Changed textures, added strength pot

This commit is contained in:
HEIEnthusiast 2023-11-27 06:25:58 -04:00
parent 0bb74f9efe
commit ac4101e70d
15 changed files with 69 additions and 7 deletions

View File

@ -7,13 +7,13 @@ ItemDef(
Buff(( Buff((
kind: Regeneration, kind: Regeneration,
data: ( data: (
strength: 2.0, strength: 1.0,
duration: Some(60), duration: Some(60),
), ),
cat_ids: [Natural], cat_ids: [Natural],
)), )),
]) ])
), ),
quality: Moderate, quality: Common,
tags: [Potion], tags: [Potion],
) )

View File

@ -0,0 +1,19 @@
ItemDef(
name: "Strength Potion",
description: "Makes you stronger.",
kind: Consumable(
kind: Drink,
effects: All([
Buff((
kind: Strength,
data: (
strength: 0.20,
duration: Some(90),
),
cat_ids: [Natural],
)),
])
),
quality: High,
tags: [Potion],
)

View File

@ -14,6 +14,6 @@ ItemDef(
)), )),
]) ])
), ),
quality: Moderate, quality: Common,
tags: [Potion], tags: [Potion],
) )

View File

@ -52,13 +52,22 @@
"potion_regeneration": ( "potion_regeneration": (
output: ("common.items.consumable.potion_regeneration", 1), output: ("common.items.consumable.potion_regeneration", 1),
inputs: [ inputs: [
(Item("common.items.crafting_ing.empty_vial"), 1, false),
(Item("common.items.consumable.potion_minor"), 1, false), (Item("common.items.consumable.potion_minor"), 1, false),
(Item("common.items.crafting_ing.sentient_seed"), 1, false), (Item("common.items.crafting_ing.sentient_seed"), 1, false),
(Item("common.items.crafting_ing.animal_misc.viscous_ooze"), 1, false), (Item("common.items.crafting_ing.animal_misc.viscous_ooze"), 1, false),
], ],
craft_sprite: Some(Cauldron), craft_sprite: Some(Cauldron),
), ),
"potion_strength": (
output: ("common.items.consumable.potion_strength", 1),
inputs: [
(Item("common.items.crafting_ing.empty_vial"), 1, false),
(Item("common.items.mineral.ore.velorite"), 2, false),
(Item("common.items.crafting_ing.animal_misc.grim_eyeball"), 2, false),
(Item("common.items.crafting_ing.animal_misc.viscous_ooze"), 1, false),
],
craft_sprite: Some(Cauldron),
),
"potion_s": ( "potion_s": (
output: ("common.items.consumable.potion_minor", 1), output: ("common.items.consumable.potion_minor", 1),
inputs: [ inputs: [

View File

@ -13,6 +13,12 @@ buff-stat-swift =
Increases movement speed, Increases movement speed,
and increases damage taken, and increases damage taken,
by { $strength }% by { $strength }%
## Strength
buff-title-strength = Strength
buff-desc-strength = You deal more damage
buff-stat-strength =
Increases damage dealt by you
by { $strength }%
## Saturation ## Saturation
buff-title-saturation = Saturation buff-title-saturation = Saturation
buff-desc-saturation = Gain health over time from consumables. buff-desc-saturation = Gain health over time from consumables.

View File

@ -3205,10 +3205,14 @@
), ),
Simple("common.items.consumable.potion_swiftness"): VoxTrans( Simple("common.items.consumable.potion_swiftness"): VoxTrans(
"voxel.object.potion_swiftness", "voxel.object.potion_swiftness",
(0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.7, (0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.5,
), ),
Simple("common.items.consumable.potion_regeneration"): VoxTrans( Simple("common.items.consumable.potion_regeneration"): VoxTrans(
"voxel.object.potion_regeneration", "voxel.object.potion_regeneration",
(0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.5,
),
Simple("common.items.consumable.potion_strength"): VoxTrans(
"voxel.object.potion_strength",
(0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.7, (0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.7,
), ),
Simple("common.items.charms.burning_charm"): VoxTrans( Simple("common.items.charms.burning_charm"): VoxTrans(

View File

@ -812,6 +812,7 @@
Simple("common.items.consumable.potion_burning"): "voxel.object.potion_burning", Simple("common.items.consumable.potion_burning"): "voxel.object.potion_burning",
Simple("common.items.consumable.potion_swiftness"): "voxel.object.potion_swiftness", Simple("common.items.consumable.potion_swiftness"): "voxel.object.potion_swiftness",
Simple("common.items.consumable.potion_regeneration"): "voxel.object.potion_regeneration", Simple("common.items.consumable.potion_regeneration"): "voxel.object.potion_regeneration",
Simple("common.items.consumable.potion_strength"): "voxel.object.potion_strength",
Simple("common.items.charms.burning_charm"): "voxel.object.burning_charm", Simple("common.items.charms.burning_charm"): "voxel.object.burning_charm",
Simple("common.items.charms.frozen_charm"): "voxel.object.frozen_charm", Simple("common.items.charms.frozen_charm"): "voxel.object.frozen_charm",
Simple("common.items.charms.lifesteal_charm"): "voxel.object.lifesteal_charm", Simple("common.items.charms.lifesteal_charm"): "voxel.object.lifesteal_charm",

Binary file not shown.

BIN
assets/voxygen/voxel/object/potion_strength.vox (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

View File

@ -157,6 +157,7 @@ lazy_static! {
BuffKind::Potion => "potion", BuffKind::Potion => "potion",
BuffKind::Swiftness => "swiftness", BuffKind::Swiftness => "swiftness",
BuffKind::CampfireHeal => "campfire_heal", BuffKind::CampfireHeal => "campfire_heal",
BuffKind::Strength => "strength",
BuffKind::EnergyRegen => "energy_regen", BuffKind::EnergyRegen => "energy_regen",
BuffKind::IncreaseMaxEnergy => "increase_max_energy", BuffKind::IncreaseMaxEnergy => "increase_max_energy",
BuffKind::IncreaseMaxHealth => "increase_max_health", BuffKind::IncreaseMaxHealth => "increase_max_health",

View File

@ -41,6 +41,10 @@ pub enum BuffKind {
/// Movement speed and vulnerability to damage increase linearly with strength, /// Movement speed and vulnerability to damage increase linearly with strength,
/// 1.0 is an 100% increase for both. /// 1.0 is an 100% increase for both.
Swiftness, Swiftness,
/// Increases attack damage.
/// Attack damage scales linearly with strength
/// 1.0 is an 100% increase of attack damage
Strength,
/// Applied when sitting at a campfire. /// Applied when sitting at a campfire.
/// Strength is fraction of health restored per second. /// Strength is fraction of health restored per second.
CampfireHeal, CampfireHeal,
@ -176,6 +180,7 @@ impl BuffKind {
| BuffKind::Saturation | BuffKind::Saturation
| BuffKind::Potion | BuffKind::Potion
| BuffKind::Swiftness | BuffKind::Swiftness
| BuffKind::Strength
| BuffKind::CampfireHeal | BuffKind::CampfireHeal
| BuffKind::Frenzied | BuffKind::Frenzied
| BuffKind::EnergyRegen | BuffKind::EnergyRegen
@ -267,6 +272,9 @@ impl BuffKind {
BuffEffect::DamageReduction(-data.strength), BuffEffect::DamageReduction(-data.strength),
BuffEffect::PrecisionOverride(0.0), BuffEffect::PrecisionOverride(0.0),
], ],
BuffKind::Strength => vec![
BuffEffect::AttackDamage(1.0 + data.strength),
],
BuffKind::CampfireHeal => vec![BuffEffect::HealthChangeOverTime { BuffKind::CampfireHeal => vec![BuffEffect::HealthChangeOverTime {
rate: data.strength, rate: data.strength,
kind: ModifierKind::Multiplicative, kind: ModifierKind::Multiplicative,

View File

@ -110,6 +110,7 @@ pub fn localize_chat_message(
| BuffKind::Saturation | BuffKind::Saturation
| BuffKind::Potion | BuffKind::Potion
| BuffKind::Swiftness | BuffKind::Swiftness
| BuffKind::Strength
| BuffKind::CampfireHeal | BuffKind::CampfireHeal
| BuffKind::EnergyRegen | BuffKind::EnergyRegen
| BuffKind::IncreaseMaxEnergy | BuffKind::IncreaseMaxEnergy

View File

@ -5160,7 +5160,9 @@ pub fn get_buff_image(buff: BuffKind, imgs: &Imgs) -> conrod_core::image::Id {
BuffKind::Regeneration => imgs.buff_plus_0, BuffKind::Regeneration => imgs.buff_plus_0,
BuffKind::Saturation => imgs.buff_saturation_0, BuffKind::Saturation => imgs.buff_saturation_0,
BuffKind::Potion => imgs.buff_potion_0, BuffKind::Potion => imgs.buff_potion_0,
// TODO: Need unique image for Swiftness and Strength
BuffKind::Swiftness => imgs.buff_plus_0, BuffKind::Swiftness => imgs.buff_plus_0,
BuffKind::Strength => imgs.buff_plus_0,
BuffKind::CampfireHeal => imgs.buff_campfire_heal_0, BuffKind::CampfireHeal => imgs.buff_campfire_heal_0,
BuffKind::EnergyRegen => imgs.buff_energyplus_0, BuffKind::EnergyRegen => imgs.buff_energyplus_0,
BuffKind::IncreaseMaxEnergy => imgs.buff_energyplus_0, BuffKind::IncreaseMaxEnergy => imgs.buff_energyplus_0,
@ -5204,6 +5206,7 @@ pub fn get_buff_title(buff: BuffKind, localized_strings: &Localization) -> Cow<s
BuffKind::Saturation => localized_strings.get_msg("buff-title-saturation"), BuffKind::Saturation => localized_strings.get_msg("buff-title-saturation"),
BuffKind::Potion => localized_strings.get_msg("buff-title-potion"), BuffKind::Potion => localized_strings.get_msg("buff-title-potion"),
BuffKind::Swiftness => localized_strings.get_msg("buff-title-swift"), BuffKind::Swiftness => localized_strings.get_msg("buff-title-swift"),
BuffKind::Strength => localized_strings.get_msg("buff-title-strength"),
BuffKind::CampfireHeal => localized_strings.get_msg("buff-title-campfire_heal"), BuffKind::CampfireHeal => localized_strings.get_msg("buff-title-campfire_heal"),
BuffKind::EnergyRegen => localized_strings.get_msg("buff-title-energy_regen"), BuffKind::EnergyRegen => localized_strings.get_msg("buff-title-energy_regen"),
BuffKind::IncreaseMaxHealth => localized_strings.get_msg("buff-title-increase_max_health"), BuffKind::IncreaseMaxHealth => localized_strings.get_msg("buff-title-increase_max_health"),
@ -5246,6 +5249,7 @@ pub fn get_buff_desc(buff: BuffKind, data: BuffData, localized_strings: &Localiz
BuffKind::Saturation => localized_strings.get_msg("buff-desc-saturation"), BuffKind::Saturation => localized_strings.get_msg("buff-desc-saturation"),
BuffKind::Potion => localized_strings.get_msg("buff-desc-potion"), BuffKind::Potion => localized_strings.get_msg("buff-desc-potion"),
BuffKind::Swiftness => localized_strings.get_msg("buff-desc-swift"), BuffKind::Swiftness => localized_strings.get_msg("buff-desc-swift"),
BuffKind::Strength => localized_strings.get_msg("buff-desc-strength"),
BuffKind::CampfireHeal => { BuffKind::CampfireHeal => {
localized_strings.get_msg_ctx("buff-desc-campfire_heal", &i18n::fluent_args! { localized_strings.get_msg_ctx("buff-desc-campfire_heal", &i18n::fluent_args! {
"rate" => data.strength * 100.0 "rate" => data.strength * 100.0

View File

@ -194,6 +194,11 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec<String> {
"strength" => format_float(strength * 100.0), "strength" => format_float(strength * 100.0),
}) })
}, },
BuffKind::Strength => {
i18n.get_msg_ctx("buff-stat-strength", &i18n::fluent_args! {
"strength" => format_float(strength * 100.0),
})
},
BuffKind::Invulnerability => i18n.get_msg("buff-stat-invulnerability"), BuffKind::Invulnerability => i18n.get_msg("buff-stat-invulnerability"),
BuffKind::Bleeding BuffKind::Bleeding
| BuffKind::Burning | BuffKind::Burning
@ -235,6 +240,7 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec<String> {
}) })
}, },
BuffKind::IncreaseMaxEnergy BuffKind::IncreaseMaxEnergy
| BuffKind::Strength
| BuffKind::Swiftness | BuffKind::Swiftness
| BuffKind::IncreaseMaxHealth | BuffKind::IncreaseMaxHealth
| BuffKind::Invulnerability | BuffKind::Invulnerability