From 0bb74f9efe7e52c01b39723fd3a64bb4797ccd09 Mon Sep 17 00:00:00 2001 From: HEIEnthusiast Date: Sun, 26 Nov 2023 10:54:02 -0400 Subject: [PATCH 01/20] Added swiftness and regeneration potions --- .../items/consumable/potion_regeneration.ron | 19 +++++++++++++++++++ .../items/consumable/potion_swiftness.ron | 19 +++++++++++++++++++ assets/common/recipe_book.ron | 19 +++++++++++++++++++ assets/voxygen/i18n/en/buff.ftl | 8 ++++++++ assets/voxygen/item_image_manifest.ron | 8 ++++++++ assets/voxygen/voxel/item_drop_manifest.ron | 2 ++ .../voxel/object/potion_regeneration.vox | 3 +++ .../voxygen/voxel/object/potion_swiftness.vox | 3 +++ common/src/cmd.rs | 1 + common/src/comp/buff.rs | 10 ++++++++++ voxygen/i18n-helpers/src/lib.rs | 1 + voxygen/src/hud/mod.rs | 3 +++ voxygen/src/hud/util.rs | 6 ++++++ 13 files changed, 102 insertions(+) create mode 100644 assets/common/items/consumable/potion_regeneration.ron create mode 100644 assets/common/items/consumable/potion_swiftness.ron create mode 100644 assets/voxygen/voxel/object/potion_regeneration.vox create mode 100644 assets/voxygen/voxel/object/potion_swiftness.vox diff --git a/assets/common/items/consumable/potion_regeneration.ron b/assets/common/items/consumable/potion_regeneration.ron new file mode 100644 index 0000000000..4874c4320e --- /dev/null +++ b/assets/common/items/consumable/potion_regeneration.ron @@ -0,0 +1,19 @@ +ItemDef( + name: "Regeneration Potion", + description: "You must have lost an arm and a leg to need this.", + kind: Consumable( + kind: Drink, + effects: All([ + Buff(( + kind: Regeneration, + data: ( + strength: 2.0, + duration: Some(60), + ), + cat_ids: [Natural], + )), + ]) + ), + quality: Moderate, + tags: [Potion], +) \ No newline at end of file diff --git a/assets/common/items/consumable/potion_swiftness.ron b/assets/common/items/consumable/potion_swiftness.ron new file mode 100644 index 0000000000..c111d2021e --- /dev/null +++ b/assets/common/items/consumable/potion_swiftness.ron @@ -0,0 +1,19 @@ +ItemDef( + name: "Swiftness Potion", + description: "Makes you go faster.", + kind: Consumable( + kind: Drink, + effects: All([ + Buff(( + kind: Swiftness, + data: ( + strength: 0.25, + duration: Some(300), + ), + cat_ids: [Natural], + )), + ]) + ), + quality: Moderate, + tags: [Potion], +) diff --git a/assets/common/recipe_book.ron b/assets/common/recipe_book.ron index 701913e9aa..7795efde78 100644 --- a/assets/common/recipe_book.ron +++ b/assets/common/recipe_book.ron @@ -40,6 +40,25 @@ ], craft_sprite: Some(Cauldron), ), + "potion_swiftness": ( + output: ("common.items.consumable.potion_swiftness", 1), + inputs: [ + (Item("common.items.crafting_ing.empty_vial"), 1, false), + (Item("common.items.crafting_ing.honey"), 3, false), + (Item("common.items.crafting_ing.animal_misc.viscous_ooze"), 1, false), + ], + craft_sprite: Some(Cauldron), + ), + "potion_regeneration": ( + output: ("common.items.consumable.potion_regeneration", 1), + inputs: [ + (Item("common.items.crafting_ing.empty_vial"), 1, false), + (Item("common.items.consumable.potion_minor"), 1, false), + (Item("common.items.crafting_ing.sentient_seed"), 1, false), + (Item("common.items.crafting_ing.animal_misc.viscous_ooze"), 1, false), + ], + craft_sprite: Some(Cauldron), + ), "potion_s": ( output: ("common.items.consumable.potion_minor", 1), inputs: [ diff --git a/assets/voxygen/i18n/en/buff.ftl b/assets/voxygen/i18n/en/buff.ftl index 49f74d0989..8b27b04e94 100644 --- a/assets/voxygen/i18n/en/buff.ftl +++ b/assets/voxygen/i18n/en/buff.ftl @@ -5,6 +5,14 @@ buff-stat-health = Restores { $str_total } Health ## Potion buff-title-potion = Potion buff-desc-potion = Drinking... +## Swiftness +buff-title-swift = Swiftness +buff-desc-swift = Your movement is faster, but you're more vulnerable to damage and can't get critical hits. +buff-stat-swift = + Removes chance of getting critical hits. + Increases movement speed, + and increases damage taken, + by { $strength }% ## Saturation buff-title-saturation = Saturation buff-desc-saturation = Gain health over time from consumables. diff --git a/assets/voxygen/item_image_manifest.ron b/assets/voxygen/item_image_manifest.ron index 2bb9671c4b..2406a06880 100644 --- a/assets/voxygen/item_image_manifest.ron +++ b/assets/voxygen/item_image_manifest.ron @@ -3203,6 +3203,14 @@ "voxel.object.potion_burning", (0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.7, ), + Simple("common.items.consumable.potion_swiftness"): VoxTrans( + "voxel.object.potion_swiftness", + (0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.7, + ), + Simple("common.items.consumable.potion_regeneration"): VoxTrans( + "voxel.object.potion_regeneration", + (0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.7, + ), Simple("common.items.charms.burning_charm"): VoxTrans( "voxel.object.burning_charm", (0.0, 0.0, 0.0), (-80.0, 15.0, 15.0), 1.0, diff --git a/assets/voxygen/voxel/item_drop_manifest.ron b/assets/voxygen/voxel/item_drop_manifest.ron index 9f05d84d7f..df329b13b1 100644 --- a/assets/voxygen/voxel/item_drop_manifest.ron +++ b/assets/voxygen/voxel/item_drop_manifest.ron @@ -810,6 +810,8 @@ Simple("common.items.consumable.potion_big"): "voxel.object.potion_red", Simple("common.items.consumable.curious_potion"): "voxel.object.curious_potion", 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_regeneration"): "voxel.object.potion_regeneration", Simple("common.items.charms.burning_charm"): "voxel.object.burning_charm", Simple("common.items.charms.frozen_charm"): "voxel.object.frozen_charm", Simple("common.items.charms.lifesteal_charm"): "voxel.object.lifesteal_charm", diff --git a/assets/voxygen/voxel/object/potion_regeneration.vox b/assets/voxygen/voxel/object/potion_regeneration.vox new file mode 100644 index 0000000000..32bc7a9049 --- /dev/null +++ b/assets/voxygen/voxel/object/potion_regeneration.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c42d6187fdad39cae6fc80e32b972cd510a7d4b1251c833ec35e4c055333d02 +size 26190 diff --git a/assets/voxygen/voxel/object/potion_swiftness.vox b/assets/voxygen/voxel/object/potion_swiftness.vox new file mode 100644 index 0000000000..0dd3935eee --- /dev/null +++ b/assets/voxygen/voxel/object/potion_swiftness.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9538a8d053f8ce43c7c531d1f721b1096a3ee11a500c6e165feac723fad43605 +size 26190 diff --git a/common/src/cmd.rs b/common/src/cmd.rs index 8a4093c0c5..6b9ad12deb 100644 --- a/common/src/cmd.rs +++ b/common/src/cmd.rs @@ -155,6 +155,7 @@ lazy_static! { BuffKind::Bleeding => "bleeding", BuffKind::Cursed => "cursed", BuffKind::Potion => "potion", + BuffKind::Swiftness => "swiftness", BuffKind::CampfireHeal => "campfire_heal", BuffKind::EnergyRegen => "energy_regen", BuffKind::IncreaseMaxEnergy => "increase_max_energy", diff --git a/common/src/comp/buff.rs b/common/src/comp/buff.rs index aac831abfb..2f2e711ac2 100644 --- a/common/src/comp/buff.rs +++ b/common/src/comp/buff.rs @@ -37,6 +37,10 @@ pub enum BuffKind { /// Applied when drinking a potion. /// Strength should be the healing per second. Potion, + /// Increases movement speed and vulnerability to damage and removes chance to get critical hits. + /// Movement speed and vulnerability to damage increase linearly with strength, + /// 1.0 is an 100% increase for both. + Swiftness, /// Applied when sitting at a campfire. /// Strength is fraction of health restored per second. CampfireHeal, @@ -171,6 +175,7 @@ impl BuffKind { BuffKind::Regeneration | BuffKind::Saturation | BuffKind::Potion + | BuffKind::Swiftness | BuffKind::CampfireHeal | BuffKind::Frenzied | BuffKind::EnergyRegen @@ -257,6 +262,11 @@ impl BuffKind { tick_dur: Secs(0.1), }] }, + BuffKind::Swiftness => vec![ + BuffEffect::MovementSpeed(1.0 + data.strength), + BuffEffect::DamageReduction(-data.strength), + BuffEffect::PrecisionOverride(0.0), + ], BuffKind::CampfireHeal => vec![BuffEffect::HealthChangeOverTime { rate: data.strength, kind: ModifierKind::Multiplicative, diff --git a/voxygen/i18n-helpers/src/lib.rs b/voxygen/i18n-helpers/src/lib.rs index b4196b644f..b2689d18dc 100644 --- a/voxygen/i18n-helpers/src/lib.rs +++ b/voxygen/i18n-helpers/src/lib.rs @@ -109,6 +109,7 @@ pub fn localize_chat_message( BuffKind::Regeneration | BuffKind::Saturation | BuffKind::Potion + | BuffKind::Swiftness | BuffKind::CampfireHeal | BuffKind::EnergyRegen | BuffKind::IncreaseMaxEnergy diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 559f84fc06..9d4c7249e1 100755 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -5160,6 +5160,7 @@ pub fn get_buff_image(buff: BuffKind, imgs: &Imgs) -> conrod_core::image::Id { BuffKind::Regeneration => imgs.buff_plus_0, BuffKind::Saturation => imgs.buff_saturation_0, BuffKind::Potion => imgs.buff_potion_0, + BuffKind::Swiftness => imgs.buff_plus_0, BuffKind::CampfireHeal => imgs.buff_campfire_heal_0, BuffKind::EnergyRegen => imgs.buff_energyplus_0, BuffKind::IncreaseMaxEnergy => imgs.buff_energyplus_0, @@ -5202,6 +5203,7 @@ pub fn get_buff_title(buff: BuffKind, localized_strings: &Localization) -> Cow localized_strings.get_msg("buff-title-heal"), BuffKind::Saturation => localized_strings.get_msg("buff-title-saturation"), BuffKind::Potion => localized_strings.get_msg("buff-title-potion"), + BuffKind::Swiftness => localized_strings.get_msg("buff-title-swift"), BuffKind::CampfireHeal => localized_strings.get_msg("buff-title-campfire_heal"), BuffKind::EnergyRegen => localized_strings.get_msg("buff-title-energy_regen"), BuffKind::IncreaseMaxHealth => localized_strings.get_msg("buff-title-increase_max_health"), @@ -5243,6 +5245,7 @@ pub fn get_buff_desc(buff: BuffKind, data: BuffData, localized_strings: &Localiz BuffKind::Regeneration => localized_strings.get_msg("buff-desc-heal"), BuffKind::Saturation => localized_strings.get_msg("buff-desc-saturation"), BuffKind::Potion => localized_strings.get_msg("buff-desc-potion"), + BuffKind::Swiftness => localized_strings.get_msg("buff-desc-swift"), BuffKind::CampfireHeal => { localized_strings.get_msg_ctx("buff-desc-campfire_heal", &i18n::fluent_args! { "rate" => data.strength * 100.0 diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index 133a20b632..76478e9792 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -189,6 +189,11 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec { "strength" => format_float(strength * 100.0), }) }, + BuffKind::Swiftness => { + i18n.get_msg_ctx("buff-stat-swift", &i18n::fluent_args! { + "strength" => format_float(strength * 100.0), + }) + }, BuffKind::Invulnerability => i18n.get_msg("buff-stat-invulnerability"), BuffKind::Bleeding | BuffKind::Burning @@ -230,6 +235,7 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec { }) }, BuffKind::IncreaseMaxEnergy + | BuffKind::Swiftness | BuffKind::IncreaseMaxHealth | BuffKind::Invulnerability | BuffKind::PotionSickness From ac4101e70d6cc963f727a749e4264f2310774de5 Mon Sep 17 00:00:00 2001 From: HEIEnthusiast Date: Mon, 27 Nov 2023 06:25:58 -0400 Subject: [PATCH 02/20] Changed textures, added strength pot --- .../items/consumable/potion_regeneration.ron | 4 ++-- .../items/consumable/potion_strength.ron | 19 +++++++++++++++++++ .../items/consumable/potion_swiftness.ron | 2 +- assets/common/recipe_book.ron | 11 ++++++++++- assets/voxygen/i18n/en/buff.ftl | 6 ++++++ assets/voxygen/item_image_manifest.ron | 6 +++++- assets/voxygen/voxel/item_drop_manifest.ron | 1 + .../voxel/object/potion_regeneration.vox | 2 +- .../voxygen/voxel/object/potion_strength.vox | 3 +++ .../voxygen/voxel/object/potion_swiftness.vox | 2 +- common/src/cmd.rs | 1 + common/src/comp/buff.rs | 8 ++++++++ voxygen/i18n-helpers/src/lib.rs | 1 + voxygen/src/hud/mod.rs | 4 ++++ voxygen/src/hud/util.rs | 6 ++++++ 15 files changed, 69 insertions(+), 7 deletions(-) create mode 100644 assets/common/items/consumable/potion_strength.ron create mode 100644 assets/voxygen/voxel/object/potion_strength.vox diff --git a/assets/common/items/consumable/potion_regeneration.ron b/assets/common/items/consumable/potion_regeneration.ron index 4874c4320e..756cf3aaff 100644 --- a/assets/common/items/consumable/potion_regeneration.ron +++ b/assets/common/items/consumable/potion_regeneration.ron @@ -7,13 +7,13 @@ ItemDef( Buff(( kind: Regeneration, data: ( - strength: 2.0, + strength: 1.0, duration: Some(60), ), cat_ids: [Natural], )), ]) ), - quality: Moderate, + quality: Common, tags: [Potion], ) \ No newline at end of file diff --git a/assets/common/items/consumable/potion_strength.ron b/assets/common/items/consumable/potion_strength.ron new file mode 100644 index 0000000000..7bacf4966c --- /dev/null +++ b/assets/common/items/consumable/potion_strength.ron @@ -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], +) diff --git a/assets/common/items/consumable/potion_swiftness.ron b/assets/common/items/consumable/potion_swiftness.ron index c111d2021e..01bf9eec2d 100644 --- a/assets/common/items/consumable/potion_swiftness.ron +++ b/assets/common/items/consumable/potion_swiftness.ron @@ -14,6 +14,6 @@ ItemDef( )), ]) ), - quality: Moderate, + quality: Common, tags: [Potion], ) diff --git a/assets/common/recipe_book.ron b/assets/common/recipe_book.ron index 7795efde78..764e000152 100644 --- a/assets/common/recipe_book.ron +++ b/assets/common/recipe_book.ron @@ -52,13 +52,22 @@ "potion_regeneration": ( output: ("common.items.consumable.potion_regeneration", 1), inputs: [ - (Item("common.items.crafting_ing.empty_vial"), 1, false), (Item("common.items.consumable.potion_minor"), 1, false), (Item("common.items.crafting_ing.sentient_seed"), 1, false), (Item("common.items.crafting_ing.animal_misc.viscous_ooze"), 1, false), ], 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": ( output: ("common.items.consumable.potion_minor", 1), inputs: [ diff --git a/assets/voxygen/i18n/en/buff.ftl b/assets/voxygen/i18n/en/buff.ftl index 8b27b04e94..90cc12f20c 100644 --- a/assets/voxygen/i18n/en/buff.ftl +++ b/assets/voxygen/i18n/en/buff.ftl @@ -13,6 +13,12 @@ buff-stat-swift = Increases movement speed, and increases damage taken, 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 buff-title-saturation = Saturation buff-desc-saturation = Gain health over time from consumables. diff --git a/assets/voxygen/item_image_manifest.ron b/assets/voxygen/item_image_manifest.ron index 2406a06880..f501d282cd 100644 --- a/assets/voxygen/item_image_manifest.ron +++ b/assets/voxygen/item_image_manifest.ron @@ -3205,10 +3205,14 @@ ), Simple("common.items.consumable.potion_swiftness"): VoxTrans( "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( "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, ), Simple("common.items.charms.burning_charm"): VoxTrans( diff --git a/assets/voxygen/voxel/item_drop_manifest.ron b/assets/voxygen/voxel/item_drop_manifest.ron index df329b13b1..d45d751095 100644 --- a/assets/voxygen/voxel/item_drop_manifest.ron +++ b/assets/voxygen/voxel/item_drop_manifest.ron @@ -812,6 +812,7 @@ 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_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.frozen_charm"): "voxel.object.frozen_charm", Simple("common.items.charms.lifesteal_charm"): "voxel.object.lifesteal_charm", diff --git a/assets/voxygen/voxel/object/potion_regeneration.vox b/assets/voxygen/voxel/object/potion_regeneration.vox index 32bc7a9049..f2c91f438a 100644 --- a/assets/voxygen/voxel/object/potion_regeneration.vox +++ b/assets/voxygen/voxel/object/potion_regeneration.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6c42d6187fdad39cae6fc80e32b972cd510a7d4b1251c833ec35e4c055333d02 +oid sha256:900dd8a88123118e5183bc5d84af9bb4dee88887fa3dadcfc01a72e5355d8fbb size 26190 diff --git a/assets/voxygen/voxel/object/potion_strength.vox b/assets/voxygen/voxel/object/potion_strength.vox new file mode 100644 index 0000000000..70e0edb71c --- /dev/null +++ b/assets/voxygen/voxel/object/potion_strength.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67b4ed5a23a8130941d3c548fcc7a3b03e92f018de3ae64b825595a18b14aea7 +size 26190 diff --git a/assets/voxygen/voxel/object/potion_swiftness.vox b/assets/voxygen/voxel/object/potion_swiftness.vox index 0dd3935eee..268383079f 100644 --- a/assets/voxygen/voxel/object/potion_swiftness.vox +++ b/assets/voxygen/voxel/object/potion_swiftness.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9538a8d053f8ce43c7c531d1f721b1096a3ee11a500c6e165feac723fad43605 +oid sha256:8470f7899fea70d3babd29605c8cc327c09c8bf31742ff09f99cb63279ba1eea size 26190 diff --git a/common/src/cmd.rs b/common/src/cmd.rs index 6b9ad12deb..743926eb2d 100644 --- a/common/src/cmd.rs +++ b/common/src/cmd.rs @@ -157,6 +157,7 @@ lazy_static! { BuffKind::Potion => "potion", BuffKind::Swiftness => "swiftness", BuffKind::CampfireHeal => "campfire_heal", + BuffKind::Strength => "strength", BuffKind::EnergyRegen => "energy_regen", BuffKind::IncreaseMaxEnergy => "increase_max_energy", BuffKind::IncreaseMaxHealth => "increase_max_health", diff --git a/common/src/comp/buff.rs b/common/src/comp/buff.rs index 2f2e711ac2..626e0849f0 100644 --- a/common/src/comp/buff.rs +++ b/common/src/comp/buff.rs @@ -41,6 +41,10 @@ pub enum BuffKind { /// Movement speed and vulnerability to damage increase linearly with strength, /// 1.0 is an 100% increase for both. 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. /// Strength is fraction of health restored per second. CampfireHeal, @@ -176,6 +180,7 @@ impl BuffKind { | BuffKind::Saturation | BuffKind::Potion | BuffKind::Swiftness + | BuffKind::Strength | BuffKind::CampfireHeal | BuffKind::Frenzied | BuffKind::EnergyRegen @@ -267,6 +272,9 @@ impl BuffKind { BuffEffect::DamageReduction(-data.strength), BuffEffect::PrecisionOverride(0.0), ], + BuffKind::Strength => vec![ + BuffEffect::AttackDamage(1.0 + data.strength), + ], BuffKind::CampfireHeal => vec![BuffEffect::HealthChangeOverTime { rate: data.strength, kind: ModifierKind::Multiplicative, diff --git a/voxygen/i18n-helpers/src/lib.rs b/voxygen/i18n-helpers/src/lib.rs index b2689d18dc..b7a9c7e422 100644 --- a/voxygen/i18n-helpers/src/lib.rs +++ b/voxygen/i18n-helpers/src/lib.rs @@ -110,6 +110,7 @@ pub fn localize_chat_message( | BuffKind::Saturation | BuffKind::Potion | BuffKind::Swiftness + | BuffKind::Strength | BuffKind::CampfireHeal | BuffKind::EnergyRegen | BuffKind::IncreaseMaxEnergy diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 9d4c7249e1..637c589536 100755 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -5160,7 +5160,9 @@ pub fn get_buff_image(buff: BuffKind, imgs: &Imgs) -> conrod_core::image::Id { BuffKind::Regeneration => imgs.buff_plus_0, BuffKind::Saturation => imgs.buff_saturation_0, BuffKind::Potion => imgs.buff_potion_0, + // TODO: Need unique image for Swiftness and Strength BuffKind::Swiftness => imgs.buff_plus_0, + BuffKind::Strength => imgs.buff_plus_0, BuffKind::CampfireHeal => imgs.buff_campfire_heal_0, BuffKind::EnergyRegen => 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 localized_strings.get_msg("buff-title-saturation"), BuffKind::Potion => localized_strings.get_msg("buff-title-potion"), 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::EnergyRegen => localized_strings.get_msg("buff-title-energy_regen"), 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::Potion => localized_strings.get_msg("buff-desc-potion"), BuffKind::Swiftness => localized_strings.get_msg("buff-desc-swift"), + BuffKind::Strength => localized_strings.get_msg("buff-desc-strength"), BuffKind::CampfireHeal => { localized_strings.get_msg_ctx("buff-desc-campfire_heal", &i18n::fluent_args! { "rate" => data.strength * 100.0 diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index 76478e9792..dad8fd1b91 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -194,6 +194,11 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec { "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::Bleeding | BuffKind::Burning @@ -235,6 +240,7 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec { }) }, BuffKind::IncreaseMaxEnergy + | BuffKind::Strength | BuffKind::Swiftness | BuffKind::IncreaseMaxHealth | BuffKind::Invulnerability From 4d87a9ab44093ac5649362c97b6dc8b2523a3ef2 Mon Sep 17 00:00:00 2001 From: HEIEnthusiast Date: Mon, 27 Nov 2023 06:57:42 -0400 Subject: [PATCH 03/20] General potion modifications --- assets/common/items/consumable/potion_strength.ron | 6 +++--- assets/common/items/consumable/potion_swiftness.ron | 2 +- assets/common/recipe_book.ron | 5 ++--- assets/voxygen/i18n/en/buff.ftl | 5 ++--- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/assets/common/items/consumable/potion_strength.ron b/assets/common/items/consumable/potion_strength.ron index 7bacf4966c..1b6fc9fe32 100644 --- a/assets/common/items/consumable/potion_strength.ron +++ b/assets/common/items/consumable/potion_strength.ron @@ -7,13 +7,13 @@ ItemDef( Buff(( kind: Strength, data: ( - strength: 0.20, - duration: Some(90), + strength: 0.15, + duration: Some(45), ), cat_ids: [Natural], )), ]) ), - quality: High, + quality: Moderate, tags: [Potion], ) diff --git a/assets/common/items/consumable/potion_swiftness.ron b/assets/common/items/consumable/potion_swiftness.ron index 01bf9eec2d..00a6aff367 100644 --- a/assets/common/items/consumable/potion_swiftness.ron +++ b/assets/common/items/consumable/potion_swiftness.ron @@ -8,7 +8,7 @@ ItemDef( kind: Swiftness, data: ( strength: 0.25, - duration: Some(300), + duration: Some(240), ), cat_ids: [Natural], )), diff --git a/assets/common/recipe_book.ron b/assets/common/recipe_book.ron index 764e000152..a06602ad92 100644 --- a/assets/common/recipe_book.ron +++ b/assets/common/recipe_book.ron @@ -54,7 +54,6 @@ inputs: [ (Item("common.items.consumable.potion_minor"), 1, false), (Item("common.items.crafting_ing.sentient_seed"), 1, false), - (Item("common.items.crafting_ing.animal_misc.viscous_ooze"), 1, false), ], craft_sprite: Some(Cauldron), ), @@ -62,8 +61,8 @@ 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.mineral.ore.velorite"), 1, false), + (Item("common.items.crafting_ing.animal_misc.grim_eyeball"), 1, false), (Item("common.items.crafting_ing.animal_misc.viscous_ooze"), 1, false), ], craft_sprite: Some(Cauldron), diff --git a/assets/voxygen/i18n/en/buff.ftl b/assets/voxygen/i18n/en/buff.ftl index 90cc12f20c..ebfb051b8c 100644 --- a/assets/voxygen/i18n/en/buff.ftl +++ b/assets/voxygen/i18n/en/buff.ftl @@ -10,9 +10,8 @@ buff-title-swift = Swiftness buff-desc-swift = Your movement is faster, but you're more vulnerable to damage and can't get critical hits. buff-stat-swift = Removes chance of getting critical hits. - Increases movement speed, - and increases damage taken, - by { $strength }% + Increases movement speed, + and damage taken, by { $strength }% ## Strength buff-title-strength = Strength buff-desc-strength = You deal more damage From bf5acdc3bad194694fced3de4f321634620d164b Mon Sep 17 00:00:00 2001 From: Py bit Date: Mon, 27 Nov 2023 11:07:46 +0000 Subject: [PATCH 04/20] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a7f2c5520..5707f5b15b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Strength, swiftness, and regeneration, potions - Esperanto translation - Item quantity sort in player inventory. - Using Block('Alt' by default) in Defensive Stance now feels stronger From 0074be2339f8e3e9c6d190d87c76bfd24d246131 Mon Sep 17 00:00:00 2001 From: Py bit Date: Mon, 27 Nov 2023 11:39:30 +0000 Subject: [PATCH 05/20] Update buff.rs --- common/src/comp/buff.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/src/comp/buff.rs b/common/src/comp/buff.rs index 626e0849f0..f1da69c35b 100644 --- a/common/src/comp/buff.rs +++ b/common/src/comp/buff.rs @@ -272,9 +272,7 @@ impl BuffKind { BuffEffect::DamageReduction(-data.strength), BuffEffect::PrecisionOverride(0.0), ], - BuffKind::Strength => vec![ - BuffEffect::AttackDamage(1.0 + data.strength), - ], + BuffKind::Strength => vec![BuffEffect::AttackDamage(1.0 + data.strength)], BuffKind::CampfireHeal => vec![BuffEffect::HealthChangeOverTime { rate: data.strength, kind: ModifierKind::Multiplicative, From 16b873590b52a9fd13f5215bde95e9640eacb33d Mon Sep 17 00:00:00 2001 From: Py bit Date: Mon, 27 Nov 2023 12:02:54 +0000 Subject: [PATCH 06/20] Update buff.rs --- common/src/comp/buff.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/common/src/comp/buff.rs b/common/src/comp/buff.rs index f1da69c35b..ccdb223a07 100644 --- a/common/src/comp/buff.rs +++ b/common/src/comp/buff.rs @@ -35,14 +35,17 @@ pub enum BuffKind { /// Strength should be the healing per second. Saturation, /// Applied when drinking a potion. - /// Strength should be the healing per second. - Potion, + /// Strength should be the healing per second. + Potion, /// Increases movement speed and vulnerability to damage and removes chance to get critical hits. /// Movement speed and vulnerability to damage increase linearly with strength, /// 1.0 is an 100% increase for both. + /// Increases movement speed and vulnerability to damage and removes chance + /// to get critical hits. Movement speed and vulnerability to damage + /// increase linearly with strength, 1.0 is an 100% increase for both. Swiftness, /// Increases attack damage. - /// Attack damage scales linearly with strength + /// Attack damage scales linearly with strength /// 1.0 is an 100% increase of attack damage Strength, /// Applied when sitting at a campfire. From e0de63dbf82101ef16feea79a0d6eb412aaf4606 Mon Sep 17 00:00:00 2001 From: Py bit Date: Mon, 27 Nov 2023 12:25:23 +0000 Subject: [PATCH 07/20] Update buff.rs --- common/src/comp/buff.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/common/src/comp/buff.rs b/common/src/comp/buff.rs index ccdb223a07..e8f775d2ca 100644 --- a/common/src/comp/buff.rs +++ b/common/src/comp/buff.rs @@ -35,17 +35,14 @@ pub enum BuffKind { /// Strength should be the healing per second. Saturation, /// Applied when drinking a potion. - /// Strength should be the healing per second. - Potion, - /// Increases movement speed and vulnerability to damage and removes chance to get critical hits. - /// Movement speed and vulnerability to damage increase linearly with strength, - /// 1.0 is an 100% increase for both. + /// Strength should be the healing per second. + Potion, /// Increases movement speed and vulnerability to damage and removes chance /// to get critical hits. Movement speed and vulnerability to damage /// increase linearly with strength, 1.0 is an 100% increase for both. Swiftness, /// Increases attack damage. - /// Attack damage scales linearly with strength + /// Attack damage scales linearly with strength /// 1.0 is an 100% increase of attack damage Strength, /// Applied when sitting at a campfire. From bb2adfb2e500314b51eb293bd8470e3dea74f1af Mon Sep 17 00:00:00 2001 From: HEIEnthusiast Date: Mon, 27 Nov 2023 15:16:44 -0400 Subject: [PATCH 08/20] Removed strength and regeneration potions --- .../items/consumable/potion_regeneration.ron | 19 ------------------- .../items/consumable/potion_strength.ron | 19 ------------------- assets/common/recipe_book.ron | 18 ------------------ assets/voxygen/item_image_manifest.ron | 8 -------- assets/voxygen/voxel/item_drop_manifest.ron | 2 -- .../voxel/object/potion_regeneration.vox | 3 --- .../voxygen/voxel/object/potion_strength.vox | 3 --- common/src/cmd.rs | 1 - common/src/comp/buff.rs | 6 ------ voxygen/i18n-helpers/src/lib.rs | 1 - voxygen/src/hud/mod.rs | 3 --- voxygen/src/hud/util.rs | 6 ------ 12 files changed, 89 deletions(-) delete mode 100644 assets/common/items/consumable/potion_regeneration.ron delete mode 100644 assets/common/items/consumable/potion_strength.ron delete mode 100644 assets/voxygen/voxel/object/potion_regeneration.vox delete mode 100644 assets/voxygen/voxel/object/potion_strength.vox diff --git a/assets/common/items/consumable/potion_regeneration.ron b/assets/common/items/consumable/potion_regeneration.ron deleted file mode 100644 index 756cf3aaff..0000000000 --- a/assets/common/items/consumable/potion_regeneration.ron +++ /dev/null @@ -1,19 +0,0 @@ -ItemDef( - name: "Regeneration Potion", - description: "You must have lost an arm and a leg to need this.", - kind: Consumable( - kind: Drink, - effects: All([ - Buff(( - kind: Regeneration, - data: ( - strength: 1.0, - duration: Some(60), - ), - cat_ids: [Natural], - )), - ]) - ), - quality: Common, - tags: [Potion], -) \ No newline at end of file diff --git a/assets/common/items/consumable/potion_strength.ron b/assets/common/items/consumable/potion_strength.ron deleted file mode 100644 index 1b6fc9fe32..0000000000 --- a/assets/common/items/consumable/potion_strength.ron +++ /dev/null @@ -1,19 +0,0 @@ -ItemDef( - name: "Strength Potion", - description: "Makes you stronger.", - kind: Consumable( - kind: Drink, - effects: All([ - Buff(( - kind: Strength, - data: ( - strength: 0.15, - duration: Some(45), - ), - cat_ids: [Natural], - )), - ]) - ), - quality: Moderate, - tags: [Potion], -) diff --git a/assets/common/recipe_book.ron b/assets/common/recipe_book.ron index a06602ad92..62c5485a90 100644 --- a/assets/common/recipe_book.ron +++ b/assets/common/recipe_book.ron @@ -49,24 +49,6 @@ ], craft_sprite: Some(Cauldron), ), - "potion_regeneration": ( - output: ("common.items.consumable.potion_regeneration", 1), - inputs: [ - (Item("common.items.consumable.potion_minor"), 1, false), - (Item("common.items.crafting_ing.sentient_seed"), 1, false), - ], - 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"), 1, false), - (Item("common.items.crafting_ing.animal_misc.grim_eyeball"), 1, false), - (Item("common.items.crafting_ing.animal_misc.viscous_ooze"), 1, false), - ], - craft_sprite: Some(Cauldron), - ), "potion_s": ( output: ("common.items.consumable.potion_minor", 1), inputs: [ diff --git a/assets/voxygen/item_image_manifest.ron b/assets/voxygen/item_image_manifest.ron index f501d282cd..8a02fe3920 100644 --- a/assets/voxygen/item_image_manifest.ron +++ b/assets/voxygen/item_image_manifest.ron @@ -3207,14 +3207,6 @@ "voxel.object.potion_swiftness", (0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.5, ), - Simple("common.items.consumable.potion_regeneration"): VoxTrans( - "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, - ), Simple("common.items.charms.burning_charm"): VoxTrans( "voxel.object.burning_charm", (0.0, 0.0, 0.0), (-80.0, 15.0, 15.0), 1.0, diff --git a/assets/voxygen/voxel/item_drop_manifest.ron b/assets/voxygen/voxel/item_drop_manifest.ron index d45d751095..77bbd9b5a8 100644 --- a/assets/voxygen/voxel/item_drop_manifest.ron +++ b/assets/voxygen/voxel/item_drop_manifest.ron @@ -811,8 +811,6 @@ Simple("common.items.consumable.curious_potion"): "voxel.object.curious_potion", 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_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.frozen_charm"): "voxel.object.frozen_charm", Simple("common.items.charms.lifesteal_charm"): "voxel.object.lifesteal_charm", diff --git a/assets/voxygen/voxel/object/potion_regeneration.vox b/assets/voxygen/voxel/object/potion_regeneration.vox deleted file mode 100644 index f2c91f438a..0000000000 --- a/assets/voxygen/voxel/object/potion_regeneration.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:900dd8a88123118e5183bc5d84af9bb4dee88887fa3dadcfc01a72e5355d8fbb -size 26190 diff --git a/assets/voxygen/voxel/object/potion_strength.vox b/assets/voxygen/voxel/object/potion_strength.vox deleted file mode 100644 index 70e0edb71c..0000000000 --- a/assets/voxygen/voxel/object/potion_strength.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:67b4ed5a23a8130941d3c548fcc7a3b03e92f018de3ae64b825595a18b14aea7 -size 26190 diff --git a/common/src/cmd.rs b/common/src/cmd.rs index f4250d94d2..46146f1d9b 100644 --- a/common/src/cmd.rs +++ b/common/src/cmd.rs @@ -157,7 +157,6 @@ lazy_static! { BuffKind::Potion => "potion", BuffKind::Swiftness => "swiftness", BuffKind::CampfireHeal => "campfire_heal", - BuffKind::Strength => "strength", BuffKind::EnergyRegen => "energy_regen", BuffKind::IncreaseMaxEnergy => "increase_max_energy", BuffKind::IncreaseMaxHealth => "increase_max_health", diff --git a/common/src/comp/buff.rs b/common/src/comp/buff.rs index e8f775d2ca..c272c47de8 100644 --- a/common/src/comp/buff.rs +++ b/common/src/comp/buff.rs @@ -41,10 +41,6 @@ pub enum BuffKind { /// to get critical hits. Movement speed and vulnerability to damage /// increase linearly with strength, 1.0 is an 100% increase for both. 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. /// Strength is fraction of health restored per second. CampfireHeal, @@ -180,7 +176,6 @@ impl BuffKind { | BuffKind::Saturation | BuffKind::Potion | BuffKind::Swiftness - | BuffKind::Strength | BuffKind::CampfireHeal | BuffKind::Frenzied | BuffKind::EnergyRegen @@ -272,7 +267,6 @@ impl BuffKind { BuffEffect::DamageReduction(-data.strength), BuffEffect::PrecisionOverride(0.0), ], - BuffKind::Strength => vec![BuffEffect::AttackDamage(1.0 + data.strength)], BuffKind::CampfireHeal => vec![BuffEffect::HealthChangeOverTime { rate: data.strength, kind: ModifierKind::Multiplicative, diff --git a/voxygen/i18n-helpers/src/lib.rs b/voxygen/i18n-helpers/src/lib.rs index b7a9c7e422..b2689d18dc 100644 --- a/voxygen/i18n-helpers/src/lib.rs +++ b/voxygen/i18n-helpers/src/lib.rs @@ -110,7 +110,6 @@ pub fn localize_chat_message( | BuffKind::Saturation | BuffKind::Potion | BuffKind::Swiftness - | BuffKind::Strength | BuffKind::CampfireHeal | BuffKind::EnergyRegen | BuffKind::IncreaseMaxEnergy diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 637c589536..e0ddf54e27 100755 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -5162,7 +5162,6 @@ pub fn get_buff_image(buff: BuffKind, imgs: &Imgs) -> conrod_core::image::Id { BuffKind::Potion => imgs.buff_potion_0, // TODO: Need unique image for Swiftness and Strength BuffKind::Swiftness => imgs.buff_plus_0, - BuffKind::Strength => imgs.buff_plus_0, BuffKind::CampfireHeal => imgs.buff_campfire_heal_0, BuffKind::EnergyRegen => imgs.buff_energyplus_0, BuffKind::IncreaseMaxEnergy => imgs.buff_energyplus_0, @@ -5206,7 +5205,6 @@ pub fn get_buff_title(buff: BuffKind, localized_strings: &Localization) -> Cow localized_strings.get_msg("buff-title-saturation"), BuffKind::Potion => localized_strings.get_msg("buff-title-potion"), 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::EnergyRegen => localized_strings.get_msg("buff-title-energy_regen"), BuffKind::IncreaseMaxHealth => localized_strings.get_msg("buff-title-increase_max_health"), @@ -5249,7 +5247,6 @@ pub fn get_buff_desc(buff: BuffKind, data: BuffData, localized_strings: &Localiz BuffKind::Saturation => localized_strings.get_msg("buff-desc-saturation"), BuffKind::Potion => localized_strings.get_msg("buff-desc-potion"), BuffKind::Swiftness => localized_strings.get_msg("buff-desc-swift"), - BuffKind::Strength => localized_strings.get_msg("buff-desc-strength"), BuffKind::CampfireHeal => { localized_strings.get_msg_ctx("buff-desc-campfire_heal", &i18n::fluent_args! { "rate" => data.strength * 100.0 diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index dad8fd1b91..76478e9792 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -194,11 +194,6 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec { "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::Bleeding | BuffKind::Burning @@ -240,7 +235,6 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec { }) }, BuffKind::IncreaseMaxEnergy - | BuffKind::Strength | BuffKind::Swiftness | BuffKind::IncreaseMaxHealth | BuffKind::Invulnerability From b6c67a7f41a68bde57da5c71edd60a1dc501360b Mon Sep 17 00:00:00 2001 From: HEIEnthusiast Date: Mon, 27 Nov 2023 16:15:29 -0400 Subject: [PATCH 09/20] Made handle_jump use it's own jump_modifier stat --- common/src/comp/stats.rs | 2 ++ common/src/states/utils.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common/src/comp/stats.rs b/common/src/comp/stats.rs index c30f06a981..2ed9ee0b23 100644 --- a/common/src/comp/stats.rs +++ b/common/src/comp/stats.rs @@ -58,6 +58,7 @@ pub struct Stats { pub heal_multiplier: f32, pub max_health_modifiers: StatsModifier, pub move_speed_modifier: f32, + pub jump_modifier: f32, pub attack_speed_modifier: f32, pub friction_modifier: f32, pub max_energy_modifiers: StatsModifier, @@ -85,6 +86,7 @@ impl Stats { heal_multiplier: 1.0, max_health_modifiers: StatsModifier::default(), move_speed_modifier: 1.0, + jump_modifier: 1.0, attack_speed_modifier: 1.0, friction_modifier: 1.0, max_energy_modifiers: StatsModifier::default(), diff --git a/common/src/states/utils.rs b/common/src/states/utils.rs index bc08c65388..fefe896ea7 100644 --- a/common/src/states/utils.rs +++ b/common/src/states/utils.rs @@ -1190,7 +1190,7 @@ pub fn handle_jump( data.entity, strength * impulse / data.mass.0 * data.scale.map_or(1.0, |s| s.0.powf(13.0).powf(0.25)) - * data.stats.move_speed_modifier, + * data.stats.jump_modifier, )); }) .is_some() From 568d12cdd02dbd075f5b4db1eb35bf3e3838e509 Mon Sep 17 00:00:00 2001 From: HEIEnthusiast Date: Tue, 28 Nov 2023 10:03:07 -0400 Subject: [PATCH 10/20] Swiftness potion changes --- .../common/items/consumable/potion_swiftness.ron | 16 ++++++++++++---- assets/common/recipe_book.ron | 3 ++- assets/voxygen/i18n/en/buff.ftl | 15 ++++----------- common/src/comp/buff.rs | 10 +++++++--- common/src/comp/stats.rs | 2 ++ common/systems/src/buff.rs | 5 +++++ 6 files changed, 32 insertions(+), 19 deletions(-) diff --git a/assets/common/items/consumable/potion_swiftness.ron b/assets/common/items/consumable/potion_swiftness.ron index 00a6aff367..597af012fe 100644 --- a/assets/common/items/consumable/potion_swiftness.ron +++ b/assets/common/items/consumable/potion_swiftness.ron @@ -1,19 +1,27 @@ ItemDef( name: "Swiftness Potion", - description: "Makes you go faster.", + description: "Drinking gives a sudden, short burst of speed.", kind: Consumable( kind: Drink, effects: All([ Buff(( kind: Swiftness, data: ( - strength: 0.25, - duration: Some(240), + strength: 1.2, + duration: Some(10), + ), + cat_ids: [Natural], + )), + Buff(( + kind: PotionSickness, + data: ( + strength: 0.33, + duration: Some(45), ), cat_ids: [Natural], )), ]) ), - quality: Common, + quality: Moderate, tags: [Potion], ) diff --git a/assets/common/recipe_book.ron b/assets/common/recipe_book.ron index 62c5485a90..15abe9a8f8 100644 --- a/assets/common/recipe_book.ron +++ b/assets/common/recipe_book.ron @@ -44,7 +44,8 @@ output: ("common.items.consumable.potion_swiftness", 1), inputs: [ (Item("common.items.crafting_ing.empty_vial"), 1, false), - (Item("common.items.crafting_ing.honey"), 3, false), + (Item("common.items.crafting_ing.honey"), 2, false), + (Item("common.items.mineral.gem.topaz"), 2, false), (Item("common.items.crafting_ing.animal_misc.viscous_ooze"), 1, false), ], craft_sprite: Some(Cauldron), diff --git a/assets/voxygen/i18n/en/buff.ftl b/assets/voxygen/i18n/en/buff.ftl index ebfb051b8c..2fcb9d80a7 100644 --- a/assets/voxygen/i18n/en/buff.ftl +++ b/assets/voxygen/i18n/en/buff.ftl @@ -7,17 +7,10 @@ buff-title-potion = Potion buff-desc-potion = Drinking... ## Swiftness buff-title-swift = Swiftness -buff-desc-swift = Your movement is faster, but you're more vulnerable to damage and can't get critical hits. +buff-desc-swift = Your movement is faster, but you can't get critical hits. buff-stat-swift = Removes chance of getting critical hits. - Increases movement speed, - and damage taken, by { $strength }% -## Strength -buff-title-strength = Strength -buff-desc-strength = You deal more damage -buff-stat-strength = - Increases damage dealt by you - by { $strength }% + Increases movement speed by { $strength }% ## Saturation buff-title-saturation = Saturation buff-desc-saturation = Gain health over time from consumables. @@ -82,9 +75,9 @@ buff-title-parried = Parried buff-desc-parried = You were parried and now are slow to recover. ## Potion sickness buff-title-potionsickness = Potion sickness -buff-desc-potionsickness = Potions heal you less after recently consuming a potion. +buff-desc-potionsickness = Potions have less effect on you after recently consuming a potion. buff-stat-potionsickness = - Decreases the amount you heal from + Decreases the positive effects of subsequent potions by { $strength }%. ## Reckless buff-title-reckless = Reckless diff --git a/common/src/comp/buff.rs b/common/src/comp/buff.rs index c272c47de8..bbc6dec335 100644 --- a/common/src/comp/buff.rs +++ b/common/src/comp/buff.rs @@ -263,8 +263,7 @@ impl BuffKind { }] }, BuffKind::Swiftness => vec![ - BuffEffect::MovementSpeed(1.0 + data.strength), - BuffEffect::DamageReduction(-data.strength), + BuffEffect::MovementSpeed(1.0 + data.strength * stats.map_or(1.0, |s| s.move_speed_multiplier)), BuffEffect::PrecisionOverride(0.0), ], BuffKind::CampfireHeal => vec![BuffEffect::HealthChangeOverTime { @@ -354,7 +353,10 @@ impl BuffKind { }, ], BuffKind::Parried => vec![BuffEffect::AttackSpeed(0.5)], - BuffKind::PotionSickness => vec![BuffEffect::HealReduction(data.strength)], + BuffKind::PotionSickness => vec![ + BuffEffect::HealReduction(data.strength), + BuffEffect::MoveSpeedReduction(data.strength), + ], BuffKind::Reckless => vec![ BuffEffect::DamageReduction(-data.strength), BuffEffect::AttackDamage(1.0 + data.strength), @@ -556,6 +558,8 @@ pub enum BuffEffect { PoiseReduction(f32), /// Reduces amount healed by consumables HealReduction(f32), + /// Reduces amount of speed increase by consumables + MoveSpeedReduction(f32), /// Increases poise damage dealt when health is lost PoiseDamageFromLostHealth { initial_health: f32, diff --git a/common/src/comp/stats.rs b/common/src/comp/stats.rs index 2ed9ee0b23..7a61319d32 100644 --- a/common/src/comp/stats.rs +++ b/common/src/comp/stats.rs @@ -56,6 +56,7 @@ pub struct Stats { pub damage_reduction: f32, pub poise_reduction: f32, pub heal_multiplier: f32, + pub move_speed_multiplier: f32, pub max_health_modifiers: StatsModifier, pub move_speed_modifier: f32, pub jump_modifier: f32, @@ -84,6 +85,7 @@ impl Stats { damage_reduction: 0.0, poise_reduction: 0.0, heal_multiplier: 1.0, + move_speed_multiplier: 1.0, max_health_modifiers: StatsModifier::default(), move_speed_modifier: 1.0, jump_modifier: 1.0, diff --git a/common/systems/src/buff.rs b/common/systems/src/buff.rs index 8f890ee0c2..31c6b36d89 100644 --- a/common/systems/src/buff.rs +++ b/common/systems/src/buff.rs @@ -663,6 +663,11 @@ fn execute_effect( }, BuffEffect::HealReduction(red) => { stat.heal_multiplier *= 1.0 - *red; + print!("heal_multiplier: {}\n", stat.heal_multiplier); + }, + BuffEffect::MoveSpeedReduction(red) => { + stat.move_speed_multiplier *= 1.0 - *red; + print!("move_speed_multiplier: {}\n", stat.move_speed_multiplier); }, BuffEffect::PoiseDamageFromLostHealth { initial_health, From 5001c4a262ca08ec54421908e0adbc174ac36c00 Mon Sep 17 00:00:00 2001 From: HEIEnthusiast Date: Tue, 28 Nov 2023 11:41:29 -0400 Subject: [PATCH 11/20] Added swiftness debuffs --- assets/common/items/consumable/potion_swiftness.ron | 4 ++-- assets/voxygen/i18n/en/buff.ftl | 10 ++++++---- common/src/comp/buff.rs | 10 ++++++---- common/systems/src/buff.rs | 2 -- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/assets/common/items/consumable/potion_swiftness.ron b/assets/common/items/consumable/potion_swiftness.ron index 597af012fe..7b0c40ea1e 100644 --- a/assets/common/items/consumable/potion_swiftness.ron +++ b/assets/common/items/consumable/potion_swiftness.ron @@ -1,6 +1,6 @@ ItemDef( name: "Swiftness Potion", - description: "Drinking gives a sudden, short burst of speed.", + description: "Watch the walls!", kind: Consumable( kind: Drink, effects: All([ @@ -8,7 +8,7 @@ ItemDef( kind: Swiftness, data: ( strength: 1.2, - duration: Some(10), + duration: Some(15), ), cat_ids: [Natural], )), diff --git a/assets/voxygen/i18n/en/buff.ftl b/assets/voxygen/i18n/en/buff.ftl index 8b58777da3..ffa6bcdc8a 100644 --- a/assets/voxygen/i18n/en/buff.ftl +++ b/assets/voxygen/i18n/en/buff.ftl @@ -7,10 +7,12 @@ buff-title-potion = Potion buff-desc-potion = Drinking... ## Swiftness buff-title-swift = Swiftness -buff-desc-swift = Your movement is faster, but you can't get critical hits. +buff-desc-swift = Your movement is faster, but you deal less damage, and take more damage. buff-stat-swift = - Removes chance of getting critical hits. - Increases movement speed by { $strength }% + Increases movement speed by { $strength }%. + but decreases your damage by 100%, + and increases your damage vulnerability + by 100%. ## Saturation buff-title-saturation = Saturation buff-desc-saturation = Gain health over time from consumables. @@ -75,7 +77,7 @@ buff-title-parried = Parried buff-desc-parried = You were parried and now are slow to recover. ## Potion sickness buff-title-potionsickness = Potion sickness -buff-desc-potionsickness = Potions have less effect on you after recently consuming a potion. +buff-desc-potionsickness = Potions have less positive effect on you after recently consuming a potion. buff-stat-potionsickness = Decreases the positive effects of subsequent potions by { $strength }%. diff --git a/common/src/comp/buff.rs b/common/src/comp/buff.rs index d85310f9b1..1979452c96 100644 --- a/common/src/comp/buff.rs +++ b/common/src/comp/buff.rs @@ -37,9 +37,10 @@ pub enum BuffKind { /// Applied when drinking a potion. /// Strength should be the healing per second. Potion, - /// Increases movement speed and vulnerability to damage and removes chance - /// to get critical hits. Movement speed and vulnerability to damage - /// increase linearly with strength, 1.0 is an 100% increase for both. + /// Increases movement speed and vulnerability to damage as well as + /// decreases the amount of damage dealt. + /// Movement speed increases linearly with strength 1.0 is an 100% increase + /// Damage vulnerability and damage reduction are both hard set to 100% Swiftness, /// Applied when sitting at a campfire. /// Strength is fraction of health restored per second. @@ -271,7 +272,8 @@ impl BuffKind { }, BuffKind::Swiftness => vec![ BuffEffect::MovementSpeed(1.0 + data.strength * stats.map_or(1.0, |s| s.move_speed_multiplier)), - BuffEffect::PrecisionOverride(0.0), + BuffEffect::DamageReduction(-1.0), + BuffEffect::AttackDamage(0.0), ], BuffKind::CampfireHeal => vec![BuffEffect::HealthChangeOverTime { rate: data.strength, diff --git a/common/systems/src/buff.rs b/common/systems/src/buff.rs index 31c6b36d89..53cc332083 100644 --- a/common/systems/src/buff.rs +++ b/common/systems/src/buff.rs @@ -663,11 +663,9 @@ fn execute_effect( }, BuffEffect::HealReduction(red) => { stat.heal_multiplier *= 1.0 - *red; - print!("heal_multiplier: {}\n", stat.heal_multiplier); }, BuffEffect::MoveSpeedReduction(red) => { stat.move_speed_multiplier *= 1.0 - *red; - print!("move_speed_multiplier: {}\n", stat.move_speed_multiplier); }, BuffEffect::PoiseDamageFromLostHealth { initial_health, From a01d7485e40ab1a09389cc8896fc290eca91a415 Mon Sep 17 00:00:00 2001 From: HEIEnthusiast Date: Tue, 28 Nov 2023 11:43:12 -0400 Subject: [PATCH 12/20] Small speed tweak --- assets/common/items/consumable/potion_swiftness.ron | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/common/items/consumable/potion_swiftness.ron b/assets/common/items/consumable/potion_swiftness.ron index 7b0c40ea1e..d0b194ff30 100644 --- a/assets/common/items/consumable/potion_swiftness.ron +++ b/assets/common/items/consumable/potion_swiftness.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Swiftness, data: ( - strength: 1.2, + strength: 1.25, duration: Some(15), ), cat_ids: [Natural], From 2497c04a63cfb28e42ee80ce12d81be8a1455857 Mon Sep 17 00:00:00 2001 From: HEIEnthusiast Date: Tue, 28 Nov 2023 12:11:34 -0400 Subject: [PATCH 13/20] Code quality fix :( --- common/src/comp/buff.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/src/comp/buff.rs b/common/src/comp/buff.rs index 1979452c96..45c7c4fe62 100644 --- a/common/src/comp/buff.rs +++ b/common/src/comp/buff.rs @@ -271,7 +271,9 @@ impl BuffKind { }] }, BuffKind::Swiftness => vec![ - BuffEffect::MovementSpeed(1.0 + data.strength * stats.map_or(1.0, |s| s.move_speed_multiplier)), + BuffEffect::MovementSpeed( + 1.0 + data.strength * stats.map_or(1.0, |s| s.move_speed_multiplier) + ), BuffEffect::DamageReduction(-1.0), BuffEffect::AttackDamage(0.0), ], From 7d7937df36e86c81ba38332a1056cab671088593 Mon Sep 17 00:00:00 2001 From: HEIEnthusiast Date: Tue, 28 Nov 2023 13:42:24 -0400 Subject: [PATCH 14/20] , --- common/src/comp/buff.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/comp/buff.rs b/common/src/comp/buff.rs index 45c7c4fe62..261217b5e0 100644 --- a/common/src/comp/buff.rs +++ b/common/src/comp/buff.rs @@ -272,7 +272,7 @@ impl BuffKind { }, BuffKind::Swiftness => vec![ BuffEffect::MovementSpeed( - 1.0 + data.strength * stats.map_or(1.0, |s| s.move_speed_multiplier) + 1.0 + data.strength * stats.map_or(1.0, |s| s.move_speed_multiplier), ), BuffEffect::DamageReduction(-1.0), BuffEffect::AttackDamage(0.0), From f0d915b311cb607bbed7dd6121b8521f3cbddf76 Mon Sep 17 00:00:00 2001 From: Py bit Date: Tue, 28 Nov 2023 17:56:10 +0000 Subject: [PATCH 15/20] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f05d94d50..f57821fdd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Strength, swiftness, and regeneration, potions +- Swiftness potion - Esperanto translation - Item quantity sort in player inventory. - Using Block('Alt' by default) in Defensive Stance now feels stronger From cc013d7b775d63dd4e5471ac1314772b937f961a Mon Sep 17 00:00:00 2001 From: HEIEnthusiast Date: Wed, 29 Nov 2023 06:25:20 -0400 Subject: [PATCH 16/20] Changing values --- assets/common/items/consumable/potion_swiftness.ron | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/common/items/consumable/potion_swiftness.ron b/assets/common/items/consumable/potion_swiftness.ron index d0b194ff30..05996c2889 100644 --- a/assets/common/items/consumable/potion_swiftness.ron +++ b/assets/common/items/consumable/potion_swiftness.ron @@ -1,14 +1,14 @@ ItemDef( name: "Swiftness Potion", - description: "Watch the walls!", + description: "Makes you faster.", kind: Consumable( kind: Drink, effects: All([ Buff(( kind: Swiftness, data: ( - strength: 1.25, - duration: Some(15), + strength: 0.5, + duration: Some(30), ), cat_ids: [Natural], )), From 77d63b2d9fdd789829b2392e2372c3300923b3af Mon Sep 17 00:00:00 2001 From: HEIEnthusiast Date: Wed, 29 Nov 2023 06:30:38 -0400 Subject: [PATCH 17/20] changelog.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f05d94d50..f57821fdd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Strength, swiftness, and regeneration, potions +- Swiftness potion - Esperanto translation - Item quantity sort in player inventory. - Using Block('Alt' by default) in Defensive Stance now feels stronger From 4659a66cfeac7c91798e395722313fb54d901e8c Mon Sep 17 00:00:00 2001 From: HEIEnthusiast Date: Wed, 29 Nov 2023 06:43:46 -0400 Subject: [PATCH 18/20] Further tweaks --- assets/common/items/consumable/potion_swiftness.ron | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/common/items/consumable/potion_swiftness.ron b/assets/common/items/consumable/potion_swiftness.ron index 05996c2889..bc4908c336 100644 --- a/assets/common/items/consumable/potion_swiftness.ron +++ b/assets/common/items/consumable/potion_swiftness.ron @@ -7,8 +7,8 @@ ItemDef( Buff(( kind: Swiftness, data: ( - strength: 0.5, - duration: Some(30), + strength: 0.6, + duration: Some(20), ), cat_ids: [Natural], )), From 76b2d7d0e034f76b7dc198b0b7d361ab75fabab2 Mon Sep 17 00:00:00 2001 From: HEIEnthusiast Date: Wed, 29 Nov 2023 06:56:35 -0400 Subject: [PATCH 19/20] Recipe change --- assets/common/items/consumable/potion_swiftness.ron | 8 ++++---- assets/common/recipe_book.ron | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/assets/common/items/consumable/potion_swiftness.ron b/assets/common/items/consumable/potion_swiftness.ron index bc4908c336..8ed61cdb09 100644 --- a/assets/common/items/consumable/potion_swiftness.ron +++ b/assets/common/items/consumable/potion_swiftness.ron @@ -7,16 +7,16 @@ ItemDef( Buff(( kind: Swiftness, data: ( - strength: 0.6, - duration: Some(20), + strength: 0.55, + duration: Some(25), ), cat_ids: [Natural], )), Buff(( kind: PotionSickness, data: ( - strength: 0.33, - duration: Some(45), + strength: 0.5, + duration: Some(60), ), cat_ids: [Natural], )), diff --git a/assets/common/recipe_book.ron b/assets/common/recipe_book.ron index 15abe9a8f8..ab93d0d320 100644 --- a/assets/common/recipe_book.ron +++ b/assets/common/recipe_book.ron @@ -44,9 +44,9 @@ output: ("common.items.consumable.potion_swiftness", 1), inputs: [ (Item("common.items.crafting_ing.empty_vial"), 1, false), - (Item("common.items.crafting_ing.honey"), 2, false), - (Item("common.items.mineral.gem.topaz"), 2, false), - (Item("common.items.crafting_ing.animal_misc.viscous_ooze"), 1, false), + (Item("common.items.mineral.ore.veloritefrag"), 2, false), + (Item("common.items.crafting_ing.animal_misc.raptor_feather"), 2, false), + (Item("common.items.crafting_ing.animal_misc.viscous_ooze"), 3, false), ], craft_sprite: Some(Cauldron), ), From 53600a941dadc912bc32953a64b787c111b0eb6f Mon Sep 17 00:00:00 2001 From: Py bit Date: Wed, 29 Nov 2023 17:03:17 +0000 Subject: [PATCH 20/20] Update mod.rs --- voxygen/src/hud/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 6c785970bb..b8ed30062c 100755 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -5160,7 +5160,7 @@ pub fn get_buff_image(buff: BuffKind, imgs: &Imgs) -> conrod_core::image::Id { BuffKind::Regeneration => imgs.buff_plus_0, BuffKind::Saturation => imgs.buff_saturation_0, BuffKind::Potion => imgs.buff_potion_0, - // TODO: Need unique image for Swiftness and Strength + // TODO: Need unique image for Swiftness (uses same as regeneration atm) BuffKind::Swiftness => imgs.buff_plus_0, BuffKind::CampfireHeal => imgs.buff_campfire_heal_0, BuffKind::EnergyRegen => imgs.buff_energyplus_0,