From 09b25d4f747dd9bb72934519126619918a709f7e Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 25 Jan 2024 20:10:26 -0500 Subject: [PATCH 01/31] Initial setup --- .../common/abilities/ability_set_manifest.ron | 52 +++- assets/common/abilities/hammer/charged.ron | 26 -- assets/common/abilities/hammer/leap.ron | 21 -- .../common/abilities/hammer/singlestrike.ron | 25 -- .../common/skill_trees/skill_max_levels.ron | 13 - .../skill_trees/skill_prerequisites.ron | 23 +- .../skills_skill-groups_manifest.ron | 33 ++- .../common/skillset/preset/rank1/hammer.ron | 9 +- .../common/skillset/preset/rank2/hammer.ron | 16 +- .../common/skillset/preset/rank3/hammer.ron | 26 +- .../common/skillset/preset/rank4/hammer.ron | 33 ++- .../common/skillset/preset/rank5/hammer.ron | 38 +-- assets/server/manifests/presets.ron | 52 ++-- common/src/comp/ability.rs | 103 -------- common/src/comp/skillset/mod.rs | 2 +- common/src/comp/skillset/skills.rs | 84 ++---- server/agent/src/attack.rs | 76 +----- voxygen/src/hud/diary.rs | 245 +----------------- 18 files changed, 185 insertions(+), 692 deletions(-) delete mode 100644 assets/common/abilities/hammer/charged.ron delete mode 100644 assets/common/abilities/hammer/leap.ron delete mode 100644 assets/common/abilities/hammer/singlestrike.ron diff --git a/assets/common/abilities/ability_set_manifest.ron b/assets/common/abilities/ability_set_manifest.ron index a89a16aa2e..c1e35e2b30 100644 --- a/assets/common/abilities/ability_set_manifest.ron +++ b/assets/common/abilities/ability_set_manifest.ron @@ -193,10 +193,54 @@ ), Tool(Hammer): ( guard: Some(Simple(None, "common.abilities.hammer.basic_guard")), - primary: Simple(None, "common.abilities.hammer.singlestrike"), - secondary: Simple(None, "common.abilities.hammer.charged"), + primary: Simple(None, "common.abilities.hammer.basic_guard"), + // primary: Simple(None, "common.abilities.hammer.solid_smash"), + secondary: Simple(None, "common.abilities.hammer.basic_guard"), + // secondary: Simple(None, "common.abilities.hammer.wide_wallop"), abilities: [ - Simple(Some(Hammer(UnlockLeap)), "common.abilities.hammer.leap"), + // Simple(Hammer(ScornfulSwipe), "common.abilities.hammer.scornful_swipe"), + // Simple(Hammer(Tremor), "common.abilities.hammer.tremor"), + // Simple(Hammer(VigorousBash), "common.abilities.hammer.vigorous_bash"), + // Simple(Hammer(Retaliate), "common.abilities.hammer.retaliate"), + // Simple(Hammer(SpineCracker), "common.abilities.hammer.spine_cracker"), + // Simple(Hammer(Breach), "common.abilities.hammer.breach"), + // Contextualized( + // pseudo_id: "common.abilities.hammer.iron_tempest", + // abilities: [ + // ((dual_wielding_same_kind: true), (Hammer(IronTempest), "common.abilities.hammer.dual_iron_tempest")), + // ((), (Hammer(IronTempest), "common.abilities.hammer.iron_tempest")), + // ], + // ), + // Contextualized( + // pseudo_id: "common.abilities.hammer.upheaval", + // abilities: [ + // ((dual_wielding_same_kind: true), (Hammer(Upheaval), "common.abilities.hammer.dual_upheaval")), + // ((), (Hammer(Upheaval), "common.abilities.hammer.upheaval")), + // ], + // ), + // Simple(Hammer(Thunderclap), "common.abilities.hammer.thunderclap"), + // Simple(Hammer(SeismicShock), "common.abilities.hammer.seismic_shock"), + // Contextualized( + // pseudo_id: "common.abilities.hammer.heavy_whorl", + // abilities: [ + // ((dual_wielding_same_kind: true), (Hammer(HeavyWhorl), "common.abilities.hammer.dual_heavy_whorl")), + // ((), (Hammer(HeavyWhorl), "common.abilities.hammer.heavy_whorl")), + // ], + // ), + // Contextualized( + // pseudo_id: "common.abilities.hammer.intercept", + // abilities: [ + // ((dual_wielding_same_kind: true), (Hammer(Intercept), "common.abilities.hammer.dual_intercept")), + // ((), (Hammer(Intercept), "common.abilities.hammer.intercept")), + // ], + // ), + // Simple(Hammer(PileDriver), "common.abilities.hammer.pile_driver"), + // Simple(Hammer(LungPummel), "common.abilities.hammer.lung_pummel"), + // Simple(Hammer(HelmCrusher), "common.abilities.hammer.helm_crusher"), + // Simple(Hammer(Rampart), "common.abilities.hammer.rampart"), + // Simple(Hammer(Tenacity), "common.abilities.hammer.tenacity"), + // Simple(Hammer(Earthshaker), "common.abilities.hammer.earthshaker"), + // Simple(Hammer(Judgement), "common.abilities.hammer.judgement"), ], ), Tool(Bow): ( @@ -863,7 +907,7 @@ abilities: [], ), Custom("Golf Club"): ( - primary: Simple(None, "common.abilities.hammer.singlestrike"), + primary: Simple(None, "common.abilities.tool.golf_club.charged"), secondary: Simple(None, "common.abilities.tool.golf_club.charged"), abilities: [], ), diff --git a/assets/common/abilities/hammer/charged.ron b/assets/common/abilities/hammer/charged.ron deleted file mode 100644 index d5486f5084..0000000000 --- a/assets/common/abilities/hammer/charged.ron +++ /dev/null @@ -1,26 +0,0 @@ -ChargedMelee( - energy_cost: 1, - energy_drain: 30.0, - melee_constructor: ( - kind: Bash( - damage: 0.0, - poise: 0.0, - knockback: 5.0, - energy_regen: 0.0, - ), - scaled: Some(( - kind: Bash( - damage: 20.0, - poise: 30.0, - knockback: 20.0, - energy_regen: 0.0, - ))), - range: 3.5, - angle: 30.0, - multi_target: Some(Normal), - ), - charge_duration: 1.0, - swing_duration: 0.12, - hit_timing: 0.2, - recover_duration: 0.3, -) diff --git a/assets/common/abilities/hammer/leap.ron b/assets/common/abilities/hammer/leap.ron deleted file mode 100644 index b694dd80bf..0000000000 --- a/assets/common/abilities/hammer/leap.ron +++ /dev/null @@ -1,21 +0,0 @@ -LeapMelee( - energy_cost: 35.0, - buildup_duration: 0.1, - movement_duration: 0.6, - swing_duration: 0.15, - recover_duration: 0.2, - melee_constructor: ( - kind: Bash( - damage: 25.0, - poise: 40.0, - knockback: 25.0, - energy_regen: 0.0, - ), - range: 4.5, - angle: 360.0, - multi_target: Some(Normal), - ), - forward_leap_strength: 20.0, - vertical_leap_strength: 8.0, - specifier: None, -) diff --git a/assets/common/abilities/hammer/singlestrike.ron b/assets/common/abilities/hammer/singlestrike.ron deleted file mode 100644 index 3f93b52230..0000000000 --- a/assets/common/abilities/hammer/singlestrike.ron +++ /dev/null @@ -1,25 +0,0 @@ -ComboMeleeDeprecated( - stage_data: [( - stage: 1, - base_damage: 15.0, - damage_increase: 0.75, - base_poise_damage: 0, - poise_damage_increase: 0, - knockback: 3.5, - range: 4.5, - angle: 50.0, - base_buildup_duration: 0.2, - base_swing_duration: 0.1, - hit_timing: 0.5, - base_recover_duration: 0.45, - forward_movement: 0.0, - damage_kind: Crushing, - )], - initial_energy_gain: 5.0, - max_energy_gain: 12.5, - energy_increase: 2.5, - speed_increase: 0.1, - max_speed_increase: 0.4, - scales_from_combo: 2, - ori_modifier: 1.0, -) \ No newline at end of file diff --git a/assets/common/skill_trees/skill_max_levels.ron b/assets/common/skill_trees/skill_max_levels.ron index 1c72edf8f0..2e71d20c3c 100644 --- a/assets/common/skill_trees/skill_max_levels.ron +++ b/assets/common/skill_trees/skill_max_levels.ron @@ -1,17 +1,4 @@ ({ - Hammer(SsKnockback): 2, - Hammer(SsDamage): 3, - Hammer(SsRegen): 2, - Hammer(SsSpeed): 3, - Hammer(CDamage): 3, - Hammer(CKnockback): 3, - Hammer(CDrain): 2, - Hammer(CSpeed): 2, - Hammer(LDamage): 2, - Hammer(LCost): 2, - Hammer(LDistance): 2, - Hammer(LKnockback): 2, - Hammer(LRange): 2, Bow(ProjSpeed): 2, Bow(CDamage): 3, Bow(CRegen): 2, diff --git a/assets/common/skill_trees/skill_prerequisites.ron b/assets/common/skill_trees/skill_prerequisites.ron index fa37882494..6e909e1f5b 100644 --- a/assets/common/skill_trees/skill_prerequisites.ron +++ b/assets/common/skill_trees/skill_prerequisites.ron @@ -37,11 +37,24 @@ Axe(Keelhaul): Any({Axe(Sunder): 1, Axe(Plunder): 1}), Axe(Bulkhead): Any({Axe(Sunder): 1, Axe(Plunder): 1}), Axe(Capsize): All({Axe(Bulkhead): 1}), - Hammer(LDamage): All({Hammer(UnlockLeap): 1}), - Hammer(LCost): All({Hammer(UnlockLeap): 1}), - Hammer(LDistance): All({Hammer(UnlockLeap): 1}), - Hammer(LKnockback): All({Hammer(UnlockLeap): 1}), - Hammer(LRange): All({Hammer(UnlockLeap): 1}), + Hammer(Tremor): All({Hammer(ScornfulSwipe): 1}), + Hammer(VigorousBash): All({Hammer(ScornfulSwipe): 1}), + Hammer(Retaliate): Any({Hammer(Tremor): 1, Hammer(VigorousBash): 1}), + Hammer(SpineCracker): Any({Hammer(Tremor): 1, Hammer(VigorousBash): 1}), + Hammer(Breach): Any({Hammer(Tremor): 1, Hammer(VigorousBash): 1}), + Hammer(IronTempest): Any({Hammer(Retaliate): 1, Hammer(Breach): 1, Hammer(SpineCracker): 1, Hammer(HelmCrusher): 1, Hammer(LungPummel): 1, Hammer(PileDriver): 1}), + Hammer(Upheaval): Any({Hammer(Retaliate): 1, Hammer(Breach): 1, Hammer(SpineCracker): 1, Hammer(HelmCrusher): 1, Hammer(LungPummel): 1, Hammer(PileDriver): 1}), + Hammer(Thunderclap): Any({Hammer(IronTempest): 1, Hammer(Upheaval): 1}), + Hammer(SeismicShock): Any({Hammer(IronTempest): 1, Hammer(Upheaval): 1}), + Hammer(HeavyWhorl): All({Hammer(ScornfulSwipe): 1}), + Hammer(Intercept): All({Hammer(ScornfulSwipe): 1}), + Hammer(PileDriver): Any({Hammer(Intercept): 1, Hammer(HeavyWhorl): 1}), + Hammer(LungPummel): Any({Hammer(Intercept): 1, Hammer(HeavyWhorl): 1}), + Hammer(HelmCrusher): Any({Hammer(Intercept): 1, Hammer(HeavyWhorl): 1}), + Hammer(Rampart): Any({Hammer(Retaliate): 1, Hammer(Breach): 1, Hammer(SpineCracker): 1, Hammer(HelmCrusher): 1, Hammer(LungPummel): 1, Hammer(PileDriver): 1}), + Hammer(Tenacity): Any({Hammer(Retaliate): 1, Hammer(Breach): 1, Hammer(SpineCracker): 1, Hammer(HelmCrusher): 1, Hammer(LungPummel): 1, Hammer(PileDriver): 1}), + Hammer(Earthshaker): Any({Hammer(Tenacity): 1, Hammer(Rampart): 1}), + Hammer(Judgement): Any({Hammer(Tenacity): 1, Hammer(Rampart): 1}), Bow(SDamage): All({Bow(UnlockShotgun): 1}), Bow(SCost): All({Bow(UnlockShotgun): 1}), Bow(SArrows): All({Bow(UnlockShotgun): 1}), diff --git a/assets/common/skill_trees/skills_skill-groups_manifest.ron b/assets/common/skill_trees/skills_skill-groups_manifest.ron index 03fe33e55c..c7d613cff8 100644 --- a/assets/common/skill_trees/skills_skill-groups_manifest.ron +++ b/assets/common/skill_trees/skills_skill-groups_manifest.ron @@ -62,20 +62,25 @@ Axe(Capsize), ], Weapon(Hammer): [ - Hammer(SsKnockback), - Hammer(SsDamage), - Hammer(SsSpeed), - Hammer(SsRegen), - Hammer(CDamage), - Hammer(CKnockback), - Hammer(CDrain), - Hammer(CSpeed), - Hammer(UnlockLeap), - Hammer(LDamage), - Hammer(LCost), - Hammer(LDistance), - Hammer(LKnockback), - Hammer(LRange), + Hammer(ScornfulSwipe), + Hammer(Tremor), + Hammer(VigorousBash), + Hammer(Retaliate), + Hammer(SpineCracker), + Hammer(Breach), + Hammer(IronTempest), + Hammer(Upheaval), + Hammer(Thunderclap), + Hammer(SeismicShock), + Hammer(HeavyWhorl), + Hammer(Intercept), + Hammer(PileDriver), + Hammer(LungPummel), + Hammer(HelmCrusher), + Hammer(Rampart), + Hammer(Tenacity), + Hammer(Earthshaker), + Hammer(Judgement), ], Weapon(Bow): [ Bow(ProjSpeed), diff --git a/assets/common/skillset/preset/rank1/hammer.ron b/assets/common/skillset/preset/rank1/hammer.ron index 8bd38bc888..acfa66eeb5 100644 --- a/assets/common/skillset/preset/rank1/hammer.ron +++ b/assets/common/skillset/preset/rank1/hammer.ron @@ -1,12 +1,5 @@ ([ Group(Weapon(Hammer)), - // Single Strike, as single as you are - Skill((Hammer(SsKnockback), 1)), - Skill((Hammer(SsDamage), 1)), - - // Charged - Skill((Hammer(CDamage), 1)), - Skill((Hammer(CKnockback), 1)), - + Skill((Hammer(ScornfulSwipe), 1)), ]) diff --git a/assets/common/skillset/preset/rank2/hammer.ron b/assets/common/skillset/preset/rank2/hammer.ron index 9cb93a115e..61b397f180 100644 --- a/assets/common/skillset/preset/rank2/hammer.ron +++ b/assets/common/skillset/preset/rank2/hammer.ron @@ -1,16 +1,10 @@ ([ Group(Weapon(Hammer)), - // Single Strike, as single as you are - Skill((Hammer(SsKnockback), 1)), - Skill((Hammer(SsDamage), 2)), - Skill((Hammer(SsRegen), 1)), - Skill((Hammer(SsSpeed), 1)), - - // Charged - Skill((Hammer(CDamage), 1)), - Skill((Hammer(CKnockback), 1)), - Skill((Hammer(CDrain), 1)), - Skill((Hammer(CSpeed), 1)), + Skill((Hammer(ScornfulSwipe), 1)), + Skill((Hammer(Tremor), 1)), + Skill((Hammer(VigorousBash), 1)), + Skill((Hammer(Intercept), 1)), + Skill((Hammer(HeavyWhorl), 1)), ]) diff --git a/assets/common/skillset/preset/rank3/hammer.ron b/assets/common/skillset/preset/rank3/hammer.ron index ed4f7bb28c..f6e607cc38 100644 --- a/assets/common/skillset/preset/rank3/hammer.ron +++ b/assets/common/skillset/preset/rank3/hammer.ron @@ -1,21 +1,17 @@ ([ Group(Weapon(Hammer)), - // Single Strike, as single as you are - Skill((Hammer(SsKnockback), 2)), - Skill((Hammer(SsDamage), 2)), - Skill((Hammer(SsRegen), 1)), - Skill((Hammer(SsSpeed), 1)), + Skill((Hammer(ScornfulSwipe), 1)), - // Charged - Skill((Hammer(CDamage), 2)), - Skill((Hammer(CKnockback), 1)), - Skill((Hammer(CDrain), 1)), - Skill((Hammer(CSpeed), 1)), + Skill((Hammer(Tremor), 1)), + Skill((Hammer(VigorousBash), 1)), + Skill((Hammer(Intercept), 1)), + Skill((Hammer(HeavyWhorl), 1)), - // Leap - Skill((Hammer(UnlockLeap), 1)), - Skill((Hammer(LDamage), 1)), - Skill((Hammer(LCost), 1)), - Skill((Hammer(LDistance), 1)), + Skill((Hammer(Retaliate), 1)), + Skill((Hammer(Breach), 1)), + Skill((Hammer(SpineCracker), 1)), + Skill((Hammer(HelmCrusher), 1)), + Skill((Hammer(LungPummel), 1)), + Skill((Hammer(PileDriver), 1)), ]) diff --git a/assets/common/skillset/preset/rank4/hammer.ron b/assets/common/skillset/preset/rank4/hammer.ron index 58c318c533..6bcd87446f 100644 --- a/assets/common/skillset/preset/rank4/hammer.ron +++ b/assets/common/skillset/preset/rank4/hammer.ron @@ -1,23 +1,22 @@ ([ Group(Weapon(Hammer)), - // Single Strike, as single as you are - Skill((Hammer(SsKnockback), 2)), - Skill((Hammer(SsDamage), 2)), - Skill((Hammer(SsRegen), 2)), - Skill((Hammer(SsSpeed), 2)), + Skill((Hammer(ScornfulSwipe), 1)), - // Charged - Skill((Hammer(CDamage), 2)), - Skill((Hammer(CKnockback), 2)), - Skill((Hammer(CDrain), 2)), - Skill((Hammer(CSpeed), 2)), + Skill((Hammer(Tremor), 1)), + Skill((Hammer(VigorousBash), 1)), + Skill((Hammer(Intercept), 1)), + Skill((Hammer(HeavyWhorl), 1)), - // Leap - Skill((Hammer(UnlockLeap), 1)), - Skill((Hammer(LDamage), 1)), - Skill((Hammer(LCost), 1)), - Skill((Hammer(LDistance), 1)), - Skill((Hammer(LKnockback), 1)), - Skill((Hammer(LRange), 1)), + Skill((Hammer(Retaliate), 1)), + Skill((Hammer(Breach), 1)), + Skill((Hammer(SpineCracker), 1)), + Skill((Hammer(HelmCrusher), 1)), + Skill((Hammer(LungPummel), 1)), + Skill((Hammer(PileDriver), 1)), + + Skill((Hammer(IronTempest), 1)), + Skill((Hammer(Upheaval), 1)), + Skill((Hammer(Tenacity), 1)), + Skill((Hammer(Rampart), 1)), ]) diff --git a/assets/common/skillset/preset/rank5/hammer.ron b/assets/common/skillset/preset/rank5/hammer.ron index 4c60c85beb..0a2682af19 100644 --- a/assets/common/skillset/preset/rank5/hammer.ron +++ b/assets/common/skillset/preset/rank5/hammer.ron @@ -1,23 +1,27 @@ ([ Group(Weapon(Hammer)), - // Single Strike, as single as you are - Skill((Hammer(SsKnockback), 2)), - Skill((Hammer(SsDamage), 3)), - Skill((Hammer(SsRegen), 2)), - Skill((Hammer(SsSpeed), 3)), + Skill((Hammer(ScornfulSwipe), 1)), - // Charged - Skill((Hammer(CDamage), 3)), - Skill((Hammer(CKnockback), 3)), - Skill((Hammer(CDrain), 2)), - Skill((Hammer(CSpeed), 2)), + Skill((Hammer(Tremor), 1)), + Skill((Hammer(VigorousBash), 1)), + Skill((Hammer(Intercept), 1)), + Skill((Hammer(HeavyWhorl), 1)), - // Leap - Skill((Hammer(UnlockLeap), 1)), - Skill((Hammer(LDamage), 2)), - Skill((Hammer(LCost), 2)), - Skill((Hammer(LDistance), 2)), - Skill((Hammer(LKnockback), 2)), - Skill((Hammer(LRange), 2)), + Skill((Hammer(Retaliate), 1)), + Skill((Hammer(Breach), 1)), + Skill((Hammer(SpineCracker), 1)), + Skill((Hammer(HelmCrusher), 1)), + Skill((Hammer(LungPummel), 1)), + Skill((Hammer(PileDriver), 1)), + + Skill((Hammer(IronTempest), 1)), + Skill((Hammer(Upheaval), 1)), + Skill((Hammer(Tenacity), 1)), + Skill((Hammer(Rampart), 1)), + + Skill((Hammer(Thunderclap), 1)), + Skill((Hammer(SeismicShock), 1)), + Skill((Hammer(Judgement), 1)), + Skill((Hammer(Earthshaker), 1)), ]) diff --git a/assets/server/manifests/presets.ron b/assets/server/manifests/presets.ron index 3788c7d7da..4c2715c69b 100644 --- a/assets/server/manifests/presets.ron +++ b/assets/server/manifests/presets.ron @@ -60,23 +60,26 @@ (Axe(Capsize), 1), // Hammer (UnlockGroup(Weapon(Hammer)), 1), + (Hammer(ScornfulSwipe), 1), + (Hammer(Tremor), 1), + (Hammer(VigorousBash), 1), + (Hammer(Intercept), 1), + (Hammer(HeavyWhorl), 1), + (Hammer(Retaliate), 1), + (Hammer(Breach), 1), + (Hammer(SpineCracker), 1), + (Hammer(HelmCrusher), 1), + (Hammer(LungPummel), 1), + (Hammer(PileDriver), 1), + (Hammer(IronTempest), 1), + (Hammer(Upheaval), 1), + (Hammer(Tenacity), 1), + (Hammer(Rampart), 1), + (Hammer(Thunderclap), 1), + (Hammer(SeismicShock), 1), + (Hammer(Judgement), 1), + (Hammer(Earthshaker), 1), - (Hammer(SsKnockback), 2), - (Hammer(SsDamage), 3), - (Hammer(SsRegen), 2), - (Hammer(SsSpeed), 3), - - (Hammer(CDamage), 3), - (Hammer(CKnockback), 3), - (Hammer(CDrain), 2), - (Hammer(CSpeed), 2), - - (Hammer(UnlockLeap), 1), - (Hammer(LDamage), 2), - (Hammer(LCost), 2), - (Hammer(LDistance), 2), - (Hammer(LKnockback), 2), - (Hammer(LRange), 2), // Bow (UnlockGroup(Weapon(Bow)), 1), @@ -149,22 +152,6 @@ // Hammer (UnlockGroup(Weapon(Hammer)), 1), - (Hammer(SsKnockback), 1), - (Hammer(SsDamage), 2), - (Hammer(SsRegen), 2), - (Hammer(SsSpeed), 2), - - (Hammer(CDamage), 2), - (Hammer(CKnockback), 1), - (Hammer(CDrain), 2), - (Hammer(CSpeed), 2), - - (Hammer(UnlockLeap), 1), - (Hammer(LDamage), 2), - (Hammer(LCost), 2), - (Hammer(LDistance), 1), - (Hammer(LKnockback), 2), - (Hammer(LRange), 2), // Bow (UnlockGroup(Weapon(Bow)), 1), @@ -232,7 +219,6 @@ // Hammer (UnlockGroup(Weapon(Hammer)), 1), - (Hammer(UnlockLeap), 1), // Bow (UnlockGroup(Weapon(Bow)), 1), diff --git a/common/src/comp/ability.rs b/common/src/comp/ability.rs index 30d6b0ea7c..4a3ed1a3f6 100644 --- a/common/src/comp/ability.rs +++ b/common/src/comp/ability.rs @@ -1919,7 +1919,6 @@ impl CharacterAbility { #[must_use = "method returns new ability and doesn't mutate the original value"] pub fn adjusted_by_skills(mut self, skillset: &SkillSet, tool: Option) -> Self { match tool { - Some(ToolKind::Hammer) => self.adjusted_by_hammer_skills(skillset), Some(ToolKind::Bow) => self.adjusted_by_bow_skills(skillset), Some(ToolKind::Staff) => self.adjusted_by_staff_skills(skillset), Some(ToolKind::Sceptre) => self.adjusted_by_sceptre_skills(skillset), @@ -1950,108 +1949,6 @@ impl CharacterAbility { } } - fn adjusted_by_hammer_skills(&mut self, skillset: &SkillSet) { - #![allow(clippy::enum_glob_use)] - use skills::{HammerSkill::*, Skill::Hammer}; - - match self { - CharacterAbility::ComboMeleeDeprecated { - ref mut speed_increase, - ref mut max_speed_increase, - ref mut stage_data, - ref mut max_energy_gain, - ref mut scales_from_combo, - .. - } => { - let modifiers = SKILL_MODIFIERS.hammer_tree.single_strike; - - if let Ok(level) = skillset.skill_level(Hammer(SsKnockback)) { - *stage_data = (*stage_data) - .iter() - .map(|s| s.modify_strike(modifiers.knockback.powi(level.into()))) - .collect::>(); - } - let speed_segments = f32::from(Hammer(SsSpeed).max_level()); - let speed_level = f32::from(skillset.skill_level(Hammer(SsSpeed)).unwrap_or(0)); - *speed_increase *= speed_level / speed_segments; - *max_speed_increase *= speed_level / speed_segments; - - let energy_level = skillset.skill_level(Hammer(SsRegen)).unwrap_or(0); - - let stages = u16::try_from(stage_data.len()) - .expect("number of stages can't be more than u16"); - - *max_energy_gain *= f32::from((energy_level + 1) * stages) - / f32::from((Hammer(SsRegen).max_level() + 1) * stages); - - *scales_from_combo = skillset.skill_level(Hammer(SsDamage)).unwrap_or(0).into(); - }, - CharacterAbility::ChargedMelee { - ref mut energy_drain, - ref mut charge_duration, - ref mut melee_constructor, - .. - } => { - let modifiers = SKILL_MODIFIERS.hammer_tree.charged; - - if let Some(MeleeConstructorKind::Bash { - ref mut damage, - ref mut knockback, - .. - }) = melee_constructor.scaled.as_mut().map(|scaled| scaled.kind) - { - if let Ok(level) = skillset.skill_level(Hammer(CDamage)) { - *damage *= modifiers.scaled_damage.powi(level.into()); - } - if let Ok(level) = skillset.skill_level(Hammer(CKnockback)) { - *knockback *= modifiers.scaled_knockback.powi(level.into()); - } - } - if let Ok(level) = skillset.skill_level(Hammer(CDrain)) { - *energy_drain *= modifiers.energy_drain.powi(level.into()); - } - if let Ok(level) = skillset.skill_level(Hammer(CSpeed)) { - let charge_time = 1.0 / modifiers.charge_rate; - *charge_duration *= charge_time.powi(level.into()); - } - }, - CharacterAbility::LeapMelee { - ref mut energy_cost, - ref mut forward_leap_strength, - ref mut vertical_leap_strength, - ref mut melee_constructor, - .. - } => { - let modifiers = SKILL_MODIFIERS.hammer_tree.leap; - if let MeleeConstructorKind::Bash { - ref mut damage, - ref mut knockback, - .. - } = melee_constructor.kind - { - if let Ok(level) = skillset.skill_level(Hammer(LDamage)) { - *damage *= modifiers.base_damage.powi(level.into()); - } - if let Ok(level) = skillset.skill_level(Hammer(LKnockback)) { - *knockback *= modifiers.knockback.powi(level.into()); - } - } - if let Ok(level) = skillset.skill_level(Hammer(LCost)) { - *energy_cost *= modifiers.energy_cost.powi(level.into()); - } - if let Ok(level) = skillset.skill_level(Hammer(LDistance)) { - let strength = modifiers.leap_strength; - *forward_leap_strength *= strength.powi(level.into()); - *vertical_leap_strength *= strength.powi(level.into()); - } - if let Ok(level) = skillset.skill_level(Hammer(LRange)) { - melee_constructor.range += modifiers.range * f32::from(level); - } - }, - _ => {}, - } - } - fn adjusted_by_bow_skills(&mut self, skillset: &SkillSet) { #![allow(clippy::enum_glob_use)] use skills::{BowSkill::*, Skill::Bow}; diff --git a/common/src/comp/skillset/mod.rs b/common/src/comp/skillset/mod.rs index e52e5736e5..2fff17d0b5 100644 --- a/common/src/comp/skillset/mod.rs +++ b/common/src/comp/skillset/mod.rs @@ -135,7 +135,7 @@ impl SkillGroupKind { pub fn skill_point_cost(self, level: u16) -> u32 { use std::f32::consts::E; match self { - Self::Weapon(ToolKind::Sword | ToolKind::Axe) => { + Self::Weapon(ToolKind::Sword | ToolKind::Axe | ToolKind::Hammer) => { let level = level as f32; ((400.0 * (level / (level + 20.0)).powi(2) + 5.0 * E.powf(0.025 * level)) .min(u32::MAX as f32) as u32) diff --git a/common/src/comp/skillset/skills.rs b/common/src/comp/skillset/skills.rs index 6179cb25de..3e91c24495 100644 --- a/common/src/comp/skillset/skills.rs +++ b/common/src/comp/skillset/skills.rs @@ -80,23 +80,25 @@ pub enum AxeSkill { #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, Serialize, Deserialize, Ord, PartialOrd)] pub enum HammerSkill { - // Single strike upgrades - SsKnockback, - SsDamage, - SsSpeed, - SsRegen, - // Charged melee upgrades - CDamage, - CKnockback, - CDrain, - CSpeed, - // Leap upgrades - UnlockLeap, - LDamage, - LCost, - LDistance, - LKnockback, - LRange, + ScornfulSwipe, + Tremor, + VigorousBash, + Retaliate, + SpineCracker, + Breach, + IronTempest, + Upheaval, + Thunderclap, + SeismicShock, + HeavyWhorl, + Intercept, + PileDriver, + LungPummel, + HelmCrusher, + Rampart, + Tenacity, + Earthshaker, + Judgement, } #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, Serialize, Deserialize, Ord, PartialOrd)] @@ -211,7 +213,6 @@ impl Skill { pub const SKILL_MODIFIERS: SkillTreeModifiers = SkillTreeModifiers::get(); pub struct SkillTreeModifiers { - pub hammer_tree: HammerTreeModifiers, pub bow_tree: BowTreeModifiers, pub staff_tree: StaffTreeModifiers, pub sceptre_tree: SceptreTreeModifiers, @@ -222,7 +223,6 @@ pub struct SkillTreeModifiers { impl SkillTreeModifiers { const fn get() -> Self { Self { - hammer_tree: HammerTreeModifiers::get(), bow_tree: BowTreeModifiers::get(), staff_tree: StaffTreeModifiers::get(), sceptre_tree: SceptreTreeModifiers::get(), @@ -232,52 +232,6 @@ impl SkillTreeModifiers { } } -pub struct HammerTreeModifiers { - pub single_strike: HammerStrikeModifiers, - pub charged: HammerChargedModifers, - pub leap: HammerLeapModifiers, -} - -pub struct HammerStrikeModifiers { - pub knockback: f32, -} - -pub struct HammerChargedModifers { - pub scaled_damage: f32, - pub scaled_knockback: f32, - pub energy_drain: f32, - pub charge_rate: f32, -} - -pub struct HammerLeapModifiers { - pub base_damage: f32, - pub knockback: f32, - pub energy_cost: f32, - pub leap_strength: f32, - pub range: f32, -} - -impl HammerTreeModifiers { - const fn get() -> Self { - Self { - single_strike: HammerStrikeModifiers { knockback: 1.25 }, - charged: HammerChargedModifers { - scaled_damage: 1.1, - scaled_knockback: 1.15, - energy_drain: 0.95, - charge_rate: 1.1, - }, - leap: HammerLeapModifiers { - base_damage: 1.15, - knockback: 1.15, - energy_cost: 0.85, - leap_strength: 1.05, - range: 0.25, - }, - } - } -} - pub struct BowTreeModifiers { pub universal: BowUniversalModifiers, pub charged: BowChargedModifiers, diff --git a/server/agent/src/attack.rs b/server/agent/src/attack.rs index bac81bf2f2..54c58619ac 100644 --- a/server/agent/src/attack.rs +++ b/server/agent/src/attack.rs @@ -278,74 +278,7 @@ impl<'a> AgentData<'a> { read_data: &ReadData, rng: &mut impl Rng, ) { - enum ActionStateTimers { - TimerHandleHammerAttack = 0, - } - let has_leap = || { - self.skill_set - .has_skill(Skill::Hammer(HammerSkill::UnlockLeap)) - }; - - let has_energy = |need| self.energy.current() > need; - - let use_leap = |controller: &mut Controller| { - controller.push_basic_input(InputKind::Ability(0)); - }; - - if attack_data.in_min_range() && attack_data.angle < 45.0 { - controller.inputs.move_dir = Vec2::zero(); - if agent.combat_state.timers[ActionStateTimers::TimerHandleHammerAttack as usize] > 4.0 - { - controller.push_cancel_input(InputKind::Secondary); - agent.combat_state.timers[ActionStateTimers::TimerHandleHammerAttack as usize] = - 0.0; - } else if agent.combat_state.timers[ActionStateTimers::TimerHandleHammerAttack as usize] - > 3.0 - { - controller.push_basic_input(InputKind::Secondary); - agent.combat_state.timers[ActionStateTimers::TimerHandleHammerAttack as usize] += - read_data.dt.0; - } else if has_leap() && has_energy(50.0) && rng.gen_bool(0.9) { - use_leap(controller); - agent.combat_state.timers[ActionStateTimers::TimerHandleHammerAttack as usize] += - read_data.dt.0; - } else { - controller.push_basic_input(InputKind::Primary); - agent.combat_state.timers[ActionStateTimers::TimerHandleHammerAttack as usize] += - read_data.dt.0; - } - } else { - self.path_toward_target( - agent, - controller, - tgt_data.pos.0, - read_data, - Path::Separate, - None, - ); - - if attack_data.dist_sqrd < 32.0f32.powi(2) - && has_leap() - && has_energy(50.0) - && entities_have_line_of_sight( - self.pos, - self.body, - self.scale, - tgt_data.pos, - tgt_data.body, - tgt_data.scale, - read_data, - ) - { - use_leap(controller); - } - if self.body.map(|b| b.is_humanoid()).unwrap_or(false) - && attack_data.dist_sqrd < 16.0f32.powi(2) - && rng.gen::() < 0.02 - { - controller.push_basic_input(InputKind::Roll); - } - } + // TODO } pub fn handle_sword_attack( @@ -4609,10 +4542,6 @@ impl<'a> AgentData<'a> { enum ActionStateTimers { TimerHandleHammerAttack = 0, } - let has_leap = || { - self.skill_set - .has_skill(Skill::Hammer(HammerSkill::UnlockLeap)) - }; let has_energy = |need| self.energy.current() > need; @@ -4633,7 +4562,7 @@ impl<'a> AgentData<'a> { controller.push_basic_input(InputKind::Secondary); agent.combat_state.timers[ActionStateTimers::TimerHandleHammerAttack as usize] += read_data.dt.0; - } else if has_leap() && has_energy(50.0) && rng.gen_bool(0.9) { + } else if has_energy(50.0) && rng.gen_bool(0.9) { use_leap(controller); agent.combat_state.timers[ActionStateTimers::TimerHandleHammerAttack as usize] += read_data.dt.0; @@ -4653,7 +4582,6 @@ impl<'a> AgentData<'a> { ); if attack_data.dist_sqrd < 32.0f32.powi(2) - && has_leap() && has_energy(50.0) && entities_have_line_of_sight( self.pos, diff --git a/voxygen/src/hud/diary.rs b/voxygen/src/hud/diary.rs index ace15e5707..65ed34b19b 100644 --- a/voxygen/src/hud/diary.rs +++ b/voxygen/src/hud/diary.rs @@ -86,23 +86,6 @@ widget_ids! { skill_lock_imgs[], sword_bg, axe_bg, - hammer_render, - skill_hammer_combo_0, - skill_hammer_combo_1, - skill_hammer_combo_2, - skill_hammer_combo_3, - skill_hammer_combo_4, - skill_hammer_charged_0, - skill_hammer_charged_1, - skill_hammer_charged_2, - skill_hammer_charged_3, - skill_hammer_charged_4, - skill_hammer_leap_0, - skill_hammer_leap_1, - skill_hammer_leap_2, - skill_hammer_leap_3, - skill_hammer_leap_4, - skill_hammer_leap_5, bow_render, skill_bow_charged_0, skill_bow_charged_1, @@ -1809,154 +1792,12 @@ impl<'a> Diary<'a> { ui: &mut UiCell, mut events: Vec, ) -> Vec { - // Title text - let tree_title = &self.localized_strings.get_msg("common-weapons-hammer"); + // use skills::HammerSkill::*; + // let skill_buttons = &[ + // ]; - Text::new(tree_title) - .mid_top_with_margin_on(state.ids.content_align, 2.0) - .font_id(self.fonts.cyri.conrod_id) - .font_size(self.fonts.cyri.scale(34)) - .color(TEXT_COLOR) - .set(state.ids.tree_title_txt, ui); - - // Number of skills per rectangle per weapon, start counting at 0 - // Maximum of 9 skills/8 indices - let skills_top_l = 5; - let skills_top_r = 5; - let skills_bot_l = 6; - let skills_bot_r = 0; - - self.setup_state_for_skill_icons( - state, - ui, - skills_top_l, - skills_top_r, - skills_bot_l, - skills_bot_r, - ); - - // Skill icons and buttons - use skills::HammerSkill::*; - // Hammer - Image::new(animate_by_pulse( - &self - .item_imgs - .img_ids_or_not_found_img(ItemKey::Simple("example_hammer".to_string())), - self.pulse, - )) - .wh(ART_SIZE) - .middle_of(state.ids.content_align) - .color(Some(Color::Rgba(1.0, 1.0, 1.0, 1.0))) - .set(state.ids.hammer_render, ui); - use PositionSpecifier::MidTopWithMarginOn; - let skill_buttons = &[ - // Top Left skills - // 5 1 6 - // 3 0 4 - // 8 2 7 - SkillIcon::Descriptive { - title: "hud-skill-hmr_single_strike_title", - desc: "hud-skill-hmr_single_strike", - image: self.imgs.twohhammer_m1, - position: MidTopWithMarginOn(state.ids.skills_top_l[0], 3.0), - id: state.ids.skill_hammer_combo_0, - }, - SkillIcon::Unlockable { - skill: Skill::Hammer(SsKnockback), - image: self.imgs.physical_knockback_skill, - position: MidTopWithMarginOn(state.ids.skills_top_l[1], 3.0), - id: state.ids.skill_hammer_combo_1, - }, - SkillIcon::Unlockable { - skill: Skill::Hammer(SsDamage), - image: self.imgs.physical_damage_skill, - position: MidTopWithMarginOn(state.ids.skills_top_l[2], 3.0), - id: state.ids.skill_hammer_combo_2, - }, - SkillIcon::Unlockable { - skill: Skill::Hammer(SsSpeed), - image: self.imgs.physical_speed_skill, - position: MidTopWithMarginOn(state.ids.skills_top_l[3], 3.0), - id: state.ids.skill_hammer_combo_3, - }, - SkillIcon::Unlockable { - skill: Skill::Hammer(SsRegen), - image: self.imgs.physical_energy_regen_skill, - position: MidTopWithMarginOn(state.ids.skills_top_l[4], 3.0), - id: state.ids.skill_hammer_combo_4, - }, - // Top right skills - SkillIcon::Descriptive { - title: "hud-skill-hmr_charged_melee_title", - desc: "hud-skill-hmr_charged_melee", - image: self.imgs.hammergolf, - position: MidTopWithMarginOn(state.ids.skills_top_r[0], 3.0), - id: state.ids.skill_hammer_charged_0, - }, - SkillIcon::Unlockable { - skill: Skill::Hammer(CKnockback), - image: self.imgs.physical_knockback_skill, - position: MidTopWithMarginOn(state.ids.skills_top_r[1], 3.0), - id: state.ids.skill_hammer_charged_1, - }, - SkillIcon::Unlockable { - skill: Skill::Hammer(CDamage), - image: self.imgs.physical_damage_skill, - position: MidTopWithMarginOn(state.ids.skills_top_r[2], 3.0), - id: state.ids.skill_hammer_charged_2, - }, - SkillIcon::Unlockable { - skill: Skill::Hammer(CDrain), - image: self.imgs.physical_energy_drain_skill, - position: MidTopWithMarginOn(state.ids.skills_top_r[3], 3.0), - id: state.ids.skill_hammer_charged_3, - }, - SkillIcon::Unlockable { - skill: Skill::Hammer(CSpeed), - image: self.imgs.physical_amount_skill, - position: MidTopWithMarginOn(state.ids.skills_top_r[4], 3.0), - id: state.ids.skill_hammer_charged_4, - }, - // Bottom left skills - SkillIcon::Unlockable { - skill: Skill::Hammer(UnlockLeap), - image: self.imgs.hammerleap, - position: MidTopWithMarginOn(state.ids.skills_bot_l[0], 3.0), - id: state.ids.skill_hammer_leap_0, - }, - SkillIcon::Unlockable { - skill: Skill::Hammer(LDamage), - image: self.imgs.physical_damage_skill, - position: MidTopWithMarginOn(state.ids.skills_bot_l[1], 3.0), - id: state.ids.skill_hammer_leap_1, - }, - SkillIcon::Unlockable { - skill: Skill::Hammer(LKnockback), - image: self.imgs.physical_knockback_skill, - position: MidTopWithMarginOn(state.ids.skills_bot_l[2], 3.0), - id: state.ids.skill_hammer_leap_2, - }, - SkillIcon::Unlockable { - skill: Skill::Hammer(LCost), - image: self.imgs.physical_cost_skill, - position: MidTopWithMarginOn(state.ids.skills_bot_l[3], 3.0), - id: state.ids.skill_hammer_leap_3, - }, - SkillIcon::Unlockable { - skill: Skill::Hammer(LDistance), - image: self.imgs.physical_distance_skill, - position: MidTopWithMarginOn(state.ids.skills_bot_l[4], 3.0), - id: state.ids.skill_hammer_leap_4, - }, - SkillIcon::Unlockable { - skill: Skill::Hammer(LRange), - image: self.imgs.physical_radius_skill, - position: MidTopWithMarginOn(state.ids.skills_bot_l[5], 3.0), - id: state.ids.skill_hammer_leap_5, - }, - ]; - - self.handle_skill_buttons(skill_buttons, ui, &mut events, diary_tooltip, state); + // self.handle_skill_buttons(skill_buttons, ui, &mut events, diary_tooltip, + // state); events } @@ -2812,7 +2653,6 @@ fn skill_strings(skill: Skill) -> SkillStrings<'static> { // general tree Skill::UnlockGroup(s) => unlock_skill_strings(s), // weapon trees - Skill::Hammer(s) => hammer_skill_strings(s), Skill::Bow(s) => bow_skill_strings(s), Skill::Staff(s) => staff_skill_strings(s), Skill::Sceptre(s) => sceptre_skill_strings(s), @@ -2865,81 +2705,6 @@ fn unlock_skill_strings(group: SkillGroupKind) -> SkillStrings<'static> { } } -fn hammer_skill_strings(skill: HammerSkill) -> SkillStrings<'static> { - let modifiers = SKILL_MODIFIERS.hammer_tree; - // Single strike upgrades - match skill { - HammerSkill::SsKnockback => SkillStrings::with_mult( - "hud-skill-hmr_single_strike_knockback_title", - "hud-skill-hmr_single_strike_knockback", - modifiers.single_strike.knockback, - ), - HammerSkill::SsDamage => SkillStrings::plain( - "hud-skill-hmr_single_strike_damage_title", - "hud-skill-hmr_single_strike_damage", - ), - HammerSkill::SsSpeed => SkillStrings::plain( - "hud-skill-hmr_single_strike_speed_title", - "hud-skill-hmr_single_strike_speed", - ), - HammerSkill::SsRegen => SkillStrings::plain( - "hud-skill-hmr_single_strike_regen_title", - "hud-skill-hmr_single_strike_regen", - ), - // Charged melee upgrades - HammerSkill::CDamage => SkillStrings::with_mult( - "hud-skill-hmr_charged_melee_damage_title", - "hud-skill-hmr_charged_melee_damage", - modifiers.charged.scaled_damage, - ), - HammerSkill::CKnockback => SkillStrings::with_mult( - "hud-skill-hmr_charged_melee_knockback_title", - "hud-skill-hmr_charged_melee_knockback", - modifiers.charged.scaled_knockback, - ), - HammerSkill::CDrain => SkillStrings::with_mult( - "hud-skill-hmr_charged_melee_nrg_drain_title", - "hud-skill-hmr_charged_melee_nrg_drain", - modifiers.charged.energy_drain, - ), - HammerSkill::CSpeed => SkillStrings::with_mult( - "hud-skill-hmr_charged_rate_title", - "hud-skill-hmr_charged_rate", - modifiers.charged.charge_rate, - ), - // Leap upgrades - HammerSkill::UnlockLeap => SkillStrings::plain( - "hud-skill-hmr_unlock_leap_title", - "hud-skill-hmr_unlock_leap", - ), - HammerSkill::LDamage => SkillStrings::with_mult( - "hud-skill-hmr_leap_damage_title", - "hud-skill-hmr_leap_damage", - modifiers.leap.base_damage, - ), - HammerSkill::LCost => SkillStrings::with_mult( - "hud-skill-hmr_leap_cost_title", - "hud-skill-hmr_leap_cost", - modifiers.leap.energy_cost, - ), - HammerSkill::LDistance => SkillStrings::with_mult( - "hud-skill-hmr_leap_distance_title", - "hud-skill-hmr_leap_distance", - modifiers.leap.leap_strength, - ), - HammerSkill::LKnockback => SkillStrings::with_mult( - "hud-skill-hmr_leap_knockback_title", - "hud-skill-hmr_leap_knockback", - modifiers.leap.knockback, - ), - HammerSkill::LRange => SkillStrings::with_const_float( - "hud-skill-hmr_leap_radius_title", - "hud-skill-hmr_leap_radius", - modifiers.leap.range, - ), - } -} - fn bow_skill_strings(skill: BowSkill) -> SkillStrings<'static> { let modifiers = SKILL_MODIFIERS.bow_tree; match skill { From 78acdcf767c7d51a446bd5f14a53ab18d7cbc108 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 26 Jan 2024 19:56:16 -0500 Subject: [PATCH 02/31] Placeholder UI for skill tree --- assets/voxygen/element/ui/diary/hammer_bg.png | 3 + common/src/comp/ability.rs | 2 +- voxygen/src/hud/diary.rs | 123 +++++++++++++++++- voxygen/src/hud/img_ids.rs | 1 + 4 files changed, 123 insertions(+), 6 deletions(-) create mode 100644 assets/voxygen/element/ui/diary/hammer_bg.png diff --git a/assets/voxygen/element/ui/diary/hammer_bg.png b/assets/voxygen/element/ui/diary/hammer_bg.png new file mode 100644 index 0000000000..0434dc4eec --- /dev/null +++ b/assets/voxygen/element/ui/diary/hammer_bg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f5ab5dd7fd805d91eb2eca905a25aa7c757059fd559a39bb6513a4117f1ccd8 +size 4554 diff --git a/common/src/comp/ability.rs b/common/src/comp/ability.rs index 4a3ed1a3f6..3332b3e42e 100644 --- a/common/src/comp/ability.rs +++ b/common/src/comp/ability.rs @@ -34,7 +34,7 @@ use crate::{ use hashbrown::HashMap; use serde::{Deserialize, Serialize}; use specs::{Component, DerefFlaggedStorage}; -use std::{borrow::Cow, convert::TryFrom, time::Duration}; +use std::{borrow::Cow, time::Duration}; use super::shockwave::ShockwaveDodgeable; diff --git a/voxygen/src/hud/diary.rs b/voxygen/src/hud/diary.rs index 65ed34b19b..310ac4bff0 100644 --- a/voxygen/src/hud/diary.rs +++ b/voxygen/src/hud/diary.rs @@ -86,6 +86,7 @@ widget_ids! { skill_lock_imgs[], sword_bg, axe_bg, + hammer_bg, bow_render, skill_bow_charged_0, skill_bow_charged_1, @@ -1792,12 +1793,124 @@ impl<'a> Diary<'a> { ui: &mut UiCell, mut events: Vec, ) -> Vec { - // use skills::HammerSkill::*; - // let skill_buttons = &[ - // ]; + // Hammer + Image::new(self.imgs.hammer_bg) + .wh([865.0, 600.0]) + .mid_top_with_margin_on(state.ids.content_align, 65.0) + .color(Some(Color::Rgba(1.0, 1.0, 1.0, 1.0))) + .set(state.ids.hammer_bg, ui); - // self.handle_skill_buttons(skill_buttons, ui, &mut events, diary_tooltip, - // state); + use PositionSpecifier::TopLeftWithMarginsOn; + let skill_buttons = &[ + SkillIcon::Ability { + skill: Skill::Hammer(HammerSkill::ScornfulSwipe), + ability_id: "common.abilities.hammer.scornful_swipe", + position: TopLeftWithMarginsOn(state.ids.hammer_bg, 492.0, 416.0), + }, + SkillIcon::Ability { + skill: Skill::Hammer(HammerSkill::Tremor), + ability_id: "common.abilities.hammer.tremor", + position: TopLeftWithMarginsOn(state.ids.hammer_bg, 418.0, 149.0), + }, + SkillIcon::Ability { + skill: Skill::Hammer(HammerSkill::VigorousBash), + ability_id: "common.abilities.hammer.vigorous_bash", + position: TopLeftWithMarginsOn(state.ids.hammer_bg, 422.0, 282.0), + }, + SkillIcon::Ability { + skill: Skill::Hammer(HammerSkill::Retaliate), + ability_id: "common.abilities.hammer.retaliate", + position: TopLeftWithMarginsOn(state.ids.hammer_bg, 313.0, 87.0), + }, + SkillIcon::Ability { + skill: Skill::Hammer(HammerSkill::SpineCracker), + ability_id: "common.abilities.hammer.spine_cracker", + position: TopLeftWithMarginsOn(state.ids.hammer_bg, 311.0, 327.0), + }, + SkillIcon::Ability { + skill: Skill::Hammer(HammerSkill::Breach), + ability_id: "common.abilities.hammer.breach", + position: TopLeftWithMarginsOn(state.ids.hammer_bg, 311.0, 214.0), + }, + SkillIcon::Ability { + skill: Skill::Hammer(HammerSkill::IronTempest), + ability_id: "common.abilities.hammer.iron_tempest", + position: TopLeftWithMarginsOn(state.ids.hammer_bg, 202.0, 216.0), + }, + SkillIcon::Ability { + skill: Skill::Hammer(HammerSkill::Upheaval), + ability_id: "common.abilities.hammer.upheaval", + position: TopLeftWithMarginsOn(state.ids.hammer_bg, 202.0, 343.0), + }, + SkillIcon::Ability { + skill: Skill::Hammer(HammerSkill::Thunderclap), + ability_id: "common.abilities.hammer.thunderclap", + position: TopLeftWithMarginsOn(state.ids.hammer_bg, 72.0, 218.0), + }, + SkillIcon::Ability { + skill: Skill::Hammer(HammerSkill::SeismicShock), + ability_id: "common.abilities.hammer.seismic_shock", + position: TopLeftWithMarginsOn(state.ids.hammer_bg, 71.0, 336.0), + }, + SkillIcon::Ability { + skill: Skill::Hammer(HammerSkill::HeavyWhorl), + ability_id: "common.abilities.hammer.heavy_whorl", + position: TopLeftWithMarginsOn(state.ids.hammer_bg, 417.0, 675.0), + }, + SkillIcon::Ability { + skill: Skill::Hammer(HammerSkill::Intercept), + ability_id: "common.abilities.hammer.intercept", + position: TopLeftWithMarginsOn(state.ids.hammer_bg, 421.0, 541.0), + }, + SkillIcon::Ability { + skill: Skill::Hammer(HammerSkill::PileDriver), + ability_id: "common.abilities.hammer.pile_driver", + position: TopLeftWithMarginsOn(state.ids.hammer_bg, 312.0, 735.0), + }, + SkillIcon::Ability { + skill: Skill::Hammer(HammerSkill::LungPummel), + ability_id: "common.abilities.hammer.lung_pummel", + position: TopLeftWithMarginsOn(state.ids.hammer_bg, 310.0, 609.0), + }, + SkillIcon::Ability { + skill: Skill::Hammer(HammerSkill::HelmCrusher), + ability_id: "common.abilities.hammer.helm_crusher", + position: TopLeftWithMarginsOn(state.ids.hammer_bg, 310.0, 497.0), + }, + SkillIcon::Ability { + skill: Skill::Hammer(HammerSkill::Rampart), + ability_id: "common.abilities.hammer.rampart", + position: TopLeftWithMarginsOn(state.ids.hammer_bg, 201.0, 605.0), + }, + SkillIcon::Ability { + skill: Skill::Hammer(HammerSkill::Tenacity), + ability_id: "common.abilities.hammer.tenacity", + position: TopLeftWithMarginsOn(state.ids.hammer_bg, 201.0, 478.0), + }, + SkillIcon::Ability { + skill: Skill::Hammer(HammerSkill::Earthshaker), + ability_id: "common.abilities.hammer.earthshaker", + position: TopLeftWithMarginsOn(state.ids.hammer_bg, 71.0, 600.0), + }, + SkillIcon::Ability { + skill: Skill::Hammer(HammerSkill::Judgement), + ability_id: "common.abilities.hammer.judgement", + position: TopLeftWithMarginsOn(state.ids.hammer_bg, 70.0, 481.0), + }, + ]; + + state.update(|s| { + s.ids + .skills + .resize(skill_buttons.len(), &mut ui.widget_id_generator()) + }); + state.update(|s| { + s.ids + .skill_lock_imgs + .resize(skill_buttons.len(), &mut ui.widget_id_generator()) + }); + + self.handle_skill_buttons(skill_buttons, ui, &mut events, diary_tooltip, state); events } diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index fff7cdd125..0be304dcd6 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -84,6 +84,7 @@ image_ids! { slot_skills: "voxygen.element.ui.diary.buttons.slot_skilltree", sword_bg: "voxygen.element.ui.diary.sword_bg", axe_bg: "voxygen.element.ui.diary.axe_bg", + hammer_bg: "voxygen.element.ui.diary.hammer_bg", swords_crossed: "voxygen.element.weapons.swords_crossed", sceptre: "voxygen.element.weapons.sceptre", sword: "voxygen.element.weapons.sword", From fcfff367c9ca70555a9eeac9089971b1f0d68170 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 26 Jan 2024 21:54:38 -0500 Subject: [PATCH 03/31] Cleanup stuff from old hammer --- assets/voxygen/audio/sfx.ron | 7 - assets/voxygen/element/skills/2hhammer_m1.png | 3 - .../element/skills/skill_hammergolf.png | 3 - .../element/skills/skill_hammerleap.png | 3 - assets/voxygen/i18n/be/hud/skills.ftl | 32 -- assets/voxygen/i18n/ca/hud/skills.ftl | 32 -- assets/voxygen/i18n/cs/hud/skills.ftl | 32 -- assets/voxygen/i18n/de/hud/ability.ftl | 2 - assets/voxygen/i18n/de/hud/skills.ftl | 32 -- assets/voxygen/i18n/en/hud/skills.ftl | 32 -- assets/voxygen/i18n/es-419/hud/ability.ftl | 2 - assets/voxygen/i18n/es-419/hud/skills.ftl | 32 -- assets/voxygen/i18n/es/hud/ability.ftl | 2 - assets/voxygen/i18n/es/hud/skills.ftl | 44 -- assets/voxygen/i18n/eu/hud/ability.ftl | 2 - assets/voxygen/i18n/eu/hud/skills.ftl | 32 -- assets/voxygen/i18n/fr/hud/ability.ftl | 2 - assets/voxygen/i18n/fr/hud/skills.ftl | 32 -- assets/voxygen/i18n/hu/hud/skills.ftl | 32 -- assets/voxygen/i18n/it/hud/ability.ftl | 2 - assets/voxygen/i18n/it/hud/skills.ftl | 32 -- assets/voxygen/i18n/ja/hud/skills.ftl | 32 -- assets/voxygen/i18n/ko/hud/ability.ftl | 2 - assets/voxygen/i18n/ko/hud/skills.ftl | 32 -- assets/voxygen/i18n/pl/hud/ability.ftl | 2 - assets/voxygen/i18n/pl/hud/skills.ftl | 32 -- assets/voxygen/i18n/pt-BR/hud/ability.ftl | 2 - assets/voxygen/i18n/pt-BR/hud/skills.ftl | 32 -- assets/voxygen/i18n/ro/hud/ability.ftl | 2 - assets/voxygen/i18n/ro/hud/skills.ftl | 32 -- assets/voxygen/i18n/ru/hud/ability.ftl | 2 - assets/voxygen/i18n/ru/hud/skills.ftl | 32 -- assets/voxygen/i18n/sr/hud/skills.ftl | 32 -- assets/voxygen/i18n/sv/hud/ability.ftl | 2 - assets/voxygen/i18n/sv/hud/skills.ftl | 32 -- assets/voxygen/i18n/th/hud/ability.ftl | 2 - assets/voxygen/i18n/th/hud/skills.ftl | 32 -- assets/voxygen/i18n/uk/hud/ability.ftl | 34 +- assets/voxygen/i18n/uk/hud/skills.ftl | 32 -- assets/voxygen/i18n/zh-Hans/hud/ability.ftl | 2 - assets/voxygen/i18n/zh-Hans/hud/skills.ftl | 32 -- common/src/comp/ability.rs | 66 +-- common/src/comp/character_state.rs | 29 +- common/src/states/combo_melee.rs | 386 ------------------ common/src/states/mod.rs | 1 - common/systems/src/stats.rs | 1 - server/agent/src/attack.rs | 14 +- voxygen/anim/src/character/alpha.rs | 8 +- voxygen/anim/src/character/chargeswing.rs | 213 +--------- voxygen/anim/src/character/leapmelee.rs | 173 +------- voxygen/src/hud/diary.rs | 27 -- voxygen/src/hud/img_ids.rs | 3 - voxygen/src/hud/util.rs | 3 - voxygen/src/scene/figure/mod.rs | 47 +-- 54 files changed, 61 insertions(+), 1704 deletions(-) delete mode 100644 assets/voxygen/element/skills/2hhammer_m1.png delete mode 100644 assets/voxygen/element/skills/skill_hammergolf.png delete mode 100644 assets/voxygen/element/skills/skill_hammerleap.png delete mode 100644 common/src/states/combo_melee.rs diff --git a/assets/voxygen/audio/sfx.ron b/assets/voxygen/audio/sfx.ron index b215ab8708..48d277132c 100644 --- a/assets/voxygen/audio/sfx.ron +++ b/assets/voxygen/audio/sfx.ron @@ -422,13 +422,6 @@ threshold: 0.5, subtitle: "subtitle-unwield_hammer", ), - Attack(ComboMeleeDeprecated(Action, 1), Hammer): ( - files: [ - "voxygen.audio.sfx.abilities.swing", - ], - threshold: 0.7, - subtitle: "subtitle-hammer_attack", - ), Attack(ChargedMelee(Action), Hammer): ( files: [ "voxygen.audio.sfx.abilities.swing", diff --git a/assets/voxygen/element/skills/2hhammer_m1.png b/assets/voxygen/element/skills/2hhammer_m1.png deleted file mode 100644 index c2b633f12b..0000000000 --- a/assets/voxygen/element/skills/2hhammer_m1.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:90ea0ee65b5b3637948bdbc55b744fd9be53f4cf05123d59c65ab515eccf3c11 -size 219 diff --git a/assets/voxygen/element/skills/skill_hammergolf.png b/assets/voxygen/element/skills/skill_hammergolf.png deleted file mode 100644 index 8c1448959e..0000000000 --- a/assets/voxygen/element/skills/skill_hammergolf.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:516fb0c1c25701b22833bc3997f133f9cecef868236be794f092fc938201f504 -size 209 diff --git a/assets/voxygen/element/skills/skill_hammerleap.png b/assets/voxygen/element/skills/skill_hammerleap.png deleted file mode 100644 index f526ae9c3d..0000000000 --- a/assets/voxygen/element/skills/skill_hammerleap.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7a0f516995b6149ceaf295b058c3f09fdfb41d74627e1e268db05cb7bbea4d6e -size 283 diff --git a/assets/voxygen/i18n/be/hud/skills.ftl b/assets/voxygen/i18n/be/hud/skills.ftl index d23e1e82e6..558c02014d 100644 --- a/assets/voxygen/i18n/be/hud/skills.ftl +++ b/assets/voxygen/i18n/be/hud/skills.ftl @@ -119,38 +119,6 @@ hud-skill-bow_shotgun_arrow_count_title = Колькасць стрэл hud-skill-bow_shotgun_arrow_count = Пабольшвае колькасць стрэл у выстрале на { $boost }.{ $SP } hud-skill-bow_shotgun_spread_title = Кучнасць стрэл hud-skill-bow_shotgun_spread = Змяншае роскід стрэл на { $boost }%.{ $SP } -hud-skill-hmr_leap_radius_title = Радыус ударнай хвалі -hud-skill-hmr_leap_radius = Пабольшвае радыус ударнай хвалі ад атакі ў скачку на { $boost } метры.{ $SP } -hud-skill-hmr_leap_distance_title = Даўжыня скачка -hud-skill-hmr_leap_distance = Пабольшвае даўжыню скачка на { $boost }%.{ $SP } -hud-skill-hmr_leap_cost_title = Выдатак энергіі -hud-skill-hmr_leap_cost = Змяншае выдатак энергіі на { $boost }%.{ $SP } -hud-skill-hmr_leap_knockback_title = Адкідванне атакай у скачку -hud-skill-hmr_leap_knockback = Адкідвайце ворагаў на { $boost }% далей.{ $SP } -hud-skill-hmr_leap_damage_title = Шкода -hud-skill-hmr_leap_damage = Пабольшвае шкоду на { $boost }%.{ $SP } -hud-skill-hmr_unlock_leap_title = Атака ў скачку -hud-skill-hmr_unlock_leap = Адчыняе магчымасць атакі ў скачку.{ $SP } -hud-skill-hmr_charged_melee_title = Зараджаны ўдар -hud-skill-hmr_charged_melee = Прыпыніцеся на хвілінку ды вытніце злосніка з усяе сілы. -hud-skill-hmr_charged_rate_title = Хуткасць зарадкі -hud-skill-hmr_charged_rate = Удар зараджаецца на { $boost }% хутчэй.{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = Выдатак энергіі -hud-skill-hmr_charged_melee_nrg_drain = Змяншае паглынанне энергіі ў час зарадкі на { $boost }%.{ $SP } -hud-skill-hmr_charged_melee_damage_title = Шкода -hud-skill-hmr_charged_melee_damage = Пабольшвае шкоду ад заражанага ўдару на { $boost }%.{ $SP } -hud-skill-hmr_charged_melee_knockback_title = Адкідванне зараджаным ударам -hud-skill-hmr_charged_melee_knockback = Значна пабольшвае моц адкідвання на { $boost }%.{ $SP } -hud-skill-hmr_single_strike_title = Удар -hud-skill-hmr_single_strike = Бі альбо не бі, вось у чым пытанне. -hud-skill-hmr_single_strike_regen_title = Аднаўленне энергіі -hud-skill-hmr_single_strike_regen = Пабольшвае аднаўленне энергіі з кожным паслядоўным ударам.{ $SP } -hud-skill-hmr_single_strike_speed_title = Хуткасць удару -hud-skill-hmr_single_strike_speed = Пабольшвае хуткасць атакі з кожным паслядоўным ударам.{ $SP } -hud-skill-hmr_single_strike_damage_title = Шкода -hud-skill-hmr_single_strike_damage = Пабольшвае шкоду з кожным паслядоўным ударам.{ $SP } -hud-skill-hmr_single_strike_knockback_title = Адкідванне -hud-skill-hmr_single_strike_knockback = Пабольшвае адкідванне на { $boost }%.{ $SP } hud-skill-mining_title = Горная справа hud-skill-pick_strike_title = Удар кіркою hud-skill-pick_strike = Біце жылы і друзы, каб здабыць руды і каштоўныя камяні. diff --git a/assets/voxygen/i18n/ca/hud/skills.ftl b/assets/voxygen/i18n/ca/hud/skills.ftl index ea754b8ae4..f2f87fb7b6 100644 --- a/assets/voxygen/i18n/ca/hud/skills.ftl +++ b/assets/voxygen/i18n/ca/hud/skills.ftl @@ -117,38 +117,6 @@ hud-skill-bow_shotgun_arrow_count_title = Nombre de Fletxes d'Escopeta hud-skill-bow_shotgun_arrow_count = Augmenta el nombre de fletxes en cada ús en { $boost }{ $SP } hud-skill-bow_shotgun_spread_title = Difusió d'Escopeta hud-skill-bow_shotgun_spread = Redueix la difusió de les fletxes un { $boost }%{ $SP } -hud-skill-hmr_leap_radius_title = Radi del Salt en Picat -hud-skill-hmr_leap_radius = Augmenta el radi d'atac del cop a terra en { $boost } metres{ $SP } -hud-skill-hmr_leap_distance_title = Distància del Salt en Picat -hud-skill-hmr_leap_distance = Augmenta la distància de l'habilitat Salt en Picat un { $boost }%{ $SP } -hud-skill-hmr_leap_cost_title = Cost del Salt en Picat -hud-skill-hmr_leap_cost = Redueix el cost energètic del Salt en Picat un { $boost }%{ $SP } -hud-skill-hmr_leap_knockback_title = Empenta del Salt en Picat -hud-skill-hmr_leap_knockback = Augmenta l'empenta del Salt en Picat un { $boost }%{ $SP } -hud-skill-hmr_leap_damage_title = Dany del Salt en Picat -hud-skill-hmr_leap_damage = Augmenta el dany del Salt en Picat un { $boost }%{ $SP } -hud-skill-hmr_unlock_leap_title = Desbloqueja Salt en Picat -hud-skill-hmr_unlock_leap = Desbloqueja l'habilitat Salt en Picat{ $SP } -hud-skill-hmr_charged_melee_title = Atac Carregat -hud-skill-hmr_charged_melee = L'atac de sempre ara carregat! -hud-skill-hmr_charged_rate_title = Velocitat de Càrrega -hud-skill-hmr_charged_rate = Augmenta la velocitat a la qual carregues el cop un { $boost }%{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = Consum Energètic de l'Atac Carregat -hud-skill-hmr_charged_melee_nrg_drain = Redueix el cost energètic quan carregues un atac un { $boost }%{ $SP } -hud-skill-hmr_charged_melee_damage_title = Dany de l'Atac Carregat -hud-skill-hmr_charged_melee_damage = Augmenta el dany de l'Atac Carregat un { $boost }%{ $SP } -hud-skill-hmr_charged_melee_knockback_title = Empenta de l'Atac Carregat -hud-skill-hmr_charged_melee_knockback = Augmenta massivament la potència de llançament de l'atac un { $boost }%{ $SP } -hud-skill-hmr_single_strike_title = Atac Individual -hud-skill-hmr_single_strike = Tan solitari com sou vós -hud-skill-hmr_single_strike_regen_title = Regeneració de l'Atac Individual -hud-skill-hmr_single_strike_regen = Augmenta el guany d'Energia per cada cop successiu{ $SP } -hud-skill-hmr_single_strike_speed_title = Velocitat de l'Atac Individual -hud-skill-hmr_single_strike_speed = Augmenta la velocitat dels atacs per cada cop successiu{ $SP } -hud-skill-hmr_single_strike_damage_title = Dany de l'Atac Individual -hud-skill-hmr_single_strike_damage = Augmenta el dany per cada cop successiu{ $SP } -hud-skill-hmr_single_strike_knockback_title = Empenta de l'Atac Individual -hud-skill-hmr_single_strike_knockback = Augmenta la potència de llançament dels atacs un { $boost }%{ $SP } hud-skill-mining_title = Minar hud-skill-pick_strike_title = Cop de Pic hud-skill-pick_strike = Colpeja les roques amb el pic per a aconseguir minerals, gemmes i experiència diff --git a/assets/voxygen/i18n/cs/hud/skills.ftl b/assets/voxygen/i18n/cs/hud/skills.ftl index 3564951ded..98ae6e8a8a 100644 --- a/assets/voxygen/i18n/cs/hud/skills.ftl +++ b/assets/voxygen/i18n/cs/hud/skills.ftl @@ -115,35 +115,3 @@ hud-skill-bow_shotgun_arrow_count_title = Počet Šípů hud-skill-bow_shotgun_arrow_count = Zvyšuje počet šípů vystřelených v jedné dávce o { $boost }{ $SP } hud-skill-bow_shotgun_spread_title = Rozptyl Brokovnice hud-skill-bow_shotgun_spread = Snižuje rozptyl šípů o { $boost }%{ $SP } -hud-skill-hmr_leap_radius_title = Rádius Přískoku -hud-skill-hmr_leap_radius = Zvětšuje rádius bouchnutí do země o { $boost } metr{ $SP } -hud-skill-hmr_leap_distance_title = Vzdálenost Přískoku -hud-skill-hmr_leap_distance = Zvětší vzdálenost o { $boost }%{ $SP } -hud-skill-hmr_leap_cost_title = Spotřeba při Přískoku -hud-skill-hmr_leap_cost = Sníží cenu skoku o { $boost }%{ $SP } -hud-skill-hmr_leap_knockback_title = Odražení -hud-skill-hmr_leap_knockback = Zvyšuje odražení z Vyšlehnutí o { $boost }%{ $SP } -hud-skill-hmr_leap_damage_title = Poškození Přískoku -hud-skill-hmr_leap_damage = Zvyšuje poškození při Přískoku o { $boost }%{ $SP } -hud-skill-hmr_unlock_leap_title = Odemknout Přískok -hud-skill-hmr_unlock_leap = Odemkne přískok{ $SP } -hud-skill-hmr_charged_melee_title = Silný Úder -hud-skill-hmr_charged_melee = Útok na blízko, ale silnější -hud-skill-hmr_charged_rate_title = Rychlost Nápřahu -hud-skill-hmr_charged_rate = Zvýší rychlost napřažení k úderu o { $boost }%{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = Menší Spotřeba Energie -hud-skill-hmr_charged_melee_nrg_drain = Snižuje spotřebu energie během napřažení o { $boost }%{ $SP } -hud-skill-hmr_charged_melee_damage_title = Poškození -hud-skill-hmr_charged_melee_damage = Zvětší poškození silného úderu o { $boost }%{ $SP } -hud-skill-hmr_charged_melee_knockback_title = Odhození -hud-skill-hmr_charged_melee_knockback = Masivně zvětšuje potenciální odhození silným úderem o { $boost }%{ $SP } -hud-skill-hmr_single_strike_title = Jednoduchý Úder -hud-skill-hmr_single_strike = Jednoduchý jako ty -hud-skill-hmr_single_strike_regen_title = Regenerace Energie -hud-skill-hmr_single_strike_regen = Zvyšuje energii při každém povedeném úderu{ $SP } -hud-skill-hmr_single_strike_speed_title = Rychlost Jednoduchého Útoku -hud-skill-hmr_single_strike_speed = Zvýší rychlost útoku při každém povedeném úderu{ $SP } -hud-skill-hmr_single_strike_damage_title = Poškození Jednoduchého Útoku -hud-skill-hmr_single_strike_damage = Při každém povedeném úderu zvyšuje poškození{ $SP } -hud-skill-hmr_single_strike_knockback_title = Odražení pomocí Jednoduchého Útoku -hud-skill-hmr_single_strike_knockback = Zvyšuje potenciální odhození o { $boost }%{ $SP } diff --git a/assets/voxygen/i18n/de/hud/ability.ftl b/assets/voxygen/i18n/de/hud/ability.ftl index d4865f84c6..35e019a4bd 100644 --- a/assets/voxygen/i18n/de/hud/ability.ftl +++ b/assets/voxygen/i18n/de/hud/ability.ftl @@ -1,7 +1,5 @@ common-abilities-debug-possess = Pfeil der Besessenheit .desc = Schießt einen giftigen Pfeil und lässt dich dein Ziel kontrollieren. -common-abilities-hammer-leap = Schicksalsschlag - .desc = Eine Attacke mit Flächeneffekt und Rückstoß. Spring an die Position des Cursors. common-abilities-bow-shotgun = Pfeilhagel .desc = Schießt einen Pfeilhagel ab common-abilities-staff-fireshockwave = Ring des Feuers diff --git a/assets/voxygen/i18n/de/hud/skills.ftl b/assets/voxygen/i18n/de/hud/skills.ftl index 63154ebb8c..09db16f690 100644 --- a/assets/voxygen/i18n/de/hud/skills.ftl +++ b/assets/voxygen/i18n/de/hud/skills.ftl @@ -119,38 +119,6 @@ hud-skill-bow_charged_speed_title = Spanngeschwindigkeit hud-skill-bow_charged_speed = Erhöht die Geschwindigkeit mit der du den Bogen spannst um { $boost }%{ $SP } hud-skill-bow_charged_move_title = Bewegungsgeschw. beim Spannen hud-skill-bow_charged_move = Erhöht die Bewegungsgeschw. um { $boost }% während du den Bogen spannst{ $SP } -hud-skill-hmr_leap_radius_title = Radius: Zerschmettern -hud-skill-hmr_leap_radius = Erhöht den Radius, indem du deine Gegner ungespitzt in den Boden rammst um { $boost } Meter{ $SP } -hud-skill-hmr_leap_distance_title = Sprungreichweite -hud-skill-hmr_leap_distance = Du kannst dich auf { $boost }% weiter entfernte Gegner stürzen{ $SP } -hud-skill-hmr_leap_cost_title = Kosten: Zerschmettern -hud-skill-hmr_leap_cost = Verringert die Ausdauerkosten um { $boost }%{ $SP } -hud-skill-hmr_leap_knockback_title = Rückstoß: Zerschmettern -hud-skill-hmr_leap_knockback = Zerschmettern stößt deine Gegner um { $boost }% weiter{ $SP } -hud-skill-hmr_leap_damage_title = Schaden: Zerschmettern -hud-skill-hmr_leap_damage = Du schlägst um { $boost }% stärker auf deine Feinde ein{ $SP } -hud-skill-hmr_unlock_leap_title = Zerschmettern freischalten -hud-skill-hmr_unlock_leap = Du kannst auf deine Gegner zuspringen und sie dem Erdboden gleichmachen{ $SP } -hud-skill-hmr_charged_melee_title = Aufgeladener Schlag -hud-skill-hmr_charged_melee = Schwingt den Prügel aber mit Schmackes -hud-skill-hmr_charged_rate_title = Schwung: Aufgeladener Schlag -hud-skill-hmr_charged_rate = Erhöht den Schwung mit dem du zuschlägst um { $boost }%{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = Effizienz: Aufgeladener Schlag -hud-skill-hmr_charged_melee_nrg_drain = Wenn du zum aufgeladenen Schlag ansetzt verbrauchst du { $boost }% weniger Energie{ $SP } -hud-skill-hmr_charged_melee_damage_title = Schaden: Aufgeladener Schlag -hud-skill-hmr_charged_melee_damage = Erhöht den Schaden des aufgeladenen Schlages um { $boost }%{ $SP } -hud-skill-hmr_charged_melee_knockback_title = Rückstoß: Aufgeladener Schlag -hud-skill-hmr_charged_melee_knockback = Erhöht den Rückstoß deines aufgeladenen Schlages um stattliche { $boost }%{ $SP } -hud-skill-hmr_single_strike_title = Einfacher Schlag -hud-skill-hmr_single_strike = Weil einfach einfach einfach ist! -hud-skill-hmr_single_strike_regen_title = Regeneration: Einfacher Schlag -hud-skill-hmr_single_strike_regen = Erhöht den Ausdauergewinn mit jedem Treffer{ $SP } -hud-skill-hmr_single_strike_speed_title = Angriffsgeschw.: Einfacher Schlag -hud-skill-hmr_single_strike_speed = Erhöht die Angriffsgeschw. mit jedem Treffer{ $SP } -hud-skill-hmr_single_strike_damage_title = Schaden: Einfacher Schlag -hud-skill-hmr_single_strike_damage = Erhöht den Schaden mit jedem Treffer{ $SP } -hud-skill-hmr_single_strike_knockback_title = Rückstoß: Einfacher Schlag -hud-skill-hmr_single_strike_knockback = Erhöht die Rückstoßkraft um { $boost }%{ $SP } hud-skill-mining_title = Bergbau hud-skill-pick_strike_title = Spitzhackenschlag hud-skill-pick_strike = Baue Steine mit deiner Spitzhacke ab, um Erze, seltene Edelsteine und EP zu erhalten diff --git a/assets/voxygen/i18n/en/hud/skills.ftl b/assets/voxygen/i18n/en/hud/skills.ftl index ef4e33ff99..e8162c9311 100644 --- a/assets/voxygen/i18n/en/hud/skills.ftl +++ b/assets/voxygen/i18n/en/hud/skills.ftl @@ -130,38 +130,6 @@ hud-skill-bow_shotgun_arrow_count_title = Shotgun Arrows hud-skill-bow_shotgun_arrow_count = Increases the number of arrows in the burst by { $boost }.{ $SP } hud-skill-bow_shotgun_spread_title = Shotgun Spread hud-skill-bow_shotgun_spread = Decreases the spread of the arrows by { $boost } %.{ $SP } -hud-skill-hmr_leap_radius_title = Leap Radius -hud-skill-hmr_leap_radius = Increases attack radius on ground slam by { $boost } meter.{ $SP } -hud-skill-hmr_leap_distance_title = Leap Distance -hud-skill-hmr_leap_distance = Increases distance of leap by { $boost } %.{ $SP } -hud-skill-hmr_leap_cost_title = Leap Cost -hud-skill-hmr_leap_cost = Decreases cost of leap by { $boost } %.{ $SP } -hud-skill-hmr_leap_knockback_title = Leap Knockback -hud-skill-hmr_leap_knockback = Increases knockback from leap by { $boost } %.{ $SP } -hud-skill-hmr_leap_damage_title = Leap Damage -hud-skill-hmr_leap_damage = Increases damage of leap by { $boost } %.{ $SP } -hud-skill-hmr_unlock_leap_title = Unlock Leap -hud-skill-hmr_unlock_leap = Unlocks a leap.{ $SP } -hud-skill-hmr_charged_melee_title = Charged Melee -hud-skill-hmr_charged_melee = Melee but with charge. -hud-skill-hmr_charged_rate_title = Charge Rate -hud-skill-hmr_charged_rate = Increases the rate that you charge the swing by { $boost } %.{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = Charged Melee energy Drain -hud-skill-hmr_charged_melee_nrg_drain = Decreases the rate energy drains when charging by { $boost } %.{ $SP } -hud-skill-hmr_charged_melee_damage_title = Charged Melee Damage -hud-skill-hmr_charged_melee_damage = Increases the damage of the charged swing by { $boost } %.{ $SP } -hud-skill-hmr_charged_melee_knockback_title = Charged Melee Knockback -hud-skill-hmr_charged_melee_knockback = Massively increases throw potential of swing by { $boost } %.{ $SP } -hud-skill-hmr_single_strike_title = Single Strike -hud-skill-hmr_single_strike = As single as you are. -hud-skill-hmr_single_strike_regen_title = Single Strike Regen -hud-skill-hmr_single_strike_regen = Increases energy gain with each successive strike.{ $SP } -hud-skill-hmr_single_strike_speed_title = Single Strike Speed -hud-skill-hmr_single_strike_speed = Increases the attack speed with each successive strike.{ $SP } -hud-skill-hmr_single_strike_damage_title = Single Strike Damage -hud-skill-hmr_single_strike_damage = Increases the damage with each successive strike.{ $SP } -hud-skill-hmr_single_strike_knockback_title = Single Strike Knockback -hud-skill-hmr_single_strike_knockback = Increase throw potential of swings by { $boost } %.{ $SP } hud-skill-mining_title = Mining hud-skill-pick_strike_title = Pickaxe Strike hud-skill-pick_strike = Hit rocks with the pickaxe to gain ore, gems and experience. diff --git a/assets/voxygen/i18n/es-419/hud/ability.ftl b/assets/voxygen/i18n/es-419/hud/ability.ftl index 51ee2126fc..8650481ff7 100644 --- a/assets/voxygen/i18n/es-419/hud/ability.ftl +++ b/assets/voxygen/i18n/es-419/hud/ability.ftl @@ -1,7 +1,5 @@ common-abilities-debug-possess = Flecha de Posesión .desc = Dispara una flecha venenosa. Te permite controlar a tu objetivo. -common-abilities-hammer-leap = Golpe Fatal - .desc = Un ataque en área con retroceso. Salta a la posición del cursor. common-abilities-bow-shotgun = Ráfaga .desc = Lanza una ráfaga de flechas. common-abilities-staff-fireshockwave = Anillo de Fuego diff --git a/assets/voxygen/i18n/es-419/hud/skills.ftl b/assets/voxygen/i18n/es-419/hud/skills.ftl index 92d43a6c8a..2ed18f085a 100644 --- a/assets/voxygen/i18n/es-419/hud/skills.ftl +++ b/assets/voxygen/i18n/es-419/hud/skills.ftl @@ -117,38 +117,6 @@ hud-skill-bow_shotgun_arrow_count_title = Flechas de escopeta hud-skill-bow_shotgun_arrow_count = Aumenta el número de flechas de ráfaga en { $boost }{ $SP } hud-skill-bow_shotgun_spread_title = Flechas de escopeta hud-skill-bow_shotgun_spread = Disminuye la propagación de las flechas en un { $boost }%{ $SP } -hud-skill-hmr_leap_radius_title = Radio de Salto -hud-skill-hmr_leap_radius = Aumenta el radio de ataque en golpes de tierra en{ $boost } metros más{ $SP } -hud-skill-hmr_leap_distance_title = Distancia de salto -hud-skill-hmr_leap_distance = Aumenta la distancia de salto en un { $boost }%{ $SP } -hud-skill-hmr_leap_cost_title = Costo de salto -hud-skill-hmr_leap_cost = Disminuye el costo del salto en un { $boost }%{ $SP } -hud-skill-hmr_leap_knockback_title = Retroceso de salto -hud-skill-hmr_leap_knockback = Aumenta el retroceso del salto en un { $boost }%{ $SP } -hud-skill-hmr_leap_damage_title = Daño de salto -hud-skill-hmr_leap_damage = Aumenta el daño de salto por { $boost }%{ $SP } -hud-skill-hmr_unlock_leap_title = Desbloquear Salto -hud-skill-hmr_unlock_leap = Desbloquea un salto{ $SP } -hud-skill-hmr_charged_melee_title = Carga cuerpo a cuerpo -hud-skill-hmr_charged_melee = Carga cuerpo a cuerpo -hud-skill-hmr_charged_rate_title = Velocidad de carga -hud-skill-hmr_charged_rate = Aumenta velocidad de carga en un { $boost }%{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = Energía de la carga cuerpo a cuerpo -hud-skill-hmr_charged_melee_nrg_drain = Disminuye la cantidad de energía necesaria de la carga cuerpo a cuerpo en un { $boost }%{ $SP } -hud-skill-hmr_charged_melee_damage_title = Daño de la Carga cuerpo a cuerpo -hud-skill-hmr_charged_melee_damage = Aumenta el daño de la Carga cuerpo a cuerpo en { $boost }%{ $SP } -hud-skill-hmr_charged_melee_knockback_title = Empuje de la Carga cuerpo a cuerpo -hud-skill-hmr_charged_melee_knockback = Aumenta enormemente el potencial de lanzamiento de la Carga cuerpo a cuerpo en un { $boost }%{ $SP } -hud-skill-hmr_single_strike_title = Ataque Único -hud-skill-hmr_single_strike = Tan único como tú -hud-skill-hmr_single_strike_regen_title = Regeneración de Ataque Único -hud-skill-hmr_single_strike_regen = Aumenta la ganancia de energía con cada golpe{ $SP } -hud-skill-hmr_single_strike_speed_title = Velocidad de Ataque Único -hud-skill-hmr_single_strike_speed = Aumenta la velocidad de ataque con cada golpe sucesivo{ $SP } -hud-skill-hmr_single_strike_damage_title = Daño de Ataque Único -hud-skill-hmr_single_strike_damage = Aumenta el daño con cada golpe sucesivo{ $SP } -hud-skill-hmr_single_strike_knockback_title = Empuje de Ataque Único -hud-skill-hmr_single_strike_knockback = Aumenta el empuje en un { $boost }%{ $SP } hud-skill-mining_title = Mineria hud-skill-pick_strike_title = Golpe con pico hud-skill-pick_strike = Golpea rocas con el pico para conseguir minerales, gemas y experiencia diff --git a/assets/voxygen/i18n/es/hud/ability.ftl b/assets/voxygen/i18n/es/hud/ability.ftl index ee64ea88c3..1eb85cfb71 100644 --- a/assets/voxygen/i18n/es/hud/ability.ftl +++ b/assets/voxygen/i18n/es/hud/ability.ftl @@ -258,8 +258,6 @@ common-abilities-sword-defensive_disengage = Retirada defensiva # Habilidades de arco common-abilities-debug-possess = Flecha de posesión .desc = Dispara una flecha que te permite controlar a tu objetivo. -common-abilities-hammer-leap = Golpe de la perdición - .desc = Salta hacia la posición del cursor para atacar a un enemigo con retroceso. common-abilities-bow-shotgun = Ráfaga .desc = Lanza una ráfaga de flechas. # Habilidades de bastón diff --git a/assets/voxygen/i18n/es/hud/skills.ftl b/assets/voxygen/i18n/es/hud/skills.ftl index 190fa031d9..d2057f6988 100644 --- a/assets/voxygen/i18n/es/hud/skills.ftl +++ b/assets/voxygen/i18n/es/hud/skills.ftl @@ -58,50 +58,6 @@ hud-skill-swim = Movimiento acuático. hud-skill-swim_speed_title = Velocidad al nadar hud-skill-swim_speed = Nadas un { $boost } % más rápido.{ $SP } -# Martillo - Árbol de habilidades - - -## Golpe único - -hud-skill-hmr_single_strike_title = Golpe sencillo -hud-skill-hmr_single_strike = Tan sencillo como tú. -hud-skill-hmr_single_strike_knockback_title = Retroceso de {{ hud-skill-hmr_single_strike_title }} -hud-skill-hmr_single_strike_knockback = Aumenta el retroceso de los golpes en un { $boost } %.{ $SP } -hud-skill-hmr_single_strike_regen_title = Regeneración de {{ hud-skill-hmr_single_strike_title }} -hud-skill-hmr_single_strike_regen = Aumenta la energía obtenida con cada golpe sucesivo.{ $SP } -hud-skill-hmr_single_strike_damage_title = Daño de {{ hud-skill-hmr_single_strike_title }} -hud-skill-hmr_single_strike_damage = Aumenta el daño infligido con cada golpe sucesivo.{ $SP } -hud-skill-hmr_single_strike_speed_title = Velocidad de {{ hud-skill-hmr_single_strike_title }} -hud-skill-hmr_single_strike_speed = Aumenta la velocidad de ataque con cada golpe sucesivo.{ $SP } - -## Martillazo - -hud-skill-hmr_charged_melee_title = Martillazo -hud-skill-hmr_charged_melee = Un golpe más con el martillo... pero esta vez lleno de energía. -hud-skill-hmr_charged_rate_title = Velocidad de carga de {{ hud-skill-hmr_charged_melee_title }} -hud-skill-hmr_charged_rate = El tiempo para preparar un martillazo es un { $boost } % más rápido.{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = Consumo de energía de {{ hud-skill-hmr_charged_melee_title }} -hud-skill-hmr_charged_melee_nrg_drain = Reduce la velocidad con la que se consume la energía mientras se prepara un golpe cargado con el martillo en un { $boost } %.{ $SP } -hud-skill-hmr_charged_melee_damage_title = Daño de {{ hud-skill-hmr_charged_melee_title }} -hud-skill-hmr_charged_melee_damage = Aumenta el daño del golpe cargado en un { $boost } %.{ $SP } -hud-skill-hmr_charged_melee_knockback_title = Retroceso de {{ hud-skill-hmr_charged_melee_title }} -hud-skill-hmr_charged_melee_knockback = Aumenta en gran medida el potencial para lanzar por los aires a los enemigos en un { $boost } %.{ $SP } - -## Terremoto - -hud-skill-hmr_unlock_leap_title = Desbloquear Terremoto -hud-skill-hmr_unlock_leap = Desbloquea el Terremoto.{ $SP } -hud-skill-hmr_leap_damage_title = Daño de Terremoto -hud-skill-hmr_leap_damage = Aumenta el daño del salto en un { $boost } %.{ $SP } -hud-skill-hmr_leap_distance_title = Distancia de Terremoto -hud-skill-hmr_leap_distance = Aumenta la distancia de salto en un { $boost } %.{ $SP } -hud-skill-hmr_leap_knockback_title = Retroceso de Terremoto -hud-skill-hmr_leap_knockback = Aumenta el retroceso infligido del salto en un { $boost } %.{ $SP } -hud-skill-hmr_leap_cost_title = Coste de Terremoto -hud-skill-hmr_leap_cost = Reduce el coste del salto en un { $boost } %.{ $SP } -hud-skill-hmr_leap_radius_title = Radio de Terremoto -hud-skill-hmr_leap_radius = Aumenta el radio del golpe al suelo en { $boost } metros.{ $SP } - # Cetro - Árbol de habilidades diff --git a/assets/voxygen/i18n/eu/hud/ability.ftl b/assets/voxygen/i18n/eu/hud/ability.ftl index cc7e02ccfe..f35c9430dc 100644 --- a/assets/voxygen/i18n/eu/hud/ability.ftl +++ b/assets/voxygen/i18n/eu/hud/ability.ftl @@ -1,7 +1,5 @@ common-abilities-debug-possess = Gezi kontrolatzailea .desc = Gezi pozoitsua jaurtitzen du. Zure helburua kontrolatzea ahalbidetzen dizu. -common-abilities-hammer-leap = Galbidearen kolpea - .desc = Etsaiak bultzatzen dituen eremu erasoa. Kurtsorearen posiziora salto egiten du. common-abilities-bow-shotgun = Tiro sorta .desc = Gezi tiro sorta jaurtitzen du. common-abilities-staff-fireshockwave = Suzko eraztuna diff --git a/assets/voxygen/i18n/eu/hud/skills.ftl b/assets/voxygen/i18n/eu/hud/skills.ftl index 4e9b90167b..43bded4ff7 100644 --- a/assets/voxygen/i18n/eu/hud/skills.ftl +++ b/assets/voxygen/i18n/eu/hud/skills.ftl @@ -117,38 +117,6 @@ hud-skill-bow_shotgun_arrow_count_title = Eskopeta geziak hud-skill-bow_shotgun_arrow_count = Tiro bakoitzean jaurtitako geziak { $boost } areagotzen ditu{ $SP } hud-skill-bow_shotgun_spread_title = Eskopetaren zabaltzea hud-skill-bow_shotgun_spread = Gezien zabaltzea % { $boost } murrizten du{ $SP } -hud-skill-hmr_leap_radius_title = Jauziaren erradioa -hud-skill-hmr_leap_radius = Lurreko danbatekoaren erasoaren erradioa { $boost } areagotzen du{ $SP } -hud-skill-hmr_leap_distance_title = Jauziaren distantzia -hud-skill-hmr_leap_distance = Jauziaren distantzia % { $boost } areagotzen du { $SP } -hud-skill-hmr_leap_cost_title = Jauziaren balioa -hud-skill-hmr_leap_cost = Jauziaren balioa % { $boost } murrizten du { $SP } -hud-skill-hmr_leap_knockback_title = Jauziaren indarra -hud-skill-hmr_leap_knockback = Jauziak eragindako jaurtiketa indarra % { $boost } areagotzen du { $SP } -hud-skill-hmr_leap_damage_title = Jauziaren mina -hud-skill-hmr_leap_damage = Jauziak eragindako mina % { $boost }areagotzen du{ $SP } -hud-skill-hmr_unlock_leap_title = Jauzia desblokeatu -hud-skill-hmr_unlock_leap = Jauzi bat desblokeatzen du { $SP } -hud-skill-hmr_charged_melee_title = Kargatutako gorputzez-gorputzeko erasoa -hud-skill-hmr_charged_melee = Gorputzez-gorputzeko erasoa, baina kargatuta -hud-skill-hmr_charged_rate_title = Karga abiadura -hud-skill-hmr_charged_rate = Kolpearen kargatzea % { $boost } bizkortzen da{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = Kargatutako gorputzez gorputzeko erasoaren drainatzea -hud-skill-hmr_charged_melee_nrg_drain = Kargatzerakoan energia drainatzen den abiadura % { $boost } murrizten da{ $SP } -hud-skill-hmr_charged_melee_damage_title = Kargatutako gorputzez gorputzeko erasoaren mina -hud-skill-hmr_charged_melee_damage = Kargatutako kolpearen mina % { $boost } areagotzen da { $SP } -hud-skill-hmr_charged_melee_knockback_title = Kargatutako gorputzez gorputzeko erasoaren indarra -hud-skill-hmr_charged_melee_knockback = Kolpeak arerioa jaurtitzeko duen indarra % { $boost } areagotzen da{ $SP } -hud-skill-hmr_single_strike_title = Kolpe bakarra -hud-skill-hmr_single_strike = Zu bezalako bakarra -hud-skill-hmr_single_strike_regen_title = Kolpe bakarraren berreskuratzea -hud-skill-hmr_single_strike_regen = Segidan emandako kolpe bakoitzarekin berreskuratutako energia areagotzen da{ $SP } -hud-skill-hmr_single_strike_speed_title = Kolpe bakarraren abiadura -hud-skill-hmr_single_strike_speed = Segidan emandako kolpe bakoitzaren abiadura areagotzen da{ $SP } -hud-skill-hmr_single_strike_damage_title = Kolpe bakarraren mina -hud-skill-hmr_single_strike_damage = Segidan emandako kolpe bakoitzaren mina areagotzen da{ $SP } -hud-skill-hmr_single_strike_knockback_title = Kolpe bakarraren indarra -hud-skill-hmr_single_strike_knockback = Kolpeen jaurtitze indarra % { $boost }areagotzen da{ $SP } hud-skill-mining_title = Meatzaritza hud-skill-pick_strike_title = Pika erasoa hud-skill-pick_strike = Jo itzazu arrokak pikaren mea, harribitxiak eta esperientzia lortzeko diff --git a/assets/voxygen/i18n/fr/hud/ability.ftl b/assets/voxygen/i18n/fr/hud/ability.ftl index 443837f241..ba71a2eebd 100644 --- a/assets/voxygen/i18n/fr/hud/ability.ftl +++ b/assets/voxygen/i18n/fr/hud/ability.ftl @@ -1,7 +1,5 @@ common-abilities-debug-possess = Flèche de contrôle .desc = Tire une flèche empoisonnée. Vous permet de contrôler votre cible. -common-abilities-hammer-leap = Fracas de la destruction - .desc = Une attaque de zone avec du recul. Saute à la position du curseur. common-abilities-bow-shotgun = Rafale .desc = Lance une rafale de flèches common-abilities-staff-fireshockwave = Anneau de feu diff --git a/assets/voxygen/i18n/fr/hud/skills.ftl b/assets/voxygen/i18n/fr/hud/skills.ftl index 7659046dd6..ae94e66155 100644 --- a/assets/voxygen/i18n/fr/hud/skills.ftl +++ b/assets/voxygen/i18n/fr/hud/skills.ftl @@ -120,38 +120,6 @@ hud-skill-bow_shotgun_arrow_count_title = Flèches du fusil à pompe hud-skill-bow_shotgun_arrow_count = Augmente de { $boost } le nombre de flèches dans la rafale{ $SP } hud-skill-bow_shotgun_spread_title = Dispersion du fusil à pompe hud-skill-bow_shotgun_spread = Diminue de { $boost } % la dispersion des flèches{ $SP }. -hud-skill-hmr_leap_radius_title = Rayon du Bond -hud-skill-hmr_leap_radius = Augmente le rayon d'attaque de { $boost } mètres de la frappe au sol{ $SP } -hud-skill-hmr_leap_distance_title = Distance du Bond -hud-skill-hmr_leap_distance = Augmente de { $boost }% la distance du bond{ $SP } -hud-skill-hmr_leap_cost_title = Coût d'Endurance du Bond -hud-skill-hmr_leap_cost = Diminue de { $boost }% le coût d'endurance du bond{ $SP } -hud-skill-hmr_leap_knockback_title = Projection du Bond -hud-skill-hmr_leap_knockback = Augmente de { $boost }% la force de projection du bond{ $SP } -hud-skill-hmr_leap_damage_title = Dégâts du Bond -hud-skill-hmr_leap_damage = Augmente de { $boost }% les dégâts causés par le bond{ $SP } -hud-skill-hmr_unlock_leap_title = Déblocage du Bond -hud-skill-hmr_unlock_leap = Débloque une compétence permettant de s'élancer dans les airs pour frapper un ennemi lointain{ $SP } -hud-skill-hmr_charged_melee_title = Coup Chargé -hud-skill-hmr_charged_melee = Un coup mais chargé. -hud-skill-hmr_charged_rate_title = Vitesse de Charge -hud-skill-hmr_charged_rate = Augmente de { $boost }% la vitesse du chargement de votre frappe{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = Drain d'endurance du Coup Chargé -hud-skill-hmr_charged_melee_nrg_drain = Diminue de { $boost }% la vitesse de drain d'endurance du chargement de votre coup{ $SP } -hud-skill-hmr_charged_melee_damage_title = Dégâts du Coup Chargé -hud-skill-hmr_charged_melee_damage = Augmente de { $boost }% les dégâts du coup chargé{ $SP } -hud-skill-hmr_charged_melee_knockback_title = Projection du Coup Chargé -hud-skill-hmr_charged_melee_knockback = Augmente significativement la force de projection de { $boost }%{ $SP } -hud-skill-hmr_single_strike_title = Frappe Simple -hud-skill-hmr_single_strike = Aussi simple que vous. -hud-skill-hmr_single_strike_regen_title = Régénération d'Endurance de la Frappe Simple -hud-skill-hmr_single_strike_regen = Augmente le gain d'endurance à chaque frappe successive{ $SP } -hud-skill-hmr_single_strike_speed_title = Vitesse de la Frappe Simple -hud-skill-hmr_single_strike_speed = Augmente la vitesse d'attaque à chaque frappe successive{ $SP } -hud-skill-hmr_single_strike_damage_title = Dégâts de la Frappe Simple -hud-skill-hmr_single_strike_damage = Augmente les dégâts à chaque frappe successive{ $SP } -hud-skill-hmr_single_strike_knockback_title = Projection de la Frappe Simple -hud-skill-hmr_single_strike_knockback = Augmente de { $boost }% la force de projection{ $SP } hud-skill-mining_title = Minage hud-skill-pick_strike_title = Coup de pioche hud-skill-pick_strike = Miner des rochers avec la pioche pour récupérer des minerais, des gemmes et de l'expérience. diff --git a/assets/voxygen/i18n/hu/hud/skills.ftl b/assets/voxygen/i18n/hu/hud/skills.ftl index 8d2f8292ac..e86892f089 100644 --- a/assets/voxygen/i18n/hu/hud/skills.ftl +++ b/assets/voxygen/i18n/hu/hud/skills.ftl @@ -115,38 +115,6 @@ hud-skill-bow_shotgun_arrow_count_title = Szórólövés nyilai hud-skill-bow_shotgun_arrow_count = Megnöveli a szétlőtt nyilak számát ennyivel: { $boost }{ $SP } hud-skill-bow_shotgun_spread_title = Szórólövés szórása hud-skill-bow_shotgun_spread = Csökkenti a nyilak szétrepülésének mértékét { $boost }%-kal{ $SP } -hud-skill-hmr_leap_radius_title = Ugrás sugár -hud-skill-hmr_leap_radius = Megnöveli a támadási sugarat földbecsapódáskor { $boost } méterrel{ $SP } -hud-skill-hmr_leap_distance_title = Ugrás távolság -hud-skill-hmr_leap_distance = Megnöveli az ugrás hosszát { $boost }%-kal{ $SP } -hud-skill-hmr_leap_cost_title = Ugrás energiaigénye -hud-skill-hmr_leap_cost = Csökkenti az ugrás energiaigényét { $boost }%-kal{ $SP } -hud-skill-hmr_leap_knockback_title = Ugrás hátralökés -hud-skill-hmr_leap_knockback = Megnöveli az ugrásból származó hátralökést { $boost }%-kal{ $SP } -hud-skill-hmr_leap_damage_title = Ugrás sebzés -hud-skill-hmr_leap_damage = Megnöveli az ugrás sebzését { $boost }%-kal{ $SP } -hud-skill-hmr_unlock_leap_title = Ugrás feloldása -hud-skill-hmr_unlock_leap = Feloldja az ugrást{ $SP } -hud-skill-hmr_charged_melee_title = Felhúzott ütés -hud-skill-hmr_charged_melee = Közelharci ütés, de felhúzással -hud-skill-hmr_charged_rate_title = Felhúzási mennyiség -hud-skill-hmr_charged_rate = Megnöveli a felhúzott ütések mennyiségét { $boost }%-kal{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = Felhúzott ütés energiaigény -hud-skill-hmr_charged_melee_nrg_drain = Csökkenti a felhúzás energiaigényét { $boost }%-kal{ $SP } -hud-skill-hmr_charged_melee_damage_title = Felhúzott ütés sebzés -hud-skill-hmr_charged_melee_damage = Növeli a felhúzott ütés sebzését { $boost }%-kal{ $SP } -hud-skill-hmr_charged_melee_knockback_title = Felhúzott ütés visszalökése -hud-skill-hmr_charged_melee_knockback = Masszívan megnöveli az ellökés lehetőségét { $boost }%-kal{ $SP } -hud-skill-hmr_single_strike_title = Egyszeri csapás -hud-skill-hmr_single_strike = Annyira egyedül van, mint te -hud-skill-hmr_single_strike_regen_title = Egyszeri csapás energia visszatöltődése -hud-skill-hmr_single_strike_regen = Megnöveli az energia visszatöltődését minden egyes sikeres csapással{ $SP } -hud-skill-hmr_single_strike_speed_title = Egyszeri csapás sebessége -hud-skill-hmr_single_strike_speed = Megnöveli a támadási sebességet minden egyes sikeres csapással{ $SP } -hud-skill-hmr_single_strike_damage_title = Egyszeri csapás sebzése -hud-skill-hmr_single_strike_damage = Megnöveli a sebzést minden egyes sikeres csapással{ $SP } -hud-skill-hmr_single_strike_knockback_title = Egyszeri csapás visszalökése -hud-skill-hmr_single_strike_knockback = Megnöveli a csapások ellökési sebességét { $boost }%-kal{ $SP } hud-skill-mining_title = Bányászás hud-skill-pick_strike_title = Csákány csapás hud-skill-pick_strike = Üss köveket a csákánnyal, hogy érceket, drágaköveket és tapasztalatot szerezz diff --git a/assets/voxygen/i18n/it/hud/ability.ftl b/assets/voxygen/i18n/it/hud/ability.ftl index ea0f03090f..d197e02253 100644 --- a/assets/voxygen/i18n/it/hud/ability.ftl +++ b/assets/voxygen/i18n/it/hud/ability.ftl @@ -8,8 +8,6 @@ common-abilities-debug-glide_boost = Vroom .desc = Ti dà la spinta per raggiungere il cielo common-abilities-debug-glide_speeder = Vroom .desc = Ti dà la spinta per arrivare ovunque arrivi il tuo sguardo -common-abilities-hammer-leap = Colpo del destino - .desc = Un attacco ad area con contraccolpo. Salta alla posizione del cursore. common-abilities-bow-shotgun = Raffica .desc = Spara una serie di frecce common-abilities-staff-fireshockwave = Anello di fuoco diff --git a/assets/voxygen/i18n/it/hud/skills.ftl b/assets/voxygen/i18n/it/hud/skills.ftl index a9e49a1f64..f2aba5a713 100644 --- a/assets/voxygen/i18n/it/hud/skills.ftl +++ b/assets/voxygen/i18n/it/hud/skills.ftl @@ -120,38 +120,6 @@ hud-skill-bow_shotgun_arrow_count_title = Frecce colpo multiplo hud-skill-bow_shotgun_arrow_count = Incrementa il numero di frecce nel colpo del { $boost }{ $SP } hud-skill-bow_shotgun_spread_title = Propagazione colpo multiplo hud-skill-bow_shotgun_spread = Diminuisce la propagazione delle frecce del { $boost }%{ $SP } -hud-skill-hmr_leap_radius_title = Portata balzo -hud-skill-hmr_leap_radius = Incrementa la portata di attacco dello schianto di { $boost } metro{ $SP } -hud-skill-hmr_leap_distance_title = Distanza balzo -hud-skill-hmr_leap_distance = Incrementa la distanza del balzo del { $boost }%{ $SP } -hud-skill-hmr_leap_cost_title = Costo balzo -hud-skill-hmr_leap_cost = Diminuisce il costo del balzo del { $boost }%{ $SP } -hud-skill-hmr_leap_knockback_title = Contraccolpo balzo -hud-skill-hmr_leap_knockback = Incrementa il contraccolpo dal balzo del { $boost }%{ $SP } -hud-skill-hmr_leap_damage_title = Danno balzo -hud-skill-hmr_leap_damage = Incrementa il danno del balzo del { $boost }%{ $SP } -hud-skill-hmr_unlock_leap_title = Sblocca balzo -hud-skill-hmr_unlock_leap = Sblocca uno sbalzo{ $SP } -hud-skill-hmr_charged_melee_title = Attacco ravvicinato caricato -hud-skill-hmr_charged_melee = Attacco ravvicinato ma con carica -hud-skill-hmr_charged_rate_title = Velocità carica -hud-skill-hmr_charged_rate = Incrementa la velocità a cui carichi il colpo del { $boost }%{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = Drenaggio energia dell'attacco ravvicinato caricato -hud-skill-hmr_charged_melee_nrg_drain = Diminuisce la velocità a cui l'energia viene drenata durante il caricamento del { $boost }%{ $SP } -hud-skill-hmr_charged_melee_damage_title = Danno dell'attacco ravvicinato caricato -hud-skill-hmr_charged_melee_damage = Incrementa il danno del colpo caricato del { $boost }%{ $SP } -hud-skill-hmr_charged_melee_knockback_title = Contraccolpo dell'attacco ravvicinato caricato -hud-skill-hmr_charged_melee_knockback = Incrementa enormemente il potenziale di lancio del colpo del { $boost }%{ $SP } -hud-skill-hmr_single_strike_title = Colpo singolo -hud-skill-hmr_single_strike = Proprio come te -hud-skill-hmr_single_strike_regen_title = Rigenerazione colpo singolo -hud-skill-hmr_single_strike_regen = Incrementa il guadagno di energia per ogni colpo in successione{ $SP } -hud-skill-hmr_single_strike_speed_title = Velocità colpo singolo -hud-skill-hmr_single_strike_speed = Incrementa la velocità d'attacco per ogni colpo in successione{ $SP } -hud-skill-hmr_single_strike_damage_title = Danno colpo singolo -hud-skill-hmr_single_strike_damage = Incrementa il danno per ogni colpo in successione{ $SP } -hud-skill-hmr_single_strike_knockback_title = Contraccolpo colpo singolo -hud-skill-hmr_single_strike_knockback = Incrementa il potenziale di lancio dei colpi del { $boost }%{ $SP } hud-skill-mining_title = Estrazione mineraria hud-skill-pick_strike_title = Picconata hud-skill-pick_strike = Colpisci rocce col piccone per ottenere materiale grezzo, gemme ed esperienza diff --git a/assets/voxygen/i18n/ja/hud/skills.ftl b/assets/voxygen/i18n/ja/hud/skills.ftl index 60f9f98c42..b474d24949 100644 --- a/assets/voxygen/i18n/ja/hud/skills.ftl +++ b/assets/voxygen/i18n/ja/hud/skills.ftl @@ -97,35 +97,3 @@ hud-skill-bow_charged_speed_title = チャージド スピード hud-skill-bow_charged_speed = Increases the rate that you charge the attack by { $boost }%{ $SP } hud-skill-bow_charged_damage_title = チャージド ダメージ hud-skill-bow_charged_damage = Increases damage by { $boost }%{ $SP } -hud-skill-hmr_leap_radius_title = リープ 範囲 -hud-skill-hmr_leap_radius = グランドスラムの攻撃半径を{ $boost }m増加 { $SP } -hud-skill-hmr_leap_distance_title = リープ 距離 -hud-skill-hmr_leap_distance = リープの距離を{ $boost }%増加 { $SP } -hud-skill-hmr_leap_cost_title = リープ コスト -hud-skill-hmr_leap_cost = リープのコストを{ $boost }%減少 { $SP } -hud-skill-hmr_leap_knockback_title = リープ ノックバック -hud-skill-hmr_leap_knockback = リープのノックバックを{ $boost }%増加 { $SP } -hud-skill-hmr_leap_damage_title = リープ ダメージ -hud-skill-hmr_leap_damage = リープのダメージを{ $boost }%増加 { $SP } -hud-skill-hmr_unlock_leap_title = リープ解除 -hud-skill-hmr_unlock_leap = リープを解除 { $SP } -hud-skill-hmr_charged_melee_title = チャージドメレー -hud-skill-hmr_charged_melee = チャージ付き乱闘 -hud-skill-hmr_charged_rate_title = チャージ レート -hud-skill-hmr_charged_rate = Increases the rate that you charge the swing by { $boost }%{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = チャージドメレー エナジードレイン -hud-skill-hmr_charged_melee_nrg_drain = Decreases the rate energy drains when charging by { $boost }%{ $SP } -hud-skill-hmr_charged_melee_damage_title = チャージドメレー ダメージ -hud-skill-hmr_charged_melee_damage = Increases the damage of the charged swing by { $boost }%{ $SP } -hud-skill-hmr_charged_melee_knockback_title = チャージドメレー ノックバック -hud-skill-hmr_charged_melee_knockback = Massively increases throw potential of swing by { $boost }%{ $SP } -hud-skill-hmr_single_strike_title = シングルストライク -hud-skill-hmr_single_strike = As single as you are -hud-skill-hmr_single_strike_regen_title = シングルストライク 再生 -hud-skill-hmr_single_strike_regen = Increases stamina gain with each successive strike{ $SP } -hud-skill-hmr_single_strike_speed_title = シングルストライク スピード -hud-skill-hmr_single_strike_speed = Increases the attack speed with each successive strike{ $SP } -hud-skill-hmr_single_strike_damage_title = シングルストライク ダメージ -hud-skill-hmr_single_strike_damage = Increases the damage with each successive strike{ $SP } -hud-skill-hmr_single_strike_knockback_title = シングルストライク ノックバック -hud-skill-hmr_single_strike_knockback = スイングして投げる能力を{ $boost }%増加 { $SP } diff --git a/assets/voxygen/i18n/ko/hud/ability.ftl b/assets/voxygen/i18n/ko/hud/ability.ftl index 5458ec352f..de747e396f 100644 --- a/assets/voxygen/i18n/ko/hud/ability.ftl +++ b/assets/voxygen/i18n/ko/hud/ability.ftl @@ -1,7 +1,5 @@ common-abilities-debug-possess = 빙의 화살 .desc = 독 화살을 쏜다. 대상을 조종할수 있다. -common-abilities-hammer-leap = 멸망의 베기 - .desc = 커서의 위치로 뛰어 광역으로 베며 적을 밀친다. common-abilities-bow-shotgun = 난사 .desc = 화살을 여러발 쏜다. common-abilities-staff-fireshockwave = 불의 고리 diff --git a/assets/voxygen/i18n/ko/hud/skills.ftl b/assets/voxygen/i18n/ko/hud/skills.ftl index d962188429..d599b2ed6c 100644 --- a/assets/voxygen/i18n/ko/hud/skills.ftl +++ b/assets/voxygen/i18n/ko/hud/skills.ftl @@ -118,38 +118,6 @@ hud-skill-bow_shotgun_arrow_count_title = 샷건 화살수 hud-skill-bow_shotgun_arrow_count = 한번에 쏘는 화살의 갯수가 { $boost }개 늘어난다{ $SP } hud-skill-bow_shotgun_spread_title = 샷건 퍼짐 hud-skill-bow_shotgun_spread = 샷건의 화살이 퍼지는 정도가 { $boost }% 감소한다{ $SP } -hud-skill-hmr_leap_radius_title = 높이뛰기 범위 -hud-skill-hmr_leap_radius = 땅에 착지할때 충격파의 범위가 { $boost }미터 늘어난다{ $SP } -hud-skill-hmr_leap_distance_title = 높이뛰기 거리 -hud-skill-hmr_leap_distance = 높이뛰기의 거리가 { $boost }% 늘어난다{ $SP } -hud-skill-hmr_leap_cost_title = 높이뛰기 기력 소모 -hud-skill-hmr_leap_cost = 높이뛰기의 기력 소모가 { $boost }% 감소한다{ $SP } -hud-skill-hmr_leap_knockback_title = 높이뛰기 밀침 -hud-skill-hmr_leap_knockback = 높이뛰기가 적을 { $boost }% 멀리 밀친다{ $SP } -hud-skill-hmr_leap_damage_title = 높이뛰기 피해 -hud-skill-hmr_leap_damage = 높이뛰기의 피해가 { $boost }% 증가한다{ $SP } -hud-skill-hmr_unlock_leap_title = 높이뛰기 해금 -hud-skill-hmr_unlock_leap = 높이뛰기를 해금한다{ $SP } -hud-skill-hmr_charged_melee_title = 모아치기 -hud-skill-hmr_charged_melee = 힘을 모아서 공격한다 -hud-skill-hmr_charged_rate_title = 모아치기 모으기 -hud-skill-hmr_charged_rate = 모아치기가 힘을 모으는 속도가 { $boost }% 빨라진다{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = 모아치기 기력 소모 -hud-skill-hmr_charged_melee_nrg_drain = 모아치기가 기력을 { $boost }% 덜 소모한다{ $SP } -hud-skill-hmr_charged_melee_damage_title = 모아치기 피해 -hud-skill-hmr_charged_melee_damage = 모아치기의 피해가 { $boost }% 증가한다{ $SP } -hud-skill-hmr_charged_melee_knockback_title = 모아치기 밀침 -hud-skill-hmr_charged_melee_knockback = 모아치기가 적을 { $boost }% 멀리 밀친다{ $SP } -hud-skill-hmr_single_strike_title = 내려치기 -hud-skill-hmr_single_strike = 적을 내려친다 -hud-skill-hmr_single_strike_regen_title = 내려치기 기력 재생 -hud-skill-hmr_single_strike_regen = 적을 공격할수록 내려치기가 기력을 더 많이 재생한다{ $SP } -hud-skill-hmr_single_strike_speed_title = 내려치기 속도 -hud-skill-hmr_single_strike_speed = 적을 공격할수록 내려치기의 속도가 빨라진다{ $SP } -hud-skill-hmr_single_strike_damage_title = 내려치기 피해 -hud-skill-hmr_single_strike_damage = 적을 공격할수록 내려치기의 피해가 증가한다{ $SP } -hud-skill-hmr_single_strike_knockback_title = 내려치기 밀침 -hud-skill-hmr_single_strike_knockback = 내려치기가 적을 { $boost }% 멀리 밀친다{ $SP } hud-skill-mining_title = 채굴 hud-skill-pick_strike_title = 곡괭이 내려치기 hud-skill-pick_strike = 돌을 곡괭이로 내려쳐서 광물과 경험치를 얻는다 diff --git a/assets/voxygen/i18n/pl/hud/ability.ftl b/assets/voxygen/i18n/pl/hud/ability.ftl index 58e7468ecd..00437cae75 100644 --- a/assets/voxygen/i18n/pl/hud/ability.ftl +++ b/assets/voxygen/i18n/pl/hud/ability.ftl @@ -1,7 +1,5 @@ common-abilities-debug-possess = Strzała Opętania .desc = Pozwala przejąć kontrolę nad twoim celem. -common-abilities-hammer-leap = Uderzenie Zagłady - .desc = Atak obszarowy z odrzutem. Skaczesz w kierunku kursora, uderzając w ziemię swoim młotem. common-abilities-bow-shotgun = Salwa .desc = Wystrzeliwujesz salwę strzał. common-abilities-staff-fireshockwave = Pierścień Ognia diff --git a/assets/voxygen/i18n/pl/hud/skills.ftl b/assets/voxygen/i18n/pl/hud/skills.ftl index b5ac6abcf0..84eec1bbdf 100644 --- a/assets/voxygen/i18n/pl/hud/skills.ftl +++ b/assets/voxygen/i18n/pl/hud/skills.ftl @@ -119,38 +119,6 @@ hud-skill-bow_shotgun_arrow_count_title = Wielostrzał - Ilość Strzał hud-skill-bow_shotgun_arrow_count = Zwiększa ilość strzał wystrzelonych na raz o { $boost }{ $SP } hud-skill-bow_shotgun_spread_title = Wielostrzał - Celność hud-skill-bow_shotgun_spread = Zmniejsza rozrzut strzał o { $boost }%{ $SP } -hud-skill-hmr_leap_radius_title = Tąpnięcie - zasięg -hud-skill-hmr_leap_radius = Zwiększa zasięg o { $boost } metr{ $SP } -hud-skill-hmr_leap_distance_title = Tąpnięcie - doskok -hud-skill-hmr_leap_distance = Zwiększa doskok o { $boost }%{ $SP } -hud-skill-hmr_leap_cost_title = Tąpnięcie - koszt -hud-skill-hmr_leap_cost = Zmniejsza koszt tąpnięcia o { $boost }%{ $SP } -hud-skill-hmr_leap_knockback_title = Tąpnięcie - odrzut -hud-skill-hmr_leap_knockback = Odrzucenie przeciwników zwiększone o { $boost }%{ $SP } -hud-skill-hmr_leap_damage_title = Tąpnięcie - obrażenia -hud-skill-hmr_leap_damage = Zwiększa obrażenia o { $boost }%{ $SP } -hud-skill-hmr_unlock_leap_title = Tąpnięcie -hud-skill-hmr_unlock_leap = Odblokowuje tąpnięcie{ $SP } -hud-skill-hmr_charged_melee_title = Miażdżenie -hud-skill-hmr_charged_melee = Ładowany atak młotem -hud-skill-hmr_charged_rate_title = Miażdżenie - ładowanie -hud-skill-hmr_charged_rate = Zwiększa prędkość ładowania o { $boost }%{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = Miażdżenie - męczenie -hud-skill-hmr_charged_melee_nrg_drain = Zmniejsza prędkość męczenia miażdżeniem o { $boost }%{ $SP } -hud-skill-hmr_charged_melee_damage_title = Miażdżenie - obrażenia -hud-skill-hmr_charged_melee_damage = Zwiększa obrażenia miażdżenia o { $boost }%{ $SP } -hud-skill-hmr_charged_melee_knockback_title = Miażdżenie - odrzut -hud-skill-hmr_charged_melee_knockback = Zwiększa odrzucenie przeciwników o { $boost }%{ $SP } -hud-skill-hmr_single_strike_title = Trafienie -hud-skill-hmr_single_strike = Pojedyncze, jedno, porządne -hud-skill-hmr_single_strike_regen_title = Regeneracja Energii -hud-skill-hmr_single_strike_regen = Zwiększa regenerację Energii za każde trafienie{ $SP } -hud-skill-hmr_single_strike_speed_title = Trafienie - szybkość -hud-skill-hmr_single_strike_speed = Zwiększa prędkość ataku za każde trafienie{ $SP } -hud-skill-hmr_single_strike_damage_title = Trafienie - obrażenia -hud-skill-hmr_single_strike_damage = Zwiększa obrażenia za każde trafienie{ $SP } -hud-skill-hmr_single_strike_knockback_title = Trafienie - odrzut -hud-skill-hmr_single_strike_knockback = Zwiększa odrzut o { $boost }%{ $SP } hud-skill-mining_title = Górnictwo hud-skill-pick_strike_title = Wykorzystanie kilofa hud-skill-pick_strike = Niszcz skały kilofem zby zdobywać rudy, kryształy i doświadczenie diff --git a/assets/voxygen/i18n/pt-BR/hud/ability.ftl b/assets/voxygen/i18n/pt-BR/hud/ability.ftl index 0aebf8baf5..a8c33a9a16 100644 --- a/assets/voxygen/i18n/pt-BR/hud/ability.ftl +++ b/assets/voxygen/i18n/pt-BR/hud/ability.ftl @@ -1,7 +1,5 @@ common-abilities-debug-possess = Flecha Marionete .desc = Atira uma flecha venenosa que deixa você controlar seu alvo. -common-abilities-hammer-leap = Golpe da Ruína - .desc = Um Ataque em Área que inflige Empurrão. Salta na direção do cursor do mouse. common-abilities-bow-shotgun = Estrondo .desc = Atira uma sequência de flechas common-abilities-staff-fireshockwave = Anel de Fogo diff --git a/assets/voxygen/i18n/pt-BR/hud/skills.ftl b/assets/voxygen/i18n/pt-BR/hud/skills.ftl index feda1feb55..55a733b5c9 100644 --- a/assets/voxygen/i18n/pt-BR/hud/skills.ftl +++ b/assets/voxygen/i18n/pt-BR/hud/skills.ftl @@ -120,38 +120,6 @@ hud-skill-bow_shotgun_arrow_count_title = Flechas da Shotgun hud-skill-bow_shotgun_arrow_count = Aumenta o número de flechas na sequência em { $boost }.{ $SP } hud-skill-bow_shotgun_spread_title = Espalhamento da Shotgun hud-skill-bow_shotgun_spread = Diminui quanto as flechas se espalham em { $boost }%.{ $SP } -hud-skill-hmr_leap_radius_title = Raio do Salto -hud-skill-hmr_leap_radius = Aumenta o raio da pancada no chão em { $boost } metro.{ $SP } -hud-skill-hmr_leap_distance_title = Distância do Salto -hud-skill-hmr_leap_distance = Aumenta a Distância do Salto em { $boost }%.{ $SP } -hud-skill-hmr_leap_cost_title = Custo do Salto -hud-skill-hmr_leap_cost = Reduz custo do salto em { $boost }%.{ $SP } -hud-skill-hmr_leap_knockback_title = Empurrão do Salto -hud-skill-hmr_leap_knockback = Aumenta empurrão do salto em { $boost }%.{ $SP } -hud-skill-hmr_leap_damage_title = Dano do Salto -hud-skill-hmr_leap_damage = Aumenta dano do salto em { $boost }%.{ $SP } -hud-skill-hmr_unlock_leap_title = Desbloquear Salto -hud-skill-hmr_unlock_leap = Desbloqueia o salto.{ $SP } -hud-skill-hmr_charged_melee_title = Carga Corpo a Corpo -hud-skill-hmr_charged_melee = Ataque de martelo com carga. -hud-skill-hmr_charged_rate_title = Taxa de Carga -hud-skill-hmr_charged_rate = Aumenta a taxa de carga em { $boost }%.{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = Dreno de Emergia em Carga de Ataque -hud-skill-hmr_charged_melee_nrg_drain = Reduz dreno de energia em { $boost }%.{ $SP } -hud-skill-hmr_charged_melee_damage_title = Dano de Ataque Corpo a Corpo Carregado -hud-skill-hmr_charged_melee_damage = Aumenta dano de ataque carregado em { $boost }%.{ $SP } -hud-skill-hmr_charged_melee_knockback_title = Empurrão em Ataque Carregado -hud-skill-hmr_charged_melee_knockback = Aumenta massivamente o potencial de um empurrão em { $boost }%.{ $SP } -hud-skill-hmr_single_strike_title = Ataque único -hud-skill-hmr_single_strike = Único como você é. -hud-skill-hmr_single_strike_regen_title = Regeneração em Ataque Único -hud-skill-hmr_single_strike_regen = Aumenta stamina a cada ataque contínuo.{ $SP } -hud-skill-hmr_single_strike_speed_title = Velocidade de Ataque Único -hud-skill-hmr_single_strike_speed = Aumenta a velocidade de cada ataque contínuo.{ $SP } -hud-skill-hmr_single_strike_damage_title = Dano de Ataque Único -hud-skill-hmr_single_strike_damage = Aumenta o dano de cada ataque contínuo.{ $SP } -hud-skill-hmr_single_strike_knockback_title = Empurrão em Ataque Único -hud-skill-hmr_single_strike_knockback = Aumenta o potencial de empurrar em { $boost }% durante ataques contínuo. { $SP } hud-skill-mining_title = Mineração hud-skill-pick_strike_title = Golpe de Picareta hud-skill-pick_strike = Acerta rochas com a picareta para retirar minérios, gemas e experiência. diff --git a/assets/voxygen/i18n/ro/hud/ability.ftl b/assets/voxygen/i18n/ro/hud/ability.ftl index 7d21247fe5..20ee07f9b0 100644 --- a/assets/voxygen/i18n/ro/hud/ability.ftl +++ b/assets/voxygen/i18n/ro/hud/ability.ftl @@ -1,7 +1,5 @@ common-abilities-debug-possess = Săgeată Manipulatoare .desc = Trage o săgeată otrăvitoare care te lasă să controlezi inamicul. -common-abilities-hammer-leap = Lovitura Morții - .desc = Un atac „Zonă de Efect” cu aruncare. Salt la poziția cursorului. common-abilities-bow-shotgun = Burst .desc = Trage rapid mai multe sageți common-abilities-staff-fireshockwave = Inel de Foc diff --git a/assets/voxygen/i18n/ro/hud/skills.ftl b/assets/voxygen/i18n/ro/hud/skills.ftl index 7e24cee25f..84febbbe3d 100644 --- a/assets/voxygen/i18n/ro/hud/skills.ftl +++ b/assets/voxygen/i18n/ro/hud/skills.ftl @@ -117,38 +117,6 @@ hud-skill-bow_shotgun_arrow_count_title = Shotgun Arrows hud-skill-bow_shotgun_arrow_count = Increases the number of arrows in the burst by { $boost }{ $SP } hud-skill-bow_shotgun_spread_title = Shotgun Spread hud-skill-bow_shotgun_spread = Decreases the spread of the arrows by { $boost }%{ $SP } -hud-skill-hmr_leap_radius_title = Leap Radius -hud-skill-hmr_leap_radius = Increases attack radius on ground slam by { $boost } meter{ $SP } -hud-skill-hmr_leap_distance_title = Leap Distance -hud-skill-hmr_leap_distance = Increases distance of leap by { $boost }%{ $SP } -hud-skill-hmr_leap_cost_title = Leap Cost -hud-skill-hmr_leap_cost = Decreases cost of leap by { $boost }%{ $SP } -hud-skill-hmr_leap_knockback_title = Leap Knockback -hud-skill-hmr_leap_knockback = Increases knockback from leap by { $boost }%{ $SP } -hud-skill-hmr_leap_damage_title = Leap Damage -hud-skill-hmr_leap_damage = Increases damage of leap by { $boost }%{ $SP } -hud-skill-hmr_unlock_leap_title = Unlock Leap -hud-skill-hmr_unlock_leap = Unlocks a leap{ $SP } -hud-skill-hmr_charged_melee_title = Charged Melee -hud-skill-hmr_charged_melee = Melee but with charge -hud-skill-hmr_charged_rate_title = Charge Rate -hud-skill-hmr_charged_rate = Increases the rate that you charge the swing by { $boost }%{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = Charged Melee Energy Drain -hud-skill-hmr_charged_melee_nrg_drain = Decreases the rate energy drains when charging by { $boost }%{ $SP } -hud-skill-hmr_charged_melee_damage_title = Charged Melee Damage -hud-skill-hmr_charged_melee_damage = Increases the damage of the charged swing by { $boost }%{ $SP } -hud-skill-hmr_charged_melee_knockback_title = Charged Melee Knockback -hud-skill-hmr_charged_melee_knockback = Massively increases throw potential of swing by { $boost }%{ $SP } -hud-skill-hmr_single_strike_title = Single Strike -hud-skill-hmr_single_strike = As single as you are -hud-skill-hmr_single_strike_regen_title = Single Strike Regen -hud-skill-hmr_single_strike_regen = Increases energy gain with each successive strike{ $SP } -hud-skill-hmr_single_strike_speed_title = Single Strike Speed -hud-skill-hmr_single_strike_speed = Increases the attack speed with each successive strike{ $SP } -hud-skill-hmr_single_strike_damage_title = Single Strike Damage -hud-skill-hmr_single_strike_damage = Increases the damage with each successive strike{ $SP } -hud-skill-hmr_single_strike_knockback_title = Single Strike Knockback -hud-skill-hmr_single_strike_knockback = Increase throw potential of swings by { $boost }%{ $SP } hud-skill-mining_title = Minare hud-skill-pick_strike_title = Lovitură de Târnăcop hud-skill-pick_strike = Lovește roci cu târnăcopul pentru a primi minereu, gemuri și experiență diff --git a/assets/voxygen/i18n/ru/hud/ability.ftl b/assets/voxygen/i18n/ru/hud/ability.ftl index 70ef098044..16437e522e 100644 --- a/assets/voxygen/i18n/ru/hud/ability.ftl +++ b/assets/voxygen/i18n/ru/hud/ability.ftl @@ -1,7 +1,5 @@ common-abilities-debug-possess = Овладевающая стрела .desc = Стреляет ядовитой стрелой. Позволяет управлять вашей целью. -common-abilities-hammer-leap = Удар смерти - .desc = Атака по некоторой области с отбрасыванием. Совершает прыжок на позицию курсора. common-abilities-bow-shotgun = Мультивыстрел .desc = Выстрел несколькими стрелами одновременно common-abilities-staff-fireshockwave = Пламенное кольцо diff --git a/assets/voxygen/i18n/ru/hud/skills.ftl b/assets/voxygen/i18n/ru/hud/skills.ftl index 1edd8bc07c..ac582ca221 100644 --- a/assets/voxygen/i18n/ru/hud/skills.ftl +++ b/assets/voxygen/i18n/ru/hud/skills.ftl @@ -118,38 +118,6 @@ hud-skill-bow_shotgun_arrow_count_title = Увеличенный колчан hud-skill-bow_shotgun_arrow_count = Увеличивает количество стрел в серии выстрелов на { $boost }{ $SP } hud-skill-bow_shotgun_spread_title = Прицельный выстрел hud-skill-bow_shotgun_spread = Уменьшает разброс стрел на { $boost }%{ $SP } -hud-skill-hmr_leap_radius_title = Радиус удара скачка -hud-skill-hmr_leap_radius = Увеличивает радиус атаки при ударе об землю на { $boost } метров{ $SP } -hud-skill-hmr_leap_distance_title = Расстояние скачка -hud-skill-hmr_leap_distance = Увеличивает расстояние скачка на { $boost }%{ $SP } -hud-skill-hmr_leap_cost_title = Расход энергии -hud-skill-hmr_leap_cost = Снижает затраты энергии на { $boost }%{ $SP } -hud-skill-hmr_leap_knockback_title = Отбрасывание скачком -hud-skill-hmr_leap_knockback = Увеличивает отбрасывание от скачка на { $boost }%{ $SP } -hud-skill-hmr_leap_damage_title = Урон -hud-skill-hmr_leap_damage = Увеличивает урон скачка на { $boost }%{ $SP } -hud-skill-hmr_unlock_leap_title = Разблокировать скачок -hud-skill-hmr_unlock_leap = Разблокирует скачок{ $SP } -hud-skill-hmr_charged_melee_title = Силовая атака -hud-skill-hmr_charged_melee = ПКМ совершает оглушающий удар. Зажатие ПКМ накапливает силу и оглушает врага, отбрасывая его -hud-skill-hmr_charged_rate_title = Скорость -hud-skill-hmr_charged_rate = Увеличивает скорость с которой вы накапливаете силу удара на { $boost }%{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = Расход энергии -hud-skill-hmr_charged_melee_nrg_drain = Уменьшает затраты энергии на { $boost }%{ $SP } -hud-skill-hmr_charged_melee_damage_title = Урон -hud-skill-hmr_charged_melee_damage = Увеличивает урон на { $boost }%{ $SP } -hud-skill-hmr_charged_melee_knockback_title = Оглушение силовой атакой -hud-skill-hmr_charged_melee_knockback = Увеличивает отбрасывание { $boost }%{ $SP } -hud-skill-hmr_single_strike_title = Одиночный удар -hud-skill-hmr_single_strike = Такой же одинокий, как и ты -hud-skill-hmr_single_strike_regen_title = Восстановление энергии -hud-skill-hmr_single_strike_regen = Увеличивает прирост энергии с каждым удачным ударом{ $SP } -hud-skill-hmr_single_strike_speed_title = Скорость -hud-skill-hmr_single_strike_speed = Увеличивает скорость атаки с каждым удачным ударом{ $SP } -hud-skill-hmr_single_strike_damage_title = Урон -hud-skill-hmr_single_strike_damage = Увеличивает урон с каждым удачным ударом{ $SP } -hud-skill-hmr_single_strike_knockback_title = Отбрасывание -hud-skill-hmr_single_strike_knockback = Увеличивает потенциал отбрасывания на { $boost }%{ $SP } hud-skill-mining_title = Добыча hud-skill-pick_strike_title = Удар киркой hud-skill-pick_strike = Разбивай камни киркой, чтобы получить руду, самоцветы и опыт diff --git a/assets/voxygen/i18n/sr/hud/skills.ftl b/assets/voxygen/i18n/sr/hud/skills.ftl index 73a0c7daee..dd82cbb314 100644 --- a/assets/voxygen/i18n/sr/hud/skills.ftl +++ b/assets/voxygen/i18n/sr/hud/skills.ftl @@ -115,38 +115,6 @@ hud-skill-bow_shotgun_arrow_count_title = Стрелна Сачмара hud-skill-bow_shotgun_arrow_count = Повећава број испаљених стрела одједном за { $boost }{ $SP } hud-skill-bow_shotgun_spread_title = Обухват Сачмаре hud-skill-bow_shotgun_spread = Смањује ширину обухвата стрелама за { $boost }%{ $SP } -hud-skill-hmr_leap_radius_title = Домет Наскока -hud-skill-hmr_leap_radius = Повећава домет напада земљаног удара за { $boost } метра{ $SP } -hud-skill-hmr_leap_distance_title = Даљина Наскока -hud-skill-hmr_leap_distance = Повећава даљину наскока за { $boost }%{ $SP } -hud-skill-hmr_leap_cost_title = Цена Наскока -hud-skill-hmr_leap_cost = Смањује цену наскока за { $boost }%{ $SP } -hud-skill-hmr_leap_knockback_title = Скок Одбацивање -hud-skill-hmr_leap_knockback = Повећава одбацивање при наскоку за { $boost }%{ $SP } -hud-skill-hmr_leap_damage_title = Рањавање Наскоком -hud-skill-hmr_leap_damage = Повећава нанете ране при наскоку за { $boost }%{ $SP } -hud-skill-hmr_unlock_leap_title = Откључај Наскок -hud-skill-hmr_unlock_leap = Откључава наскок{ $SP } -hud-skill-hmr_charged_melee_title = Јуришна Блиска Борба -hud-skill-hmr_charged_melee = Блиска борба са јуришом -hud-skill-hmr_charged_rate_title = Брзина Јуриша -hud-skill-hmr_charged_rate = Повећава брзину замаха при јуришу за { $boost }%{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = Енергетско Црпљење Јуришне Борбе -hud-skill-hmr_charged_melee_nrg_drain = Смаљује брзину црпљења снаге при јуришу за { $boost }%{ $SP } -hud-skill-hmr_charged_melee_damage_title = Рањавање Јуришном Борбом -hud-skill-hmr_charged_melee_damage = Повећава ране нанете јуришним замахом за { $boost }%{ $SP } -hud-skill-hmr_charged_melee_knockback_title = Одбацивање при Јуришној Борби -hud-skill-hmr_charged_melee_knockback = Повећава одбацивање при замаху за { $boost }%{ $SP } -hud-skill-hmr_single_strike_title = Једноструки Ударац -hud-skill-hmr_single_strike = Усамљен као и ти -hud-skill-hmr_single_strike_regen_title = Једноструки Ударац Обнова -hud-skill-hmr_single_strike_regen = Повећава обнову снаге после сваког успешног ударца{ $SP } -hud-skill-hmr_single_strike_speed_title = Брзина Једноструког Ударца -hud-skill-hmr_single_strike_speed = Повећава брзину напада после сваког успешног ударца{ $SP } -hud-skill-hmr_single_strike_damage_title = Рањавање Једноструким Ударацем -hud-skill-hmr_single_strike_damage = Повећава рањавање при сваком успешном ударцу{ $SP } -hud-skill-hmr_single_strike_knockback_title = Једноструки Ударац Одбацивање -hud-skill-hmr_single_strike_knockback = Повећава потенцијал одбацивања за { $boost }%{ $SP } hud-skill-mining_title = Рударење hud-skill-pick_strike_title = Ударац Крамп hud-skill-pick_strike = Удари камен крампом да добијеш руду, драгуље и искуство diff --git a/assets/voxygen/i18n/sv/hud/ability.ftl b/assets/voxygen/i18n/sv/hud/ability.ftl index 3e3f36ac9e..f4353ac5b1 100644 --- a/assets/voxygen/i18n/sv/hud/ability.ftl +++ b/assets/voxygen/i18n/sv/hud/ability.ftl @@ -1,7 +1,5 @@ common-abilities-debug-possess = Besättande spil .desc = Skjuter en förgiftad pil. Låter dig kontrollera ditt mål. -common-abilities-hammer-leap = Nederslag - .desc = En attack som träffar ett område och knuffar fiender. Hoppar mot pekarens position. common-abilities-bow-shotgun = Pilskur .desc = Skjuter iväg en skur av pilar. common-abilities-staff-fireshockwave = Eldens ring diff --git a/assets/voxygen/i18n/sv/hud/skills.ftl b/assets/voxygen/i18n/sv/hud/skills.ftl index e4216d72b9..397b411223 100644 --- a/assets/voxygen/i18n/sv/hud/skills.ftl +++ b/assets/voxygen/i18n/sv/hud/skills.ftl @@ -120,38 +120,6 @@ hud-skill-bow_shotgun_arrow_count_title = Hagelgevärspilar hud-skill-bow_shotgun_arrow_count = Ökar antalet pilar i skottsalvan med { $boost }.{ $SP } hud-skill-bow_shotgun_spread_title = Hagelgevärsspridning hud-skill-bow_shotgun_spread = Minskar pilarnas spridning med { $boost } %.{ $SP } -hud-skill-hmr_leap_radius_title = Hoppsradie -hud-skill-hmr_leap_radius = Ökar attackradie vid marknedslag med { $boost } meter.{ $SP } -hud-skill-hmr_leap_distance_title = Hoppsavstånd -hud-skill-hmr_leap_distance = Ökar hoppsavståndet med { $boost } %.{ $SP } -hud-skill-hmr_leap_cost_title = Hoppskostnad -hud-skill-hmr_leap_cost = Minskar hoppskostnaden med { $boost } %.{ $SP } -hud-skill-hmr_leap_knockback_title = Knuffning från hopp -hud-skill-hmr_leap_knockback = Ökar knuffning från hopp med { $boost } %.{ $SP } -hud-skill-hmr_leap_damage_title = Hoppsskada -hud-skill-hmr_leap_damage = Ökar hoppsskada med { $boost } %.{ $SP } -hud-skill-hmr_unlock_leap_title = Lås upp hopp -hud-skill-hmr_unlock_leap = Låser upp ett hopp.{ $SP } -hud-skill-hmr_charged_melee_title = Laddad Närstrid -hud-skill-hmr_charged_melee = Närstrid men med laddning. -hud-skill-hmr_charged_rate_title = Laddningshastighet -hud-skill-hmr_charged_rate = Ökar hur fort du laddar slaget med { $boost } %.{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = Energidränering för Laddad Närstrid -hud-skill-hmr_charged_melee_nrg_drain = Minskar hur fort energi dräneras när du laddar med { $boost } %.{ $SP } -hud-skill-hmr_charged_melee_damage_title = Laddad Närstridsskada -hud-skill-hmr_charged_melee_damage = Ökar skadan från det laddade slaget med { $boost } %.{ $SP } -hud-skill-hmr_charged_melee_knockback_title = Laddad Närstridsknuffning -hud-skill-hmr_charged_melee_knockback = Ökar massivt slagens kastpotential med { $boost } %.{ $SP } -hud-skill-hmr_single_strike_title = Enkelslag -hud-skill-hmr_single_strike = Så singel som du är. -hud-skill-hmr_single_strike_regen_title = Enkelslagsåterhämtning -hud-skill-hmr_single_strike_regen = Ökar energivinst för varje successivt slag.{ $SP } -hud-skill-hmr_single_strike_speed_title = Enkelslagshastighet -hud-skill-hmr_single_strike_speed = Ökar attackhastigheten för varje successivt slag.{ $SP } -hud-skill-hmr_single_strike_damage_title = Enkelslagsskada -hud-skill-hmr_single_strike_damage = Ökar skadan för varje successiv träff.{ $SP } -hud-skill-hmr_single_strike_knockback_title = Enkelslagsknuffning -hud-skill-hmr_single_strike_knockback = Ökar slagens kastpotential med { $boost } %.{ $SP } hud-skill-mining_title = Gruvgrävande hud-skill-pick_strike_title = Hackeslag hud-skill-pick_strike = Slå stenar med hackan för att få malm, ädelstenar och erfarenhet. diff --git a/assets/voxygen/i18n/th/hud/ability.ftl b/assets/voxygen/i18n/th/hud/ability.ftl index 1b8bcdfaae..2d09cb3083 100644 --- a/assets/voxygen/i18n/th/hud/ability.ftl +++ b/assets/voxygen/i18n/th/hud/ability.ftl @@ -1,7 +1,5 @@ common-abilities-debug-possess = ลูกธนูเข้าสิง .desc = ยิงลูกธนูอาบยาพิศ ใช้ควบคุมเป้าหมาย -common-abilities-hammer-leap = ทุบแห่งหายนะ - .desc = โจมตีในวงกล้างพร้องกับทำให้ศัตรูกระเด็น ทุบในตำแหน่งที่เลงไว้ common-abilities-bow-shotgun = รัว .desc = ยิงลูกธนูรัวๆ common-abilities-staff-fireshockwave = วงแหวนแห่งไฟ diff --git a/assets/voxygen/i18n/th/hud/skills.ftl b/assets/voxygen/i18n/th/hud/skills.ftl index fc2ef6e5fe..fecdf0949e 100644 --- a/assets/voxygen/i18n/th/hud/skills.ftl +++ b/assets/voxygen/i18n/th/hud/skills.ftl @@ -117,38 +117,6 @@ hud-skill-bow_shotgun_arrow_count_title = จำนวนลูกธนู hud-skill-bow_shotgun_arrow_count = เพิ่มจำนวนลูกธนูที่ยิงกระจายใช้ { $boost } { $SP } hud-skill-bow_shotgun_spread_title = จุดตาย hud-skill-bow_shotgun_spread = ลดความกระจายของลูกธนูลง { $boost }% { $SP } -hud-skill-hmr_leap_radius_title = รัศมี -hud-skill-hmr_leap_radius = กระโดดทุมมีขอบเขตเพิ่มขึ้นเป็น { $boost } เมตร { $SP } -hud-skill-hmr_leap_distance_title = แชมป์กระโดดไกล -hud-skill-hmr_leap_distance = กระโดนทุบมีระยะทางเพิ่มขึ้น { $boost }% { $SP } -hud-skill-hmr_leap_cost_title = ลดพลังงาน -hud-skill-hmr_leap_cost = กระโดดทุบใช้พลังงานน้อยลง { $boost }% { $SP } -hud-skill-hmr_leap_knockback_title = กระเด็ดออก -hud-skill-hmr_leap_knockback = ศัตรูที่ถูกกระโดดทุบจะกระเด็นออกไกลขึ้น { $boost }% { $SP } -hud-skill-hmr_leap_damage_title = ทรงพลัง -hud-skill-hmr_leap_damage = กระโดดทุบสร้างความเสียหายมากขึ้น { $boost }% { $SP } -hud-skill-hmr_unlock_leap_title = กระโดดทุบ -hud-skill-hmr_unlock_leap = กระโดดขึ้นไปในอากาศแล้วฟาดค้อนใส่ศัตรู{ $SP } -hud-skill-hmr_charged_melee_title = หน้าสะบัด -hud-skill-hmr_charged_melee = ง้างค้อนแล้วฟาดใส่ศัตรูอย่างรุนแรง -hud-skill-hmr_charged_rate_title = ง้างเร็ว -hud-skill-hmr_charged_rate = ง้างค้อนได้เร็วขึ้น { $boost }% { $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = ลดพลังงาน -hud-skill-hmr_charged_melee_nrg_drain = ลดพลังงานทมี่ใช้ในการง้างค้อนลง { $boost }% { $SP } -hud-skill-hmr_charged_melee_damage_title = ทรงพลัง -hud-skill-hmr_charged_melee_damage = เมื่อง้างค้อน สร้างเสียหายกับศัตรูเพิ่มขึ้น { $boost }% { $SP } -hud-skill-hmr_charged_melee_knockback_title = กระเด็ดออก -hud-skill-hmr_charged_melee_knockback = เมื่อง้างค้อน ศัตรูจะกระเด็ดออกไปไกลขึ้น { $boost }% { $SP } -hud-skill-hmr_single_strike_title = ฟาดค้อน -hud-skill-hmr_single_strike = ฟาดค้อนใส่ศัตรู -hud-skill-hmr_single_strike_regen_title = ฟื้นฟูพลังงาน -hud-skill-hmr_single_strike_regen = พื้นฟูพลังงาน เมื่อฟาดค้อนใส่ศัตรูสำเร็จ { $SP } -hud-skill-hmr_single_strike_speed_title = กล้ามแขนเป็นมัด ๆ -hud-skill-hmr_single_strike_speed = ความเร็วโจมตีเพิ่มขึ้น เมื่อฟาดค้อนใส่ศัตรูสำเร็จต่อเนื่องกัน{ $SP } -hud-skill-hmr_single_strike_damage_title = ทรงพลัง -hud-skill-hmr_single_strike_damage = ฟาดค้อนสร้างความเสียหายมากขึ้น { $SP } -hud-skill-hmr_single_strike_knockback_title = กระเด็ดออก -hud-skill-hmr_single_strike_knockback = เมื่อถูกฟาด ศัตรูจะกระเด็ดออกไปไกลขึ้น { $boost }% { $SP } hud-skill-mining_title = ขุดหิน hud-skill-pick_strike_title = ขุด ขุด ขุด hud-skill-pick_strike = Hit rocks with the pickaxe to gain ore, gems and experience diff --git a/assets/voxygen/i18n/uk/hud/ability.ftl b/assets/voxygen/i18n/uk/hud/ability.ftl index 596558068a..9e5e6aa256 100644 --- a/assets/voxygen/i18n/uk/hud/ability.ftl +++ b/assets/voxygen/i18n/uk/hud/ability.ftl @@ -1,7 +1,5 @@ common-abilities-debug-possess = Заклинаюча Стріла .desc = Стріляє отруйною стрілою. Дає тобі контроль над ціллю. -common-abilities-hammer-leap = Погром - .desc = Атака по області. Стрибок спрямований за курсором. common-abilities-bow-shotgun = Мультипостріл .desc = Постріл купою стріл за раз. common-abilities-staff-fireshockwave = Кільце Вогню @@ -65,7 +63,7 @@ common-abilities-sword-defensive_crescent_slash = Захист: Півмісяч .desc = Діагональний розріз вгору. Парирує атаки ворога common-abilities-sword-crippling_crescent_slash = Руйнівний Півмісячний Розріз .desc = Діагональний розріз вгору, який може викликати кровотечу -common-abilities-sword-cleaving_crescent_slash = Розсікаючий Півмісячний Розріз +common-abilities-sword-cleaving_crescent_slash = Розсікаючий Півмісячний Розріз .desc = Діагональний розріз вгору, який може пробити ворогів veloren-core-pseudo_abilities-sword-fell_strike = Лютий Удар .desc = @@ -105,13 +103,13 @@ veloren-core-pseudo_abilities-sword-cascade = Лавина Модифікується залежно від вашої стійки common-abilities-sword-basic_cascade = Основна Лавина .desc = Основний розріз зверху -common-abilities-sword-heavy_cascade = Важка Лавина +common-abilities-sword-heavy_cascade = Важка Лавина .desc = Розріз зверху, який може похитнути ворога common-abilities-sword-agile_cascade = Спритна Лавина .desc = Швидкий розріз зверху common-abilities-sword-defensive_cascade = Захист: Лавина .desc = Розріз зверху. Парирує атаки ворога -common-abilities-sword-crippling_cascade = Руйнівна Лавина +common-abilities-sword-crippling_cascade = Руйнівна Лавина .desc = Розріз зверху, який може викликати кровотечу common-abilities-sword-cleaving_cascade = Розсікаюча Лавина .desc = Розріз зверху, який може пробити ворогів @@ -121,7 +119,7 @@ veloren-core-pseudo_abilities-sword-cross_cut = Поперечний Розрі Модифікується залежно від вашої стійки common-abilities-sword-basic_cross_cut = Основний Поперечний Розріз .desc = Основний правий і лівий розріз -common-abilities-sword-heavy_cross_cut = Важкий Поперечний Розріз +common-abilities-sword-heavy_cross_cut = Важкий Поперечний Розріз .desc = Правий і лівий розріз, який може похитнути ворога common-abilities-sword-agile_cross_cut = Спритний Поперечний Розріз .desc = Швидкий правий і лівий розріз @@ -147,7 +145,7 @@ veloren-core-pseudo_abilities-sword-finisher = Смертельний Удар .desc = Здатність, що споживає комбо та призначена для завершення бою Смертельний удар буде різним, залежно від вашої стійки -common-abilities-sword-basic_mighty_strike = Могутній Розріз +common-abilities-sword-basic_mighty_strike = Могутній Розріз .desc = Простий, сильний розріз Для використання потрібна помірна кількість комбо @@ -171,7 +169,7 @@ common-abilities-sword-cleaving_bladestorm = Буря Клинків .desc = Знищуйте ворогів кількома циклічними помахами меча Для використання потрібна помірна кількість комбо -common-abilities-sword-cleaving_dual_bladestorm = Буря Клинків +common-abilities-sword-cleaving_dual_bladestorm = Буря Клинків .desc = Знищуйте ворогів кількома циклічними помахами обома мечами Для використання потрібна помірна кількість комбо @@ -179,7 +177,7 @@ common-abilities-sword-heavy_sweep = Важкий Розмах .desc = Важкий, широкий, розмашистий удар, який завдає більшої шкоди ворогу, що хитається Входить у важку стійку -common-abilities-sword-heavy_pommel_strike = Удар Рукояттю +common-abilities-sword-heavy_pommel_strike = Удар Рукояттю .desc = Похитніть ворога тупим ударом по голові Входить у важку стійку @@ -195,7 +193,7 @@ common-abilities-sword-defensive_riposte = Контратака .desc = Парируйте удар перед миттєвою контратакою Входить у захисну стійку -common-abilities-sword-defensive_disengage = Відступ +common-abilities-sword-defensive_disengage = Відступ .desc = Зробіть крок назад після удару Входить у захисну стійку @@ -215,7 +213,7 @@ common-abilities-sword-cleaving_dual_whirlwind_slice = Вихор Порізів .desc = Вдаряйте всіх оточуючих ворогів круговими атаками, використовуючи обидва свої мечі Входить у розсікаючу стійку -common-abilities-sword-cleaving_earth_splitter = Розколювач Землі +common-abilities-sword-cleaving_earth_splitter = Розколювач Землі .desc = Розколи землю. Якщо використовувати під час падіння, то матиме набагато сильніший удар Входить у розсікаючу стійку @@ -259,7 +257,7 @@ common-abilities-sword-cleaving_blade_fever = Шаленість .desc = Нападайте безрозсудніше, збільшуючи силу своїх ударів, залишаючись відкритими для нових атак Для використання потрібна розсікаюча стійка -common-abilities-sword-cleaving_sky_splitter = Розсікач Небес +common-abilities-sword-cleaving_sky_splitter = Розсікач Небес .desc = Потужний удар, який нібито може розколоти небо, але розколює ворогів Для використання потрібна розсікаюча стійка @@ -268,24 +266,24 @@ common-abilities-axe-triple_chop = Потрійна Рубка .desc = Три швидких удари common-abilities-axe-cleave = Розколювач .desc = Рубка донизу, що може створити кілька комбо -common-abilities-axe-brutal_swing = Жорстокий Мах +common-abilities-axe-brutal_swing = Жорстокий Мах .desc = Обертання леза навколо вас -common-abilities-axe-berserk = Берсерк +common-abilities-axe-berserk = Берсерк .desc = Збільшує вашу силу ціною того, що робить вас уразливими common-abilities-axe-rising_tide = Приплив .desc = Удар вгору, який значно збільшує комбо common-abilities-axe-savage_sense = Дике Відчуття .desc = Визначте життєво важливу точку на вашій цілі, щоб ваш наступний удар завдав їй серйозної шкоди -common-abilities-axe-adrenaline_rush = Приплив Адреналіну +common-abilities-axe-adrenaline_rush = Приплив Адреналіну .desc = Використайте все своє комбо, щоб відновити витривалість Масштабується з комбо при активації, споживає все комбо -common-abilities-axe-execute = Страта +common-abilities-axe-execute = Страта .desc = Нищівний удар, який часто буває смертельним Потребує 30 комбо для використання Автоматично оновлюється до вихру при 50 комбо, якщо його розблоковано -common-abilities-axe-maelstrom = Вихор +common-abilities-axe-maelstrom = Вихор .desc = Вдаряйте все, що знаходиться поблизу, нищівним обертовим ударом Автоматично оновлюється з страти при 50 комбо @@ -312,7 +310,7 @@ common-abilities-axe-riptide = Розривна Течія .desc = Роздеріть усіх ворогів, які знаходяться поблизу, викликаючи кровотечу Автоматично оновлюється з розрива при 50 комбо -common-abilities-axe-skull_bash = Удар По Черепу +common-abilities-axe-skull_bash = Удар По Черепу .desc = Удар плоскою частиною сокири, який може похитнути ворога common-abilities-axe-sunder = Розкол .desc = Змінивши хват, ви зможете обійти броню ворога, відновлюючи свою енергію ефективніше diff --git a/assets/voxygen/i18n/uk/hud/skills.ftl b/assets/voxygen/i18n/uk/hud/skills.ftl index fc096cf7f1..f5173dc481 100644 --- a/assets/voxygen/i18n/uk/hud/skills.ftl +++ b/assets/voxygen/i18n/uk/hud/skills.ftl @@ -118,38 +118,6 @@ hud-skill-bow_shotgun_arrow_count_title = Кількість стріл hud-skill-bow_shotgun_arrow_count = Збільшує кількість стріл на { $boost }{ $SP } hud-skill-bow_shotgun_spread_title = Кучність стріл hud-skill-bow_shotgun_spread = Зменшує розліт стріл на { $boost }%{ $SP } -hud-skill-hmr_leap_radius_title = Радіус ударної хвилі від атаки в стрибку -hud-skill-hmr_leap_radius = Збільшує радіус ударної хвилі від атаки в стрибку на { $boost } метр{ $SP } -hud-skill-hmr_leap_distance_title = Дальність стрибка -hud-skill-hmr_leap_distance = Збільшує дальність стрибка на { $boost }%{ $SP } -hud-skill-hmr_leap_cost_title = Енергоспоживання атаки в стрибку -hud-skill-hmr_leap_cost = Атака в стрибку споживає на { $boost }% менше енергії{ $SP } -hud-skill-hmr_leap_knockback_title = Відкидання атакою в стрибку -hud-skill-hmr_leap_knockback = Збільшує відстань відкидання від атаки в стрибку на { $boost }%{ $SP } -hud-skill-hmr_leap_damage_title = Ушкодження атакою в стрибку -hud-skill-hmr_leap_damage = Збільшує ушкодження від атаки в стрибку на { $boost }%{ $SP } -hud-skill-hmr_unlock_leap_title = Атака в стрибку -hud-skill-hmr_unlock_leap = Відкриває атаку в стрибку{ $SP } -hud-skill-hmr_charged_melee_title = Заряджена холодна зброя -hud-skill-hmr_charged_melee = На холоді розряджається скоріше -hud-skill-hmr_charged_rate_title = Швидкість потужного удару -hud-skill-hmr_charged_rate = Збільшує швидкість зарядження потужного удару на { $boost }%{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = Енергоспоживання потужного удару -hud-skill-hmr_charged_melee_nrg_drain = Зарядження потужного удару споживає на { $boost }% менше енергії{ $SP } -hud-skill-hmr_charged_melee_damage_title = Ушкодження потужним ударом -hud-skill-hmr_charged_melee_damage = Збільшує ушкодження потужним ударом на { $boost }%{ $SP } -hud-skill-hmr_charged_melee_knockback_title = Відкидання потужним ударом -hud-skill-hmr_charged_melee_knockback = Збільшує відстань відкидання ворогів потужним ударом на { $boost }%{ $SP } -hud-skill-hmr_single_strike_title = Одиночний Удар -hud-skill-hmr_single_strike = Одинокий як ти -hud-skill-hmr_single_strike_regen_title = Комбо приріст відновлення енергії -hud-skill-hmr_single_strike_regen = Збільшує приріст відновлення енергії від ударів підряд{ $SP } -hud-skill-hmr_single_strike_speed_title = Комбо приріст швидкості -hud-skill-hmr_single_strike_speed = Збільшує приріст швидкості від ударів підряд{ $SP } -hud-skill-hmr_single_strike_damage_title = Комбо приріст ушкодження -hud-skill-hmr_single_strike_damage = Збільшує приріст ушкодження від ударів підряд{ $SP } -hud-skill-hmr_single_strike_knockback_title = Відкидання -hud-skill-hmr_single_strike_knockback = Збільшує відстань відкидання ворогів на { $boost }%{ $SP } hud-skill-mining_title = Гірнича справа hud-skill-pick_strike_title = Удар Киркою hud-skill-pick_strike = Шукайте руди та коштовні камені щоб здобути матеріали diff --git a/assets/voxygen/i18n/zh-Hans/hud/ability.ftl b/assets/voxygen/i18n/zh-Hans/hud/ability.ftl index 0f868ded6a..766c99ebdc 100644 --- a/assets/voxygen/i18n/zh-Hans/hud/ability.ftl +++ b/assets/voxygen/i18n/zh-Hans/hud/ability.ftl @@ -1,7 +1,5 @@ common-abilities-debug-possess = 附身箭矢 .desc = 射出一个毒箭矢,使你能够控制你的目标. -common-abilities-hammer-leap = 厄运粉碎 - .desc = 一个拥有击退的AOE(范围)攻击. 跳跃到指定地点. common-abilities-bow-shotgun = 爆发 .desc = 迸发一堆箭矢. common-abilities-staff-fireshockwave = 火焰之圈 diff --git a/assets/voxygen/i18n/zh-Hans/hud/skills.ftl b/assets/voxygen/i18n/zh-Hans/hud/skills.ftl index 49bea7901c..d6da76f467 100644 --- a/assets/voxygen/i18n/zh-Hans/hud/skills.ftl +++ b/assets/voxygen/i18n/zh-Hans/hud/skills.ftl @@ -118,38 +118,6 @@ hud-skill-bow_shotgun_arrow_count_title = 箭矢数量 hud-skill-bow_shotgun_arrow_count = 你迸发时的箭矢数量增加{ $boost }{ $SP } hud-skill-bow_shotgun_spread_title = 集中 hud-skill-bow_shotgun_spread = 减少迸发的散布{ $boost }%{ $SP } -hud-skill-hmr_leap_radius_title = 震荡 -hud-skill-hmr_leap_radius = 千斤坠伤害的作用半径扩大{ $boost }米{ $SP } -hud-skill-hmr_leap_distance_title = 奋力一跃 -hud-skill-hmr_leap_distance = 飞跃的最大距离提高{ $boost }%{ $SP } -hud-skill-hmr_leap_cost_title = 耐力节省 -hud-skill-hmr_leap_cost = 施展千斤坠需要消耗的耐力减少{ $boost }%{ $SP } -hud-skill-hmr_leap_knockback_title = 冲击强化 -hud-skill-hmr_leap_knockback = 千斤坠击退的效果提高{ $boost }%{ $SP } -hud-skill-hmr_leap_damage_title = 伤害提升 -hud-skill-hmr_leap_damage = 千斤坠造成的伤害提升{ $boost }%{ $SP } -hud-skill-hmr_unlock_leap_title = 千斤坠 -hud-skill-hmr_unlock_leap = 全力飞跃给予敌人强力一击{ $SP } -hud-skill-hmr_charged_melee_title = 蓄力打击 -hud-skill-hmr_charged_melee = 蓄力造成强力打击 -hud-skill-hmr_charged_rate_title = 专注 -hud-skill-hmr_charged_rate = 蓄力效果达到最大化的速度加快{ $boost }%{ $SP } -hud-skill-hmr_charged_melee_nrg_drain_title = 耐力节省 -hud-skill-hmr_charged_melee_nrg_drain = 蓄力时耐力消耗速率降低{ $boost }%{ $SP } -hud-skill-hmr_charged_melee_damage_title = 伤害提升 -hud-skill-hmr_charged_melee_damage = 蓄力打击造成的伤害提升{ $boost }%{ $SP } -hud-skill-hmr_charged_melee_knockback_title = 冲击强化 -hud-skill-hmr_charged_melee_knockback = 蓄力打击击退的效果提高{ $boost }%{ $SP } -hud-skill-hmr_single_strike_title = 锤击 -hud-skill-hmr_single_strike = 挥舞大锤打击敌人 -hud-skill-hmr_single_strike_regen_title = 热身(耐力回复) -hud-skill-hmr_single_strike_regen = 随着连击数增加,每次击中敌人回复更多耐力{ $SP } -hud-skill-hmr_single_strike_speed_title = 热身(攻击速度) -hud-skill-hmr_single_strike_speed = 随着连击数增加,每次击中敌人攻击速度加快{ $SP } -hud-skill-hmr_single_strike_damage_title = 热身(伤害) -hud-skill-hmr_single_strike_damage = 随着连击数增加,每次击中敌人造成的伤害提升{ $SP } -hud-skill-hmr_single_strike_knockback_title = 冲击强化 -hud-skill-hmr_single_strike_knockback = 锤击击退的效果提高{ $boost }%{ $SP } hud-skill-mining_title = 挖矿 hud-skill-pick_strike_title = 镐击 hud-skill-pick_strike = 使用你的镐子敲打石头来获得矿物,宝石和经验 diff --git a/common/src/comp/ability.rs b/common/src/comp/ability.rs index 3332b3e42e..d6d2d336c3 100644 --- a/common/src/comp/ability.rs +++ b/common/src/comp/ability.rs @@ -670,7 +670,6 @@ pub enum CharacterAbilityType { ChargedRanged, DashMelee(StageSection), BasicBlock, - ComboMeleeDeprecated(StageSection, u32), ComboMelee2(StageSection), FinisherMelee(StageSection), DiveMelee(StageSection), @@ -697,9 +696,6 @@ impl From<&CharacterState> for CharacterAbilityType { CharacterState::BasicBlock(_) => Self::BasicBlock, CharacterState::LeapMelee(data) => Self::LeapMelee(data.stage_section), CharacterState::LeapShockwave(data) => Self::LeapShockwave(data.stage_section), - CharacterState::ComboMeleeDeprecated(data) => { - Self::ComboMeleeDeprecated(data.stage_section, data.stage) - }, CharacterState::ComboMelee2(data) => Self::ComboMelee2(data.stage_section), CharacterState::FinisherMelee(data) => Self::FinisherMelee(data.stage_section), CharacterState::DiveMelee(data) => Self::DiveMelee(data.stage_section), @@ -836,18 +832,6 @@ pub enum CharacterAbility { #[serde(default)] meta: AbilityMeta, }, - ComboMeleeDeprecated { - stage_data: Vec>, - initial_energy_gain: f32, - max_energy_gain: f32, - energy_increase: f32, - speed_increase: f32, - max_speed_increase: f32, - scales_from_combo: u32, - ori_modifier: f32, - #[serde(default)] - meta: AbilityMeta, - }, ComboMelee2 { strikes: Vec>, energy_cost_per_strike: f32, @@ -1216,8 +1200,7 @@ impl CharacterAbility { (data.physics.on_ground.is_none() || buildup_duration.is_some()) && update.energy.try_change_by(-*energy_cost).is_ok() }, - CharacterAbility::ComboMeleeDeprecated { .. } - | CharacterAbility::Boost { .. } + CharacterAbility::Boost { .. } | CharacterAbility::GlideBoost { .. } | CharacterAbility::BasicBeam { .. } | CharacterAbility::Blink { .. } @@ -1389,22 +1372,6 @@ impl CharacterAbility { *recover_duration /= stats.speed; *energy_cost /= stats.energy_efficiency; }, - ComboMeleeDeprecated { - ref mut stage_data, - initial_energy_gain: _, - max_energy_gain: _, - energy_increase: _, - speed_increase: _, - max_speed_increase: _, - scales_from_combo: _, - ori_modifier: _, - meta: _, - } => { - *stage_data = stage_data - .iter_mut() - .map(|s| s.adjusted_by_stats(stats)) - .collect(); - }, ComboMelee2 { ref mut strikes, ref mut energy_cost_per_strike, @@ -1823,7 +1790,6 @@ impl CharacterAbility { }, Boost { .. } | GlideBoost { .. } - | ComboMeleeDeprecated { .. } | Blink { .. } | Music { .. } | BasicSummon { .. } @@ -1873,7 +1839,6 @@ impl CharacterAbility { | BasicBeam { .. } | Boost { .. } | GlideBoost { .. } - | ComboMeleeDeprecated { .. } | Blink { .. } | Music { .. } | BasicSummon { .. } @@ -1902,7 +1867,6 @@ impl CharacterAbility { | BasicBeam { meta, .. } | Boost { meta, .. } | GlideBoost { meta, .. } - | ComboMeleeDeprecated { meta, .. } | ComboMelee2 { meta, .. } | Blink { meta, .. } | BasicSummon { meta, .. } @@ -2375,34 +2339,6 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState { prev_aimed_dir: None, is_sneaking: false, }), - CharacterAbility::ComboMeleeDeprecated { - stage_data, - initial_energy_gain, - max_energy_gain, - energy_increase, - speed_increase, - max_speed_increase, - scales_from_combo, - ori_modifier, - meta: _, - } => CharacterState::ComboMeleeDeprecated(combo_melee::Data { - static_data: combo_melee::StaticData { - num_stages: stage_data.len() as u32, - stage_data: stage_data.iter().map(|stage| stage.to_duration()).collect(), - initial_energy_gain: *initial_energy_gain, - max_energy_gain: *max_energy_gain, - energy_increase: *energy_increase, - speed_increase: 1.0 - *speed_increase, - max_speed_increase: *max_speed_increase, - scales_from_combo: *scales_from_combo, - ori_modifier: *ori_modifier, - ability_info, - }, - exhausted: false, - stage: 1, - timer: Duration::default(), - stage_section: StageSection::Buildup, - }), CharacterAbility::ComboMelee2 { strikes, energy_cost_per_strike, diff --git a/common/src/comp/character_state.rs b/common/src/comp/character_state.rs index 8e166cbe68..3b59261a68 100644 --- a/common/src/comp/character_state.rs +++ b/common/src/comp/character_state.rs @@ -123,9 +123,6 @@ pub enum CharacterState { Boost(boost::Data), /// Dash forward and then attack DashMelee(dash_melee::Data), - /// A three-stage attack where each attack pushes player forward - /// and successive attacks increase in damage, while player holds button. - ComboMeleeDeprecated(combo_melee::Data), /// A state where you progress through multiple melee attacks ComboMelee2(combo_melee2::Data), /// A leap followed by a small aoe ground attack @@ -186,7 +183,6 @@ impl CharacterState { | CharacterState::BasicMelee(_) | CharacterState::BasicRanged(_) | CharacterState::DashMelee(_) - | CharacterState::ComboMeleeDeprecated(_) | CharacterState::ComboMelee2(_) | CharacterState::BasicBlock(_) | CharacterState::LeapMelee(_) @@ -263,7 +259,6 @@ impl CharacterState { CharacterState::BasicMelee(_) | CharacterState::BasicRanged(_) | CharacterState::DashMelee(_) - | CharacterState::ComboMeleeDeprecated(_) | CharacterState::ComboMelee2(_) | CharacterState::LeapMelee(_) | CharacterState::LeapShockwave(_) @@ -290,7 +285,6 @@ impl CharacterState { CharacterState::BasicMelee(_) | CharacterState::BasicRanged(_) | CharacterState::DashMelee(_) - | CharacterState::ComboMeleeDeprecated(_) | CharacterState::ComboMelee2(_) | CharacterState::BasicBlock(_) | CharacterState::LeapMelee(_) @@ -432,9 +426,7 @@ impl CharacterState { pub fn is_stunned(&self) -> bool { matches!(self, CharacterState::Stunned(_)) } pub fn is_forced_movement(&self) -> bool { - matches!(self, - CharacterState::ComboMeleeDeprecated(s) if s.stage_section == StageSection::Action) - || matches!(self, CharacterState::ComboMelee2(s) if s.stage_section == StageSection::Action) + matches!(self, CharacterState::ComboMelee2(s) if s.stage_section == StageSection::Action) || matches!(self, CharacterState::DashMelee(s) if s.stage_section == StageSection::Charge) || matches!(self, CharacterState::LeapMelee(s) if s.stage_section == StageSection::Movement) || matches!(self, CharacterState::Roll(s) if s.stage_section == StageSection::Movement) @@ -459,7 +451,6 @@ impl CharacterState { | CharacterState::Wielding(_) | CharacterState::BasicMelee(_) | CharacterState::BasicRanged(_) - | CharacterState::ComboMeleeDeprecated(_) | CharacterState::ComboMelee2(_) | CharacterState::ChargedRanged(_) | CharacterState::RepeaterRanged(_) @@ -515,7 +506,6 @@ impl CharacterState { CharacterState::Roll(data) => data.behavior(j, output_events), CharacterState::Wielding(data) => data.behavior(j, output_events), CharacterState::Equipping(data) => data.behavior(j, output_events), - CharacterState::ComboMeleeDeprecated(data) => data.behavior(j, output_events), CharacterState::ComboMelee2(data) => data.behavior(j, output_events), CharacterState::BasicMelee(data) => data.behavior(j, output_events), CharacterState::BasicRanged(data) => data.behavior(j, output_events), @@ -570,9 +560,6 @@ impl CharacterState { CharacterState::Roll(data) => data.handle_event(j, output_events, action), CharacterState::Wielding(data) => data.handle_event(j, output_events, action), CharacterState::Equipping(data) => data.handle_event(j, output_events, action), - CharacterState::ComboMeleeDeprecated(data) => { - data.handle_event(j, output_events, action) - }, CharacterState::ComboMelee2(data) => data.handle_event(j, output_events, action), CharacterState::BasicMelee(data) => data.handle_event(j, output_events, action), CharacterState::BasicRanged(data) => data.handle_event(j, output_events, action), @@ -627,7 +614,6 @@ impl CharacterState { CharacterState::Roll(data) => Some(data.static_data.ability_info), CharacterState::Wielding(_) => None, CharacterState::Equipping(_) => None, - CharacterState::ComboMeleeDeprecated(data) => Some(data.static_data.ability_info), CharacterState::ComboMelee2(data) => Some(data.static_data.ability_info), CharacterState::BasicMelee(data) => Some(data.static_data.ability_info), CharacterState::BasicRanged(data) => Some(data.static_data.ability_info), @@ -673,7 +659,6 @@ impl CharacterState { CharacterState::Roll(data) => Some(data.stage_section), CharacterState::Equipping(_) => Some(StageSection::Buildup), CharacterState::Wielding(_) => None, - CharacterState::ComboMeleeDeprecated(data) => Some(data.stage_section), CharacterState::ComboMelee2(data) => Some(data.stage_section), CharacterState::BasicMelee(data) => Some(data.stage_section), CharacterState::BasicRanged(data) => Some(data.stage_section), @@ -735,16 +720,6 @@ impl CharacterState { buildup: Some(data.static_data.buildup_duration), ..Default::default() }), - CharacterState::ComboMeleeDeprecated(data) => { - let stage_index = data.stage_index(); - let stage = data.static_data.stage_data[stage_index]; - Some(DurationsInfo { - buildup: Some(stage.base_buildup_duration), - action: Some(stage.base_swing_duration), - recover: Some(stage.base_recover_duration), - ..Default::default() - }) - }, CharacterState::ComboMelee2(data) => { let strike = data.strike_data(); Some(DurationsInfo { @@ -913,7 +888,6 @@ impl CharacterState { CharacterState::Roll(data) => Some(data.timer), CharacterState::Wielding(_) => None, CharacterState::Equipping(data) => Some(data.timer), - CharacterState::ComboMeleeDeprecated(data) => Some(data.timer), CharacterState::ComboMelee2(data) => Some(data.timer), CharacterState::BasicMelee(data) => Some(data.timer), CharacterState::BasicRanged(data) => Some(data.timer), @@ -959,7 +933,6 @@ impl CharacterState { CharacterState::Roll(_) => None, CharacterState::Wielding(_) => None, CharacterState::Equipping(_) => None, - CharacterState::ComboMeleeDeprecated(_) => Some(AttackSource::Melee), CharacterState::ComboMelee2(_) => Some(AttackSource::Melee), CharacterState::BasicMelee(_) => Some(AttackSource::Melee), CharacterState::BasicRanged(data) => { diff --git a/common/src/states/combo_melee.rs b/common/src/states/combo_melee.rs deleted file mode 100644 index a1a6aef699..0000000000 --- a/common/src/states/combo_melee.rs +++ /dev/null @@ -1,386 +0,0 @@ -use crate::{ - combat::{self, Attack, AttackDamage, AttackEffect, CombatEffect, CombatRequirement}, - comp::{ - character_state::OutputEvents, - melee::MultiTarget, - tool::{Stats, ToolKind}, - CharacterState, Melee, StateUpdate, - }, - states::{ - behavior::{CharacterBehavior, JoinData}, - utils::*, - }, - Damage, DamageKind, DamageSource, GroupTarget, Knockback, KnockbackDir, -}; -use serde::{Deserialize, Serialize}; -use std::time::Duration; - -#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)] -pub struct Stage { - /// Specifies which stage the combo attack is in - pub stage: u32, - /// Initial damage of stage - pub base_damage: f32, - /// Damage scaling per combo - pub damage_increase: f32, - /// Initial poise damage of stage - pub base_poise_damage: f32, - /// Poise damage scaling per combo - pub poise_damage_increase: f32, - /// Knockback of stage - pub knockback: f32, - /// Range of attack - pub range: f32, - /// Angle of attack - pub angle: f32, - /// Initial buildup duration of stage (how long until state can deal damage) - pub base_buildup_duration: T, - /// Duration of stage spent in swing (controls animation stuff, and can also - /// be used to handle movement separately to buildup) - pub base_swing_duration: T, - /// At what fraction of the swing duration to apply the melee "hit" - pub hit_timing: f32, - /// Initial recover duration of stage (how long until character exits state) - pub base_recover_duration: T, - /// How much forward movement there is in the swing portion of the stage - pub forward_movement: f32, - /// What kind of damage this stage of the attack does - pub damage_kind: DamageKind, - /// Adds an effect onto the main damage of the attack - pub damage_effect: Option, -} - -impl Stage { - pub fn to_duration(self) -> Stage { - Stage:: { - stage: self.stage, - base_damage: self.base_damage, - damage_increase: self.damage_increase, - base_poise_damage: self.base_poise_damage, - poise_damage_increase: self.poise_damage_increase, - knockback: self.knockback, - range: self.range, - angle: self.angle, - base_buildup_duration: Duration::from_secs_f32(self.base_buildup_duration), - hit_timing: self.hit_timing, - base_swing_duration: Duration::from_secs_f32(self.base_swing_duration), - base_recover_duration: Duration::from_secs_f32(self.base_recover_duration), - forward_movement: self.forward_movement, - damage_kind: self.damage_kind, - damage_effect: self.damage_effect, - } - } - - #[must_use] - pub fn adjusted_by_stats(self, stats: Stats) -> Self { - Self { - stage: self.stage, - base_damage: self.base_damage * stats.power, - damage_increase: self.damage_increase * stats.power, - base_poise_damage: self.base_poise_damage * stats.effect_power, - poise_damage_increase: self.poise_damage_increase * stats.effect_power, - knockback: self.knockback, - range: self.range * stats.range, - angle: self.angle, - base_buildup_duration: self.base_buildup_duration / stats.speed, - base_swing_duration: self.base_swing_duration / stats.speed, - hit_timing: self.hit_timing, - base_recover_duration: self.base_recover_duration / stats.speed, - forward_movement: self.forward_movement, - damage_kind: self.damage_kind, - damage_effect: self.damage_effect.map(|de| de.adjusted_by_stats(stats)), - } - } - - // TODO: name it as using knockback - #[must_use] - pub fn modify_strike(mut self, knockback_mult: f32) -> Self { - self.knockback *= knockback_mult; - self - } -} - -// TODO: Completely rewrite this with skill tree rework. Don't bother converting -// to melee constructor. -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -/// Separated out to condense update portions of character state -pub struct StaticData { - /// Indicates number of stages in combo - pub num_stages: u32, - /// Data for each stage - pub stage_data: Vec>, - /// Initial energy gain per strike - pub initial_energy_gain: f32, - /// Max energy gain per strike - pub max_energy_gain: f32, - /// Energy gain increase per combo - pub energy_increase: f32, - /// (100% - speed_increase) is percentage speed increases from current to - /// max per combo increase - pub speed_increase: f32, - /// This value is the highest percentage speed can increase from the base - /// speed - pub max_speed_increase: f32, - /// Number of times damage scales with combo - pub scales_from_combo: u32, - /// Adjusts turning rate during the attack - pub ori_modifier: f32, - /// What key is used to press ability - pub ability_info: AbilityInfo, -} -/// A sequence of attacks that can incrementally become faster and more -/// damaging. -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct Data { - /// Struct containing data that does not change over the course of the - /// character state - pub static_data: StaticData, - /// Whether the attack was executed already - pub exhausted: bool, - /// Indicates what stage the combo is in - pub stage: u32, - /// Timer for each stage - pub timer: Duration, - /// Checks what section a stage is in - pub stage_section: StageSection, -} - -impl CharacterBehavior for Data { - fn behavior(&self, data: &JoinData, output_events: &mut OutputEvents) -> StateUpdate { - let mut update = StateUpdate::from(data); - - let combo_counter = data.combo.map_or(0, |c| c.counter()); - - handle_move(data, &mut update, 0.4); - - let stage_index = self.stage_index(); - - let speed_modifier = 1.0 - + self.static_data.max_speed_increase - * (1.0 - self.static_data.speed_increase.powi(combo_counter as i32)); - - match self.stage_section { - StageSection::Buildup => { - if self.timer < self.static_data.stage_data[stage_index].base_buildup_duration { - handle_orientation( - data, - &mut update, - 0.4 * self.static_data.ori_modifier, - None, - ); - - // Build up - update.character = CharacterState::ComboMeleeDeprecated(Data { - static_data: self.static_data.clone(), - timer: tick_attack_or_default(data, self.timer, Some(speed_modifier)), - ..*self - }); - } else { - // Transitions to swing section of stage - update.character = CharacterState::ComboMeleeDeprecated(Data { - static_data: self.static_data.clone(), - timer: Duration::default(), - stage_section: StageSection::Action, - ..*self - }); - } - }, - StageSection::Action => { - if self.timer.as_secs_f32() - > self.static_data.stage_data[stage_index].hit_timing - * self.static_data.stage_data[stage_index] - .base_swing_duration - .as_secs_f32() - && !self.exhausted - { - // Swing - update.character = CharacterState::ComboMeleeDeprecated(Data { - static_data: self.static_data.clone(), - timer: tick_attack_or_default(data, self.timer, None), - exhausted: true, - ..*self - }); - - let damage = self.static_data.stage_data[stage_index].base_damage - + (self - .static_data - .scales_from_combo - .min(combo_counter / self.static_data.num_stages) - as f32) - * self.static_data.stage_data[stage_index].damage_increase; - - let poise = self.static_data.stage_data[stage_index].base_poise_damage - + (self - .static_data - .scales_from_combo - .min(combo_counter / self.static_data.num_stages) - as f32) - * self.static_data.stage_data[stage_index].poise_damage_increase; - let poise = AttackEffect::new( - Some(GroupTarget::OutOfGroup), - CombatEffect::Poise(poise), - ) - .with_requirement(CombatRequirement::AnyDamage); - - let knockback = AttackEffect::new( - Some(GroupTarget::OutOfGroup), - CombatEffect::Knockback(Knockback { - strength: self.static_data.stage_data[stage_index].knockback, - direction: KnockbackDir::Away, - }), - ) - .with_requirement(CombatRequirement::AnyDamage); - - let energy = self.static_data.max_energy_gain.min( - self.static_data.initial_energy_gain - + combo_counter as f32 * self.static_data.energy_increase, - ); - - let energy = AttackEffect::new(None, CombatEffect::EnergyReward(energy)) - .with_requirement(CombatRequirement::AnyDamage); - - let mut damage = AttackDamage::new( - Damage { - source: DamageSource::Melee, - kind: self.static_data.stage_data[stage_index].damage_kind, - value: damage, - }, - Some(GroupTarget::OutOfGroup), - rand::random(), - ); - if let Some(effect) = self.static_data.stage_data[stage_index].damage_effect { - damage = damage.with_effect(effect); - } - - let precision_mult = combat::compute_precision_mult(data.inventory, data.msm); - - let attack = Attack::default() - .with_damage(damage) - .with_precision(precision_mult) - .with_effect(energy) - .with_effect(poise) - .with_effect(knockback) - .with_combo_increment(); - - data.updater.insert(data.entity, Melee { - attack, - range: self.static_data.stage_data[stage_index].range, - max_angle: self.static_data.stage_data[stage_index].angle.to_radians(), - applied: false, - hit_count: 0, - // TODO: Evaluate if we want to leave this true. State will be removed at - // some point anyways and this does preserve behavior - multi_target: Some(MultiTarget::Normal), - simultaneous_hits: 1, - break_block: data - .inputs - .break_block_pos - .map(|p| { - ( - p.map(|e| e.floor() as i32), - self.static_data.ability_info.tool, - ) - }) - .filter(|(_, tool)| { - matches!(tool, Some(ToolKind::Pick | ToolKind::Shovel)) - }), - }); - } else if self.timer < self.static_data.stage_data[stage_index].base_swing_duration - { - handle_orientation( - data, - &mut update, - 0.4 * self.static_data.ori_modifier, - None, - ); - - // Forward movement - handle_forced_movement( - data, - &mut update, - ForcedMovement::Forward( - self.static_data.stage_data[stage_index].forward_movement, - ), - ); - - // Swings - update.character = CharacterState::ComboMeleeDeprecated(Data { - static_data: self.static_data.clone(), - timer: tick_attack_or_default(data, self.timer, Some(speed_modifier)), - ..*self - }); - } else { - // Transitions to recover section of stage - update.character = CharacterState::ComboMeleeDeprecated(Data { - static_data: self.static_data.clone(), - timer: Duration::default(), - stage_section: StageSection::Recover, - ..*self - }); - } - }, - StageSection::Recover => { - if self.timer < self.static_data.stage_data[stage_index].base_recover_duration { - handle_orientation( - data, - &mut update, - 0.8 * self.static_data.ori_modifier, - None, - ); - // Recovers - update.character = CharacterState::ComboMeleeDeprecated(Data { - static_data: self.static_data.clone(), - timer: tick_attack_or_default(data, self.timer, Some(speed_modifier)), - ..*self - }); - } else { - // Done - if input_is_pressed(data, self.static_data.ability_info.input) { - reset_state(self, data, output_events, &mut update); - } else { - end_melee_ability(data, &mut update); - } - } - }, - _ => { - // If it somehow ends up in an incorrect stage section - end_melee_ability(data, &mut update); - }, - } - - // At end of state logic so an interrupt isn't overwritten - handle_interrupts(data, &mut update, output_events); - - update - } -} - -impl Data { - /// Index should be `self.stage - 1`, however in cases of client-server - /// desync this can cause panics. This ensures that `self.stage - 1` is - /// valid, and if it isn't, index of 0 is used, which is always safe. - pub fn stage_index(&self) -> usize { - self.static_data - .stage_data - .get(self.stage as usize - 1) - .map_or(0, |_| self.stage as usize - 1) - } -} - -fn reset_state( - data: &Data, - join: &JoinData, - output_events: &mut OutputEvents, - update: &mut StateUpdate, -) { - handle_input( - join, - output_events, - update, - data.static_data.ability_info.input, - ); - - if let CharacterState::ComboMeleeDeprecated(c) = &mut update.character { - c.stage = (data.stage % data.static_data.num_stages) + 1; - } -} diff --git a/common/src/states/mod.rs b/common/src/states/mod.rs index 2a39c3244e..4e95af5f3f 100644 --- a/common/src/states/mod.rs +++ b/common/src/states/mod.rs @@ -10,7 +10,6 @@ pub mod boost; pub mod charged_melee; pub mod charged_ranged; pub mod climb; -pub mod combo_melee; pub mod combo_melee2; pub mod dance; pub mod dash_melee; diff --git a/common/systems/src/stats.rs b/common/systems/src/stats.rs index b854d967c7..dc5ab7f41c 100644 --- a/common/systems/src/stats.rs +++ b/common/systems/src/stats.rs @@ -150,7 +150,6 @@ impl<'a> System<'a> for Sys { | CharacterState::DashMelee(_) | CharacterState::LeapMelee(_) | CharacterState::LeapShockwave(_) - | CharacterState::ComboMeleeDeprecated(_) | CharacterState::ComboMelee2(_) | CharacterState::BasicRanged(_) | CharacterState::Music(_) diff --git a/server/agent/src/attack.rs b/server/agent/src/attack.rs index 54c58619ac..b443efe71c 100644 --- a/server/agent/src/attack.rs +++ b/server/agent/src/attack.rs @@ -8,7 +8,7 @@ use common::{ ability::{ActiveAbilities, AuxiliaryAbility, Stance, SwordStance, BASE_ABILITY_LIMIT}, buff::BuffKind, item::tool::AbilityContext, - skills::{AxeSkill, BowSkill, HammerSkill, SceptreSkill, Skill, StaffSkill, SwordSkill}, + skills::{AxeSkill, BowSkill, SceptreSkill, Skill, StaffSkill, SwordSkill}, Ability, AbilityInput, Agent, CharacterAbility, CharacterState, ControlAction, ControlEvent, Controller, Fluid, InputKind, }, @@ -271,12 +271,12 @@ impl<'a> AgentData<'a> { pub fn handle_hammer_attack( &self, - agent: &mut Agent, - controller: &mut Controller, - attack_data: &AttackData, - tgt_data: &TargetData, - read_data: &ReadData, - rng: &mut impl Rng, + _agent: &mut Agent, + _controller: &mut Controller, + _attack_data: &AttackData, + _tgt_data: &TargetData, + _read_data: &ReadData, + _rng: &mut impl Rng, ) { // TODO } diff --git a/voxygen/anim/src/character/alpha.rs b/voxygen/anim/src/character/alpha.rs index 2713c29d70..50378a5ca6 100644 --- a/voxygen/anim/src/character/alpha.rs +++ b/voxygen/anim/src/character/alpha.rs @@ -65,7 +65,7 @@ impl Animation for AlphaAnimation { next.head.orientation = Quaternion::rotation_z(move1 * -0.9 + move2 * 1.8); }, - Some(ToolKind::Hammer | ToolKind::Pick | ToolKind::Shovel) => { + Some(ToolKind::Pick | ToolKind::Shovel) => { let (move1, move2, move3) = match stage_section { Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Action) => (1.0, anim_time.powf(0.25), 0.0), @@ -96,7 +96,7 @@ impl Animation for AlphaAnimation { match hands { (Some(Hands::Two), _) | (None, Some(Hands::Two)) => { match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Hammer | ToolKind::Pick) => { + Some(ToolKind::Pick) => { let (move1, move2, move3) = match stage_section { Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0), @@ -168,7 +168,7 @@ impl Animation for AlphaAnimation { next.hand_l.position = Vec3::new(0.0, -0.5, 0.0); next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0) }, - Some(ToolKind::Hammer | ToolKind::Pick | ToolKind::Shovel) => { + Some(ToolKind::Pick | ToolKind::Shovel) => { next.control_l.position = Vec3::new( -7.0, 8.0 + move1 * -4.0 + move2 * 4.0, @@ -197,7 +197,7 @@ impl Animation for AlphaAnimation { next.hand_r.position = Vec3::new(0.0, -0.5, 0.0); next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0) }, - Some(ToolKind::Hammer | ToolKind::Pick | ToolKind::Shovel) => { + Some(ToolKind::Pick | ToolKind::Shovel) => { next.control_r.position = Vec3::new( 7.0, 8.0 + move1 * -4.0 + move2h * 4.0, diff --git a/voxygen/anim/src/character/chargeswing.rs b/voxygen/anim/src/character/chargeswing.rs index 49d48b1a95..9b034b9307 100644 --- a/voxygen/anim/src/character/chargeswing.rs +++ b/voxygen/anim/src/character/chargeswing.rs @@ -2,20 +2,12 @@ use super::{ super::{vek::*, Animation}, CharacterSkeleton, SkeletonAttr, }; -use common::{ - comp::item::{Hands, ToolKind}, - states::utils::{AbilityInfo, StageSection}, -}; +use common::states::utils::StageSection; use core::f32::consts::{PI, TAU}; pub struct ChargeswingAnimation; -type ChargeswingAnimationDependency<'a> = ( - (Option, Option), - Option<&'a str>, - Option, - Option, -); +type ChargeswingAnimationDependency<'a> = (Option<&'a str>, StageSection); impl Animation for ChargeswingAnimation { type Dependency<'a> = ChargeswingAnimationDependency<'a>; @@ -27,7 +19,7 @@ impl Animation for ChargeswingAnimation { #[cfg_attr(feature = "be-dyn-lib", export_name = "character_chargeswing")] fn update_skeleton_inner( skeleton: &Self::Skeleton, - (hands, ability_id, stage_section, ability_info): Self::Dependency<'_>, + (ability_id, stage_section): Self::Dependency<'_>, anim_time: f32, rate: &mut f32, s_a: &SkeletonAttr, @@ -39,7 +31,7 @@ impl Animation for ChargeswingAnimation { next.main.orientation = Quaternion::rotation_z(0.0); next.second.position = Vec3::new(0.0, 0.0, 0.0); next.second.orientation = Quaternion::rotation_z(0.0); - if matches!(stage_section, Some(StageSection::Action)) { + if matches!(stage_section, StageSection::Action) { next.main_weapon_trail = true; next.off_weapon_trail = true; } @@ -50,14 +42,14 @@ impl Animation for ChargeswingAnimation { | "common.abilities.sword.defensive_vital_jab", ) => { let (move1, move2, move3, tension) = match stage_section { - Some(StageSection::Charge) => ( + StageSection::Charge => ( anim_time.powf(0.25).min(1.0), 0.0, 0.0, (anim_time * 20.0).sin() - 0.5, ), - Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0, 0.0), - Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4), 0.0), + StageSection::Action => (1.0, anim_time.powi(2), 0.0, 0.0), + StageSection::Recover => (1.0, 1.0, anim_time.powi(4), 0.0), _ => (0.0, 0.0, 0.0, 0.0), }; let pullback = 1.0 - move3; @@ -83,14 +75,14 @@ impl Animation for ChargeswingAnimation { }, Some("common.abilities.sword.heavy_slam") => { let (move1, move2, move3, tension) = match stage_section { - Some(StageSection::Charge) => ( + StageSection::Charge => ( anim_time.powf(0.25).min(1.0), 0.0, 0.0, (anim_time * 20.0).sin(), ), - Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0, 0.0), - Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4), 0.0), + StageSection::Action => (1.0, anim_time.powi(2), 0.0, 0.0), + StageSection::Recover => (1.0, 1.0, anim_time.powi(4), 0.0), _ => (0.0, 0.0, 0.0, 0.0), }; let pullback = 1.0 - move3; @@ -124,12 +116,12 @@ impl Animation for ChargeswingAnimation { }, Some("common.abilities.sword.crippling_deep_rend") => { let (move1, move2, tension, move3, move4) = match stage_section { - Some(StageSection::Buildup) => (anim_time, 0.0, 0.0, 0.0, 0.0), - Some(StageSection::Charge) => { + StageSection::Buildup => (anim_time, 0.0, 0.0, 0.0, 0.0), + StageSection::Charge => { (1.0, anim_time.min(1.0), (anim_time * 20.0).sin(), 0.0, 0.0) }, - Some(StageSection::Action) => (1.0, 1.0, 0.0, anim_time, 0.0), - Some(StageSection::Recover) => (1.0, 1.0, 0.0, 1.0, anim_time), + StageSection::Action => (1.0, 1.0, 0.0, anim_time, 0.0), + StageSection::Recover => (1.0, 1.0, 0.0, 1.0, anim_time), _ => (0.0, 0.0, 0.0, 0.0, 0.0), }; let move1pre = move1.min(0.5) * 2.0; @@ -189,14 +181,14 @@ impl Animation for ChargeswingAnimation { | "common.abilities.sword.cleaving_dual_spiral_slash", ) => { let (move1, tension, move2, move3) = match stage_section { - Some(StageSection::Charge) => ( + StageSection::Charge => ( anim_time.powf(0.25).min(1.0), (anim_time * 15.0).sin(), 0.0, 0.0, ), - Some(StageSection::Action) => (1.0, 0.0, anim_time, 0.0), - Some(StageSection::Recover) => (1.0, 0.0, 1.0, anim_time), + StageSection::Action => (1.0, 0.0, anim_time, 0.0), + StageSection::Recover => (1.0, 0.0, 1.0, anim_time), _ => (0.0, 0.0, 0.0, 0.0), }; let pullback = 1.0 - move3; @@ -239,11 +231,11 @@ impl Animation for ChargeswingAnimation { }, Some("common.abilities.axe.cleave") => { let (move1, move2, move3, tension) = match stage_section { - Some(StageSection::Charge) => { + StageSection::Charge => { (anim_time.min(1.0), 0.0, 0.0, (anim_time * 20.0).sin()) }, - Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0, 0.0), - Some(StageSection::Recover) => (1.0, 1.0, anim_time, 0.0), + StageSection::Action => (1.0, anim_time.powi(2), 0.0, 0.0), + StageSection::Recover => (1.0, 1.0, anim_time, 0.0), _ => (0.0, 0.0, 0.0, 0.0), }; let pullback = 1.0 - move3; @@ -270,170 +262,7 @@ impl Animation for ChargeswingAnimation { next.control.orientation.rotate_x(move2 * -3.0); next.control.position += Vec3::new(0.0, move2 * 8.0, move2 * -30.0); }, - _ => { - let lab: f32 = 1.0; - - let short = ((5.0 / (1.5 + 3.5 * ((anim_time * lab * 8.0).sin()).powi(2))).sqrt()) - * ((anim_time * lab * 8.0).sin()); - // end spin stuff - - let (move1base, move2base, movement3, tension, test) = match stage_section { - Some(StageSection::Charge) => ( - (anim_time.powf(0.25)).min(1.0), - 0.0, - 0.0, - (anim_time * 18.0 * lab).sin(), - 0.0, - ), - Some(StageSection::Action) => { - (1.0, anim_time.powf(0.25), 0.0, 0.0, anim_time.powi(4)) - }, - Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4), 0.0, 1.0), - _ => (0.0, 0.0, 0.0, 0.0, 0.0), - }; - - if matches!( - stage_section, - Some(StageSection::Charge | StageSection::Action | StageSection::Recover) - ) { - next.main_weapon_trail = true; - next.off_weapon_trail = true; - } - let pullback = 1.0 - movement3; - let move1 = move1base * pullback; - let move2 = move2base * pullback; - let slowrise = test * pullback; - next.second.position = Vec3::new(0.0, 0.0, 0.0); - next.second.orientation = Quaternion::rotation_z(0.0); - - next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1); - - if let Some(ToolKind::Hammer) = ability_info.and_then(|a| a.tool) { - next.main.position = Vec3::new(0.0, 0.0, 0.0); - next.main.orientation = Quaternion::rotation_x(0.0); - - next.chest.orientation = - Quaternion::rotation_z(short * 0.04 + (move1 * 2.0 + move2 * -3.5)); - next.belt.orientation = Quaternion::rotation_z(short * 0.08 + (move1 * -1.0)); - next.shorts.orientation = Quaternion::rotation_z(short * 0.15 + (move1 * -1.5)); - next.head.position = Vec3::new( - 0.0 + (move1 * -1.0 + move2 * 2.0), - s_a.head.0 + (move1 * 1.0), - s_a.head.1, - ); - next.head.orientation = Quaternion::rotation_z(move1 * -1.5 + move2 * 3.2); - next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1); - } - - match hands { - #[allow(clippy::single_match)] - (Some(Hands::Two), _) | (None, Some(Hands::Two)) => { - match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Hammer) => { - next.hand_l.position = - Vec3::new(s_a.hhl.0, s_a.hhl.1, s_a.hhl.2 + (move2 * -8.0)); - next.hand_l.orientation = Quaternion::rotation_x(s_a.hhl.3) - * Quaternion::rotation_y(s_a.hhl.4) - * Quaternion::rotation_z(s_a.hhl.5); - next.hand_r.position = Vec3::new(s_a.hhr.0, s_a.hhr.1, s_a.hhr.2); - next.hand_r.orientation = Quaternion::rotation_x(s_a.hhr.3) - * Quaternion::rotation_y(s_a.hhr.4) - * Quaternion::rotation_z(s_a.hhr.5); - - next.control.position = Vec3::new( - s_a.hc.0 + (move1 * -2.0 + move2 * -8.0), - s_a.hc.1 + (move1 * 2.0 + move2 * 6.0), - s_a.hc.2 + (move1 * -2.0 + slowrise * 8.0), - ); - next.control.orientation = - Quaternion::rotation_x(s_a.hc.3 + (move2 * 0.0)) - * Quaternion::rotation_y( - s_a.hc.4 - + (tension * 0.08 - + move1 * 0.7 - + move2 * -1.0 - + slowrise * 2.0), - ) - * Quaternion::rotation_z( - s_a.hc.5 + (move1 * 0.2 + move2 * -1.0), - ); - }, - _ => {}, - } - }, - (_, _) => {}, - }; - - match hands { - #[allow(clippy::single_match)] - (Some(Hands::One), _) => match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Hammer) => { - next.control_l.position = Vec3::new( - -7.0 + move1 * 4.0, - 8.0 + move1 * 2.0 + move2 * 4.0, - 2.0 + move1 * -1.0 + slowrise * 20.0, - ); - next.control_l.orientation = - Quaternion::rotation_x(-0.3 + move2 * -1.0) - * Quaternion::rotation_y( - tension * 0.07 + move1 * -1.2 + slowrise * 0.5, - ) - * Quaternion::rotation_z(move2 * 1.0); - next.hand_l.position = Vec3::new(0.0, -0.5, 0.0); - next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0) - }, - - _ => {}, - }, - (_, _) => {}, - }; - - match hands { - #[allow(clippy::single_match)] - (None | Some(Hands::One), Some(Hands::One)) => { - match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Hammer) => { - next.control_r.position = Vec3::new( - 7.0 + move1 * 1.0 + move2 * -20.0, - 8.0 + move1 * 1.0 + move2 * 4.0, - 2.0 + move1 * -3.0 + slowrise * 20.0, - ); - next.control_r.orientation = - Quaternion::rotation_x(-0.3 + move2 * -1.0) - * Quaternion::rotation_y( - tension * -0.07 + move1 * -2.0 + slowrise * 1.5, - ) - * Quaternion::rotation_z(move2 * 1.0); - next.hand_r.position = Vec3::new(0.0, -0.5, 0.0); - next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0) - }, - _ => {}, - } - }, - (_, _) => {}, - }; - - match hands { - (None, None) | (None, Some(Hands::One)) => { - next.hand_l.position = Vec3::new(-4.5, 8.0, 5.0); - next.hand_l.orientation = - Quaternion::rotation_x(1.9) * Quaternion::rotation_y(-0.5) - }, - (_, _) => {}, - }; - match hands { - (None, None) | (Some(Hands::One), None) => { - next.hand_r.position = Vec3::new(4.5, 8.0, 5.0); - next.hand_r.orientation = - Quaternion::rotation_x(1.9) * Quaternion::rotation_y(0.5) - }, - (_, _) => {}, - }; - - if let (None, Some(Hands::Two)) = hands { - next.second = next.main; - } - }, + _ => {}, } next diff --git a/voxygen/anim/src/character/leapmelee.rs b/voxygen/anim/src/character/leapmelee.rs index 4e9b0b314a..ad5f3e646c 100644 --- a/voxygen/anim/src/character/leapmelee.rs +++ b/voxygen/anim/src/character/leapmelee.rs @@ -1,22 +1,9 @@ -use super::{ - super::{vek::*, Animation}, - CharacterSkeleton, SkeletonAttr, -}; -use common::{ - comp::item::{Hands, ToolKind}, - states::utils::{AbilityInfo, StageSection}, -}; -use core::f32::consts::PI; +use super::{super::Animation, CharacterSkeleton, SkeletonAttr}; +use common::states::utils::StageSection; pub struct LeapAnimation; -type LeapAnimationDependency = ( - (Option, Option), - Vec3, - f32, - Option, - Option, -); +type LeapAnimationDependency = (StageSection,); impl Animation for LeapAnimation { type Dependency<'a> = LeapAnimationDependency; type Skeleton = CharacterSkeleton; @@ -27,156 +14,14 @@ impl Animation for LeapAnimation { #[cfg_attr(feature = "be-dyn-lib", export_name = "character_leapmelee")] fn update_skeleton_inner( skeleton: &Self::Skeleton, - (hands, _velocity, _global_time, stage_section, ability_info): Self::Dependency<'_>, - anim_time: f32, + _stage_section: Self::Dependency<'_>, + _anim_time: f32, rate: &mut f32, - s_a: &SkeletonAttr, + _s_a: &SkeletonAttr, ) -> Self::Skeleton { *rate = 1.0; - let mut next = (*skeleton).clone(); - - let (movement1, movement2, movement3, move4) = match stage_section { - Some(StageSection::Buildup) => (anim_time, 0.0, 0.0, 0.0), - Some(StageSection::Movement) => (1.0, anim_time.powi(2), 0.0, 0.0), - Some(StageSection::Action) => (1.0, 1.0, anim_time.powf(0.75), 0.0), - Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time.powf(0.75)), - _ => (0.0, 0.0, 0.0, 0.0), - }; - if matches!( - stage_section, - Some(StageSection::Movement | StageSection::Action | StageSection::Recover) - ) { - next.main_weapon_trail = true; - next.off_weapon_trail = true; - } - let pullback = 1.0 - move4; - let move1 = movement1 * pullback; - let move2 = movement2 * pullback; - let move3 = movement3 * pullback; - - next.second.position = Vec3::new(0.0, 0.0, 0.0); - next.second.orientation = Quaternion::rotation_z(0.0); - next.main.position = Vec3::new(0.0, 0.0, 0.0); - next.main.orientation = Quaternion::rotation_z(0.0); - next.torso.position = Vec3::new(0.0, 0.0, 1.1); - next.torso.orientation = Quaternion::rotation_z(0.0); - - match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Hammer) => { - next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1); - - next.chest.orientation = Quaternion::rotation_x(move2 * 0.4 + move3 * -1.5) - * Quaternion::rotation_z(move1 * 0.5 + move2 * 0.2 + move3 * -0.7); - - next.head.orientation = Quaternion::rotation_x(move3 * 0.2) - * Quaternion::rotation_y(move2 * -0.1) - * Quaternion::rotation_z(move1 * -0.4 + move2 * -0.2 + move3 * 0.6); - - next.foot_l.position = Vec3::new( - -s_a.foot.0, - s_a.foot.1 + move3 * 13.0, - s_a.foot.2 + move3 * -2.0, - ); - next.foot_l.orientation = Quaternion::rotation_x(-0.8 + move3 * 1.7); - - next.foot_r.position = Vec3::new( - s_a.foot.0, - s_a.foot.1 + move2 * 8.0 + move3 * -13.0, - s_a.foot.2 + move2 * 5.0 + move3 * -5.0, - ); - next.foot_r.orientation = Quaternion::rotation_x(0.9 + move3 * -1.7); - next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1 + move3 * -5.0); - }, - _ => {}, - } - - match hands { - (Some(Hands::Two), _) | (None, Some(Hands::Two)) => { - match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Hammer) => { - next.hand_l.position = Vec3::new(s_a.hhl.0, s_a.hhl.1, s_a.hhl.2); - next.hand_l.orientation = - Quaternion::rotation_x(s_a.hhl.3) * Quaternion::rotation_z(s_a.hhl.5); - next.hand_r.position = Vec3::new(s_a.hhr.0, s_a.hhr.1, s_a.hhr.2); - next.hand_r.orientation = - Quaternion::rotation_x(s_a.hhr.3) * Quaternion::rotation_z(s_a.hhr.5); - next.main.position = Vec3::new(0.0, 0.0, 0.0); - next.main.orientation = - Quaternion::rotation_y(0.0) * Quaternion::rotation_z(0.0); - next.control.position = Vec3::new( - s_a.hc.0 + move2 * -10.0 + move3 * 10.0, - s_a.hc.1 + move2 * 5.0 + move3 * 7.0, - s_a.hc.2 + move2 * 5.0 + move3 * -10.0, - ); - next.control.orientation = - Quaternion::rotation_x(s_a.hc.3 + move2 * PI / 2.0 + move3 * -2.3) - * Quaternion::rotation_y(s_a.hc.4 + move2 * 1.3) - * Quaternion::rotation_z(s_a.hc.5 + move2 * -1.0 + move3 * 0.5); - }, - _ => {}, - } - }, - (_, _) => {}, - }; - - match hands { - (Some(Hands::One), _) => match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Hammer | ToolKind::Pick) => { - next.control_l.position = Vec3::new( - -7.0, - 8.0 + move2 * -5.0 + move3 * 9.0, - 2.0 + move2 * 8.0 + move3 * -12.0, - ); - next.control_l.orientation = - Quaternion::rotation_x(-0.3 + move2 * 1.5 + move3 * -2.5); - next.hand_l.position = Vec3::new(0.0, -0.5, 0.0); - next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0) - }, - - _ => {}, - }, - (_, _) => {}, - }; - match hands { - (None | Some(Hands::One), Some(Hands::One)) => { - match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Hammer | ToolKind::Pick) => { - next.control_r.position = Vec3::new( - 7.0 + move2 * 3.0 + move3 * -3.0, - 8.0 + move2 * -9.0 + move3 * 15.0, - 2.0 + move2 * 11.0 + move3 * -18.0, - ); - next.control_r.orientation = - Quaternion::rotation_x(-0.3 + move2 * 1.5 + move3 * -2.5) - * Quaternion::rotation_y(move2 * -0.75 + move3 * 0.75); - next.hand_r.position = Vec3::new(0.0, -0.5, 0.0); - next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0) - }, - _ => {}, - } - }, - (_, _) => {}, - }; - - match hands { - (None, None) | (None, Some(Hands::One)) => { - next.hand_l.position = Vec3::new(-4.5, 8.0, 5.0); - next.hand_l.orientation = Quaternion::rotation_x(1.9) * Quaternion::rotation_y(-0.5) - }, - (_, _) => {}, - }; - match hands { - (None, None) | (Some(Hands::One), None) => { - next.hand_r.position = Vec3::new(4.5, 8.0, 5.0); - next.hand_r.orientation = Quaternion::rotation_x(1.9) * Quaternion::rotation_y(0.5) - }, - (_, _) => {}, - }; - - if let (None, Some(Hands::Two)) = hands { - next.second = next.main; - } - - next + /* let mut next = */ + (*skeleton).clone() + // next } } diff --git a/voxygen/src/hud/diary.rs b/voxygen/src/hud/diary.rs index 310ac4bff0..5e52c5e995 100644 --- a/voxygen/src/hud/diary.rs +++ b/voxygen/src/hud/diary.rs @@ -3098,11 +3098,6 @@ enum SkillStrings<'a> { desc: &'a str, constant: u32, }, - WithConstFloat { - title: &'a str, - desc: &'a str, - constant: f32, - }, WithMult { title: &'a str, desc: &'a str, @@ -3122,14 +3117,6 @@ impl<'a> SkillStrings<'a> { } } - fn with_const_float(title: &'a str, desc: &'a str, constant: f32) -> Self { - Self::WithConstFloat { - title, - desc, - constant, - } - } - fn with_mult(title: &'a str, desc: &'a str, multiplier: f32) -> Self { Self::WithMult { title, @@ -3169,20 +3156,6 @@ impl<'a> SkillStrings<'a> { (title, desc) }, - Self::WithConstFloat { - title, - desc, - constant, - } => { - let title = i18n.get_msg(title); - let args = i18n::fluent_args! { - "boost" => constant, - "SP" => sp(i18n, skill_set, skill), - }; - let desc = i18n.get_msg_ctx(desc, &args); - - (title, desc) - }, Self::WithMult { title, desc, diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 0be304dcd6..be666b08e6 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -200,14 +200,12 @@ image_ids! { onehdagger_m2: "voxygen.element.skills.skill_slice_2", onehshield_m1: "voxygen.element.weapons.swordshield", onehshield_m2: "voxygen.element.weapons.swordshield", - twohhammer_m1: "voxygen.element.skills.2hhammer_m1", bow_m1: "voxygen.element.skills.bow_m1", bow_m2: "voxygen.element.skills.bow_m2", staff_melee: "voxygen.element.skills.staff_m1", fireball: "voxygen.element.skills.staff_m2", flyingrod_m1: "voxygen.element.skills.debug_wand_m1", flyingrod_m2: "voxygen.element.skills.debug_wand_m2", - hammergolf: "voxygen.element.skills.skill_hammergolf", fire_aoe: "voxygen.element.skills.skill_fire_aoe", flamethrower: "voxygen.element.skills.skill_flamethrower", // Sword @@ -687,7 +685,6 @@ image_ids! { snake_arrow_0: "voxygen.element.skills.snake", skill_sceptre_lifesteal: "voxygen.element.skills.lifesteal", skill_sceptre_heal: "voxygen.element.skills.heal_aoe", - hammerleap: "voxygen.element.skills.skill_hammerleap", skill_bow_jump_burst: "voxygen.element.skills.skill_bow_jump_burst", skill_sceptre_aura: "voxygen.element.skills.sceptre_protection", instrument: "voxygen.element.skills.music", diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index 12c9dc594d..29e75f6d16 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -619,9 +619,6 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id { "common.abilities.axe.bulkhead" => imgs.axe_bulkhead, "common.abilities.axe.capsize" => imgs.axe_capsize, // Hammer - "common.abilities.hammer.singlestrike" => imgs.twohhammer_m1, - "common.abilities.hammer.charged" => imgs.hammergolf, - "common.abilities.hammer.leap" => imgs.hammerleap, // Bow "common.abilities.bow.charged" => imgs.bow_m1, "common.abilities.bow.repeater" => imgs.bow_m2, diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index 49e9d645db..7b00048c78 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -1513,12 +1513,7 @@ impl FigureMgr { anim::character::ChargeswingAnimation::update_skeleton( &target_base, - ( - hands, - ability_id, - Some(s.stage_section), - Some(s.static_data.ability_info), - ), + (ability_id, s.stage_section), stage_progress, &mut state_animation_rate, skeleton_attr, @@ -1716,13 +1711,7 @@ impl FigureMgr { anim::character::LeapAnimation::update_skeleton( &target_base, - ( - hands, - rel_vel, - time, - Some(s.stage_section), - Some(s.static_data.ability_info), - ), + (s.stage_section,), stage_progress, &mut state_animation_rate, skeleton_attr, @@ -1835,38 +1824,6 @@ impl FigureMgr { skeleton_attr, ) }, - CharacterState::ComboMeleeDeprecated(s) => { - let stage_index = (s.stage - 1) as usize; - let stage_time = s.timer.as_secs_f32(); - let stage_progress = - if let Some(stage) = s.static_data.stage_data.get(stage_index) { - match s.stage_section { - StageSection::Buildup => { - stage_time / stage.base_buildup_duration.as_secs_f32() - }, - StageSection::Action => { - stage_time / stage.base_swing_duration.as_secs_f32() - }, - StageSection::Recover => { - stage_time / stage.base_recover_duration.as_secs_f32() - }, - _ => 0.0, - } - } else { - 0.0 - }; - anim::character::AlphaAnimation::update_skeleton( - &target_base, - ( - hands, - Some(s.stage_section), - Some(s.static_data.ability_info), - ), - stage_progress, - &mut state_animation_rate, - skeleton_attr, - ) - }, CharacterState::ComboMelee2(s) => { let timer = s.timer.as_secs_f32(); let current_strike = s.completed_strikes % s.static_data.strikes.len(); From bddced1ab7addac8cfc4ed082f68e576b7846dbe Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 29 Jan 2024 18:20:06 -0500 Subject: [PATCH 04/31] Solid smash --- .../common/abilities/ability_set_manifest.ron | 3 +- .../common/abilities/hammer/solid_smash.ron | 18 + .../element/skills/hammer/solid_smash.png | 3 + assets/voxygen/i18n/en/hud/ability.ftl | 5 + voxygen/anim/src/character/alpha.rs | 415 ++++++++++-------- voxygen/anim/src/character/mod.rs | 32 ++ voxygen/src/hud/img_ids.rs | 3 +- voxygen/src/hud/util.rs | 1 + voxygen/src/scene/figure/mod.rs | 1 + 9 files changed, 289 insertions(+), 192 deletions(-) create mode 100644 assets/common/abilities/hammer/solid_smash.ron create mode 100644 assets/voxygen/element/skills/hammer/solid_smash.png diff --git a/assets/common/abilities/ability_set_manifest.ron b/assets/common/abilities/ability_set_manifest.ron index c1e35e2b30..33a6e5f997 100644 --- a/assets/common/abilities/ability_set_manifest.ron +++ b/assets/common/abilities/ability_set_manifest.ron @@ -193,8 +193,7 @@ ), Tool(Hammer): ( guard: Some(Simple(None, "common.abilities.hammer.basic_guard")), - primary: Simple(None, "common.abilities.hammer.basic_guard"), - // primary: Simple(None, "common.abilities.hammer.solid_smash"), + primary: Simple(None, "common.abilities.hammer.solid_smash"), secondary: Simple(None, "common.abilities.hammer.basic_guard"), // secondary: Simple(None, "common.abilities.hammer.wide_wallop"), abilities: [ diff --git a/assets/common/abilities/hammer/solid_smash.ron b/assets/common/abilities/hammer/solid_smash.ron new file mode 100644 index 0000000000..2c51cee788 --- /dev/null +++ b/assets/common/abilities/hammer/solid_smash.ron @@ -0,0 +1,18 @@ +BasicMelee( + energy_cost: 0, + buildup_duration: 0.2, + swing_duration: 0.1, + hit_timing: 0.5, + recover_duration: 0.2, + melee_constructor: ( + kind: Bash( + damage: 10, + poise: 10, + knockback: 5, + energy_regen: 10, + ), + range: 3.0, + angle: 15.0, + ), + ori_modifier: 0.6, +) diff --git a/assets/voxygen/element/skills/hammer/solid_smash.png b/assets/voxygen/element/skills/hammer/solid_smash.png new file mode 100644 index 0000000000..4359357000 --- /dev/null +++ b/assets/voxygen/element/skills/hammer/solid_smash.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d966ea8ce481f76878eba81ba7fde8d04c8369cd4d3e0b5ea6fefd4f12625554 +size 494 diff --git a/assets/voxygen/i18n/en/hud/ability.ftl b/assets/voxygen/i18n/en/hud/ability.ftl index fcad3a64ba..b4e3142078 100644 --- a/assets/voxygen/i18n/en/hud/ability.ftl +++ b/assets/voxygen/i18n/en/hud/ability.ftl @@ -375,3 +375,8 @@ common-abilities-axe-capsize = Capsize .desc = Stagger everything nearby with a heavy spinning strike. Automatically upgrades from bulkhead at 50 combo. + +# Hammer abilities +common-abilities-hammer-solid_smash = Solid Smash + .desc = + A solid smash, that'll hurt diff --git a/voxygen/anim/src/character/alpha.rs b/voxygen/anim/src/character/alpha.rs index 50378a5ca6..b28d7d6ee1 100644 --- a/voxygen/anim/src/character/alpha.rs +++ b/voxygen/anim/src/character/alpha.rs @@ -1,6 +1,6 @@ use super::{ super::{vek::*, Animation}, - CharacterSkeleton, SkeletonAttr, + hammer_start, twist_back, twist_forward, CharacterSkeleton, SkeletonAttr, }; use common::{ comp::item::{Hands, ToolKind}, @@ -11,6 +11,7 @@ use core::f32::consts::PI; pub struct AlphaAnimation; type AlphaAnimationDependency<'a> = ( + Option<&'a str>, (Option, Option), Option, Option, @@ -25,7 +26,7 @@ impl Animation for AlphaAnimation { #[cfg_attr(feature = "be-dyn-lib", export_name = "character_alpha")] fn update_skeleton_inner( skeleton: &Self::Skeleton, - (hands, stage_section, ability_info): Self::Dependency<'_>, + (ability_id, hands, stage_section, ability_info): Self::Dependency<'_>, anim_time: f32, rate: &mut f32, s_a: &SkeletonAttr, @@ -33,214 +34,250 @@ impl Animation for AlphaAnimation { *rate = 1.0; let mut next = (*skeleton).clone(); - let (move1, move2, _move3, move2h) = match stage_section { - Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0), - Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0, anim_time.powf(0.25)), - Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4), 1.0), - _ => (0.0, 0.0, 0.0, 0.0), - }; - - next.main.position = Vec3::new(0.0, 0.0, 0.0); - next.main.orientation = Quaternion::rotation_x(0.0); - next.second.position = Vec3::new(0.0, 0.0, 0.0); - next.second.orientation = Quaternion::rotation_z(0.0); - next.torso.position = Vec3::new(0.0, 0.0, 1.1); - next.torso.orientation = Quaternion::rotation_z(0.0); - - if matches!( - stage_section, - Some(StageSection::Action | StageSection::Recover) - ) { + if matches!(stage_section, Some(StageSection::Action)) { next.main_weapon_trail = true; next.off_weapon_trail = true; } - match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Dagger) => { - next.main.position = Vec3::new(0.0, 0.0, 0.0); - next.main.orientation = Quaternion::rotation_x(0.0); - next.chest.orientation = Quaternion::rotation_z(move1 * 1.1 + move2 * -2.0); - - next.head.position = Vec3::new(0.0 + move2 * 2.0, s_a.head.0, s_a.head.1); - next.head.orientation = Quaternion::rotation_z(move1 * -0.9 + move2 * 1.8); - }, - - Some(ToolKind::Pick | ToolKind::Shovel) => { + match ability_id { + Some("common.abilities.hammer.solid_smash") => { + hammer_start(&mut next, s_a); let (move1, move2, move3) = match stage_section { - Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), - Some(StageSection::Action) => (1.0, anim_time.powf(0.25), 0.0), - Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), + Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), + Some(StageSection::Action) => (1.0, anim_time, 0.0), + Some(StageSection::Recover) => (1.0, 1.0, anim_time), _ => (0.0, 0.0, 0.0), }; let pullback = 1.0 - move3; - let moveret1 = move1 * pullback; - let moveret2 = move2 * pullback; + let move1 = move1 * pullback; + let move2 = move2 * pullback; - next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1); - next.head.orientation = Quaternion::rotation_x(moveret1 * 0.1 + moveret2 * 0.3) - * Quaternion::rotation_z(move1 * -0.2 + moveret2 * 0.2); - next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1 + moveret2 * -2.0); - next.chest.orientation = Quaternion::rotation_x(moveret1 * 0.4 + moveret2 * -0.7) - * Quaternion::rotation_y(moveret1 * 0.3 + moveret2 * -0.4) - * Quaternion::rotation_z(moveret1 * 0.5 + moveret2 * -0.5); + next.control.orientation.rotate_x(move1 * 2.7); + next.control.orientation.rotate_z(move1 * 1.4); + next.control.position += Vec3::new(-12.0, 0.0, 0.0) * move1; + next.control.orientation.rotate_x(move1 * -1.2); + twist_back(&mut next, move1, 0.8, 0.3, 0.1, 0.5); + + twist_forward(&mut next, move2, 1.4, 0.5, 0.3, 1.0); + next.control.orientation.rotate_x(move2 * -1.9); + next.control.orientation.rotate_z(move2 * 0.6); }, - Some(ToolKind::Debug) => { - next.hand_l.position = Vec3::new(-7.0, 4.0, 3.0); - next.hand_l.orientation = Quaternion::rotation_x(1.27); - next.main.position = Vec3::new(-5.0, 5.0, 23.0); - next.main.orientation = Quaternion::rotation_x(PI); - }, - _ => {}, - } - - match hands { - (Some(Hands::Two), _) | (None, Some(Hands::Two)) => { - match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Pick) => { - let (move1, move2, move3) = match stage_section { - Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), - Some(StageSection::Action) => (1.0, anim_time, 0.0), - Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), - _ => (0.0, 0.0, 0.0), - }; - let pullback = 1.0 - move3; - let moveret1 = move1 * pullback; - let moveret2 = move2 * pullback; - next.hand_l.position = - Vec3::new(s_a.hhl.0, s_a.hhl.1, s_a.hhl.2 + moveret2 * -7.0); - next.hand_l.orientation = Quaternion::rotation_x(s_a.hhl.3) - * Quaternion::rotation_y(s_a.hhl.4) - * Quaternion::rotation_z(s_a.hhl.5); - next.hand_r.position = Vec3::new(s_a.hhr.0, s_a.hhr.1, s_a.hhr.2); - next.hand_r.orientation = Quaternion::rotation_x(s_a.hhr.3) - * Quaternion::rotation_y(s_a.hhr.4) - * Quaternion::rotation_z(s_a.hhr.5); - - next.control.position = Vec3::new( - s_a.hc.0 + moveret1 * -13.0 + moveret2 * 3.0, - s_a.hc.1 + (moveret2 * 5.0), - s_a.hc.2 + moveret1 * 8.0 + moveret2 * -6.0, - ); - next.control.orientation = - Quaternion::rotation_x(s_a.hc.3 + (moveret1 * 1.5 + moveret2 * -2.55)) - * Quaternion::rotation_y( - s_a.hc.4 + moveret1 * PI / 2.0 + moveret2 * 0.5, - ) - * Quaternion::rotation_z(s_a.hc.5 + (moveret2 * -0.5)); + _ => { + let (move1, move2, _move3, move2h) = match stage_section { + Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0), + Some(StageSection::Action) => { + (1.0, anim_time.powi(2), 0.0, anim_time.powf(0.25)) }, - Some(ToolKind::Shovel) => { - let (move1, move2, move3) = match stage_section { - Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), - Some(StageSection::Action) => (1.0, anim_time, 0.0), - Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), - _ => (0.0, 0.0, 0.0), - }; - let pullback = 1.0 - move3; - let moveret1 = move1 * pullback; - let moveret2 = move2 * pullback; + Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4), 1.0), + _ => (0.0, 0.0, 0.0, 0.0), + }; - next.hand_l.position = Vec3::new(8.0, 6.0, 3.0); - next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0); - next.hand_r.position = Vec3::new(8.0, 6.0, 15.0); - next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0); - next.main.position = Vec3::new(7.5, 7.5, 13.2); - next.main.orientation = Quaternion::rotation_y(PI); + next.main.position = Vec3::new(0.0, 0.0, 0.0); + next.main.orientation = Quaternion::rotation_x(0.0); + next.second.position = Vec3::new(0.0, 0.0, 0.0); + next.second.orientation = Quaternion::rotation_z(0.0); + next.torso.position = Vec3::new(0.0, 0.0, 1.1); + next.torso.orientation = Quaternion::rotation_z(0.0); - next.control.position = Vec3::new(-11.0 + moveret1 * 8.0, 1.8, 4.0); - next.control.orientation = - Quaternion::rotation_x(moveret1 * 0.3 + moveret2 * 0.2) - * Quaternion::rotation_y(0.8 - moveret1 * 0.7 + moveret2 * 0.7) - * Quaternion::rotation_z(moveret2 * 0.1 - moveret1 * 0.4); - }, - _ => {}, - } - }, - (_, _) => {}, - }; - - match hands { - (Some(Hands::One), _) => match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Dagger) => { - next.control_l.position = Vec3::new(-7.0, 8.0, 2.0); - next.control_l.orientation = Quaternion::rotation_x(-0.3 + move2 * 2.0) - * Quaternion::rotation_y(move1 * -1.2 + move2 * -1.5) - * Quaternion::rotation_z(move2 * 1.5); - next.hand_l.position = Vec3::new(0.0, -0.5, 0.0); - next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0) - }, - Some(ToolKind::Pick | ToolKind::Shovel) => { - next.control_l.position = Vec3::new( - -7.0, - 8.0 + move1 * -4.0 + move2 * 4.0, - 2.0 + move1 * 16.0 + move2 * -19.0, - ); - next.control_l.orientation = - Quaternion::rotation_x(-0.3 + move1 * 1.9 + move2 * -3.0) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.hand_l.position = Vec3::new(0.0, -0.5, 0.0); - next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0) - }, - - _ => {}, - }, - (_, _) => {}, - }; - match hands { - (None | Some(Hands::One), Some(Hands::One)) => { match ability_info.and_then(|a| a.tool) { Some(ToolKind::Dagger) => { - next.control_r.position = Vec3::new(7.0 + move2 * 8.0, 8.0, 2.0); - next.control_r.orientation = Quaternion::rotation_x(-0.3 + move2 * 2.0) - * Quaternion::rotation_y(move1 * -1.8 + move2 * -1.5) - * Quaternion::rotation_z(move2 * 1.5); - next.hand_r.position = Vec3::new(0.0, -0.5, 0.0); - next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0) + next.main.position = Vec3::new(0.0, 0.0, 0.0); + next.main.orientation = Quaternion::rotation_x(0.0); + + next.chest.orientation = Quaternion::rotation_z(move1 * 1.1 + move2 * -2.0); + + next.head.position = Vec3::new(0.0 + move2 * 2.0, s_a.head.0, s_a.head.1); + next.head.orientation = Quaternion::rotation_z(move1 * -0.9 + move2 * 1.8); }, + Some(ToolKind::Pick | ToolKind::Shovel) => { - next.control_r.position = Vec3::new( - 7.0, - 8.0 + move1 * -4.0 + move2h * 4.0, - 2.0 + move1 * 12.0 + move2h * -16.0, - ); - next.control_r.orientation = - Quaternion::rotation_x(-0.3 + move1 * 2.3 + move2h * -3.5) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.hand_r.position = Vec3::new(0.0, -0.5, 0.0); - next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0) + let (move1, move2, move3) = match stage_section { + Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), + Some(StageSection::Action) => (1.0, anim_time.powf(0.25), 0.0), + Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), + _ => (0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move3; + let moveret1 = move1 * pullback; + let moveret2 = move2 * pullback; + + next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1); + next.head.orientation = + Quaternion::rotation_x(moveret1 * 0.1 + moveret2 * 0.3) + * Quaternion::rotation_z(move1 * -0.2 + moveret2 * 0.2); + next.chest.position = + Vec3::new(0.0, s_a.chest.0, s_a.chest.1 + moveret2 * -2.0); + next.chest.orientation = + Quaternion::rotation_x(moveret1 * 0.4 + moveret2 * -0.7) + * Quaternion::rotation_y(moveret1 * 0.3 + moveret2 * -0.4) + * Quaternion::rotation_z(moveret1 * 0.5 + moveret2 * -0.5); + }, + Some(ToolKind::Debug) => { + next.hand_l.position = Vec3::new(-7.0, 4.0, 3.0); + next.hand_l.orientation = Quaternion::rotation_x(1.27); + next.main.position = Vec3::new(-5.0, 5.0, 23.0); + next.main.orientation = Quaternion::rotation_x(PI); }, _ => {}, } + + match hands { + (Some(Hands::Two), _) | (None, Some(Hands::Two)) => { + match ability_info.and_then(|a| a.tool) { + Some(ToolKind::Pick) => { + let (move1, move2, move3) = match stage_section { + Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), + Some(StageSection::Action) => (1.0, anim_time, 0.0), + Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), + _ => (0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move3; + let moveret1 = move1 * pullback; + let moveret2 = move2 * pullback; + next.hand_l.position = + Vec3::new(s_a.hhl.0, s_a.hhl.1, s_a.hhl.2 + moveret2 * -7.0); + next.hand_l.orientation = Quaternion::rotation_x(s_a.hhl.3) + * Quaternion::rotation_y(s_a.hhl.4) + * Quaternion::rotation_z(s_a.hhl.5); + next.hand_r.position = Vec3::new(s_a.hhr.0, s_a.hhr.1, s_a.hhr.2); + next.hand_r.orientation = Quaternion::rotation_x(s_a.hhr.3) + * Quaternion::rotation_y(s_a.hhr.4) + * Quaternion::rotation_z(s_a.hhr.5); + + next.control.position = Vec3::new( + s_a.hc.0 + moveret1 * -13.0 + moveret2 * 3.0, + s_a.hc.1 + (moveret2 * 5.0), + s_a.hc.2 + moveret1 * 8.0 + moveret2 * -6.0, + ); + next.control.orientation = + Quaternion::rotation_x( + s_a.hc.3 + (moveret1 * 1.5 + moveret2 * -2.55), + ) * Quaternion::rotation_y( + s_a.hc.4 + moveret1 * PI / 2.0 + moveret2 * 0.5, + ) * Quaternion::rotation_z(s_a.hc.5 + (moveret2 * -0.5)); + }, + Some(ToolKind::Shovel) => { + let (move1, move2, move3) = match stage_section { + Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), + Some(StageSection::Action) => (1.0, anim_time, 0.0), + Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), + _ => (0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move3; + let moveret1 = move1 * pullback; + let moveret2 = move2 * pullback; + + next.hand_l.position = Vec3::new(8.0, 6.0, 3.0); + next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0); + next.hand_r.position = Vec3::new(8.0, 6.0, 15.0); + next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0); + next.main.position = Vec3::new(7.5, 7.5, 13.2); + next.main.orientation = Quaternion::rotation_y(PI); + + next.control.position = Vec3::new(-11.0 + moveret1 * 8.0, 1.8, 4.0); + next.control.orientation = + Quaternion::rotation_x(moveret1 * 0.3 + moveret2 * 0.2) + * Quaternion::rotation_y( + 0.8 - moveret1 * 0.7 + moveret2 * 0.7, + ) + * Quaternion::rotation_z(moveret2 * 0.1 - moveret1 * 0.4); + }, + _ => {}, + } + }, + (_, _) => {}, + }; + + match hands { + (Some(Hands::One), _) => match ability_info.and_then(|a| a.tool) { + Some(ToolKind::Dagger) => { + next.control_l.position = Vec3::new(-7.0, 8.0, 2.0); + next.control_l.orientation = Quaternion::rotation_x(-0.3 + move2 * 2.0) + * Quaternion::rotation_y(move1 * -1.2 + move2 * -1.5) + * Quaternion::rotation_z(move2 * 1.5); + next.hand_l.position = Vec3::new(0.0, -0.5, 0.0); + next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0) + }, + Some(ToolKind::Pick | ToolKind::Shovel) => { + next.control_l.position = Vec3::new( + -7.0, + 8.0 + move1 * -4.0 + move2 * 4.0, + 2.0 + move1 * 16.0 + move2 * -19.0, + ); + next.control_l.orientation = + Quaternion::rotation_x(-0.3 + move1 * 1.9 + move2 * -3.0) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.hand_l.position = Vec3::new(0.0, -0.5, 0.0); + next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0) + }, + + _ => {}, + }, + (_, _) => {}, + }; + match hands { + (None | Some(Hands::One), Some(Hands::One)) => { + match ability_info.and_then(|a| a.tool) { + Some(ToolKind::Dagger) => { + next.control_r.position = Vec3::new(7.0 + move2 * 8.0, 8.0, 2.0); + next.control_r.orientation = + Quaternion::rotation_x(-0.3 + move2 * 2.0) + * Quaternion::rotation_y(move1 * -1.8 + move2 * -1.5) + * Quaternion::rotation_z(move2 * 1.5); + next.hand_r.position = Vec3::new(0.0, -0.5, 0.0); + next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0) + }, + Some(ToolKind::Pick | ToolKind::Shovel) => { + next.control_r.position = Vec3::new( + 7.0, + 8.0 + move1 * -4.0 + move2h * 4.0, + 2.0 + move1 * 12.0 + move2h * -16.0, + ); + next.control_r.orientation = + Quaternion::rotation_x(-0.3 + move1 * 2.3 + move2h * -3.5) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.hand_r.position = Vec3::new(0.0, -0.5, 0.0); + next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0) + }, + _ => {}, + } + }, + (_, _) => {}, + }; + + match hands { + (None, None) | (None, Some(Hands::One)) => { + next.hand_l.position = Vec3::new(-4.5, 8.0, 5.0); + next.hand_l.orientation = + Quaternion::rotation_x(1.9) * Quaternion::rotation_y(-0.5) + }, + (_, _) => {}, + }; + match hands { + (None, None) | (Some(Hands::One), None) => { + next.hand_r.position = Vec3::new(4.5, 8.0, 5.0); + next.hand_r.orientation = + Quaternion::rotation_x(1.9) * Quaternion::rotation_y(0.5) + }, + (_, _) => {}, + }; + + if let (None, Some(Hands::Two)) = hands { + next.second = next.main; + } + + if skeleton.holding_lantern { + next.hand_r.position = + Vec3::new(s_a.hand.0, s_a.hand.1 + 5.0, s_a.hand.2 + 12.0); + next.hand_r.orientation = + Quaternion::rotation_x(2.25) * Quaternion::rotation_z(0.9); + + next.lantern.position = Vec3::new(-0.5, -0.5, -1.5); + next.lantern.orientation = next.hand_r.orientation.inverse(); + } }, - (_, _) => {}, - }; - - match hands { - (None, None) | (None, Some(Hands::One)) => { - next.hand_l.position = Vec3::new(-4.5, 8.0, 5.0); - next.hand_l.orientation = Quaternion::rotation_x(1.9) * Quaternion::rotation_y(-0.5) - }, - (_, _) => {}, - }; - match hands { - (None, None) | (Some(Hands::One), None) => { - next.hand_r.position = Vec3::new(4.5, 8.0, 5.0); - next.hand_r.orientation = Quaternion::rotation_x(1.9) * Quaternion::rotation_y(0.5) - }, - (_, _) => {}, - }; - - if let (None, Some(Hands::Two)) = hands { - next.second = next.main; - } - - if skeleton.holding_lantern { - next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1 + 5.0, s_a.hand.2 + 12.0); - next.hand_r.orientation = Quaternion::rotation_x(2.25) * Quaternion::rotation_z(0.9); - - next.lantern.position = Vec3::new(-0.5, -0.5, -1.5); - next.lantern.orientation = next.hand_r.orientation.inverse(); } next diff --git a/voxygen/anim/src/character/mod.rs b/voxygen/anim/src/character/mod.rs index 4e2ba6127d..c3a6349d31 100644 --- a/voxygen/anim/src/character/mod.rs +++ b/voxygen/anim/src/character/mod.rs @@ -467,3 +467,35 @@ impl CharacterSkeleton { } } } + +pub fn hammer_start(next: &mut CharacterSkeleton, s_a: &SkeletonAttr) { + next.main.position = Vec3::new(0.0, 0.0, 0.0); + next.main.orientation = Quaternion::rotation_z(0.0); + next.hand_l.position = Vec3::new(s_a.hhl.0, s_a.hhl.1 + 3.0, s_a.hhl.2 - 1.0); + next.hand_l.orientation = Quaternion::rotation_x(s_a.hhl.3) + * Quaternion::rotation_y(s_a.hhl.4) + * Quaternion::rotation_z(s_a.hhl.5); + next.hand_r.position = Vec3::new(s_a.hhr.0, s_a.hhr.1 + 3.0, s_a.hhr.2 + 1.0); + next.hand_r.orientation = Quaternion::rotation_x(s_a.hhr.3) + * Quaternion::rotation_y(s_a.hhr.4) + * Quaternion::rotation_z(s_a.hhr.5); + + next.control.position = Vec3::new(s_a.hc.0 - 1.0, s_a.hc.1, s_a.hc.2 - 3.0); + next.control.orientation = Quaternion::rotation_x(s_a.hc.3) + * Quaternion::rotation_y(s_a.hc.4) + * Quaternion::rotation_z(s_a.hc.5); +} + +pub fn twist_back(next: &mut CharacterSkeleton, move1: f32, c: f32, h: f32, b: f32, s: f32) { + next.chest.orientation.rotate_z(move1 * c); + next.head.orientation.rotate_z(move1 * -h); + next.belt.orientation.rotate_z(move1 * -b); + next.shorts.orientation.rotate_z(move1 * -s); +} + +pub fn twist_forward(next: &mut CharacterSkeleton, move2: f32, c: f32, h: f32, b: f32, s: f32) { + next.chest.orientation.rotate_z(move2 * -c); + next.head.orientation.rotate_z(move2 * h); + next.belt.orientation.rotate_z(move2 * b); + next.shorts.orientation.rotate_z(move2 * s); +} diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index be666b08e6..1792969265 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -314,7 +314,8 @@ image_ids! { axe_keelhaul: "voxygen.element.skills.axe.keelhaul", axe_bulkhead: "voxygen.element.skills.axe.bulkhead", axe_capsize: "voxygen.element.skills.axe.capsize", - + // Hammer + hammer_solid_smash: "voxygen.element.skills.hammer.solid_smash", // Skilltree Icons health_plus_skill: "voxygen.element.skills.skilltree.health_plus", energy_plus_skill: "voxygen.element.skills.skilltree.energy_plus", diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index 29e75f6d16..08cb947bcb 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -619,6 +619,7 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id { "common.abilities.axe.bulkhead" => imgs.axe_bulkhead, "common.abilities.axe.capsize" => imgs.axe_capsize, // Hammer + "common.abilities.hammer.solid_smash" => imgs.hammer_solid_smash, // Bow "common.abilities.bow.charged" => imgs.bow_m1, "common.abilities.bow.repeater" => imgs.bow_m2, diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index 7b00048c78..fdbdf7dfc1 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -1329,6 +1329,7 @@ impl FigureMgr { anim::character::AlphaAnimation::update_skeleton( &target_base, ( + ability_id, hands, Some(s.stage_section), Some(s.static_data.ability_info), From af755197bbc9fad9135ed109ae90b27cc2e77a3e Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 29 Jan 2024 18:46:44 -0500 Subject: [PATCH 05/31] Wide wallop --- .../common/abilities/ability_set_manifest.ron | 3 +-- .../common/abilities/hammer/wide_wallop.ron | 25 +++++++++++++++++++ .../element/skills/hammer/wide_wallop.png | 3 +++ assets/voxygen/i18n/en/hud/ability.ftl | 3 +++ voxygen/anim/src/character/chargeswing.rs | 23 ++++++++++++++++- voxygen/src/hud/img_ids.rs | 1 + voxygen/src/hud/util.rs | 1 + 7 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 assets/common/abilities/hammer/wide_wallop.ron create mode 100644 assets/voxygen/element/skills/hammer/wide_wallop.png diff --git a/assets/common/abilities/ability_set_manifest.ron b/assets/common/abilities/ability_set_manifest.ron index 33a6e5f997..772b9826be 100644 --- a/assets/common/abilities/ability_set_manifest.ron +++ b/assets/common/abilities/ability_set_manifest.ron @@ -194,8 +194,7 @@ Tool(Hammer): ( guard: Some(Simple(None, "common.abilities.hammer.basic_guard")), primary: Simple(None, "common.abilities.hammer.solid_smash"), - secondary: Simple(None, "common.abilities.hammer.basic_guard"), - // secondary: Simple(None, "common.abilities.hammer.wide_wallop"), + secondary: Simple(None, "common.abilities.hammer.wide_wallop"), abilities: [ // Simple(Hammer(ScornfulSwipe), "common.abilities.hammer.scornful_swipe"), // Simple(Hammer(Tremor), "common.abilities.hammer.tremor"), diff --git a/assets/common/abilities/hammer/wide_wallop.ron b/assets/common/abilities/hammer/wide_wallop.ron new file mode 100644 index 0000000000..74917486c6 --- /dev/null +++ b/assets/common/abilities/hammer/wide_wallop.ron @@ -0,0 +1,25 @@ +ChargedMelee( + energy_cost: 0, + energy_drain: 0, + melee_constructor: ( + kind: Bash( + damage: 0, + poise: 0, + knockback: 0, + energy_regen: 0, + ), + scaled: Some(( + kind: Bash( + damage: 20, + poise: 30, + knockback: 20, + energy_regen: 30, + ))), + range: 4.5, + angle: 15.0, + ), + charge_duration: 0.6, + swing_duration: 0.2, + hit_timing: 0.5, + recover_duration: 0.5, +) diff --git a/assets/voxygen/element/skills/hammer/wide_wallop.png b/assets/voxygen/element/skills/hammer/wide_wallop.png new file mode 100644 index 0000000000..d28435adba --- /dev/null +++ b/assets/voxygen/element/skills/hammer/wide_wallop.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:155b65dc04dd9c0803b9e3a5512cadde3cd94ed2355cf78839b82de723b823cd +size 576 diff --git a/assets/voxygen/i18n/en/hud/ability.ftl b/assets/voxygen/i18n/en/hud/ability.ftl index b4e3142078..d2733c60f6 100644 --- a/assets/voxygen/i18n/en/hud/ability.ftl +++ b/assets/voxygen/i18n/en/hud/ability.ftl @@ -380,3 +380,6 @@ common-abilities-axe-capsize = Capsize common-abilities-hammer-solid_smash = Solid Smash .desc = A solid smash, that'll hurt +common-abilities-hammer-wide_wallop = Wide Wallop + .desc = + Pull back and send them flying diff --git a/voxygen/anim/src/character/chargeswing.rs b/voxygen/anim/src/character/chargeswing.rs index 9b034b9307..b31937587c 100644 --- a/voxygen/anim/src/character/chargeswing.rs +++ b/voxygen/anim/src/character/chargeswing.rs @@ -1,6 +1,6 @@ use super::{ super::{vek::*, Animation}, - CharacterSkeleton, SkeletonAttr, + hammer_start, twist_back, twist_forward, CharacterSkeleton, SkeletonAttr, }; use common::states::utils::StageSection; use core::f32::consts::{PI, TAU}; @@ -262,6 +262,27 @@ impl Animation for ChargeswingAnimation { next.control.orientation.rotate_x(move2 * -3.0); next.control.position += Vec3::new(0.0, move2 * 8.0, move2 * -30.0); }, + Some("common.abilities.hammer.wide_wallop") => { + hammer_start(&mut next, s_a); + let (move1, move2, move3, tension) = match stage_section { + StageSection::Charge => (anim_time.min(1.0), 0.0, 0.0, (anim_time * 7.0).sin()), + StageSection::Action => (1.0, anim_time, 0.0, 0.0), + StageSection::Recover => (1.0, 1.0, anim_time, 0.0), + _ => (0.0, 0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move3; + let move1 = move1 * pullback; + let move2 = move2 * pullback; + + next.control.orientation.rotate_x(move1 * 1.1 + move2 * 0.6); + twist_back(&mut next, move1 + tension / 25.0, 1.7, 0.7, 0.3, 1.1); + next.control.orientation.rotate_y(move1 * -0.8); + next.control.position += Vec3::new(0.0, 0.0, 6.0) * move1; + + twist_forward(&mut next, move2, 4.8, 1.7, 0.7, 3.2); + next.control.orientation.rotate_y(move2 * 2.0); + next.control.orientation.rotate_z(move2 * -1.8); + }, _ => {}, } diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 1792969265..ef2ed4ac51 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -316,6 +316,7 @@ image_ids! { axe_capsize: "voxygen.element.skills.axe.capsize", // Hammer hammer_solid_smash: "voxygen.element.skills.hammer.solid_smash", + hammer_wide_wallop: "voxygen.element.skills.hammer.wide_wallop", // Skilltree Icons health_plus_skill: "voxygen.element.skills.skilltree.health_plus", energy_plus_skill: "voxygen.element.skills.skilltree.energy_plus", diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index 08cb947bcb..322ba4b253 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -620,6 +620,7 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id { "common.abilities.axe.capsize" => imgs.axe_capsize, // Hammer "common.abilities.hammer.solid_smash" => imgs.hammer_solid_smash, + "common.abilities.hammer.wide_wallop" => imgs.hammer_wide_wallop, // Bow "common.abilities.bow.charged" => imgs.bow_m1, "common.abilities.bow.repeater" => imgs.bow_m2, From cc70685f7a969130cfd5abcfa549562d7f7aff93 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 16 Feb 2024 23:40:42 -0500 Subject: [PATCH 06/31] Scornful swipe --- .cargo/config | 2 +- .../common/abilities/ability_set_manifest.ron | 2 +- .../abilities/hammer/scornful_swipe.ron | 21 ++++++++++ .../element/de_buffs/buff_scornfultaunt.png | 3 ++ .../element/skills/hammer/scornful_swipe.png | 3 ++ .../element/skills/hammer/wide_wallop.png | 4 +- assets/voxygen/i18n/en/buff.ftl | 5 ++- assets/voxygen/i18n/en/hud/ability.ftl | 3 ++ common/src/cmd.rs | 3 +- common/src/combat.rs | 10 +++++ common/src/comp/ability.rs | 9 ++++- common/src/comp/buff.rs | 22 ++++++++++- common/src/comp/stats.rs | 5 ++- common/src/states/utils.rs | 19 ++++++++- common/systems/src/buff.rs | 1 + server/src/cmd.rs | 3 +- server/src/events/entity_manipulation.rs | 39 ++++++++++++++++++- voxygen/anim/src/character/alpha.rs | 27 +++++++++++++ voxygen/i18n-helpers/src/lib.rs | 3 +- voxygen/src/hud/img_ids.rs | 2 + voxygen/src/hud/mod.rs | 1 + voxygen/src/hud/util.rs | 8 +++- 22 files changed, 176 insertions(+), 19 deletions(-) create mode 100644 assets/common/abilities/hammer/scornful_swipe.ron create mode 100644 assets/voxygen/element/de_buffs/buff_scornfultaunt.png create mode 100644 assets/voxygen/element/skills/hammer/scornful_swipe.png diff --git a/.cargo/config b/.cargo/config index e78c87c91f..89c3d55c3a 100644 --- a/.cargo/config +++ b/.cargo/config @@ -1,6 +1,6 @@ [target.x86_64-unknown-linux-gnu] rustflags = [ - "-C", "link-arg=-fuse-ld=gold", + "-C", "link-arg=-fuse-ld=mold", ] [target.x86_64-pc-windows-gnu] diff --git a/assets/common/abilities/ability_set_manifest.ron b/assets/common/abilities/ability_set_manifest.ron index 772b9826be..5f42e92da1 100644 --- a/assets/common/abilities/ability_set_manifest.ron +++ b/assets/common/abilities/ability_set_manifest.ron @@ -196,7 +196,7 @@ primary: Simple(None, "common.abilities.hammer.solid_smash"), secondary: Simple(None, "common.abilities.hammer.wide_wallop"), abilities: [ - // Simple(Hammer(ScornfulSwipe), "common.abilities.hammer.scornful_swipe"), + Simple(Hammer(ScornfulSwipe), "common.abilities.hammer.scornful_swipe"), // Simple(Hammer(Tremor), "common.abilities.hammer.tremor"), // Simple(Hammer(VigorousBash), "common.abilities.hammer.vigorous_bash"), // Simple(Hammer(Retaliate), "common.abilities.hammer.retaliate"), diff --git a/assets/common/abilities/hammer/scornful_swipe.ron b/assets/common/abilities/hammer/scornful_swipe.ron new file mode 100644 index 0000000000..4a2cdbf19f --- /dev/null +++ b/assets/common/abilities/hammer/scornful_swipe.ron @@ -0,0 +1,21 @@ +BasicMelee( + energy_cost: 0, + buildup_duration: 0.7, + swing_duration: 0.1, + hit_timing: 0.5, + recover_duration: 0.2, + melee_constructor: ( + kind: Bash( + damage: 20, + poise: 10, + knockback: 5, + energy_regen: 0, + ), + range: 3.0, + angle: 15.0, + ), + ori_modifier: 0.6, + meta: ( + init_event: Some(GainBuff(kind: ScornfulTaunt, strength: 0.5, duration: Some(20.0))), + ), +) diff --git a/assets/voxygen/element/de_buffs/buff_scornfultaunt.png b/assets/voxygen/element/de_buffs/buff_scornfultaunt.png new file mode 100644 index 0000000000..e8c0683684 --- /dev/null +++ b/assets/voxygen/element/de_buffs/buff_scornfultaunt.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5ab398c9aefaf8cae9041648a72ddb368a18ebc725566a9df5c68c6f6ecf4c9 +size 997 diff --git a/assets/voxygen/element/skills/hammer/scornful_swipe.png b/assets/voxygen/element/skills/hammer/scornful_swipe.png new file mode 100644 index 0000000000..3ba7add30c --- /dev/null +++ b/assets/voxygen/element/skills/hammer/scornful_swipe.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:000cd05af65d01e4e866cb1a28cc3736248cb9aac977a5b139abb76589daff63 +size 1007 diff --git a/assets/voxygen/element/skills/hammer/wide_wallop.png b/assets/voxygen/element/skills/hammer/wide_wallop.png index d28435adba..5a0d9ec4fd 100644 --- a/assets/voxygen/element/skills/hammer/wide_wallop.png +++ b/assets/voxygen/element/skills/hammer/wide_wallop.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:155b65dc04dd9c0803b9e3a5512cadde3cd94ed2355cf78839b82de723b823cd -size 576 +oid sha256:8419a506f439909517ec1ac8f99fc5d4ba62f6c8fdbcfde382af2b6afb3f8042 +size 1265 diff --git a/assets/voxygen/i18n/en/buff.ftl b/assets/voxygen/i18n/en/buff.ftl index 9198f41b1c..96c83f48fe 100644 --- a/assets/voxygen/i18n/en/buff.ftl +++ b/assets/voxygen/i18n/en/buff.ftl @@ -121,8 +121,9 @@ buff-berserk = Berserk ## Heatstroke buff-heatstroke = Heatstroke .desc = You were exposed to heat and now suffer from heatstroke. Your energy reward and movement speed are cut down. Chill. - - +## Scornful Taunt +buff-scornfultaunt = Scornful Taunt + .desc = You scornfully taunt your enemies, granting you bolstered fortitude and stamina. However, your death will bolster your killer. ## Util buff-text-over_seconds = over { $dur_secs } seconds buff-text-for_seconds = for { $dur_secs } seconds diff --git a/assets/voxygen/i18n/en/hud/ability.ftl b/assets/voxygen/i18n/en/hud/ability.ftl index d2733c60f6..25e44c77ee 100644 --- a/assets/voxygen/i18n/en/hud/ability.ftl +++ b/assets/voxygen/i18n/en/hud/ability.ftl @@ -383,3 +383,6 @@ common-abilities-hammer-solid_smash = Solid Smash common-abilities-hammer-wide_wallop = Wide Wallop .desc = Pull back and send them flying +common-abilities-hammer-scornful_swipe = Scornful Swipe + .desc = + Bolster your fortitude and stamina by taunting your enemies before striking at them. If you fall to an enemy they become empowered. diff --git a/common/src/cmd.rs b/common/src/cmd.rs index ea56970e7b..014694f6e9 100644 --- a/common/src/cmd.rs +++ b/common/src/cmd.rs @@ -188,7 +188,8 @@ lazy_static! { BuffKind::Defiance => "defiance", BuffKind::Bloodfeast => "bloodfeast", BuffKind::Berserk => "berserk", - BuffKind::Heatstroke => "heatstroke" + BuffKind::Heatstroke => "heatstroke", + BuffKind::ScornfulTaunt => "scornful_taunt", }; let mut buff_parser = HashMap::new(); for kind in BuffKind::iter() { diff --git a/common/src/combat.rs b/common/src/combat.rs index 6a1f28e638..c98743e296 100644 --- a/common/src/combat.rs +++ b/common/src/combat.rs @@ -1013,6 +1013,16 @@ pub enum DamagedEffect { Combo(i32), } +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] +pub enum DeathEffect { + /// Adds buff to the attacker that killed this entity + AttackerBuff { + kind: BuffKind, + strength: f32, + duration: Option, + }, +} + #[derive(Clone, Copy, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)] pub enum DamageContributor { Solo(Uid), diff --git a/common/src/comp/ability.rs b/common/src/comp/ability.rs index d6d2d336c3..92ec1b96b3 100644 --- a/common/src/comp/ability.rs +++ b/common/src/comp/ability.rs @@ -2907,7 +2907,7 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState { } } -#[derive(Copy, Clone, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] +#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize, Default)] #[serde(deny_unknown_fields)] pub struct AbilityMeta { #[serde(default)] @@ -2987,9 +2987,14 @@ impl Stance { } } -#[derive(Copy, Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] pub enum AbilityInitEvent { EnterStance(Stance), + GainBuff { + kind: buff::BuffKind, + strength: f32, + duration: Option, + }, } impl Default for Stance { diff --git a/common/src/comp/buff.rs b/common/src/comp/buff.rs index 876ac01cb4..04489a2050 100644 --- a/common/src/comp/buff.rs +++ b/common/src/comp/buff.rs @@ -2,7 +2,7 @@ use crate::{ combat::{ AttackEffect, CombatBuff, CombatBuffStrength, CombatEffect, CombatRequirement, - DamagedEffect, + DamagedEffect, DeathEffect, }, comp::{aura::AuraKey, Stats}, resources::{Secs, Time}, @@ -127,6 +127,12 @@ pub enum BuffKind { /// non-linearly with strength, 0.5 is a 12.5% increase, 1.0 is a 16.7% /// increase decrease. Berserk, + /// Increases poise resistance and energy reward. However if killed, buffs + /// killer with Reckless buff. Poise resistance scales non-linearly with + /// strength, 0.5 is 50% and 1.0 is 67%. Energy reward scales linearly with + /// strength, 0.5 is +50% and 1.0 is +100% strength. Reckless buff reward + /// strength is equal to scornful taunt buff strength. + ScornfulTaunt, // Debuffs /// Does damage to a creature over time. /// Strength should be the DPS of the debuff. @@ -221,7 +227,8 @@ impl BuffKind { | BuffKind::Sunderer | BuffKind::Defiance | BuffKind::Bloodfeast - | BuffKind::Berserk => BuffDescriptor::SimplePositive, + | BuffKind::Berserk + | BuffKind::ScornfulTaunt => BuffDescriptor::SimplePositive, BuffKind::Bleeding | BuffKind::Cursed | BuffKind::Burning @@ -463,6 +470,15 @@ impl BuffKind { BuffEffect::MovementSpeed(1.0 - nn_scaling(data.strength) * 0.5), BuffEffect::EnergyReward((1.0 - nn_scaling(data.strength) * 3.0).max(-1.0)), ], + BuffKind::ScornfulTaunt => vec![ + BuffEffect::PoiseReduction(nn_scaling(data.strength)), + BuffEffect::EnergyReward(1.0 + data.strength), + BuffEffect::DeathEffect(DeathEffect::AttackerBuff { + kind: BuffKind::Reckless, + strength: data.strength, + duration: data.duration, + }), + ], } } @@ -612,6 +628,8 @@ pub enum BuffEffect { EnergyReward(f32), /// Add an effect to the entity when damaged by an attack DamagedEffect(DamagedEffect), + /// Add an effect to the entity when killed + DeathEffect(DeathEffect), } /// Actual de/buff. diff --git a/common/src/comp/stats.rs b/common/src/comp/stats.rs index 7a61319d32..da9c105b7c 100644 --- a/common/src/comp/stats.rs +++ b/common/src/comp/stats.rs @@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize}; use specs::{Component, DerefFlaggedStorage}; use std::{error::Error, fmt}; -use crate::combat::{AttackEffect, DamagedEffect}; +use crate::combat::{AttackEffect, DamagedEffect, DeathEffect}; use super::Body; @@ -75,6 +75,8 @@ pub struct Stats { pub energy_reward_modifier: f32, /// This creates effects when the entity is damaged pub effects_on_damaged: Vec, + /// This creates effects when the entity is killed + pub effects_on_death: Vec, } impl Stats { @@ -100,6 +102,7 @@ impl Stats { mitigations_penetration: 0.0, energy_reward_modifier: 1.0, effects_on_damaged: Vec::new(), + effects_on_death: Vec::new(), } } diff --git a/common/src/states/utils.rs b/common/src/states/utils.rs index dfa96f0b41..5287bce7d8 100644 --- a/common/src/states/utils.rs +++ b/common/src/states/utils.rs @@ -3,7 +3,7 @@ use crate::{ comp::{ ability::{AbilityInitEvent, AbilityMeta, Capability, SpecifiedAbility, Stance}, arthropod, biped_large, biped_small, bird_medium, - buff::{BuffCategory, BuffChange}, + buff::{Buff, BuffCategory, BuffChange, BuffData, BuffSource}, character_state::OutputEvents, controller::InventoryManip, golem, @@ -1321,6 +1321,23 @@ fn handle_ability( stance, }); }, + AbilityInitEvent::GainBuff { + kind, + strength, + duration, + } => { + output_events.emit_server(BuffEvent { + entity: data.entity, + buff_change: BuffChange::Add(Buff::new( + kind, + BuffData::new(strength, duration), + vec![BuffCategory::SelfBuff], + BuffSource::Character { by: *data.uid }, + *data.time, + Some(data.stats), + )), + }); + }, } } if let CharacterState::Roll(roll) = &mut update.character { diff --git a/common/systems/src/buff.rs b/common/systems/src/buff.rs index 5f4dd50035..2a0ef88ca5 100644 --- a/common/systems/src/buff.rs +++ b/common/systems/src/buff.rs @@ -792,5 +792,6 @@ fn execute_effect( stat.energy_reward_modifier *= er; }, BuffEffect::DamagedEffect(effect) => stat.effects_on_damaged.push(effect.clone()), + BuffEffect::DeathEffect(effect) => stat.effects_on_death.push(effect.clone()), }; } diff --git a/server/src/cmd.rs b/server/src/cmd.rs index ac8a887813..55d03eb3df 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -4550,7 +4550,8 @@ fn build_buff( | BuffKind::Poisoned | BuffKind::Parried | BuffKind::PotionSickness - | BuffKind::Heatstroke => { + | BuffKind::Heatstroke + | BuffKind::ScornfulTaunt => { if buff_kind.is_simple() { unreachable!("is_simple() above") } else { diff --git a/server/src/events/entity_manipulation.rs b/server/src/events/entity_manipulation.rs index 3e39ca39e7..ccdf386025 100644 --- a/server/src/events/entity_manipulation.rs +++ b/server/src/events/entity_manipulation.rs @@ -18,8 +18,7 @@ use crate::{ #[cfg(feature = "worldgen")] use common::rtsim::{Actor, RtSimEntity}; use common::{ - combat, - combat::{AttackSource, DamageContributor}, + combat::{self, AttackSource, DamageContributor, DeathEffect}, comp::{ self, aura::{self, EnteredAuras}, @@ -332,6 +331,7 @@ pub struct DestroyEventData<'a> { rtsim_entities: ReadStorage<'a, RtSimEntity>, #[cfg(feature = "worldgen")] presences: ReadStorage<'a, Presence>, + buff_events: Read<'a, EventBus>, } /// Handle an entity dying. If it is a player, it will send a message to all @@ -346,6 +346,7 @@ impl ServerEvent for DestroyEvent { let mut create_item_drop = data.create_item_drop.emitter(); let mut delete_emitter = data.delete_event.emitter(); let mut outcomes_emitter = data.outcomes.emitter(); + let mut buff_emitter = data.buff_events.emitter(); for ev in events { // TODO: Investigate duplicate `Destroy` events (but don't remove this). // If the entity was already deleted, it can't be destroyed again. @@ -383,6 +384,40 @@ impl ServerEvent for DestroyEvent { outcomes_emitter.emit(Outcome::Death { pos: pos.0 }); } + // Handle any effects on death + if let Some(killed_stats) = data.stats.get(ev.entity) { + let attacker_entity = ev.cause.by.and_then(|x| data.id_maps.uid_entity(x.uid())); + let killed_uid = data.uids.get(ev.entity); + let attacker_stats = attacker_entity.and_then(|e| data.stats.get(e)); + for effect in killed_stats.effects_on_death.iter() { + match effect { + DeathEffect::AttackerBuff { + kind, + strength, + duration, + } => { + if let Some(attacker) = attacker_entity { + buff_emitter.emit(BuffEvent { + entity: attacker, + buff_change: buff::BuffChange::Add(buff::Buff::new( + *kind, + buff::BuffData::new(*strength, *duration), + vec![], + if let Some(uid) = killed_uid { + BuffSource::Character { by: *uid } + } else { + BuffSource::World + }, + *data.time, + attacker_stats, + )), + }); + } + }, + } + } + } + // Chat message // If it was a player that died if let Some((uid, _player)) = (&data.uids, &data.players) diff --git a/voxygen/anim/src/character/alpha.rs b/voxygen/anim/src/character/alpha.rs index b28d7d6ee1..ddc50830c5 100644 --- a/voxygen/anim/src/character/alpha.rs +++ b/voxygen/anim/src/character/alpha.rs @@ -62,6 +62,33 @@ impl Animation for AlphaAnimation { next.control.orientation.rotate_x(move2 * -1.9); next.control.orientation.rotate_z(move2 * 0.6); }, + Some("common.abilities.hammer.scornful_swipe") => { + hammer_start(&mut next, s_a); + let (move1, move2, move3) = match stage_section { + Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), + Some(StageSection::Action) => (1.0, anim_time, 0.0), + Some(StageSection::Recover) => (1.0, 1.0, anim_time), + _ => (0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move3; + let move1 = move1 * pullback; + let move2 = move2 * pullback; + let move1_pre = move1.min(0.5) * 2.0; + let move1_shake = ((move1.max(0.3) - 0.3) * 15.0).sin(); + let move1_late = move1.powi(4); + + next.control.orientation.rotate_x(move1_pre * 2.3); + next.control.position += Vec3::new(0.0, 2.0, 16.0) * move1_pre; + next.control.position += Vec3::new(0.0, 0.0, 4.0) * move1_shake; + next.control.orientation.rotate_y(move1_late * 1.6); + next.control.position += Vec3::new(-8.0, 0.0, -8.0) * move1_late; + twist_back(&mut next, move1_late, 1.0, 0.4, 0.2, 0.7); + next.control.orientation.rotate_z(move1_late * 1.2); + + twist_forward(&mut next, move2, 1.9, 0.9, 0.6, 1.1); + next.control.orientation.rotate_y(move2 * -1.7); + next.control.orientation.rotate_z(move2 * -2.7); + }, _ => { let (move1, move2, _move3, move2h) = match stage_section { Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0), diff --git a/voxygen/i18n-helpers/src/lib.rs b/voxygen/i18n-helpers/src/lib.rs index 1f60cc7094..846af23e9a 100644 --- a/voxygen/i18n-helpers/src/lib.rs +++ b/voxygen/i18n-helpers/src/lib.rs @@ -395,7 +395,8 @@ fn get_buff_ident(buff: BuffKind) -> &'static str { | BuffKind::Sunderer | BuffKind::Defiance | BuffKind::Bloodfeast - | BuffKind::Berserk => { + | BuffKind::Berserk + | BuffKind::ScornfulTaunt => { tracing::error!("Player was killed by a positive buff!"); "mysterious" }, diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index ef2ed4ac51..04c572512f 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -317,6 +317,7 @@ image_ids! { // Hammer hammer_solid_smash: "voxygen.element.skills.hammer.solid_smash", hammer_wide_wallop: "voxygen.element.skills.hammer.wide_wallop", + hammer_scornful_swipe: "voxygen.element.skills.hammer.scornful_swipe", // Skilltree Icons health_plus_skill: "voxygen.element.skills.skilltree.health_plus", energy_plus_skill: "voxygen.element.skills.skilltree.energy_plus", @@ -791,6 +792,7 @@ image_ids! { buff_lifesteal: "voxygen.element.de_buffs.buff_lifesteal", buff_flame: "voxygen.element.de_buffs.buff_flame", buff_frigid: "voxygen.element.de_buffs.buff_frigid", + buff_scornfultaunt: "voxygen.element.de_buffs.buff_scornfultaunt", // Debuffs debuff_skull_0: "voxygen.element.de_buffs.debuff_skull_0", diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 0fe59514b1..c1e6610059 100755 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -5261,6 +5261,7 @@ pub fn get_buff_image(buff: BuffKind, imgs: &Imgs) -> conrod_core::image::Id { BuffKind::Defiance => imgs.buff_defiance, BuffKind::Bloodfeast => imgs.buff_plus_0, BuffKind::Berserk => imgs.buff_reckless, + BuffKind::ScornfulTaunt => imgs.buff_scornfultaunt, // Debuffs BuffKind::Bleeding => imgs.debuff_bleed_0, BuffKind::Cursed => imgs.debuff_skull_0, diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index 322ba4b253..548aa6a197 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -197,6 +197,7 @@ fn buff_key(buff: BuffKind) -> &'static str { BuffKind::Defiance => "buff-defiance", BuffKind::Bloodfeast => "buff-bloodfeast", BuffKind::Berserk => "buff-berserk", + BuffKind::ScornfulTaunt => "buff-scornfultaunt", // Debuffs BuffKind::Bleeding => "buff-bleed", BuffKind::Cursed => "buff-cursed", @@ -318,7 +319,8 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec { | BuffKind::Defiance | BuffKind::Bloodfeast | BuffKind::Berserk - | BuffKind::Heatstroke => Cow::Borrowed(""), + | BuffKind::Heatstroke + | BuffKind::ScornfulTaunt => Cow::Borrowed(""), }; write!(&mut description, "{}", buff_desc).unwrap(); @@ -368,7 +370,8 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec { | BuffKind::Defiance | BuffKind::Bloodfeast | BuffKind::Berserk - | BuffKind::Heatstroke => Cow::Borrowed(""), + | BuffKind::Heatstroke + | BuffKind::ScornfulTaunt => Cow::Borrowed(""), } } else if let BuffKind::Saturation | BuffKind::Regeneration @@ -621,6 +624,7 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id { // Hammer "common.abilities.hammer.solid_smash" => imgs.hammer_solid_smash, "common.abilities.hammer.wide_wallop" => imgs.hammer_wide_wallop, + "common.abilities.hammer.scornful_swipe" => imgs.hammer_scornful_swipe, // Bow "common.abilities.bow.charged" => imgs.bow_m1, "common.abilities.bow.repeater" => imgs.bow_m2, From 89048e953041836489a060e634960f60d796df76 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 19 Feb 2024 12:59:42 -0500 Subject: [PATCH 07/31] Tremor --- .../common/abilities/ability_set_manifest.ron | 2 +- .../custom/birdlargefire/fireshockwave.ron | 2 + .../abilities/custom/claysteed/shockwave.ron | 2 + .../custom/cloudwyvern/lightningshockwave.ron | 2 + .../abilities/custom/coralgolem/shockwave.ron | 2 + .../custom/cyclops/hammer_shockwave.ron | 2 + .../abilities/custom/dagon/steamwave.ron | 2 + .../custom/dwarves/flamekeeper/lavawave.ron | 2 + .../custom/dwarves/snaretongue/wave.ron | 2 + .../custom/flamewyvern/fireshockwave.ron | 2 + .../custom/frostwyvern/iceshockwave.ron | 2 + .../custom/gigas_frost/flashfreeze.ron | 2 + .../custom/gravewarden/shockwave.ron | 2 + .../custom/jiangshi/poisonshockwave.ron | 2 + .../custom/roshwalr/freezeshockwave.ron | 2 + .../custom/seawyvern/inkshockwave.ron | 2 + .../custom/stonegolemfist/shockwave.ron | 2 + .../custom/tidalwarrior/totem_wave.ron | 2 + .../custom/treant_sapling/shockwave.ron | 2 + .../custom/wealdwyvern/poisonshockwave.ron | 2 + .../abilities/custom/woodgolem/shockwave.ron | 2 + .../abilities/custom/yeti/icespikes.ron | 2 + .../gnarling/chieftain/fireshockwave.ron | 2 + assets/common/abilities/hammer/tremor.ron | 20 ++ .../common/abilities/staff/fireshockwave.ron | 2 + .../voxygen/element/skills/hammer/tremor.png | 3 + assets/voxygen/i18n/en/hud/ability.ftl | 3 + common/src/comp/ability.rs | 8 + common/src/states/shockwave.rs | 187 ++++++++++-------- voxygen/anim/src/character/shockwave.rs | 171 +++++++++------- voxygen/src/hud/img_ids.rs | 1 + voxygen/src/hud/util.rs | 1 + voxygen/src/scene/figure/mod.rs | 18 +- 33 files changed, 292 insertions(+), 168 deletions(-) create mode 100644 assets/common/abilities/hammer/tremor.ron create mode 100644 assets/voxygen/element/skills/hammer/tremor.png diff --git a/assets/common/abilities/ability_set_manifest.ron b/assets/common/abilities/ability_set_manifest.ron index 5f42e92da1..1b742e8ef1 100644 --- a/assets/common/abilities/ability_set_manifest.ron +++ b/assets/common/abilities/ability_set_manifest.ron @@ -197,7 +197,7 @@ secondary: Simple(None, "common.abilities.hammer.wide_wallop"), abilities: [ Simple(Hammer(ScornfulSwipe), "common.abilities.hammer.scornful_swipe"), - // Simple(Hammer(Tremor), "common.abilities.hammer.tremor"), + Simple(Hammer(Tremor), "common.abilities.hammer.tremor"), // Simple(Hammer(VigorousBash), "common.abilities.hammer.vigorous_bash"), // Simple(Hammer(Retaliate), "common.abilities.hammer.retaliate"), // Simple(Hammer(SpineCracker), "common.abilities.hammer.spine_cracker"), diff --git a/assets/common/abilities/custom/birdlargefire/fireshockwave.ron b/assets/common/abilities/custom/birdlargefire/fireshockwave.ron index 9f627d5c96..e4736430d7 100644 --- a/assets/common/abilities/custom/birdlargefire/fireshockwave.ron +++ b/assets/common/abilities/custom/birdlargefire/fireshockwave.ron @@ -15,4 +15,6 @@ Shockwave( damage_kind: Energy, specifier: Fire, ori_rate: 1.0, + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/custom/claysteed/shockwave.ron b/assets/common/abilities/custom/claysteed/shockwave.ron index 2c9c1efe13..e7a491d988 100644 --- a/assets/common/abilities/custom/claysteed/shockwave.ron +++ b/assets/common/abilities/custom/claysteed/shockwave.ron @@ -15,4 +15,6 @@ Shockwave( damage_kind: Crushing, specifier: Ground, ori_rate: 1.0, + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/custom/cloudwyvern/lightningshockwave.ron b/assets/common/abilities/custom/cloudwyvern/lightningshockwave.ron index f50fc14f98..cf7a87f6a3 100644 --- a/assets/common/abilities/custom/cloudwyvern/lightningshockwave.ron +++ b/assets/common/abilities/custom/cloudwyvern/lightningshockwave.ron @@ -21,4 +21,6 @@ Shockwave( strength: Value(0.3), chance: 1.0, ))), + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/custom/coralgolem/shockwave.ron b/assets/common/abilities/custom/coralgolem/shockwave.ron index 02979caa9c..2728da02b5 100644 --- a/assets/common/abilities/custom/coralgolem/shockwave.ron +++ b/assets/common/abilities/custom/coralgolem/shockwave.ron @@ -15,4 +15,6 @@ Shockwave( damage_kind: Crushing, specifier: Water, ori_rate: 1.0, + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/custom/cyclops/hammer_shockwave.ron b/assets/common/abilities/custom/cyclops/hammer_shockwave.ron index ffd8ed3724..c749c6265f 100644 --- a/assets/common/abilities/custom/cyclops/hammer_shockwave.ron +++ b/assets/common/abilities/custom/cyclops/hammer_shockwave.ron @@ -15,4 +15,6 @@ Shockwave( damage_kind: Piercing, specifier: Ground, ori_rate: 1.0, + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/custom/dagon/steamwave.ron b/assets/common/abilities/custom/dagon/steamwave.ron index acf6cb6b39..3920651b92 100644 --- a/assets/common/abilities/custom/dagon/steamwave.ron +++ b/assets/common/abilities/custom/dagon/steamwave.ron @@ -15,4 +15,6 @@ Shockwave( damage_kind: Crushing, specifier: Steam, ori_rate: 1.0, + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/custom/dwarves/flamekeeper/lavawave.ron b/assets/common/abilities/custom/dwarves/flamekeeper/lavawave.ron index d63306dd5e..15c8d00237 100644 --- a/assets/common/abilities/custom/dwarves/flamekeeper/lavawave.ron +++ b/assets/common/abilities/custom/dwarves/flamekeeper/lavawave.ron @@ -15,4 +15,6 @@ Shockwave( damage_kind: Crushing, specifier: Fire, ori_rate: 1.0, + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/custom/dwarves/snaretongue/wave.ron b/assets/common/abilities/custom/dwarves/snaretongue/wave.ron index 700c67ac2c..92194301f8 100644 --- a/assets/common/abilities/custom/dwarves/snaretongue/wave.ron +++ b/assets/common/abilities/custom/dwarves/snaretongue/wave.ron @@ -15,4 +15,6 @@ Shockwave( damage_kind: Crushing, specifier: Water, ori_rate: 1.0, + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/custom/flamewyvern/fireshockwave.ron b/assets/common/abilities/custom/flamewyvern/fireshockwave.ron index 3ef4ef8934..9210d61279 100644 --- a/assets/common/abilities/custom/flamewyvern/fireshockwave.ron +++ b/assets/common/abilities/custom/flamewyvern/fireshockwave.ron @@ -21,4 +21,6 @@ Shockwave( strength: DamageFraction(0.3), chance: 1.0, ))), + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/custom/frostwyvern/iceshockwave.ron b/assets/common/abilities/custom/frostwyvern/iceshockwave.ron index 277ab59e64..16fff38046 100644 --- a/assets/common/abilities/custom/frostwyvern/iceshockwave.ron +++ b/assets/common/abilities/custom/frostwyvern/iceshockwave.ron @@ -21,4 +21,6 @@ Shockwave( strength: Value(0.3), chance: 1.0, ))), + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/custom/gigas_frost/flashfreeze.ron b/assets/common/abilities/custom/gigas_frost/flashfreeze.ron index db863fd963..75394151c6 100644 --- a/assets/common/abilities/custom/gigas_frost/flashfreeze.ron +++ b/assets/common/abilities/custom/gigas_frost/flashfreeze.ron @@ -21,4 +21,6 @@ Shockwave( strength: Value(3.0), chance: 1.0, ))), + timing: PostBuildup, + emit_outcome: true, ) \ No newline at end of file diff --git a/assets/common/abilities/custom/gravewarden/shockwave.ron b/assets/common/abilities/custom/gravewarden/shockwave.ron index b6ff6a5f7c..0959389f5b 100644 --- a/assets/common/abilities/custom/gravewarden/shockwave.ron +++ b/assets/common/abilities/custom/gravewarden/shockwave.ron @@ -15,4 +15,6 @@ Shockwave( damage_kind: Crushing, specifier: Ground, ori_rate: 1.0, + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/custom/jiangshi/poisonshockwave.ron b/assets/common/abilities/custom/jiangshi/poisonshockwave.ron index e7a0691fbb..ac9779e551 100644 --- a/assets/common/abilities/custom/jiangshi/poisonshockwave.ron +++ b/assets/common/abilities/custom/jiangshi/poisonshockwave.ron @@ -21,4 +21,6 @@ Shockwave( strength: DamageFraction(0.6), chance: 1.0, ))), + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/custom/roshwalr/freezeshockwave.ron b/assets/common/abilities/custom/roshwalr/freezeshockwave.ron index b9e9feaa52..f10c63b180 100644 --- a/assets/common/abilities/custom/roshwalr/freezeshockwave.ron +++ b/assets/common/abilities/custom/roshwalr/freezeshockwave.ron @@ -21,4 +21,6 @@ Shockwave( strength: DamageFraction(0.06), chance: 1, ))), + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/custom/seawyvern/inkshockwave.ron b/assets/common/abilities/custom/seawyvern/inkshockwave.ron index 4a7ecf8ce1..7814f35a20 100644 --- a/assets/common/abilities/custom/seawyvern/inkshockwave.ron +++ b/assets/common/abilities/custom/seawyvern/inkshockwave.ron @@ -21,5 +21,7 @@ Shockwave( strength: Value(0.3), chance: 1.0, ))), + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/custom/stonegolemfist/shockwave.ron b/assets/common/abilities/custom/stonegolemfist/shockwave.ron index 52fe37b10c..4fa1f98df5 100644 --- a/assets/common/abilities/custom/stonegolemfist/shockwave.ron +++ b/assets/common/abilities/custom/stonegolemfist/shockwave.ron @@ -15,4 +15,6 @@ Shockwave( damage_kind: Crushing, specifier: Ground, ori_rate: 1.0, + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/custom/tidalwarrior/totem_wave.ron b/assets/common/abilities/custom/tidalwarrior/totem_wave.ron index 81cc0a58ac..a260075e9c 100644 --- a/assets/common/abilities/custom/tidalwarrior/totem_wave.ron +++ b/assets/common/abilities/custom/tidalwarrior/totem_wave.ron @@ -15,4 +15,6 @@ Shockwave( damage_kind: Crushing, specifier: Water, ori_rate: 0.0, + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/custom/treant_sapling/shockwave.ron b/assets/common/abilities/custom/treant_sapling/shockwave.ron index eaa8ae1ce0..aeae667faa 100644 --- a/assets/common/abilities/custom/treant_sapling/shockwave.ron +++ b/assets/common/abilities/custom/treant_sapling/shockwave.ron @@ -15,4 +15,6 @@ Shockwave( damage_kind: Crushing, specifier: Ground, ori_rate: 1.0, + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/custom/wealdwyvern/poisonshockwave.ron b/assets/common/abilities/custom/wealdwyvern/poisonshockwave.ron index 08e6a7ec55..080b13216d 100644 --- a/assets/common/abilities/custom/wealdwyvern/poisonshockwave.ron +++ b/assets/common/abilities/custom/wealdwyvern/poisonshockwave.ron @@ -21,5 +21,7 @@ Shockwave( strength: DamageFraction(0.3), chance: 1.0, ))), + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/custom/woodgolem/shockwave.ron b/assets/common/abilities/custom/woodgolem/shockwave.ron index 414f1db81e..8ac1c5d64f 100644 --- a/assets/common/abilities/custom/woodgolem/shockwave.ron +++ b/assets/common/abilities/custom/woodgolem/shockwave.ron @@ -15,4 +15,6 @@ Shockwave( damage_kind: Crushing, specifier: Ground, ori_rate: 1.0, + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/custom/yeti/icespikes.ron b/assets/common/abilities/custom/yeti/icespikes.ron index b70e2a7550..0a70a8f293 100644 --- a/assets/common/abilities/custom/yeti/icespikes.ron +++ b/assets/common/abilities/custom/yeti/icespikes.ron @@ -21,4 +21,6 @@ Shockwave( strength: DamageFraction(0.1), chance: 0.1, ))), + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/gnarling/chieftain/fireshockwave.ron b/assets/common/abilities/gnarling/chieftain/fireshockwave.ron index 81bb67dcca..26ce3ab2e9 100644 --- a/assets/common/abilities/gnarling/chieftain/fireshockwave.ron +++ b/assets/common/abilities/gnarling/chieftain/fireshockwave.ron @@ -15,4 +15,6 @@ Shockwave( damage_kind: Energy, specifier: Fire, ori_rate: 1.0, + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/common/abilities/hammer/tremor.ron b/assets/common/abilities/hammer/tremor.ron new file mode 100644 index 0000000000..529c007614 --- /dev/null +++ b/assets/common/abilities/hammer/tremor.ron @@ -0,0 +1,20 @@ +Shockwave( + energy_cost: 0, + buildup_duration: 0.4, + swing_duration: 0.3, + recover_duration: 0.3, + damage: 30, + poise_damage: 40, + knockback: (strength: 15.0, direction: Up), + shockwave_angle: 60.0, + shockwave_vertical_angle: 45.0, + shockwave_speed: 10.0, + shockwave_duration: 1.5, + dodgeable: Jump, + move_efficiency: 0.0, + damage_kind: Crushing, + specifier: Ground, + ori_rate: 0.2, + timing: PostAction, + emit_outcome: false, +) \ No newline at end of file diff --git a/assets/common/abilities/staff/fireshockwave.ron b/assets/common/abilities/staff/fireshockwave.ron index 913dc7939b..944e28d628 100644 --- a/assets/common/abilities/staff/fireshockwave.ron +++ b/assets/common/abilities/staff/fireshockwave.ron @@ -15,4 +15,6 @@ Shockwave( damage_kind: Energy, specifier: Fire, ori_rate: 1.0, + timing: PostBuildup, + emit_outcome: true, ) diff --git a/assets/voxygen/element/skills/hammer/tremor.png b/assets/voxygen/element/skills/hammer/tremor.png new file mode 100644 index 0000000000..601a212b96 --- /dev/null +++ b/assets/voxygen/element/skills/hammer/tremor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:999897075eca91a21a874c5165090b6d6955dbf3026b3fe460b1095f57519bd0 +size 1058 diff --git a/assets/voxygen/i18n/en/hud/ability.ftl b/assets/voxygen/i18n/en/hud/ability.ftl index 25e44c77ee..c03d11fb8b 100644 --- a/assets/voxygen/i18n/en/hud/ability.ftl +++ b/assets/voxygen/i18n/en/hud/ability.ftl @@ -386,3 +386,6 @@ common-abilities-hammer-wide_wallop = Wide Wallop common-abilities-hammer-scornful_swipe = Scornful Swipe .desc = Bolster your fortitude and stamina by taunting your enemies before striking at them. If you fall to an enemy they become empowered. +common-abilities-hammer-tremor = Tremor + .desc = + Strike the earth with enough force that the ground beneath your foes trembles. diff --git a/common/src/comp/ability.rs b/common/src/comp/ability.rs index 92ec1b96b3..445b151c72 100644 --- a/common/src/comp/ability.rs +++ b/common/src/comp/ability.rs @@ -933,6 +933,8 @@ pub enum CharacterAbility { specifier: comp::shockwave::FrontendSpecifier, ori_rate: f32, damage_effect: Option, + timing: shockwave::Timing, + emit_outcome: bool, #[serde(default)] meta: AbilityMeta, }, @@ -1532,6 +1534,8 @@ impl CharacterAbility { specifier: _, ori_rate: _, ref mut damage_effect, + timing: _, + emit_outcome: _, meta: _, } => { *buildup_duration /= stats.speed; @@ -2572,6 +2576,8 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState { specifier, ori_rate, damage_effect, + timing, + emit_outcome, meta: _, } => CharacterState::Shockwave(shockwave::Data { static_data: shockwave::StaticData { @@ -2592,6 +2598,8 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState { damage_kind: *damage_kind, specifier: *specifier, ori_rate: *ori_rate, + timing: *timing, + emit_outcome: *emit_outcome, }, timer: Duration::default(), stage_section: StageSection::Buildup, diff --git a/common/src/states/shockwave.rs b/common/src/states/shockwave.rs index 4614ca6ab0..fd79076a8e 100644 --- a/common/src/states/shockwave.rs +++ b/common/src/states/shockwave.rs @@ -53,8 +53,12 @@ pub struct StaticData { pub damage_kind: DamageKind, /// Used to specify the shockwave to the frontend pub specifier: shockwave::FrontendSpecifier, + /// Controls outcome emission + pub emit_outcome: bool, /// How fast enemy can rotate pub ori_rate: f32, + /// Timing of shockwave + pub timing: Timing, } #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] @@ -85,50 +89,9 @@ impl CharacterBehavior for Data { }); } else { // Attack - let poise = AttackEffect::new( - Some(GroupTarget::OutOfGroup), - CombatEffect::Poise(self.static_data.poise_damage), - ) - .with_requirement(CombatRequirement::AnyDamage); - let knockback = AttackEffect::new( - Some(GroupTarget::OutOfGroup), - CombatEffect::Knockback(self.static_data.knockback), - ) - .with_requirement(CombatRequirement::AnyDamage); - let mut damage = AttackDamage::new( - Damage { - source: DamageSource::Shockwave, - kind: self.static_data.damage_kind, - value: self.static_data.damage, - }, - Some(GroupTarget::OutOfGroup), - rand::random(), - ); - if let Some(effect) = self.static_data.damage_effect { - damage = damage.with_effect(effect); + if matches!(self.static_data.timing, Timing::PostBuildup) { + self.attack(data, output_events); } - let precision_mult = combat::compute_precision_mult(data.inventory, data.msm); - let attack = Attack::default() - .with_damage(damage) - .with_precision(precision_mult) - .with_effect(poise) - .with_effect(knockback) - .with_combo_increment(); - let properties = shockwave::Properties { - angle: self.static_data.shockwave_angle, - vertical_angle: self.static_data.shockwave_vertical_angle, - speed: self.static_data.shockwave_speed, - duration: self.static_data.shockwave_duration, - attack, - dodgeable: self.static_data.dodgeable, - owner: Some(*data.uid), - specifier: self.static_data.specifier, - }; - output_events.emit_server(ShockwaveEvent { - properties, - pos: *data.pos, - ori: *data.ori, - }); // Transitions to swing update.character = CharacterState::Shockwave(Data { @@ -146,43 +109,56 @@ impl CharacterBehavior for Data { ..*self }); // Send local event used for frontend shenanigans - match self.static_data.specifier { - shockwave::FrontendSpecifier::IceSpikes => { - output_events.emit_local(LocalEvent::CreateOutcome( - Outcome::FlashFreeze { - pos: data.pos.0 - + *data.ori.look_dir() * (data.body.max_radius()), - }, - )); - }, - shockwave::FrontendSpecifier::Ground => { - output_events.emit_local(LocalEvent::CreateOutcome( - Outcome::GroundSlam { - pos: data.pos.0 - + *data.ori.look_dir() * (data.body.max_radius()), - }, - )); - }, - shockwave::FrontendSpecifier::Steam => { - output_events.emit_local(LocalEvent::CreateOutcome(Outcome::Steam { - pos: data.pos.0 + *data.ori.look_dir() * (data.body.max_radius()), - })); - }, - shockwave::FrontendSpecifier::Fire => { - output_events.emit_local(LocalEvent::CreateOutcome( - Outcome::FireShockwave { - pos: data.pos.0 - + *data.ori.look_dir() * (data.body.max_radius()), - }, - )); - }, - _ => { - output_events.emit_local(LocalEvent::CreateOutcome(Outcome::Swoosh { - pos: data.pos.0 + *data.ori.look_dir() * (data.body.max_radius()), - })); - }, + if self.static_data.emit_outcome { + match self.static_data.specifier { + shockwave::FrontendSpecifier::IceSpikes => { + output_events.emit_local(LocalEvent::CreateOutcome( + Outcome::FlashFreeze { + pos: data.pos.0 + + *data.ori.look_dir() * (data.body.max_radius()), + }, + )); + }, + shockwave::FrontendSpecifier::Ground => { + output_events.emit_local(LocalEvent::CreateOutcome( + Outcome::GroundSlam { + pos: data.pos.0 + + *data.ori.look_dir() * (data.body.max_radius()), + }, + )); + }, + shockwave::FrontendSpecifier::Steam => { + output_events.emit_local(LocalEvent::CreateOutcome( + Outcome::Steam { + pos: data.pos.0 + + *data.ori.look_dir() * (data.body.max_radius()), + }, + )); + }, + shockwave::FrontendSpecifier::Fire => { + output_events.emit_local(LocalEvent::CreateOutcome( + Outcome::FireShockwave { + pos: data.pos.0 + + *data.ori.look_dir() * (data.body.max_radius()), + }, + )); + }, + _ => { + output_events.emit_local(LocalEvent::CreateOutcome( + Outcome::Swoosh { + pos: data.pos.0 + + *data.ori.look_dir() * (data.body.max_radius()), + }, + )); + }, + } } } else { + // Attack + if matches!(self.static_data.timing, Timing::PostAction) { + self.attack(data, output_events); + } + // Transitions to recover update.character = CharacterState::Shockwave(Data { timer: Duration::default(), @@ -215,3 +191,58 @@ impl CharacterBehavior for Data { update } } + +impl Data { + fn attack(&self, data: &JoinData, output_events: &mut OutputEvents) { + let poise = AttackEffect::new( + Some(GroupTarget::OutOfGroup), + CombatEffect::Poise(self.static_data.poise_damage), + ) + .with_requirement(CombatRequirement::AnyDamage); + let knockback = AttackEffect::new( + Some(GroupTarget::OutOfGroup), + CombatEffect::Knockback(self.static_data.knockback), + ) + .with_requirement(CombatRequirement::AnyDamage); + let mut damage = AttackDamage::new( + Damage { + source: DamageSource::Shockwave, + kind: self.static_data.damage_kind, + value: self.static_data.damage, + }, + Some(GroupTarget::OutOfGroup), + rand::random(), + ); + if let Some(effect) = self.static_data.damage_effect { + damage = damage.with_effect(effect); + } + let precision_mult = combat::compute_precision_mult(data.inventory, data.msm); + let attack = Attack::default() + .with_damage(damage) + .with_precision(precision_mult) + .with_effect(poise) + .with_effect(knockback) + .with_combo_increment(); + let properties = shockwave::Properties { + angle: self.static_data.shockwave_angle, + vertical_angle: self.static_data.shockwave_vertical_angle, + speed: self.static_data.shockwave_speed, + duration: self.static_data.shockwave_duration, + attack, + dodgeable: self.static_data.dodgeable, + owner: Some(*data.uid), + specifier: self.static_data.specifier, + }; + output_events.emit_server(ShockwaveEvent { + properties, + pos: *data.pos, + ori: *data.ori, + }); + } +} + +#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] +pub enum Timing { + PostBuildup, + PostAction, +} diff --git a/voxygen/anim/src/character/shockwave.rs b/voxygen/anim/src/character/shockwave.rs index 605d1f298a..57fb7057a9 100644 --- a/voxygen/anim/src/character/shockwave.rs +++ b/voxygen/anim/src/character/shockwave.rs @@ -1,11 +1,8 @@ use super::{ super::{vek::*, Animation}, - CharacterSkeleton, SkeletonAttr, -}; -use common::{ - comp::item::Hands, - states::utils::{AbilityInfo, StageSection}, + hammer_start, twist_back, twist_forward, CharacterSkeleton, SkeletonAttr, }; +use common::states::utils::StageSection; pub struct Input { pub attack: bool, @@ -13,13 +10,7 @@ pub struct Input { pub struct ShockwaveAnimation; impl Animation for ShockwaveAnimation { - type Dependency<'a> = ( - Option, - (Option, Option), - f32, - f32, - Option, - ); + type Dependency<'a> = (Option<&'a str>, f32, f32, Option); type Skeleton = CharacterSkeleton; #[cfg(feature = "use-dyn-lib")] @@ -28,7 +19,7 @@ impl Animation for ShockwaveAnimation { #[cfg_attr(feature = "be-dyn-lib", export_name = "character_shockwave")] fn update_skeleton_inner( skeleton: &Self::Skeleton, - (_ability_info, hands, _global_time, velocity, stage_section): Self::Dependency<'_>, + (ability_id, _global_time, velocity, stage_section): Self::Dependency<'_>, anim_time: f32, rate: &mut f32, s_a: &SkeletonAttr, @@ -36,6 +27,11 @@ impl Animation for ShockwaveAnimation { *rate = 1.0; let mut next = (*skeleton).clone(); + if matches!(stage_section, Some(StageSection::Action)) { + next.main_weapon_trail = true; + next.off_weapon_trail = true; + } + let (move1, move2, move3) = match stage_section { Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0), @@ -43,79 +39,104 @@ impl Animation for ShockwaveAnimation { _ => (0.0, 0.0, 0.0), }; - if matches!( - stage_section, - Some(StageSection::Action | StageSection::Recover) - ) { - next.main_weapon_trail = true; - next.off_weapon_trail = true; - } - next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1); + match ability_id { + Some( + "common.abilities.staff.fireshockwave" + | "common.abilities.sceptre.healingaura" + | "common.abilities.sceptre.wardingaura", + ) => { + next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1); - next.hand_l.position = Vec3::new(s_a.sthl.0, s_a.sthl.1, s_a.sthl.2); - next.hand_l.orientation = - Quaternion::rotation_x(s_a.sthl.3) * Quaternion::rotation_y(s_a.sthl.4); - next.hand_r.position = Vec3::new(s_a.sthr.0, s_a.sthr.1, s_a.sthr.2); - next.hand_r.orientation = - Quaternion::rotation_x(s_a.sthr.3) * Quaternion::rotation_y(s_a.sthr.4); - next.main.position = Vec3::new(0.0, 0.0, 0.0); - next.main.orientation = Quaternion::rotation_x(0.0); + next.hand_l.position = Vec3::new(s_a.sthl.0, s_a.sthl.1, s_a.sthl.2); + next.hand_l.orientation = + Quaternion::rotation_x(s_a.sthl.3) * Quaternion::rotation_y(s_a.sthl.4); + next.hand_r.position = Vec3::new(s_a.sthr.0, s_a.sthr.1, s_a.sthr.2); + next.hand_r.orientation = + Quaternion::rotation_x(s_a.sthr.3) * Quaternion::rotation_y(s_a.sthr.4); + next.main.position = Vec3::new(0.0, 0.0, 0.0); + next.main.orientation = Quaternion::rotation_x(0.0); - next.control.position = Vec3::new(s_a.stc.0, s_a.stc.1, s_a.stc.2); - next.control.orientation = - Quaternion::rotation_x(s_a.stc.3) * Quaternion::rotation_y(s_a.stc.4); + next.control.position = Vec3::new(s_a.stc.0, s_a.stc.1, s_a.stc.2); + next.control.orientation = + Quaternion::rotation_x(s_a.stc.3) * Quaternion::rotation_y(s_a.stc.4); - let twist = move1 * 0.8; + let twist = move1 * 0.8; - next.control.position = Vec3::new( - s_a.stc.0 + (move1 * 5.0) * (1.0 - move3), - s_a.stc.1 + (move1 * 5.0) * (1.0 - move3), - s_a.stc.2 + (move1 * 10.0 + move2 * -10.0) * (1.0 - move3), - ); - next.control.orientation = - Quaternion::rotation_x(s_a.stc.3 + (move1 * 0.8) * (1.0 - move3)) - * Quaternion::rotation_y( - s_a.stc.4 + (move1 * -0.15 + move2 * -0.15) * (1.0 - move3), - ) - * Quaternion::rotation_z((move1 * 0.8 + move2 * -0.8) * (1.0 - move3)); + next.control.position = Vec3::new( + s_a.stc.0 + (move1 * 5.0) * (1.0 - move3), + s_a.stc.1 + (move1 * 5.0) * (1.0 - move3), + s_a.stc.2 + (move1 * 10.0 + move2 * -10.0) * (1.0 - move3), + ); + next.control.orientation = + Quaternion::rotation_x(s_a.stc.3 + (move1 * 0.8) * (1.0 - move3)) + * Quaternion::rotation_y( + s_a.stc.4 + (move1 * -0.15 + move2 * -0.15) * (1.0 - move3), + ) + * Quaternion::rotation_z((move1 * 0.8 + move2 * -0.8) * (1.0 - move3)); - next.head.orientation = Quaternion::rotation_x((move1 * 0.4) * (1.0 - move3)) - * Quaternion::rotation_z((twist * 0.2 + move2 * -0.8) * (1.0 - move3)); + next.head.orientation = Quaternion::rotation_x((move1 * 0.4) * (1.0 - move3)) + * Quaternion::rotation_z((twist * 0.2 + move2 * -0.8) * (1.0 - move3)); - next.chest.position = Vec3::new( - 0.0, - s_a.chest.0, - s_a.chest.1 + (move1 * 2.0 + move2 * -4.0) * (1.0 - move3), - ); - next.chest.orientation = Quaternion::rotation_x((move2 * -0.8) * (1.0 - move3)) - * Quaternion::rotation_z(twist * -0.2 + move2 * -0.1 + (1.0 - move3)); + next.chest.position = Vec3::new( + 0.0, + s_a.chest.0, + s_a.chest.1 + (move1 * 2.0 + move2 * -4.0) * (1.0 - move3), + ); + next.chest.orientation = Quaternion::rotation_x((move2 * -0.8) * (1.0 - move3)) + * Quaternion::rotation_z(twist * -0.2 + move2 * -0.1 + (1.0 - move3)); - next.belt.orientation = Quaternion::rotation_x((move2 * 0.2) * (1.0 - move3)) - * Quaternion::rotation_z((twist * 0.6 + move2 * -0.48) * (1.0 - move3)); + next.belt.orientation = Quaternion::rotation_x((move2 * 0.2) * (1.0 - move3)) + * Quaternion::rotation_z((twist * 0.6 + move2 * -0.48) * (1.0 - move3)); - next.shorts.orientation = Quaternion::rotation_x((move2 * 0.3) * (1.0 - move3)) - * Quaternion::rotation_z((twist + move2 * -0.8) * (1.0 - move3)); + next.shorts.orientation = Quaternion::rotation_x((move2 * 0.3) * (1.0 - move3)) + * Quaternion::rotation_z((twist + move2 * -0.8) * (1.0 - move3)); - if velocity < 0.5 { - next.foot_l.position = Vec3::new( - -s_a.foot.0, - s_a.foot.1 + move1 * -7.0 + move2 * 7.0, - s_a.foot.2, - ); - next.foot_l.orientation = Quaternion::rotation_x(move1 * -0.8 + move2 * 0.8) - * Quaternion::rotation_z(move1 * 0.3 + move2 * -0.3); + if velocity < 0.5 { + next.foot_l.position = Vec3::new( + -s_a.foot.0, + s_a.foot.1 + move1 * -7.0 + move2 * 7.0, + s_a.foot.2, + ); + next.foot_l.orientation = Quaternion::rotation_x(move1 * -0.8 + move2 * 0.8) + * Quaternion::rotation_z(move1 * 0.3 + move2 * -0.3); - next.foot_r.position = Vec3::new( - s_a.foot.0, - s_a.foot.1 + move1 * 5.0 + move2 * -5.0, - s_a.foot.2, - ); - next.foot_r.orientation = Quaternion::rotation_y(move1 * -0.3 + move2 * 0.3) - * Quaternion::rotation_z(move1 * 0.4 + move2 * -0.4); - } + next.foot_r.position = Vec3::new( + s_a.foot.0, + s_a.foot.1 + move1 * 5.0 + move2 * -5.0, + s_a.foot.2, + ); + next.foot_r.orientation = Quaternion::rotation_y(move1 * -0.3 + move2 * 0.3) + * Quaternion::rotation_z(move1 * 0.4 + move2 * -0.4); + } + }, + Some("common.abilities.hammer.tremor") => { + hammer_start(&mut next, s_a); + let (move1, move2, move3) = match stage_section { + Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), + Some(StageSection::Action) => (1.0, anim_time, 0.0), + Some(StageSection::Recover) => (1.0, 1.0, anim_time), + _ => (0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move3; + let move1 = move1 * pullback; + let move2 = move2 * pullback; - if let (None, Some(Hands::Two)) = hands { - next.second = next.main; + twist_back(&mut next, move1, 1.4, 0.7, 0.5, 0.9); + next.foot_l.orientation.rotate_z(move1 * 1.4); + next.foot_l.position += Vec3::new(-1.0, -3.0, 0.0) * move1; + next.control.orientation.rotate_x(move1 * 2.6); + next.control.orientation.rotate_y(move1 * 0.8); + + twist_forward(&mut next, move2, 2.1, 1.2, 0.9, 1.6); + next.foot_l.orientation.rotate_z(move2 * -1.4); + next.foot_l.position += Vec3::new(2.0, 7.0, 0.0) * move2; + next.control.orientation.rotate_z(move2 * 2.1); + next.control.orientation.rotate_x(move2 * -2.0); + next.control.orientation.rotate_z(move2 * 1.2); + next.control.position += Vec3::new(-16.0, 0.0, 0.0) * move2; + next.chest.orientation.rotate_x(-0.8 * move2); + }, + _ => {}, } next diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 04c572512f..4c0ec5f6a3 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -318,6 +318,7 @@ image_ids! { hammer_solid_smash: "voxygen.element.skills.hammer.solid_smash", hammer_wide_wallop: "voxygen.element.skills.hammer.wide_wallop", hammer_scornful_swipe: "voxygen.element.skills.hammer.scornful_swipe", + hammer_tremor: "voxygen.element.skills.hammer.tremor", // Skilltree Icons health_plus_skill: "voxygen.element.skills.skilltree.health_plus", energy_plus_skill: "voxygen.element.skills.skilltree.energy_plus", diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index 548aa6a197..e1118643d5 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -625,6 +625,7 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id { "common.abilities.hammer.solid_smash" => imgs.hammer_solid_smash, "common.abilities.hammer.wide_wallop" => imgs.hammer_wide_wallop, "common.abilities.hammer.scornful_swipe" => imgs.hammer_scornful_swipe, + "common.abilities.hammer.tremor" => imgs.hammer_tremor, // Bow "common.abilities.bow.charged" => imgs.bow_m1, "common.abilities.bow.repeater" => imgs.bow_m2, diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index fdbdf7dfc1..0eaa728f50 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -1652,13 +1652,7 @@ impl FigureMgr { }; anim::character::ShockwaveAnimation::update_skeleton( &target_base, - ( - Some(s.static_data.ability_info), - hands, - time, - rel_vel.magnitude(), - Some(s.stage_section), - ), + (ability_id, time, rel_vel.magnitude(), Some(s.stage_section)), stage_progress, &mut state_animation_rate, skeleton_attr, @@ -1678,15 +1672,11 @@ impl FigureMgr { }, _ => 0.0, }; + + // ? Aura confirmed just shockwave anim::character::ShockwaveAnimation::update_skeleton( &target_base, - ( - Some(s.static_data.ability_info), - hands, - time, - rel_vel.magnitude(), - Some(s.stage_section), - ), + (ability_id, time, rel_vel.magnitude(), Some(s.stage_section)), stage_progress, &mut state_animation_rate, skeleton_attr, From 909363d33ca28eeaf0a65ebe62767c371c78905a Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 19 Feb 2024 14:41:22 -0500 Subject: [PATCH 08/31] Vigorous bash --- .../common/abilities/ability_set_manifest.ron | 2 +- assets/common/abilities/axe/cleave.ron | 2 +- assets/common/abilities/axe/plunder.ron | 2 +- assets/common/abilities/axe/rising_tide.ron | 2 +- assets/common/abilities/hammer/tremor.ron | 2 +- .../common/abilities/hammer/vigorous_bash.ron | 27 +++++++++++++++ .../element/skills/hammer/vigorous_bash.png | 3 ++ assets/voxygen/i18n/en/hud/ability.ftl | 5 ++- common/src/combat.rs | 16 ++++++--- common/src/comp/ability.rs | 13 ++++--- common/src/comp/melee.rs | 34 +++++++++++++------ common/src/states/charged_melee.rs | 21 ++++++++---- common/src/states/combo_melee2.rs | 12 +++---- common/src/states/dash_melee.rs | 2 +- voxygen/anim/src/character/combomelee.rs | 24 ++++++++++++- voxygen/src/hud/img_ids.rs | 1 + voxygen/src/hud/util.rs | 1 + 17 files changed, 127 insertions(+), 42 deletions(-) create mode 100644 assets/common/abilities/hammer/vigorous_bash.ron create mode 100644 assets/voxygen/element/skills/hammer/vigorous_bash.png diff --git a/assets/common/abilities/ability_set_manifest.ron b/assets/common/abilities/ability_set_manifest.ron index 1b742e8ef1..dd05bd8ac4 100644 --- a/assets/common/abilities/ability_set_manifest.ron +++ b/assets/common/abilities/ability_set_manifest.ron @@ -198,7 +198,7 @@ abilities: [ Simple(Hammer(ScornfulSwipe), "common.abilities.hammer.scornful_swipe"), Simple(Hammer(Tremor), "common.abilities.hammer.tremor"), - // Simple(Hammer(VigorousBash), "common.abilities.hammer.vigorous_bash"), + Simple(Hammer(VigorousBash), "common.abilities.hammer.vigorous_bash"), // Simple(Hammer(Retaliate), "common.abilities.hammer.retaliate"), // Simple(Hammer(SpineCracker), "common.abilities.hammer.spine_cracker"), // Simple(Hammer(Breach), "common.abilities.hammer.breach"), diff --git a/assets/common/abilities/axe/cleave.ron b/assets/common/abilities/axe/cleave.ron index 6f965e3d5c..c3c96c2df9 100644 --- a/assets/common/abilities/axe/cleave.ron +++ b/assets/common/abilities/axe/cleave.ron @@ -22,5 +22,5 @@ ChargedMelee( swing_duration: 0.1, hit_timing: 0.2, recover_duration: 0.2, - additional_combo: 4, + custom_combo: Some((additional: 4)), ) diff --git a/assets/common/abilities/axe/plunder.ron b/assets/common/abilities/axe/plunder.ron index fbce7af835..e46aafe79c 100644 --- a/assets/common/abilities/axe/plunder.ron +++ b/assets/common/abilities/axe/plunder.ron @@ -20,7 +20,7 @@ ComboMelee2( swing: Some(Forward(0.7)), ), ori_modifier: 0.6, - additional_combo: 4, + custom_combo: Some((additional: 4)), ), ], energy_cost_per_strike: 10, diff --git a/assets/common/abilities/axe/rising_tide.ron b/assets/common/abilities/axe/rising_tide.ron index 6c46e77df9..c60e22d266 100644 --- a/assets/common/abilities/axe/rising_tide.ron +++ b/assets/common/abilities/axe/rising_tide.ron @@ -16,7 +16,7 @@ ComboMelee2( hit_timing: 0.5, recover_duration: 0.3, ori_modifier: 0.6, - additional_combo: 4, + custom_combo: Some((additional: 4)), ), ], energy_cost_per_strike: 10, diff --git a/assets/common/abilities/hammer/tremor.ron b/assets/common/abilities/hammer/tremor.ron index 529c007614..d989b9a2c6 100644 --- a/assets/common/abilities/hammer/tremor.ron +++ b/assets/common/abilities/hammer/tremor.ron @@ -1,5 +1,5 @@ Shockwave( - energy_cost: 0, + energy_cost: 20, buildup_duration: 0.4, swing_duration: 0.3, recover_duration: 0.3, diff --git a/assets/common/abilities/hammer/vigorous_bash.ron b/assets/common/abilities/hammer/vigorous_bash.ron new file mode 100644 index 0000000000..ad37c11adc --- /dev/null +++ b/assets/common/abilities/hammer/vigorous_bash.ron @@ -0,0 +1,27 @@ +ComboMelee2( + strikes: [ + ( + melee_constructor: ( + kind: Bash( + damage: 15, + poise: 15, + knockback: 5, + energy_regen: 0, + ), + range: 4.0, + angle: 15.0, + ), + buildup_duration: 0.2, + swing_duration: 0.2, + hit_timing: 0.2, + recover_duration: 0.1, + movement: ( + buildup: Some(Forward(0.2)), + swing: Some(Forward(0.3)), + ), + ori_modifier: 0.6, + custom_combo: Some((additional: 9, requirement: Some(TargetPoised))), + ), + ], + energy_cost_per_strike: 0, +) diff --git a/assets/voxygen/element/skills/hammer/vigorous_bash.png b/assets/voxygen/element/skills/hammer/vigorous_bash.png new file mode 100644 index 0000000000..64fc6cc8aa --- /dev/null +++ b/assets/voxygen/element/skills/hammer/vigorous_bash.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f62ef8546cab964b85ab1f33f550c42ee314ff8db8af7da4ea37c29ed52b7cdf +size 1054 diff --git a/assets/voxygen/i18n/en/hud/ability.ftl b/assets/voxygen/i18n/en/hud/ability.ftl index c03d11fb8b..5a751087c5 100644 --- a/assets/voxygen/i18n/en/hud/ability.ftl +++ b/assets/voxygen/i18n/en/hud/ability.ftl @@ -384,8 +384,11 @@ common-abilities-hammer-wide_wallop = Wide Wallop .desc = Pull back and send them flying common-abilities-hammer-scornful_swipe = Scornful Swipe - .desc = + .desc = Bolster your fortitude and stamina by taunting your enemies before striking at them. If you fall to an enemy they become empowered. common-abilities-hammer-tremor = Tremor .desc = Strike the earth with enough force that the ground beneath your foes trembles. +common-abilities-hammer-vigorous_bash = Vigorous Bash + .desc = + Use the head of your hammer to quickly strike your foes. diff --git a/common/src/combat.rs b/common/src/combat.rs index c98743e296..24e9e943b5 100644 --- a/common/src/combat.rs +++ b/common/src/combat.rs @@ -136,13 +136,17 @@ impl Attack { } #[must_use] - pub fn with_combo(self, combo: i32) -> Self { + pub fn with_combo_requirement(self, combo: i32, requirement: CombatRequirement) -> Self { self.with_effect( - AttackEffect::new(None, CombatEffect::Combo(combo)) - .with_requirement(CombatRequirement::AnyDamage), + AttackEffect::new(None, CombatEffect::Combo(combo)).with_requirement(requirement), ) } + #[must_use] + pub fn with_combo(self, combo: i32) -> Self { + self.with_combo_requirement(combo, CombatRequirement::AnyDamage) + } + #[must_use] pub fn with_combo_increment(self) -> Self { self.with_combo(1) } @@ -648,6 +652,9 @@ impl Attack { CombatRequirement::TargetHasBuff(buff) => { target.buffs.map_or(false, |buffs| buffs.contains(*buff)) }, + CombatRequirement::TargetPoised => { + target.char_state.map_or(false, |cs| cs.is_stunned()) + }, }); if requirements_met { is_applied = true; @@ -1000,12 +1007,13 @@ impl CombatEffect { } } -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq)] pub enum CombatRequirement { AnyDamage, Energy(f32), Combo(u32), TargetHasBuff(BuffKind), + TargetPoised, } #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] diff --git a/common/src/comp/ability.rs b/common/src/comp/ability.rs index 445b151c72..d6e80dfc88 100644 --- a/common/src/comp/ability.rs +++ b/common/src/comp/ability.rs @@ -14,7 +14,7 @@ use crate::{ slot::EquipSlot, Inventory, }, - melee::{MeleeConstructor, MeleeConstructorKind}, + melee::{CustomCombo, MeleeConstructor, MeleeConstructorKind}, projectile::ProjectileConstructor, skillset::{ skills::{self, Skill, SKILL_MODIFIERS}, @@ -889,8 +889,7 @@ pub enum CharacterAbility { melee_constructor: MeleeConstructor, specifier: Option, damage_effect: Option, - #[serde(default)] - additional_combo: i32, + custom_combo: Option, #[serde(default)] meta: AbilityMeta, }, @@ -1112,7 +1111,7 @@ impl Default for CharacterAbility { multi_target: None, damage_effect: None, simultaneous_hits: 1, - combo_gain: 1, + custom_combo: None, }, ori_modifier: 1.0, frontend_specifier: None, @@ -1466,7 +1465,7 @@ impl CharacterAbility { specifier: _, ref mut damage_effect, meta: _, - additional_combo: _, + custom_combo: _, } => { *swing_duration /= stats.speed; *buildup_strike = buildup_strike @@ -2450,7 +2449,7 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState { melee_constructor, specifier, damage_effect, - additional_combo, + custom_combo, meta: _, } => CharacterState::ChargedMelee(charged_melee::Data { static_data: charged_melee::StaticData { @@ -2466,7 +2465,7 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState { ability_info, specifier: *specifier, damage_effect: *damage_effect, - additional_combo: *additional_combo, + custom_combo: *custom_combo, }, stage_section: if buildup_strike.is_some() { StageSection::Buildup diff --git a/common/src/comp/melee.rs b/common/src/comp/melee.rs index f3f589efea..bd08d8b6cf 100644 --- a/common/src/comp/melee.rs +++ b/common/src/comp/melee.rs @@ -51,7 +51,6 @@ impl Component for Melee { } fn default_simultaneous_hits() -> u32 { 1 } -fn default_combo_gain() -> i32 { 1 } #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Scaled { @@ -76,8 +75,13 @@ pub struct MeleeConstructor { pub damage_effect: Option, #[serde(default = "default_simultaneous_hits")] pub simultaneous_hits: u32, - #[serde(default = "default_combo_gain")] - pub combo_gain: i32, + pub custom_combo: Option, +} + +#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CustomCombo { + pub additional: i32, + pub requirement: Option, } impl MeleeConstructor { @@ -140,7 +144,6 @@ impl MeleeConstructor { .with_effect(energy) .with_effect(poise) .with_effect(knockback) - .with_combo(self.combo_gain) }, Stab { damage, @@ -191,7 +194,6 @@ impl MeleeConstructor { .with_effect(energy) .with_effect(poise) .with_effect(knockback) - .with_combo(self.combo_gain) }, Bash { damage, @@ -234,7 +236,6 @@ impl MeleeConstructor { .with_effect(energy) .with_effect(poise) .with_effect(knockback) - .with_combo(self.combo_gain) }, Hook { damage, @@ -281,7 +282,6 @@ impl MeleeConstructor { .with_precision(precision_mult) .with_effect(poise) .with_effect(knockback) - .with_combo(self.combo_gain) }, NecroticVortex { damage, @@ -319,7 +319,6 @@ impl MeleeConstructor { .with_damage(damage) .with_precision(precision_mult) .with_effect(knockback) - .with_combo(self.combo_gain) }, SonicWave { damage, @@ -358,10 +357,23 @@ impl MeleeConstructor { .with_precision(precision_mult) .with_effect(poise) .with_effect(knockback) - .with_combo(self.combo_gain) }, }; + let attack = match self.custom_combo { + None => attack.with_combo_increment(), + Some(CustomCombo { + additional, + requirement: None, + }) => attack.with_combo(1 + additional), + Some(CustomCombo { + additional, + requirement: Some(req), + }) => attack + .with_combo_increment() + .with_combo_requirement(additional, req), + }; + Melee { attack, range: self.range, @@ -517,8 +529,8 @@ impl MeleeConstructor { } #[must_use] - pub fn with_combo(mut self, combo: i32) -> Self { - self.combo_gain = combo; + pub fn custom_combo(mut self, custom: Option) -> Self { + self.custom_combo = custom; self } } diff --git a/common/src/states/charged_melee.rs b/common/src/states/charged_melee.rs index ce4bb3c3b2..9fac060941 100644 --- a/common/src/states/charged_melee.rs +++ b/common/src/states/charged_melee.rs @@ -1,6 +1,9 @@ use crate::{ combat::{self, CombatEffect}, - comp::{character_state::OutputEvents, CharacterState, MeleeConstructor, StateUpdate}, + comp::{ + character_state::OutputEvents, melee::CustomCombo, CharacterState, MeleeConstructor, + StateUpdate, + }, event::LocalEvent, outcome::Outcome, states::{ @@ -38,7 +41,7 @@ pub struct StaticData { /// Adds an effect onto the main damage of the attack pub damage_effect: Option, /// The actual additional combo is modified by duration of charge - pub additional_combo: i32, + pub custom_combo: Option, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] @@ -156,15 +159,21 @@ impl CharacterBehavior for Data { let precision_mult = combat::compute_precision_mult(data.inventory, data.msm); let tool_stats = get_tool_stats(data, self.static_data.ability_info); - let additional_combo = - (self.charge_amount * self.static_data.additional_combo as f32 + 0.5) - .floor() as i32; + let custom_combo = self.static_data.custom_combo.map(|c| { + let additional = + (self.charge_amount * c.additional as f32 + 0.5).floor() as i32; + + CustomCombo { + additional, + requirement: c.requirement, + } + }); data.updater.insert( data.entity, self.static_data .melee_constructor - .with_combo(1 + additional_combo) + .custom_combo(custom_combo) .handle_scaling(self.charge_amount) .create_melee(precision_mult, tool_stats), ); diff --git a/common/src/states/combo_melee2.rs b/common/src/states/combo_melee2.rs index e77a994557..530e4dcce1 100644 --- a/common/src/states/combo_melee2.rs +++ b/common/src/states/combo_melee2.rs @@ -2,8 +2,8 @@ use crate::{ combat, combat::{Attack, AttackDamage, Damage, DamageKind::Crushing, DamageSource, GroupTarget}, comp::{ - character_state::OutputEvents, item::Reagent, tool::Stats, CharacterState, - MeleeConstructor, StateUpdate, + character_state::OutputEvents, item::Reagent, melee::CustomCombo, tool::Stats, + CharacterState, MeleeConstructor, StateUpdate, }, event::{ExplosionEvent, LocalEvent}, outcome::Outcome, @@ -38,7 +38,7 @@ pub struct Strike { /// Adjusts turning rate during the attack pub ori_modifier: f32, #[serde(default)] - pub additional_combo: i32, + pub custom_combo: Option, } impl Strike { @@ -51,7 +51,7 @@ impl Strike { recover_duration: Duration::from_secs_f32(self.recover_duration), movement: self.movement, ori_modifier: self.ori_modifier, - additional_combo: self.additional_combo, + custom_combo: self.custom_combo, } } @@ -65,7 +65,7 @@ impl Strike { recover_duration: self.recover_duration / stats.speed, movement: self.movement, ori_modifier: self.ori_modifier, - additional_combo: self.additional_combo, + custom_combo: self.custom_combo, } } } @@ -179,7 +179,7 @@ impl CharacterBehavior for Data { data.entity, strike_data .melee_constructor - .with_combo(1 + strike_data.additional_combo) + .custom_combo(strike_data.custom_combo) .create_melee(precision_mult, tool_stats), ); } else if self.timer < strike_data.swing_duration { diff --git a/common/src/states/dash_melee.rs b/common/src/states/dash_melee.rs index ac16b0386f..5aaf5a923d 100644 --- a/common/src/states/dash_melee.rs +++ b/common/src/states/dash_melee.rs @@ -278,7 +278,7 @@ fn create_test_melee(static_data: StaticData) -> Melee { multi_target: None, damage_effect: None, simultaneous_hits: 1, - combo_gain: 0, + custom_combo: None, }; melee.create_melee(0.0, tool::Stats::one()) } diff --git a/voxygen/anim/src/character/combomelee.rs b/voxygen/anim/src/character/combomelee.rs index af4dbcfbd8..de42458814 100644 --- a/voxygen/anim/src/character/combomelee.rs +++ b/voxygen/anim/src/character/combomelee.rs @@ -1,6 +1,6 @@ use super::{ super::{vek::*, Animation}, - CharacterSkeleton, SkeletonAttr, + hammer_start, twist_back, twist_forward, CharacterSkeleton, SkeletonAttr, }; use common::states::utils::{AbilityInfo, HandInfo, StageSection}; use core::f32::consts::{PI, TAU}; @@ -1208,6 +1208,28 @@ impl Animation for ComboAnimation { } } }, + Some("common.abilities.hammer.vigorous_bash") => { + hammer_start(&mut next, s_a); + let (move1, move2, move3) = match stage_section { + Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), + Some(StageSection::Action) => (1.0, anim_time, 0.0), + Some(StageSection::Recover) => (1.0, 1.0, anim_time), + _ => (0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move3; + let move1 = move1 * pullback; + let move2 = move2 * pullback; + + twist_forward(&mut next, move1, 1.4, 0.7, 0.5, 0.9); + next.control.orientation.rotate_y(move1 * 0.3); + next.control.orientation.rotate_z(move1 * -0.3); + next.control.position += Vec3::new(12.0, -3.0, 3.0) * move1; + + twist_back(&mut next, move2, 1.8, 0.9, 0.6, 1.1); + next.control.orientation.rotate_z(move2 * -2.1); + next.control.orientation.rotate_x(move2 * 0.6); + next.control.position += Vec3::new(-20.0, 8.0, 0.0) * move2; + }, _ => {}, } } diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 4c0ec5f6a3..2e7f034c2c 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -319,6 +319,7 @@ image_ids! { hammer_wide_wallop: "voxygen.element.skills.hammer.wide_wallop", hammer_scornful_swipe: "voxygen.element.skills.hammer.scornful_swipe", hammer_tremor: "voxygen.element.skills.hammer.tremor", + hammer_vigorous_bash: "voxygen.element.skills.hammer.vigorous_bash", // Skilltree Icons health_plus_skill: "voxygen.element.skills.skilltree.health_plus", energy_plus_skill: "voxygen.element.skills.skilltree.energy_plus", diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index e1118643d5..1c43c48fc0 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -626,6 +626,7 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id { "common.abilities.hammer.wide_wallop" => imgs.hammer_wide_wallop, "common.abilities.hammer.scornful_swipe" => imgs.hammer_scornful_swipe, "common.abilities.hammer.tremor" => imgs.hammer_tremor, + "common.abilities.hammer.vigorous_bash" => imgs.hammer_vigorous_bash, // Bow "common.abilities.bow.charged" => imgs.bow_m1, "common.abilities.bow.repeater" => imgs.bow_m2, From e24ebc381b0871eb2e6801091a909eaf7ba52c3c Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 21 Feb 2024 20:16:04 -0500 Subject: [PATCH 09/31] Heavy whorl --- .../common/abilities/ability_set_manifest.ron | 14 +++--- .../abilities/hammer/dual_heavy_whorl.ron | 19 ++++++++ .../common/abilities/hammer/heavy_whorl.ron | 18 ++++++++ .../abilities/hammer/scornful_swipe.ron | 2 +- .../common/abilities/hammer/vigorous_bash.ron | 2 +- .../element/skills/hammer/heavy_whorl.png | 3 ++ assets/voxygen/i18n/en/hud/ability.ftl | 6 +++ voxygen/anim/src/character/alpha.rs | 46 ++++++++++++++++++- voxygen/anim/src/character/mod.rs | 27 +++++++++++ voxygen/src/hud/img_ids.rs | 1 + voxygen/src/hud/util.rs | 2 + 11 files changed, 130 insertions(+), 10 deletions(-) create mode 100644 assets/common/abilities/hammer/dual_heavy_whorl.ron create mode 100644 assets/common/abilities/hammer/heavy_whorl.ron create mode 100644 assets/voxygen/element/skills/hammer/heavy_whorl.png diff --git a/assets/common/abilities/ability_set_manifest.ron b/assets/common/abilities/ability_set_manifest.ron index dd05bd8ac4..9b807f8777 100644 --- a/assets/common/abilities/ability_set_manifest.ron +++ b/assets/common/abilities/ability_set_manifest.ron @@ -218,13 +218,13 @@ // ), // Simple(Hammer(Thunderclap), "common.abilities.hammer.thunderclap"), // Simple(Hammer(SeismicShock), "common.abilities.hammer.seismic_shock"), - // Contextualized( - // pseudo_id: "common.abilities.hammer.heavy_whorl", - // abilities: [ - // ((dual_wielding_same_kind: true), (Hammer(HeavyWhorl), "common.abilities.hammer.dual_heavy_whorl")), - // ((), (Hammer(HeavyWhorl), "common.abilities.hammer.heavy_whorl")), - // ], - // ), + Contextualized( + pseudo_id: "common.abilities.hammer.heavy_whorl", + abilities: [ + ((dual_wielding_same_kind: true), (Hammer(HeavyWhorl), "common.abilities.hammer.dual_heavy_whorl")), + ((), (Hammer(HeavyWhorl), "common.abilities.hammer.heavy_whorl")), + ], + ), // Contextualized( // pseudo_id: "common.abilities.hammer.intercept", // abilities: [ diff --git a/assets/common/abilities/hammer/dual_heavy_whorl.ron b/assets/common/abilities/hammer/dual_heavy_whorl.ron new file mode 100644 index 0000000000..67aae07670 --- /dev/null +++ b/assets/common/abilities/hammer/dual_heavy_whorl.ron @@ -0,0 +1,19 @@ +BasicMelee( + energy_cost: 15, + buildup_duration: 0.2, + swing_duration: 0.4, + hit_timing: 0.5, + recover_duration: 0.2, + melee_constructor: ( + kind: Bash( + damage: 15, + poise: 15, + knockback: 10, + energy_regen: 0, + ), + range: 3, + angle: 360, + simultaneous_hits: 2, + ), + ori_modifier: 0.2, +) diff --git a/assets/common/abilities/hammer/heavy_whorl.ron b/assets/common/abilities/hammer/heavy_whorl.ron new file mode 100644 index 0000000000..cba4f07302 --- /dev/null +++ b/assets/common/abilities/hammer/heavy_whorl.ron @@ -0,0 +1,18 @@ +BasicMelee( + energy_cost: 10, + buildup_duration: 0.2, + swing_duration: 0.4, + hit_timing: 0.5, + recover_duration: 0.2, + melee_constructor: ( + kind: Bash( + damage: 20, + poise: 20, + knockback: 10, + energy_regen: 0, + ), + range: 3, + angle: 360, + ), + ori_modifier: 0.2, +) diff --git a/assets/common/abilities/hammer/scornful_swipe.ron b/assets/common/abilities/hammer/scornful_swipe.ron index 4a2cdbf19f..13c4a441e1 100644 --- a/assets/common/abilities/hammer/scornful_swipe.ron +++ b/assets/common/abilities/hammer/scornful_swipe.ron @@ -1,5 +1,5 @@ BasicMelee( - energy_cost: 0, + energy_cost: 10, buildup_duration: 0.7, swing_duration: 0.1, hit_timing: 0.5, diff --git a/assets/common/abilities/hammer/vigorous_bash.ron b/assets/common/abilities/hammer/vigorous_bash.ron index ad37c11adc..ff2de47a0d 100644 --- a/assets/common/abilities/hammer/vigorous_bash.ron +++ b/assets/common/abilities/hammer/vigorous_bash.ron @@ -23,5 +23,5 @@ ComboMelee2( custom_combo: Some((additional: 9, requirement: Some(TargetPoised))), ), ], - energy_cost_per_strike: 0, + energy_cost_per_strike: 10, ) diff --git a/assets/voxygen/element/skills/hammer/heavy_whorl.png b/assets/voxygen/element/skills/hammer/heavy_whorl.png new file mode 100644 index 0000000000..604a438c45 --- /dev/null +++ b/assets/voxygen/element/skills/hammer/heavy_whorl.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:70029c8ac08cc45765f421b74f7177fb4c9d6c85d9d7c212165d7d724b73149f +size 1059 diff --git a/assets/voxygen/i18n/en/hud/ability.ftl b/assets/voxygen/i18n/en/hud/ability.ftl index 5a751087c5..7030f56557 100644 --- a/assets/voxygen/i18n/en/hud/ability.ftl +++ b/assets/voxygen/i18n/en/hud/ability.ftl @@ -392,3 +392,9 @@ common-abilities-hammer-tremor = Tremor common-abilities-hammer-vigorous_bash = Vigorous Bash .desc = Use the head of your hammer to quickly strike your foes. +common-abilities-hammer-heavy_whorl = Heavy Whorl + .desc = + You strike all foes surrounding you with your hammer. +common-abilities-hammer-dual_heavy_whorl = Heavy Whorl + .desc = + You strike all foes surrounding you with your hammers. diff --git a/voxygen/anim/src/character/alpha.rs b/voxygen/anim/src/character/alpha.rs index ddc50830c5..21b5e9cf91 100644 --- a/voxygen/anim/src/character/alpha.rs +++ b/voxygen/anim/src/character/alpha.rs @@ -1,6 +1,6 @@ use super::{ super::{vek::*, Animation}, - hammer_start, twist_back, twist_forward, CharacterSkeleton, SkeletonAttr, + dual_wield_start, hammer_start, twist_back, twist_forward, CharacterSkeleton, SkeletonAttr, }; use common::{ comp::item::{Hands, ToolKind}, @@ -89,6 +89,50 @@ impl Animation for AlphaAnimation { next.control.orientation.rotate_y(move2 * -1.7); next.control.orientation.rotate_z(move2 * -2.7); }, + Some("common.abilities.hammer.heavy_whorl") => { + hammer_start(&mut next, s_a); + let (move1, move2, move3) = match stage_section { + Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), + Some(StageSection::Action) => (1.0, anim_time, 0.0), + Some(StageSection::Recover) => (1.0, 1.0, anim_time), + _ => (0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move3; + let move1 = move1 * pullback; + let move2base = move2; + let move2 = move2 * pullback; + + twist_back(&mut next, move1, 2.0, 0.8, 0.4, 1.4); + next.control.orientation.rotate_x(move1 * 0.6); + + next.torso.orientation.rotate_z(move2base * -2.0 * PI); + twist_forward(&mut next, move2, 3.4, 1.2, 0.8, 1.8); + next.control.orientation.rotate_z(move2 * -2.3); + next.control.position += Vec3::new(6.0, 0.0, 6.0) * move2; + }, + Some("common.abilities.hammer.dual_heavy_whorl") => { + dual_wield_start(&mut next); + let (move1, move2, move3) = match stage_section { + Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), + Some(StageSection::Action) => (1.0, anim_time, 0.0), + Some(StageSection::Recover) => (1.0, 1.0, anim_time), + _ => (0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move3; + let move1 = move1 * pullback; + let move2base = move2; + let move2 = move2 * pullback; + + twist_back(&mut next, move1, 2.0, 0.8, 0.4, 1.4); + next.control_l.orientation.rotate_y(move1 * -PI / 2.0); + next.control_r.orientation.rotate_y(move1 * -PI / 2.0); + next.control.position += Vec3::new(0.0, 0.0, 4.0) * move1; + + next.torso.orientation.rotate_z(move2base * -2.0 * PI); + twist_forward(&mut next, move2, 3.4, 1.2, 0.8, 1.8); + next.control_l.orientation.rotate_z(move2 * -2.3); + next.control_r.orientation.rotate_z(move2 * -2.3); + }, _ => { let (move1, move2, _move3, move2h) = match stage_section { Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0), diff --git a/voxygen/anim/src/character/mod.rs b/voxygen/anim/src/character/mod.rs index c3a6349d31..6748dfbd42 100644 --- a/voxygen/anim/src/character/mod.rs +++ b/voxygen/anim/src/character/mod.rs @@ -499,3 +499,30 @@ pub fn twist_forward(next: &mut CharacterSkeleton, move2: f32, c: f32, h: f32, b next.belt.orientation.rotate_z(move2 * b); next.shorts.orientation.rotate_z(move2 * s); } + +pub fn dual_wield_start(next: &mut CharacterSkeleton) { + next.main.position = Vec3::new(0.0, 0.0, 0.0); + next.main.orientation = Quaternion::rotation_z(0.0); + next.second.position = Vec3::new(0.0, 0.0, 0.0); + next.second.orientation = Quaternion::rotation_z(0.0); + + next.control_l.position = + next.hand_l.position * Vec3::new(0.5, 0.5, 0.3) + Vec3::new(-4.0, 0.0, 0.0); + next.control_l.orientation = Quaternion::lerp( + next.hand_l.orientation, + Quaternion::rotation_x(PI * -0.5), + 0.65, + ); + next.hand_l.position = Vec3::new(0.0, -2.0, 0.0); + next.hand_l.orientation = Quaternion::rotation_x(PI * 0.5); + + next.control_r.position = + next.hand_r.position * Vec3::new(0.5, 0.5, 0.3) + Vec3::new(4.0, 0.0, 0.0); + next.control_r.orientation = Quaternion::lerp( + next.hand_r.orientation, + Quaternion::rotation_x(PI * -0.5), + 0.65, + ); + next.hand_r.position = Vec3::new(0.0, -2.0, 0.0); + next.hand_r.orientation = Quaternion::rotation_x(PI * 0.5); +} diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 2e7f034c2c..91ae4e95b5 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -320,6 +320,7 @@ image_ids! { hammer_scornful_swipe: "voxygen.element.skills.hammer.scornful_swipe", hammer_tremor: "voxygen.element.skills.hammer.tremor", hammer_vigorous_bash: "voxygen.element.skills.hammer.vigorous_bash", + hammer_heavy_whorl: "voxygen.element.skills.hammer.heavy_whorl", // Skilltree Icons health_plus_skill: "voxygen.element.skills.skilltree.health_plus", energy_plus_skill: "voxygen.element.skills.skilltree.energy_plus", diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index 1c43c48fc0..3a00cfd80a 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -627,6 +627,8 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id { "common.abilities.hammer.scornful_swipe" => imgs.hammer_scornful_swipe, "common.abilities.hammer.tremor" => imgs.hammer_tremor, "common.abilities.hammer.vigorous_bash" => imgs.hammer_vigorous_bash, + "common.abilities.hammer.heavy_whorl" => imgs.hammer_heavy_whorl, + "common.abilities.hammer.dual_heavy_whorl" => imgs.hammer_heavy_whorl, // Bow "common.abilities.bow.charged" => imgs.bow_m1, "common.abilities.bow.repeater" => imgs.bow_m2, From e858b8442711b0b78623a1693d9b8b4589e692b7 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 21 Feb 2024 22:42:55 -0500 Subject: [PATCH 10/31] Intercept --- .../common/abilities/ability_set_manifest.ron | 14 +- assets/common/abilities/adlet/elder/dash.ron | 2 +- .../custom/arthropods/antlion/charge.ron | 2 +- .../common/abilities/custom/basilisk/dash.ron | 2 +- .../abilities/custom/birdlargebasic/dash.ron | 2 +- .../custom/boreal_warrior/hammer/dash.ron | 2 +- .../common/abilities/custom/bushly/dash.ron | 2 +- .../common/abilities/custom/cyclops/dash.ron | 2 +- .../common/abilities/custom/deadwood/dash.ron | 2 +- .../common/abilities/custom/dullahan/dash.ron | 2 +- .../abilities/custom/minotaur/charge.ron | 2 +- assets/common/abilities/custom/oni/dash.ron | 2 +- .../abilities/custom/quadlowbreathe/dash.ron | 2 +- .../abilities/custom/quadlowquick/dash.ron | 2 +- .../abilities/custom/quadmedcharge/dash.ron | 2 +- .../abilities/custom/quadmedquick/dash.ron | 2 +- .../abilities/custom/roshwalr/slowcharge.ron | 2 +- .../custom/terracotta_pursuer/dash.ron | 2 +- .../abilities/custom/theropodbasic/dash.ron | 2 +- .../abilities/custom/tidalwarrior/scuttle.ron | 2 +- .../abilities/hammer/dual_intercept.ron | 32 +++++ assets/common/abilities/hammer/intercept.ron | 31 +++++ assets/common/abilities/spear/dash.ron | 2 +- assets/common/abilities/swordsimple/dash.ron | 2 +- .../element/skills/hammer/intercept.png | 3 + assets/voxygen/i18n/en/hud/ability.ftl | 6 + common/src/combat.rs | 26 ++++ common/src/comp/ability.rs | 48 ++++++- common/src/comp/melee.rs | 39 +++--- common/src/comp/poise.rs | 26 +--- common/src/states/dash_melee.rs | 124 +++--------------- common/src/states/utils.rs | 6 + voxygen/anim/src/character/dash.rs | 81 +++++++++--- voxygen/egui/src/character_states.rs | 10 +- voxygen/src/hud/img_ids.rs | 1 + voxygen/src/hud/util.rs | 2 + voxygen/src/scene/figure/mod.rs | 12 +- 37 files changed, 283 insertions(+), 220 deletions(-) create mode 100644 assets/common/abilities/hammer/dual_intercept.ron create mode 100644 assets/common/abilities/hammer/intercept.ron create mode 100644 assets/voxygen/element/skills/hammer/intercept.png diff --git a/assets/common/abilities/ability_set_manifest.ron b/assets/common/abilities/ability_set_manifest.ron index 9b807f8777..816d4707e0 100644 --- a/assets/common/abilities/ability_set_manifest.ron +++ b/assets/common/abilities/ability_set_manifest.ron @@ -225,13 +225,13 @@ ((), (Hammer(HeavyWhorl), "common.abilities.hammer.heavy_whorl")), ], ), - // Contextualized( - // pseudo_id: "common.abilities.hammer.intercept", - // abilities: [ - // ((dual_wielding_same_kind: true), (Hammer(Intercept), "common.abilities.hammer.dual_intercept")), - // ((), (Hammer(Intercept), "common.abilities.hammer.intercept")), - // ], - // ), + Contextualized( + pseudo_id: "common.abilities.hammer.intercept", + abilities: [ + ((dual_wielding_same_kind: true), (Hammer(Intercept), "common.abilities.hammer.dual_intercept")), + ((), (Hammer(Intercept), "common.abilities.hammer.intercept")), + ], + ), // Simple(Hammer(PileDriver), "common.abilities.hammer.pile_driver"), // Simple(Hammer(LungPummel), "common.abilities.hammer.lung_pummel"), // Simple(Hammer(HelmCrusher), "common.abilities.hammer.helm_crusher"), diff --git a/assets/common/abilities/adlet/elder/dash.ron b/assets/common/abilities/adlet/elder/dash.ron index f81c934b63..b8ef89c258 100644 --- a/assets/common/abilities/adlet/elder/dash.ron +++ b/assets/common/abilities/adlet/elder/dash.ron @@ -24,5 +24,5 @@ DashMelee( swing_duration: 0.1, recover_duration: 0.9, ori_modifier: 0.3, - charge_through: false, + auto_charge: false, ) diff --git a/assets/common/abilities/custom/arthropods/antlion/charge.ron b/assets/common/abilities/custom/arthropods/antlion/charge.ron index 9086964ae0..0edbd91de9 100644 --- a/assets/common/abilities/custom/arthropods/antlion/charge.ron +++ b/assets/common/abilities/custom/arthropods/antlion/charge.ron @@ -24,5 +24,5 @@ DashMelee( swing_duration: 0.25, recover_duration: 0.8, ori_modifier: 0.1, - charge_through: false, + auto_charge: false, ) diff --git a/assets/common/abilities/custom/basilisk/dash.ron b/assets/common/abilities/custom/basilisk/dash.ron index 6a6f37717b..37f17b8310 100644 --- a/assets/common/abilities/custom/basilisk/dash.ron +++ b/assets/common/abilities/custom/basilisk/dash.ron @@ -24,5 +24,5 @@ DashMelee( swing_duration: 0.3, recover_duration: 2.0, ori_modifier: 0.1, - charge_through: false, + auto_charge: false, ) diff --git a/assets/common/abilities/custom/birdlargebasic/dash.ron b/assets/common/abilities/custom/birdlargebasic/dash.ron index 1aad7f9385..a26ba7d0d1 100644 --- a/assets/common/abilities/custom/birdlargebasic/dash.ron +++ b/assets/common/abilities/custom/birdlargebasic/dash.ron @@ -24,5 +24,5 @@ DashMelee( swing_duration: 0.1, recover_duration: 1.4, ori_modifier: 0.3, - charge_through: false, + auto_charge: false, ) diff --git a/assets/common/abilities/custom/boreal_warrior/hammer/dash.ron b/assets/common/abilities/custom/boreal_warrior/hammer/dash.ron index f56050f02f..88f6966298 100644 --- a/assets/common/abilities/custom/boreal_warrior/hammer/dash.ron +++ b/assets/common/abilities/custom/boreal_warrior/hammer/dash.ron @@ -30,5 +30,5 @@ DashMelee( swing_duration: 0.1, recover_duration: 0.9, ori_modifier: 0.3, - charge_through: false, + auto_charge: false, ) diff --git a/assets/common/abilities/custom/bushly/dash.ron b/assets/common/abilities/custom/bushly/dash.ron index 67d9abc41f..db8feb13ce 100644 --- a/assets/common/abilities/custom/bushly/dash.ron +++ b/assets/common/abilities/custom/bushly/dash.ron @@ -24,5 +24,5 @@ DashMelee( swing_duration: 0.1, recover_duration: 2.0, ori_modifier: 0.1, - charge_through: true, + auto_charge: false, ) diff --git a/assets/common/abilities/custom/cyclops/dash.ron b/assets/common/abilities/custom/cyclops/dash.ron index aaf21b8501..feeac49541 100644 --- a/assets/common/abilities/custom/cyclops/dash.ron +++ b/assets/common/abilities/custom/cyclops/dash.ron @@ -25,5 +25,5 @@ DashMelee( swing_duration: 0.1, recover_duration: 0.8, ori_modifier: 0.1, - charge_through: false, + auto_charge: false, ) diff --git a/assets/common/abilities/custom/deadwood/dash.ron b/assets/common/abilities/custom/deadwood/dash.ron index b7ae85a89d..cdbd689a6a 100644 --- a/assets/common/abilities/custom/deadwood/dash.ron +++ b/assets/common/abilities/custom/deadwood/dash.ron @@ -24,5 +24,5 @@ DashMelee( swing_duration: 0.35, recover_duration: 2.0, ori_modifier: 0.1, - charge_through: true, + auto_charge: false, ) diff --git a/assets/common/abilities/custom/dullahan/dash.ron b/assets/common/abilities/custom/dullahan/dash.ron index 8dd4871d57..f9f3c0d90b 100644 --- a/assets/common/abilities/custom/dullahan/dash.ron +++ b/assets/common/abilities/custom/dullahan/dash.ron @@ -25,5 +25,5 @@ DashMelee( swing_duration: 0.1, recover_duration: 1.2, ori_modifier: 0.1, - charge_through: false, + auto_charge: false, ) diff --git a/assets/common/abilities/custom/minotaur/charge.ron b/assets/common/abilities/custom/minotaur/charge.ron index 04e182c12c..6ec1a615b1 100644 --- a/assets/common/abilities/custom/minotaur/charge.ron +++ b/assets/common/abilities/custom/minotaur/charge.ron @@ -31,5 +31,5 @@ DashMelee( swing_duration: 0.1, recover_duration: 3.4, ori_modifier: 0.1, - charge_through: false, + auto_charge: false, ) diff --git a/assets/common/abilities/custom/oni/dash.ron b/assets/common/abilities/custom/oni/dash.ron index 37b7b4e90d..d98f28d61a 100644 --- a/assets/common/abilities/custom/oni/dash.ron +++ b/assets/common/abilities/custom/oni/dash.ron @@ -24,5 +24,5 @@ DashMelee( swing_duration: 0.35, recover_duration: 2.4, ori_modifier: 0.3, - charge_through: false, + auto_charge: false, ) diff --git a/assets/common/abilities/custom/quadlowbreathe/dash.ron b/assets/common/abilities/custom/quadlowbreathe/dash.ron index 56d3014a28..ac0de971b2 100644 --- a/assets/common/abilities/custom/quadlowbreathe/dash.ron +++ b/assets/common/abilities/custom/quadlowbreathe/dash.ron @@ -24,5 +24,5 @@ DashMelee( swing_duration: 0.35, recover_duration: 2.0, ori_modifier: 0.1, - charge_through: false, + auto_charge: false, ) diff --git a/assets/common/abilities/custom/quadlowquick/dash.ron b/assets/common/abilities/custom/quadlowquick/dash.ron index 93db824fb5..7b7304d53b 100644 --- a/assets/common/abilities/custom/quadlowquick/dash.ron +++ b/assets/common/abilities/custom/quadlowquick/dash.ron @@ -24,5 +24,5 @@ DashMelee( swing_duration: 0.35, recover_duration: 2.0, ori_modifier: 0.1, - charge_through: false, + auto_charge: false, ) diff --git a/assets/common/abilities/custom/quadmedcharge/dash.ron b/assets/common/abilities/custom/quadmedcharge/dash.ron index bd36958743..54f8fac9e7 100644 --- a/assets/common/abilities/custom/quadmedcharge/dash.ron +++ b/assets/common/abilities/custom/quadmedcharge/dash.ron @@ -24,5 +24,5 @@ DashMelee( swing_duration: 0.4, recover_duration: 1.2, ori_modifier: 0.3, - charge_through: false, + auto_charge: false, ) diff --git a/assets/common/abilities/custom/quadmedquick/dash.ron b/assets/common/abilities/custom/quadmedquick/dash.ron index 2cbeb5fb2c..8741834c74 100644 --- a/assets/common/abilities/custom/quadmedquick/dash.ron +++ b/assets/common/abilities/custom/quadmedquick/dash.ron @@ -24,5 +24,5 @@ DashMelee( swing_duration: 0.65, recover_duration: 2.0, ori_modifier: 0.1, - charge_through: false, + auto_charge: false, ) diff --git a/assets/common/abilities/custom/roshwalr/slowcharge.ron b/assets/common/abilities/custom/roshwalr/slowcharge.ron index 4bb3e2ad0e..82b8d3f16a 100644 --- a/assets/common/abilities/custom/roshwalr/slowcharge.ron +++ b/assets/common/abilities/custom/roshwalr/slowcharge.ron @@ -24,5 +24,5 @@ DashMelee( swing_duration: 0.1, recover_duration: 2.2, ori_modifier: 0.3, - charge_through: false, + auto_charge: false, ) diff --git a/assets/common/abilities/custom/terracotta_pursuer/dash.ron b/assets/common/abilities/custom/terracotta_pursuer/dash.ron index 60367808de..9e8e7b6dd7 100644 --- a/assets/common/abilities/custom/terracotta_pursuer/dash.ron +++ b/assets/common/abilities/custom/terracotta_pursuer/dash.ron @@ -24,5 +24,5 @@ DashMelee( swing_duration: 0.1, recover_duration: 0.9, ori_modifier: 0.3, - charge_through: false, + auto_charge: false, ) diff --git a/assets/common/abilities/custom/theropodbasic/dash.ron b/assets/common/abilities/custom/theropodbasic/dash.ron index 6ed8eb3590..ebee860d17 100644 --- a/assets/common/abilities/custom/theropodbasic/dash.ron +++ b/assets/common/abilities/custom/theropodbasic/dash.ron @@ -24,5 +24,5 @@ DashMelee( swing_duration: 0.3, recover_duration: 0.7, ori_modifier: 0.1, - charge_through: false, + auto_charge: false, ) diff --git a/assets/common/abilities/custom/tidalwarrior/scuttle.ron b/assets/common/abilities/custom/tidalwarrior/scuttle.ron index 9c4380cf9c..c044922b33 100644 --- a/assets/common/abilities/custom/tidalwarrior/scuttle.ron +++ b/assets/common/abilities/custom/tidalwarrior/scuttle.ron @@ -25,5 +25,5 @@ DashMelee( swing_duration: 0.1, recover_duration: 1.0, ori_modifier: 0.3, - charge_through: false, + auto_charge: false, ) diff --git a/assets/common/abilities/hammer/dual_intercept.ron b/assets/common/abilities/hammer/dual_intercept.ron new file mode 100644 index 0000000000..f116cf39ca --- /dev/null +++ b/assets/common/abilities/hammer/dual_intercept.ron @@ -0,0 +1,32 @@ +DashMelee( + energy_cost: 15, + energy_drain: 0, + forward_speed: 2.5, + buildup_duration: 0.1, + charge_duration: 1.5, + swing_duration: 0.1, + recover_duration: 0.3, + melee_constructor: ( + kind: Bash( + damage: 6, + poise: 10, + knockback: 6, + energy_regen: 0, + ), + scaled: Some(( + kind: Bash( + damage: 9, + poise: 15, + knockback: 9, + energy_regen: 0, + ))), + range: 4.0, + angle: 30.0, + multi_target: Some(Normal), + ), + ori_modifier: 0.1, + auto_charge: true, + meta: ( + contextual_stats: Some((context: PoiseResilience(60.0), field: EffectPower)), + ), +) \ No newline at end of file diff --git a/assets/common/abilities/hammer/intercept.ron b/assets/common/abilities/hammer/intercept.ron new file mode 100644 index 0000000000..d73b1e6447 --- /dev/null +++ b/assets/common/abilities/hammer/intercept.ron @@ -0,0 +1,31 @@ +DashMelee( + energy_cost: 15, + energy_drain: 0, + forward_speed: 2.5, + buildup_duration: 0.1, + charge_duration: 1.5, + swing_duration: 0.1, + recover_duration: 0.3, + melee_constructor: ( + kind: Bash( + damage: 8, + poise: 12, + knockback: 8, + energy_regen: 0, + ), + scaled: Some(( + kind: Bash( + damage: 12, + poise: 18, + knockback: 12, + energy_regen: 0, + ))), + range: 4.0, + angle: 30.0, + ), + ori_modifier: 0.1, + auto_charge: true, + meta: ( + contextual_stats: Some((context: PoiseResilience(30.0), field: EffectPower)), + ), +) \ No newline at end of file diff --git a/assets/common/abilities/spear/dash.ron b/assets/common/abilities/spear/dash.ron index 36a92674cd..03f2a6fd24 100644 --- a/assets/common/abilities/spear/dash.ron +++ b/assets/common/abilities/spear/dash.ron @@ -24,5 +24,5 @@ DashMelee( swing_duration: 0.1, recover_duration: 0.8, ori_modifier: 0.3, - charge_through: false, + auto_charge: false, ) diff --git a/assets/common/abilities/swordsimple/dash.ron b/assets/common/abilities/swordsimple/dash.ron index f81c934b63..b8ef89c258 100644 --- a/assets/common/abilities/swordsimple/dash.ron +++ b/assets/common/abilities/swordsimple/dash.ron @@ -24,5 +24,5 @@ DashMelee( swing_duration: 0.1, recover_duration: 0.9, ori_modifier: 0.3, - charge_through: false, + auto_charge: false, ) diff --git a/assets/voxygen/element/skills/hammer/intercept.png b/assets/voxygen/element/skills/hammer/intercept.png new file mode 100644 index 0000000000..d9f62a2336 --- /dev/null +++ b/assets/voxygen/element/skills/hammer/intercept.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44d42314dbc699f834b710716bf61b3938551d5133e432241efb96e5bda3ca38 +size 1077 diff --git a/assets/voxygen/i18n/en/hud/ability.ftl b/assets/voxygen/i18n/en/hud/ability.ftl index 7030f56557..f9d2abf1ca 100644 --- a/assets/voxygen/i18n/en/hud/ability.ftl +++ b/assets/voxygen/i18n/en/hud/ability.ftl @@ -398,3 +398,9 @@ common-abilities-hammer-heavy_whorl = Heavy Whorl common-abilities-hammer-dual_heavy_whorl = Heavy Whorl .desc = You strike all foes surrounding you with your hammers. +common-abilities-hammer-intercept = Intercept + .desc = + Charge forward with your hammer throwing your weight behind your strike. +common-abilities-hammer-dual_intercept = Intercept + .desc = + Charge forward with your hammers throwing your weight behind your strike. diff --git a/common/src/combat.rs b/common/src/combat.rs index 24e9e943b5..cd51ab262e 100644 --- a/common/src/combat.rs +++ b/common/src/combat.rs @@ -1603,6 +1603,32 @@ pub fn compute_protection( }) } +/// Computes the total resilience provided from armor. Is used to determine the +/// reduction applied to poise damage received by an entity. None indicates that +/// the armor equipped makes the entity invulnerable to poise damage. +pub fn compute_poise_resilience( + inventory: Option<&Inventory>, + msm: &MaterialStatManifest, +) -> Option { + inventory.map_or(Some(0.0), |inv| { + inv.equipped_items() + .filter_map(|item| { + if let ItemKind::Armor(armor) = &*item.kind() { + armor + .stats(msm, item.stats_durability_multiplier()) + .poise_resilience + } else { + None + } + }) + .map(|protection| match protection { + Protection::Normal(protection) => Some(protection), + Protection::Invincible => None, + }) + .sum::>() + }) +} + /// Used to compute the precision multiplier achieved by flanking a target pub fn precision_mult_from_flank(attack_dir: Vec3, target_ori: Option<&Ori>) -> Option { let angle = target_ori.map(|t_ori| t_ori.look_dir().angle_between(attack_dir)); diff --git a/common/src/comp/ability.rs b/common/src/comp/ability.rs index d6e80dfc88..4dfec94f0a 100644 --- a/common/src/comp/ability.rs +++ b/common/src/comp/ability.rs @@ -805,7 +805,7 @@ pub enum CharacterAbility { recover_duration: f32, melee_constructor: MeleeConstructor, ori_modifier: f32, - charge_through: bool, + auto_charge: bool, #[serde(default)] meta: AbilityMeta, }, @@ -1331,7 +1331,7 @@ impl CharacterAbility { ref mut recover_duration, ref mut melee_constructor, ori_modifier: _, - charge_through: _, + auto_charge: _, meta: _, } => { *buildup_duration /= stats.speed; @@ -2271,13 +2271,13 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState { recover_duration, melee_constructor, ori_modifier, - charge_through, + auto_charge, meta: _, } => CharacterState::DashMelee(dash_melee::Data { static_data: dash_melee::StaticData { energy_drain: *energy_drain, forward_speed: *forward_speed, - charge_through: *charge_through, + auto_charge: *auto_charge, buildup_duration: Duration::from_secs_f32(*buildup_duration), charge_duration: Duration::from_secs_f32(*charge_duration), swing_duration: Duration::from_secs_f32(*swing_duration), @@ -2288,9 +2288,7 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState { }, auto_charge: false, timer: Duration::default(), - charge_end_timer: Duration::from_secs_f32(*charge_duration), stage_section: StageSection::Buildup, - exhausted: false, }), CharacterAbility::BasicBlock { buildup_duration, @@ -2924,6 +2922,44 @@ pub struct AbilityMeta { pub init_event: Option, #[serde(default)] pub requirements: AbilityRequirements, + /// Adjusts stats of ability when activated based on context. + // If we ever add more, I guess change to a vec? Or maybe just an array if we want to keep + // AbilityMeta small? + pub contextual_stats: Option, +} + +impl StatAdj { + pub fn equivalent_stats(&self, data: &JoinData) -> Stats { + let mut stats = Stats::one(); + let add = match self.context { + StatContext::PoiseResilience(base) => { + let poise_res = combat::compute_poise_resilience(data.inventory, data.msm); + poise_res.unwrap_or(0.0) / base + }, + }; + match self.field { + StatField::EffectPower => { + stats.effect_power += add; + }, + } + stats + } +} + +#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct StatAdj { + pub context: StatContext, + pub field: StatField, +} + +#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] +pub enum StatContext { + PoiseResilience(f32), +} + +#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] +pub enum StatField { + EffectPower, } // TODO: Later move over things like energy and combo into here diff --git a/common/src/comp/melee.rs b/common/src/comp/melee.rs index bd08d8b6cf..341bc3f704 100644 --- a/common/src/comp/melee.rs +++ b/common/src/comp/melee.rs @@ -133,8 +133,7 @@ impl MeleeConstructor { CombatEffect::Knockback(Knockback { strength: knockback, direction: KnockbackDir::Away, - }) - .adjusted_by_stats(tool_stats), + }), ) .with_requirement(CombatRequirement::AnyDamage); @@ -183,8 +182,7 @@ impl MeleeConstructor { CombatEffect::Knockback(Knockback { strength: knockback, direction: KnockbackDir::Away, - }) - .adjusted_by_stats(tool_stats), + }), ) .with_requirement(CombatRequirement::AnyDamage); @@ -225,8 +223,7 @@ impl MeleeConstructor { CombatEffect::Knockback(Knockback { strength: knockback, direction: KnockbackDir::Away, - }) - .adjusted_by_stats(tool_stats), + }), ) .with_requirement(CombatRequirement::AnyDamage); @@ -272,8 +269,7 @@ impl MeleeConstructor { CombatEffect::Knockback(Knockback { strength: pull, direction: KnockbackDir::Towards, - }) - .adjusted_by_stats(tool_stats), + }), ) .with_requirement(CombatRequirement::AnyDamage); @@ -310,8 +306,7 @@ impl MeleeConstructor { CombatEffect::Knockback(Knockback { strength: pull, direction: KnockbackDir::Towards, - }) - .adjusted_by_stats(tool_stats), + }), ) .with_requirement(CombatRequirement::AnyDamage); @@ -347,8 +342,7 @@ impl MeleeConstructor { CombatEffect::Knockback(Knockback { strength: knockback, direction: KnockbackDir::Away, - }) - .adjusted_by_stats(tool_stats), + }), ) .with_requirement(CombatRequirement::AnyDamage); @@ -581,52 +575,59 @@ impl MeleeConstructorKind { Slash { ref mut damage, ref mut poise, - knockback: _, + ref mut knockback, energy_regen: _, } => { *damage *= stats.power; *poise *= stats.effect_power; + *knockback *= stats.effect_power; }, Stab { ref mut damage, ref mut poise, - knockback: _, + ref mut knockback, energy_regen: _, } => { *damage *= stats.power; *poise *= stats.effect_power; + *knockback *= stats.effect_power; }, Bash { ref mut damage, ref mut poise, - knockback: _, + ref mut knockback, energy_regen: _, } => { *damage *= stats.power; *poise *= stats.effect_power; + *knockback *= stats.effect_power; }, Hook { ref mut damage, ref mut poise, - pull: _, + ref mut pull, } => { *damage *= stats.power; *poise *= stats.effect_power; + *pull *= stats.effect_power; }, NecroticVortex { ref mut damage, - pull: _, - lifesteal: _, + ref mut pull, + ref mut lifesteal, } => { *damage *= stats.power; + *pull *= stats.effect_power; + *lifesteal *= stats.effect_power; }, SonicWave { ref mut damage, ref mut poise, - knockback: _, + ref mut knockback, } => { *damage *= stats.power; *poise *= stats.effect_power; + *knockback *= stats.effect_power; }, } self diff --git a/common/src/comp/poise.rs b/common/src/comp/poise.rs index b2fdb568d1..d1b96f5c62 100644 --- a/common/src/comp/poise.rs +++ b/common/src/comp/poise.rs @@ -1,10 +1,8 @@ use crate::{ - combat::{DamageContributor, DamageSource}, + combat::{compute_poise_resilience, DamageContributor, DamageSource}, comp::{ - self, - ability::Capability, - inventory::item::{armor::Protection, ItemKind, MaterialStatManifest}, - CharacterState, Inventory, Stats, + self, ability::Capability, inventory::item::MaterialStatManifest, CharacterState, + Inventory, Stats, }, resources::Time, states, @@ -262,23 +260,7 @@ impl Poise { char_state: Option<&CharacterState>, stats: Option<&Stats>, ) -> f32 { - let protection = inventory.map_or(Some(0.0), |inv| { - inv.equipped_items() - .filter_map(|item| { - if let ItemKind::Armor(armor) = &*item.kind() { - armor - .stats(msm, item.stats_durability_multiplier()) - .poise_resilience - } else { - None - } - }) - .map(|protection| match protection { - Protection::Normal(protection) => Some(protection), - Protection::Invincible => None, - }) - .sum::>() - }); + let protection = compute_poise_resilience(inventory, msm); let from_inventory = match protection { Some(dr) => dr / (60.0 + dr.abs()), None => 1.0, diff --git a/common/src/states/dash_melee.rs b/common/src/states/dash_melee.rs index 5aaf5a923d..8118cff0cc 100644 --- a/common/src/states/dash_melee.rs +++ b/common/src/states/dash_melee.rs @@ -1,9 +1,6 @@ use crate::{ combat, - comp::{ - character_state::OutputEvents, item::tool, CharacterState, Melee, MeleeConstructor, - MeleeConstructorKind, StateUpdate, - }, + comp::{character_state::OutputEvents, CharacterState, MeleeConstructor, StateUpdate}, states::{ behavior::{CharacterBehavior, JoinData}, utils::*, @@ -19,8 +16,6 @@ pub struct StaticData { pub energy_drain: f32, /// How quickly dasher moves forward pub forward_speed: f32, - /// Whether the state can charge through enemies and do a second hit - pub charge_through: bool, /// How long until state should deal damage pub buildup_duration: Duration, /// How long the state charges for until it reaches max damage @@ -33,6 +28,8 @@ pub struct StaticData { pub melee_constructor: MeleeConstructor, /// How fast can you turn during charge pub ori_modifier: f32, + /// Controls whether charge should always go until end or enemy hit + pub auto_charge: bool, /// What key is used to press ability pub ability_info: AbilityInfo, } @@ -49,10 +46,6 @@ pub struct Data { pub timer: Duration, /// What section the character stage is in pub stage_section: StageSection, - /// Whether the state should attempt attacking again - pub exhausted: bool, - /// Time that charge should end (used for charge through) - pub charge_end_timer: Duration, } impl CharacterBehavior for Data { @@ -82,7 +75,8 @@ impl CharacterBehavior for Data { } else { // Transitions to charge section of stage update.character = CharacterState::DashMelee(Data { - auto_charge: !input_is_pressed(data, self.static_data.ability_info.input), + auto_charge: !input_is_pressed(data, self.static_data.ability_info.input) + || self.static_data.auto_charge, timer: Duration::default(), stage_section: StageSection::Charge, ..*self @@ -90,9 +84,9 @@ impl CharacterBehavior for Data { } }, StageSection::Charge => { - if self.timer < self.charge_end_timer + if self.timer < self.static_data.charge_duration && (input_is_pressed(data, self.static_data.ability_info.input) - || (self.auto_charge && self.timer < self.static_data.charge_duration)) + || self.auto_charge) && update.energy.current() >= 0.0 { // Forward movement @@ -109,27 +103,9 @@ impl CharacterBehavior for Data { ), ); - // This logic basically just decides if a charge should end, - // and prevents the character state spamming attacks - // while checking if it has hit something. - if !self.exhausted { - // If charge through, use actual melee strike, otherwise just use a test - // strike to "probe" to see when to end charge - let melee = if self.static_data.charge_through { - create_melee(charge_frac) - } else { - create_test_melee(self.static_data) - }; - - // Hit attempt - data.updater.insert(data.entity, melee); - - update.character = CharacterState::DashMelee(Data { - timer: tick_attack_or_default(data, self.timer, None), - exhausted: true, - ..*self - }) - } else if let Some(melee) = data.melee_attack { + // Determines if charge ends by continually refreshing melee component until it + // detects a hit, at which point the charge ends + if let Some(melee) = data.melee_attack { if !melee.applied { // If melee attack has not applied, just tick duration update.character = CharacterState::DashMelee(Data { @@ -137,31 +113,10 @@ impl CharacterBehavior for Data { ..*self }); } else if melee.hit_count == 0 { - // If melee attack has applied, but not hit anything, remove exhausted - // so it can attack again + // If melee attack has applied, but not hit anything, reset melee attack + data.updater.insert(data.entity, create_melee(charge_frac)); update.character = CharacterState::DashMelee(Data { timer: tick_attack_or_default(data, self.timer, None), - exhausted: false, - ..*self - }); - } else if self.static_data.charge_through { - // If can charge through, set charge_end_timer to stop after a little - // more time - let charge_end_timer = - if self.charge_end_timer != self.static_data.charge_duration { - self.charge_end_timer - } else { - self.timer - .checked_add(Duration::from_secs_f32( - 0.2 * self.static_data.melee_constructor.range - / self.static_data.forward_speed, - )) - .unwrap_or(self.static_data.charge_duration) - .min(self.static_data.charge_duration) - }; - update.character = CharacterState::DashMelee(Data { - timer: tick_attack_or_default(data, self.timer, None), - charge_end_timer, ..*self }); } else { @@ -169,16 +124,15 @@ impl CharacterBehavior for Data { update.character = CharacterState::DashMelee(Data { timer: Duration::default(), stage_section: StageSection::Action, - exhausted: false, - charge_end_timer: self.timer, ..*self }); } } else { - // If melee attack has not applied, just tick duration + // If no melee attack, add it and tick duration + data.updater.insert(data.entity, create_melee(charge_frac)); + update.character = CharacterState::DashMelee(Data { timer: tick_attack_or_default(data, self.timer, None), - exhausted: false, ..*self }); } @@ -192,39 +146,12 @@ impl CharacterBehavior for Data { update.character = CharacterState::DashMelee(Data { timer: Duration::default(), stage_section: StageSection::Action, - exhausted: false, - charge_end_timer: self.timer, ..*self }); } }, StageSection::Action => { - if !self.exhausted { - // If can charge through and not exhausted, do one more melee attack - // If not charge through, actual melee attack happens now - - // Assumes charge got to charge_end_timer for damage calculations - let charge_frac = (self.charge_end_timer.as_secs_f32() - / self.static_data.charge_duration.as_secs_f32()) - .min(1.0); - - let precision_mult = combat::compute_precision_mult(data.inventory, data.msm); - let tool_stats = get_tool_stats(data, self.static_data.ability_info); - - data.updater.insert( - data.entity, - self.static_data - .melee_constructor - .handle_scaling(charge_frac) - .create_melee(precision_mult, tool_stats), - ); - - update.character = CharacterState::DashMelee(Data { - timer: tick_attack_or_default(data, self.timer, None), - exhausted: true, - ..*self - }) - } else if self.timer < self.static_data.swing_duration { + if self.timer < self.static_data.swing_duration { // Swings update.character = CharacterState::DashMelee(Data { timer: tick_attack_or_default(data, self.timer, None), @@ -263,22 +190,3 @@ impl CharacterBehavior for Data { update } } - -fn create_test_melee(static_data: StaticData) -> Melee { - let melee = MeleeConstructor { - kind: MeleeConstructorKind::Slash { - damage: 0.0, - poise: 0.0, - knockback: 0.0, - energy_regen: 0.0, - }, - scaled: None, - range: static_data.melee_constructor.range, - angle: static_data.melee_constructor.angle, - multi_target: None, - damage_effect: None, - simultaneous_hits: 1, - custom_combo: None, - }; - melee.create_melee(0.0, tool::Stats::one()) -} diff --git a/common/src/states/utils.rs b/common/src/states/utils.rs index 5287bce7d8..83b00220be 100644 --- a/common/src/states/utils.rs +++ b/common/src/states/utils.rs @@ -1300,6 +1300,12 @@ fn handle_ability( &context, ) }) + .map(|(mut a, f, s)| { + if let Some(contextual_stats) = a.ability_meta().contextual_stats { + a = a.adjusted_by_stats(contextual_stats.equivalent_stats(data)) + } + (a, f, s) + }) .filter(|(ability, _, _)| ability.requirements_paid(data, update)) { update.character = CharacterState::from(( diff --git a/voxygen/anim/src/character/dash.rs b/voxygen/anim/src/character/dash.rs index 481e16c620..f7b21747a1 100644 --- a/voxygen/anim/src/character/dash.rs +++ b/voxygen/anim/src/character/dash.rs @@ -1,21 +1,12 @@ use super::{ super::{vek::*, Animation}, - CharacterSkeleton, SkeletonAttr, -}; -use common::{ - comp::item::Hands, - states::utils::{AbilityInfo, StageSection}, + dual_wield_start, hammer_start, twist_back, twist_forward, CharacterSkeleton, SkeletonAttr, }; +use common::states::utils::StageSection; pub struct DashAnimation; -type DashAnimationDependency<'a> = ( - (Option, Option), - Option<&'a str>, - f32, - Option, - Option, -); +type DashAnimationDependency<'a> = (Option<&'a str>, StageSection); impl Animation for DashAnimation { type Dependency<'a> = DashAnimationDependency<'a>; type Skeleton = CharacterSkeleton; @@ -27,20 +18,68 @@ impl Animation for DashAnimation { #[allow(clippy::single_match)] // TODO: Pending review in #587 fn update_skeleton_inner( skeleton: &Self::Skeleton, - (_hands, _ability_id, _global_time, _stage_section, _ability_info): Self::Dependency<'_>, - _anim_time: f32, + (ability_id, stage_section): Self::Dependency<'_>, + anim_time: f32, rate: &mut f32, - _s_a: &SkeletonAttr, + s_a: &SkeletonAttr, ) -> Self::Skeleton { *rate = 1.0; let mut next = (*skeleton).clone(); - next.main.position = Vec3::new(0.0, 0.0, 0.0); - next.main.orientation = Quaternion::rotation_z(0.0); - next.main_weapon_trail = true; - next.second.position = Vec3::new(0.0, 0.0, 0.0); - next.second.orientation = Quaternion::rotation_z(0.0); - next.off_weapon_trail = true; + if matches!(stage_section, StageSection::Action | StageSection::Charge) { + next.main_weapon_trail = true; + next.off_weapon_trail = true; + } + + match ability_id { + Some("common.abilities.hammer.intercept") => { + hammer_start(&mut next, s_a); + let (move1, _move2, move3, move4) = match stage_section { + StageSection::Buildup => (anim_time, 0.0, 0.0, 0.0), + StageSection::Charge => (1.0, anim_time, 0.0, 0.0), + StageSection::Action => (1.0, 0.0, anim_time, 0.0), + StageSection::Recover => (1.0, 0.0, 1.0, anim_time), + _ => (0.0, 0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move4; + let move1 = move1 * pullback; + let move3 = move3 * pullback; + + twist_back(&mut next, move1, 1.6, 0.7, 0.3, 1.1); + next.control.orientation.rotate_x(move1 * 1.8); + + twist_forward(&mut next, move3, 2.4, 0.9, 0.5, 1.4); + next.control.orientation.rotate_z(move3 * -2.7); + next.control.orientation.rotate_x(move3 * 2.0); + next.control.position += Vec3::new(5.0, 0.0, 11.0) * move3; + }, + Some("common.abilities.hammer.dual_intercept") => { + dual_wield_start(&mut next); + let (move1, _move2, move3, move4) = match stage_section { + StageSection::Buildup => (anim_time, 0.0, 0.0, 0.0), + StageSection::Charge => (1.0, anim_time, 0.0, 0.0), + StageSection::Action => (1.0, 0.0, anim_time, 0.0), + StageSection::Recover => (1.0, 0.0, 1.0, anim_time), + _ => (0.0, 0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move4; + let move1 = move1 * pullback; + let move3 = move3 * pullback; + + next.control_l.orientation.rotate_x(move1 * -1.4); + next.control_l.orientation.rotate_z(move1 * 0.8); + next.control_r.orientation.rotate_x(move1 * -1.4); + next.control_r.orientation.rotate_z(move1 * -0.8); + next.control.position += Vec3::new(0.0, 0.0, -6.0) * move1; + + next.control_l.orientation.rotate_z(move3 * -2.6); + next.control_l.orientation.rotate_x(move3 * 4.0); + next.control_r.orientation.rotate_z(move3 * 2.6); + next.control_r.orientation.rotate_x(move3 * 4.0); + next.control.position += Vec3::new(0.0, 0.0, 20.0) * move3; + }, + _ => {}, + } next } diff --git a/voxygen/egui/src/character_states.rs b/voxygen/egui/src/character_states.rs index 81b8761999..c31bf29ac0 100644 --- a/voxygen/egui/src/character_states.rs +++ b/voxygen/egui/src/character_states.rs @@ -46,15 +46,13 @@ fn charged_melee_grid(ui: &mut Ui, data: &charged_melee::Data) { fn dash_melee_grid(ui: &mut Ui, data: &dash_melee::Data) { Grid::new("selected_entity_dash_melee_grid") - .spacing([40.0, 4.0]) - .max_col_width(100.0) - .striped(true) - .show(ui, |ui| #[rustfmt::skip] { + .spacing([40.0, 4.0]) + .max_col_width(100.0) + .striped(true) + .show(ui, |ui| #[rustfmt::skip] { two_col_row(ui, "Auto Charge", if data.auto_charge { "True" } else { "False " }); two_col_row(ui, "Timer", format!("{}ms", data.timer.as_millis())); two_col_row(ui, "Stage Section", data.stage_section.to_string()); - two_col_row(ui, "Exhausted", if data.exhausted { "True" } else { "False " }); - two_col_row(ui, "Charge End Timer", format!("{}ms", data.charge_end_timer.as_millis())); }); } diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 91ae4e95b5..a135daa57e 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -321,6 +321,7 @@ image_ids! { hammer_tremor: "voxygen.element.skills.hammer.tremor", hammer_vigorous_bash: "voxygen.element.skills.hammer.vigorous_bash", hammer_heavy_whorl: "voxygen.element.skills.hammer.heavy_whorl", + hammer_intercept: "voxygen.element.skills.hammer.intercept", // Skilltree Icons health_plus_skill: "voxygen.element.skills.skilltree.health_plus", energy_plus_skill: "voxygen.element.skills.skilltree.energy_plus", diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index 3a00cfd80a..9ba6c044ce 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -629,6 +629,8 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id { "common.abilities.hammer.vigorous_bash" => imgs.hammer_vigorous_bash, "common.abilities.hammer.heavy_whorl" => imgs.hammer_heavy_whorl, "common.abilities.hammer.dual_heavy_whorl" => imgs.hammer_heavy_whorl, + "common.abilities.hammer.intercept" => imgs.hammer_intercept, + "common.abilities.hammer.dual_intercept" => imgs.hammer_intercept, // Bow "common.abilities.bow.charged" => imgs.bow_m1, "common.abilities.bow.repeater" => imgs.bow_m2, diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index 0eaa728f50..1e39700673 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -1611,9 +1611,7 @@ impl FigureMgr { StageSection::Buildup => { stage_time / s.static_data.buildup_duration.as_secs_f32() }, - StageSection::Charge => { - stage_time / s.static_data.charge_duration.as_secs_f32() - }, + StageSection::Charge => stage_time, StageSection::Action => { stage_time / s.static_data.swing_duration.as_secs_f32() }, @@ -1624,13 +1622,7 @@ impl FigureMgr { }; anim::character::DashAnimation::update_skeleton( &target_base, - ( - hands, - ability_id, - time, - Some(s.stage_section), - Some(s.static_data.ability_info), - ), + (ability_id, s.stage_section), stage_progress, &mut state_animation_rate, skeleton_attr, From c9c14c9202e4c79b111d4fb5519d1cc631c21129 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 23 Feb 2024 22:31:31 -0500 Subject: [PATCH 11/31] Retaliate --- .../common/abilities/ability_set_manifest.ron | 2 +- assets/common/abilities/hammer/retaliate.ron | 17 ++++++++++++ .../element/skills/hammer/heavy_whorl.png | 4 +-- .../element/skills/hammer/intercept.png | 4 +-- .../element/skills/hammer/retaliate.png | 3 +++ assets/voxygen/i18n/en/hud/ability.ftl | 3 +++ voxygen/anim/src/character/ripostemelee.rs | 26 ++++++++++++++++++- voxygen/src/hud/img_ids.rs | 1 + voxygen/src/hud/util.rs | 1 + 9 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 assets/common/abilities/hammer/retaliate.ron create mode 100644 assets/voxygen/element/skills/hammer/retaliate.png diff --git a/assets/common/abilities/ability_set_manifest.ron b/assets/common/abilities/ability_set_manifest.ron index 816d4707e0..6eb609f9e5 100644 --- a/assets/common/abilities/ability_set_manifest.ron +++ b/assets/common/abilities/ability_set_manifest.ron @@ -199,7 +199,7 @@ Simple(Hammer(ScornfulSwipe), "common.abilities.hammer.scornful_swipe"), Simple(Hammer(Tremor), "common.abilities.hammer.tremor"), Simple(Hammer(VigorousBash), "common.abilities.hammer.vigorous_bash"), - // Simple(Hammer(Retaliate), "common.abilities.hammer.retaliate"), + Simple(Hammer(Retaliate), "common.abilities.hammer.retaliate"), // Simple(Hammer(SpineCracker), "common.abilities.hammer.spine_cracker"), // Simple(Hammer(Breach), "common.abilities.hammer.breach"), // Contextualized( diff --git a/assets/common/abilities/hammer/retaliate.ron b/assets/common/abilities/hammer/retaliate.ron new file mode 100644 index 0000000000..3fc39c410b --- /dev/null +++ b/assets/common/abilities/hammer/retaliate.ron @@ -0,0 +1,17 @@ +RiposteMelee( + energy_cost: 10, + buildup_duration: 0.4, + swing_duration: 0.1, + recover_duration: 0.2, + block_strength: 5.0, + melee_constructor: ( + kind: Bash( + damage: 20, + poise: 30, + knockback: 10, + energy_regen: 0, + ), + range: 4.0, + angle: 20.0, + ), +) diff --git a/assets/voxygen/element/skills/hammer/heavy_whorl.png b/assets/voxygen/element/skills/hammer/heavy_whorl.png index 604a438c45..3cb2e18289 100644 --- a/assets/voxygen/element/skills/hammer/heavy_whorl.png +++ b/assets/voxygen/element/skills/hammer/heavy_whorl.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:70029c8ac08cc45765f421b74f7177fb4c9d6c85d9d7c212165d7d724b73149f -size 1059 +oid sha256:cf09f96a0b34c5c82b304be93fda7b6128eff24d58f3eaf44d576700e1ce7d08 +size 1064 diff --git a/assets/voxygen/element/skills/hammer/intercept.png b/assets/voxygen/element/skills/hammer/intercept.png index d9f62a2336..81af7cf333 100644 --- a/assets/voxygen/element/skills/hammer/intercept.png +++ b/assets/voxygen/element/skills/hammer/intercept.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:44d42314dbc699f834b710716bf61b3938551d5133e432241efb96e5bda3ca38 -size 1077 +oid sha256:5df6457e3e369ae97ec4a0afe7a3fb7627e29c909e9f183cdfaa902210024598 +size 1078 diff --git a/assets/voxygen/element/skills/hammer/retaliate.png b/assets/voxygen/element/skills/hammer/retaliate.png new file mode 100644 index 0000000000..5856d41294 --- /dev/null +++ b/assets/voxygen/element/skills/hammer/retaliate.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1299658a52ae844407ddc1b5a25028b7b6a74d69955982853301340a215e2a39 +size 1153 diff --git a/assets/voxygen/i18n/en/hud/ability.ftl b/assets/voxygen/i18n/en/hud/ability.ftl index f9d2abf1ca..100005392c 100644 --- a/assets/voxygen/i18n/en/hud/ability.ftl +++ b/assets/voxygen/i18n/en/hud/ability.ftl @@ -404,3 +404,6 @@ common-abilities-hammer-intercept = Intercept common-abilities-hammer-dual_intercept = Intercept .desc = Charge forward with your hammers throwing your weight behind your strike. +common-abilities-hammer-retaliate = Retaliate + .desc = + After blocking an attack, retaliate with a heavy strike back. diff --git a/voxygen/anim/src/character/ripostemelee.rs b/voxygen/anim/src/character/ripostemelee.rs index cb9d96dc97..d08e9492d3 100644 --- a/voxygen/anim/src/character/ripostemelee.rs +++ b/voxygen/anim/src/character/ripostemelee.rs @@ -1,6 +1,6 @@ use super::{ super::{vek::*, Animation}, - CharacterSkeleton, SkeletonAttr, + hammer_start, twist_back, twist_forward, CharacterSkeleton, SkeletonAttr, }; use common::states::utils::{AbilityInfo, StageSection}; @@ -27,6 +27,7 @@ impl Animation for RiposteMeleeAnimation { next.main.orientation = Quaternion::rotation_z(0.0); next.second.position = Vec3::new(0.0, 0.0, 0.0); next.second.orientation = Quaternion::rotation_z(0.0); + if matches!(stage_section, Some(StageSection::Action)) { next.main_weapon_trail = true; next.off_weapon_trail = true; @@ -78,6 +79,29 @@ impl Animation for RiposteMeleeAnimation { next.control.position += Vec3::new(move2_slow * 11.0, move2_slow * -4.0, move2_slow * -6.0); }, + Some("common.abilities.hammer.retaliate") => { + hammer_start(&mut next, s_a); + let (move1, move2, move3) = match stage_section { + Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), + Some(StageSection::Action) => (1.0, anim_time, 0.0), + Some(StageSection::Recover) => (1.0, 1.0, anim_time), + _ => (0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move3; + let move1 = move1 * pullback; + let move2 = move2 * pullback; + + twist_back(&mut next, move1, 0.6, 0.2, 0.0, 0.3); + next.control.orientation.rotate_x(move1 * 1.5); + next.control.orientation.rotate_y(move1 * 0.4); + next.control.position += Vec3::new(0.0, 0.0, 16.0) * move1; + + twist_forward(&mut next, move2, 2.1, 0.6, 0.4, 0.9); + next.control.orientation.rotate_y(move2 * 2.0); + next.control.orientation.rotate_x(move2 * -2.5); + next.control.orientation.rotate_z(move2 * -0.6); + next.control.position += Vec3::new(6.0, -10.0, -14.0) * move2; + }, _ => {}, } diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index a135daa57e..1651952611 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -322,6 +322,7 @@ image_ids! { hammer_vigorous_bash: "voxygen.element.skills.hammer.vigorous_bash", hammer_heavy_whorl: "voxygen.element.skills.hammer.heavy_whorl", hammer_intercept: "voxygen.element.skills.hammer.intercept", + hammer_retaliate: "voxygen.element.skills.hammer.retaliate", // Skilltree Icons health_plus_skill: "voxygen.element.skills.skilltree.health_plus", energy_plus_skill: "voxygen.element.skills.skilltree.energy_plus", diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index 9ba6c044ce..dc94318c05 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -631,6 +631,7 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id { "common.abilities.hammer.dual_heavy_whorl" => imgs.hammer_heavy_whorl, "common.abilities.hammer.intercept" => imgs.hammer_intercept, "common.abilities.hammer.dual_intercept" => imgs.hammer_intercept, + "common.abilities.hammer.retaliate" => imgs.hammer_retaliate, // Bow "common.abilities.bow.charged" => imgs.bow_m1, "common.abilities.bow.repeater" => imgs.bow_m2, From 7ed66f29bfc798bf8d7fa471585419944d026c90 Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 24 Feb 2024 11:48:12 -0500 Subject: [PATCH 12/31] Spine Cracker --- .../common/abilities/ability_set_manifest.ron | 2 +- .../common/abilities/hammer/spine_cracker.ron | 20 ++++++++++++++++ .../element/skills/hammer/spine_cracker.png | 3 +++ assets/voxygen/i18n/en/hud/ability.ftl | 4 ++++ common/src/combat.rs | 23 +++++++++++++++--- common/src/comp/ability.rs | 2 ++ common/src/comp/melee.rs | 14 +++++++++++ common/src/states/finisher_melee.rs | 8 ++++--- common/src/states/utils.rs | 4 +++- common/systems/src/beam.rs | 1 + common/systems/src/melee.rs | 1 + common/systems/src/projectile.rs | 2 +- voxygen/anim/src/character/finishermelee.rs | 24 ++++++++++++++++++- .../audio/sfx/event_mapper/combat/tests.rs | 4 +++- voxygen/src/hud/img_ids.rs | 1 + voxygen/src/hud/util.rs | 1 + 16 files changed, 103 insertions(+), 11 deletions(-) create mode 100644 assets/common/abilities/hammer/spine_cracker.ron create mode 100644 assets/voxygen/element/skills/hammer/spine_cracker.png diff --git a/assets/common/abilities/ability_set_manifest.ron b/assets/common/abilities/ability_set_manifest.ron index 6eb609f9e5..ac2a77a4ce 100644 --- a/assets/common/abilities/ability_set_manifest.ron +++ b/assets/common/abilities/ability_set_manifest.ron @@ -200,7 +200,7 @@ Simple(Hammer(Tremor), "common.abilities.hammer.tremor"), Simple(Hammer(VigorousBash), "common.abilities.hammer.vigorous_bash"), Simple(Hammer(Retaliate), "common.abilities.hammer.retaliate"), - // Simple(Hammer(SpineCracker), "common.abilities.hammer.spine_cracker"), + Simple(Hammer(SpineCracker), "common.abilities.hammer.spine_cracker"), // Simple(Hammer(Breach), "common.abilities.hammer.breach"), // Contextualized( // pseudo_id: "common.abilities.hammer.iron_tempest", diff --git a/assets/common/abilities/hammer/spine_cracker.ron b/assets/common/abilities/hammer/spine_cracker.ron new file mode 100644 index 0000000000..23ec67d73a --- /dev/null +++ b/assets/common/abilities/hammer/spine_cracker.ron @@ -0,0 +1,20 @@ +FinisherMelee( + energy_cost: 0, + buildup_duration: 0.1, + swing_duration: 0.1, + recover_duration: 0.3, + melee_constructor: ( + kind: Bash( + damage: 20, + poise: 0, + knockback: 0, + energy_regen: 0, + ), + range: 4.0, + angle: 15.0, + attack_effect: Some((Poise(50), BehindTarget)), + precision_flank_multiplier: 2.0, + ), + minimum_combo: 10, + combo_consumption: Cost, +) diff --git a/assets/voxygen/element/skills/hammer/spine_cracker.png b/assets/voxygen/element/skills/hammer/spine_cracker.png new file mode 100644 index 0000000000..62b32b0f06 --- /dev/null +++ b/assets/voxygen/element/skills/hammer/spine_cracker.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2cd660b77f09cc4ce6131ae67aa6fc9e571ad8ca2605b7de5ff660e9480c82b +size 1124 diff --git a/assets/voxygen/i18n/en/hud/ability.ftl b/assets/voxygen/i18n/en/hud/ability.ftl index 100005392c..ecf1ac2555 100644 --- a/assets/voxygen/i18n/en/hud/ability.ftl +++ b/assets/voxygen/i18n/en/hud/ability.ftl @@ -407,3 +407,7 @@ common-abilities-hammer-dual_intercept = Intercept common-abilities-hammer-retaliate = Retaliate .desc = After blocking an attack, retaliate with a heavy strike back. +common-abilities-hammer-spine_cracker = Spine Cracker + .desc = + When you foe turns their back to you, strike them hard in the back, targeting the weak part of their spine. + diff --git a/common/src/combat.rs b/common/src/combat.rs index cd51ab262e..06b0efe7e3 100644 --- a/common/src/combat.rs +++ b/common/src/combat.rs @@ -655,6 +655,14 @@ impl Attack { CombatRequirement::TargetPoised => { target.char_state.map_or(false, |cs| cs.is_stunned()) }, + CombatRequirement::BehindTarget => { + const REQUIRED_ANGLE: f32 = 45.0; + if let Some(ori) = target.ori { + ori.look_vec().angle_between(dir.with_z(0.0)) < REQUIRED_ANGLE + } else { + false + } + }, }); if requirements_met { is_applied = true; @@ -1014,6 +1022,7 @@ pub enum CombatRequirement { Combo(u32), TargetHasBuff(BuffKind), TargetPoised, + BehindTarget, } #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] @@ -1630,11 +1639,19 @@ pub fn compute_poise_resilience( } /// Used to compute the precision multiplier achieved by flanking a target -pub fn precision_mult_from_flank(attack_dir: Vec3, target_ori: Option<&Ori>) -> Option { +pub fn precision_mult_from_flank( + attack_dir: Vec3, + target_ori: Option<&Ori>, + precision_flank_multiplier: f32, +) -> Option { let angle = target_ori.map(|t_ori| t_ori.look_dir().angle_between(attack_dir)); match angle { - Some(angle) if angle < FULL_FLANK_ANGLE => Some(MAX_BACK_FLANK_PRECISION), - Some(angle) if angle < PARTIAL_FLANK_ANGLE => Some(MAX_SIDE_FLANK_PRECISION), + Some(angle) if angle < FULL_FLANK_ANGLE => { + Some(MAX_BACK_FLANK_PRECISION * precision_flank_multiplier) + }, + Some(angle) if angle < PARTIAL_FLANK_ANGLE => { + Some(MAX_SIDE_FLANK_PRECISION * precision_flank_multiplier) + }, Some(_) | None => None, } } diff --git a/common/src/comp/ability.rs b/common/src/comp/ability.rs index 4dfec94f0a..d6fbef19b6 100644 --- a/common/src/comp/ability.rs +++ b/common/src/comp/ability.rs @@ -1110,8 +1110,10 @@ impl Default for CharacterAbility { angle: 15.0, multi_target: None, damage_effect: None, + attack_effect: None, simultaneous_hits: 1, custom_combo: None, + precision_flank_multiplier: 1.0, }, ori_modifier: 1.0, frontend_specifier: None, diff --git a/common/src/comp/melee.rs b/common/src/comp/melee.rs index 341bc3f704..f808e8d35d 100644 --- a/common/src/comp/melee.rs +++ b/common/src/comp/melee.rs @@ -23,6 +23,7 @@ pub struct Melee { pub multi_target: Option, pub break_block: Option<(Vec3, Option)>, pub simultaneous_hits: u32, + pub precision_flank_multiplier: f32, } #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] @@ -51,6 +52,7 @@ impl Component for Melee { } fn default_simultaneous_hits() -> u32 { 1 } +fn default_precision_flank_multiplier() -> f32 { 1.0 } #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Scaled { @@ -73,9 +75,12 @@ pub struct MeleeConstructor { pub angle: f32, pub multi_target: Option, pub damage_effect: Option, + pub attack_effect: Option<(CombatEffect, CombatRequirement)>, #[serde(default = "default_simultaneous_hits")] pub simultaneous_hits: u32, pub custom_combo: Option, + #[serde(default = "default_precision_flank_multiplier")] + pub precision_flank_multiplier: f32, } #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] @@ -354,6 +359,14 @@ impl MeleeConstructor { }, }; + let attack = if let Some((effect, requirement)) = self.attack_effect { + let effect = AttackEffect::new(Some(GroupTarget::OutOfGroup), effect) + .with_requirement(requirement); + attack.with_effect(effect) + } else { + attack + }; + let attack = match self.custom_combo { None => attack.with_combo_increment(), Some(CustomCombo { @@ -377,6 +390,7 @@ impl MeleeConstructor { multi_target: self.multi_target, break_block: None, simultaneous_hits: self.simultaneous_hits, + precision_flank_multiplier: self.precision_flank_multiplier, } } diff --git a/common/src/states/finisher_melee.rs b/common/src/states/finisher_melee.rs index 98324a3181..b38faf6f11 100644 --- a/common/src/states/finisher_melee.rs +++ b/common/src/states/finisher_melee.rs @@ -74,9 +74,11 @@ impl CharacterBehavior for Data { c.exhausted = true; } - self.static_data - .combo_consumption - .consume(data, output_events); + self.static_data.combo_consumption.consume( + data, + output_events, + self.static_data.minimum_combo, + ); let mut melee_constructor = self.static_data.melee_constructor; if let Some(scaling) = self.static_data.scaling { diff --git a/common/src/states/utils.rs b/common/src/states/utils.rs index 83b00220be..9c0a53ca92 100644 --- a/common/src/states/utils.rs +++ b/common/src/states/utils.rs @@ -1732,14 +1732,16 @@ pub enum ComboConsumption { #[default] All, Half, + Cost, } impl ComboConsumption { - pub fn consume(&self, data: &JoinData, output_events: &mut OutputEvents) { + pub fn consume(&self, data: &JoinData, output_events: &mut OutputEvents, cost: u32) { let combo = data.combo.map_or(0, |c| c.counter()); let to_consume = match self { Self::All => combo, Self::Half => (combo + 1) / 2, + Self::Cost => cost, }; output_events.emit_server(ComboChangeEvent { entity: data.entity, diff --git a/common/systems/src/beam.rs b/common/systems/src/beam.rs index bf299bd98b..a2e24b837f 100644 --- a/common/systems/src/beam.rs +++ b/common/systems/src/beam.rs @@ -263,6 +263,7 @@ impl<'a> System<'a> for Sys { let precision_from_flank = combat::precision_mult_from_flank( beam.bezier.ctrl - beam.bezier.start, target_info.ori, + 1.0, ); let precision_from_time = { diff --git a/common/systems/src/melee.rs b/common/systems/src/melee.rs index 2a6419e9ea..30c6af5fa9 100644 --- a/common/systems/src/melee.rs +++ b/common/systems/src/melee.rs @@ -248,6 +248,7 @@ impl<'a> System<'a> for Sys { .try_normalized() .unwrap_or(ori.look_vec()), target_ori, + melee_attack.precision_flank_multiplier, ); let precision_from_poise = { diff --git a/common/systems/src/projectile.rs b/common/systems/src/projectile.rs index d0df98f3d8..e5e4c818b3 100644 --- a/common/systems/src/projectile.rs +++ b/common/systems/src/projectile.rs @@ -390,7 +390,7 @@ fn dispatch_hit( .map_or(false, |i| i.projectiles); let precision_from_flank = - combat::precision_mult_from_flank(*projectile_dir, target_info.ori); + combat::precision_mult_from_flank(*projectile_dir, target_info.ori, 1.0); let precision_from_head = { // This performs a cylinder and line segment intersection check. The cylinder is diff --git a/voxygen/anim/src/character/finishermelee.rs b/voxygen/anim/src/character/finishermelee.rs index e23f948a25..b233ca0f52 100644 --- a/voxygen/anim/src/character/finishermelee.rs +++ b/voxygen/anim/src/character/finishermelee.rs @@ -1,6 +1,6 @@ use super::{ super::{vek::*, Animation}, - CharacterSkeleton, SkeletonAttr, + hammer_start, twist_back, twist_forward, CharacterSkeleton, SkeletonAttr, }; use common::states::utils::{AbilityInfo, StageSection}; use core::f32::consts::{PI, TAU}; @@ -440,6 +440,28 @@ impl Animation for FinisherMeleeAnimation { next.control.orientation.rotate_z(move2 * -3.5); next.control.position += Vec3::new(move2 * 14.0, move2 * 6.0, 0.0); }, + Some("common.abilities.hammer.spine_cracker") => { + hammer_start(&mut next, s_a); + let (move1, move2, move3) = match stage_section { + Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), + Some(StageSection::Action) => (1.0, anim_time, 0.0), + Some(StageSection::Recover) => (1.0, 1.0, anim_time), + _ => (0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move3; + let move1 = move1 * pullback; + let move2 = move2 * pullback; + + twist_back(&mut next, move1, 1.9, 1.5, 0.5, 1.2); + next.head.position += Vec3::new(-2.0, 2.0, 0.0) * move1; + next.control.orientation.rotate_x(move1 * 1.8); + next.control.position += Vec3::new(0.0, 0.0, 8.0) * move1; + next.control.orientation.rotate_y(move1 * 0.4); + + twist_forward(&mut next, move2, 2.1, 1.6, 0.4, 1.3); + next.control.orientation.rotate_z(move2 * 1.6); + next.control.position += Vec3::new(-16.0, 12.0, -8.0) * move2; + }, _ => {}, } diff --git a/voxygen/src/audio/sfx/event_mapper/combat/tests.rs b/voxygen/src/audio/sfx/event_mapper/combat/tests.rs index b563992abe..0dcd6e2e1d 100644 --- a/voxygen/src/audio/sfx/event_mapper/combat/tests.rs +++ b/voxygen/src/audio/sfx/event_mapper/combat/tests.rs @@ -86,9 +86,11 @@ fn maps_basic_melee() { range: 3.5, angle: 15.0, damage_effect: None, + attack_effect: None, multi_target: None, simultaneous_hits: 1, - combo_gain: 1, + custom_combo: None, + precision_flank_multiplier: 1.0, }, ori_modifier: 1.0, ability_info: empty_ability_info(), diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 1651952611..d335a632c9 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -323,6 +323,7 @@ image_ids! { hammer_heavy_whorl: "voxygen.element.skills.hammer.heavy_whorl", hammer_intercept: "voxygen.element.skills.hammer.intercept", hammer_retaliate: "voxygen.element.skills.hammer.retaliate", + hammer_spine_cracker: "voxygen.element.skills.hammer.spine_cracker", // Skilltree Icons health_plus_skill: "voxygen.element.skills.skilltree.health_plus", energy_plus_skill: "voxygen.element.skills.skilltree.energy_plus", diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index dc94318c05..4519afac59 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -632,6 +632,7 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id { "common.abilities.hammer.intercept" => imgs.hammer_intercept, "common.abilities.hammer.dual_intercept" => imgs.hammer_intercept, "common.abilities.hammer.retaliate" => imgs.hammer_retaliate, + "common.abilities.hammer.spine_cracker" => imgs.hammer_spine_cracker, // Bow "common.abilities.bow.charged" => imgs.bow_m1, "common.abilities.bow.repeater" => imgs.bow_m2, From 90f3b671c39bfb357711a6e0a04d4ea262c9f17d Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 24 Feb 2024 13:05:18 -0500 Subject: [PATCH 13/31] Breach --- .../common/abilities/ability_set_manifest.ron | 2 +- assets/common/abilities/hammer/breach.ron | 21 +++++++++++++++++++ .../voxygen/element/skills/hammer/breach.png | 3 +++ assets/voxygen/i18n/en/hud/ability.ftl | 3 +++ common/src/combat.rs | 13 +++++++++++- common/src/comp/ability.rs | 1 + common/src/comp/melee.rs | 4 ++++ common/systems/src/beam.rs | 1 + common/systems/src/melee.rs | 1 + common/systems/src/projectile.rs | 2 +- voxygen/anim/src/character/alpha.rs | 21 +++++++++++++++++++ .../audio/sfx/event_mapper/combat/tests.rs | 1 + voxygen/src/hud/img_ids.rs | 1 + voxygen/src/hud/util.rs | 1 + 14 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 assets/common/abilities/hammer/breach.ron create mode 100644 assets/voxygen/element/skills/hammer/breach.png diff --git a/assets/common/abilities/ability_set_manifest.ron b/assets/common/abilities/ability_set_manifest.ron index ac2a77a4ce..a11122f77a 100644 --- a/assets/common/abilities/ability_set_manifest.ron +++ b/assets/common/abilities/ability_set_manifest.ron @@ -201,7 +201,7 @@ Simple(Hammer(VigorousBash), "common.abilities.hammer.vigorous_bash"), Simple(Hammer(Retaliate), "common.abilities.hammer.retaliate"), Simple(Hammer(SpineCracker), "common.abilities.hammer.spine_cracker"), - // Simple(Hammer(Breach), "common.abilities.hammer.breach"), + Simple(Hammer(Breach), "common.abilities.hammer.breach"), // Contextualized( // pseudo_id: "common.abilities.hammer.iron_tempest", // abilities: [ diff --git a/assets/common/abilities/hammer/breach.ron b/assets/common/abilities/hammer/breach.ron new file mode 100644 index 0000000000..38fba8b8be --- /dev/null +++ b/assets/common/abilities/hammer/breach.ron @@ -0,0 +1,21 @@ +BasicMelee( + energy_cost: 20, + buildup_duration: 0.4, + swing_duration: 0.1, + hit_timing: 0.5, + recover_duration: 0.2, + melee_constructor: ( + kind: Bash( + damage: 15, + poise: 20, + knockback: 0, + energy_regen: 0, + ), + range: 3.0, + angle: 15.0, + attack_effect: Some((Poise(40), TargetBlocking)), + precision_flank_multiplier: 1.5, + precision_flank_invert: true, + ), + ori_modifier: 0.6, +) \ No newline at end of file diff --git a/assets/voxygen/element/skills/hammer/breach.png b/assets/voxygen/element/skills/hammer/breach.png new file mode 100644 index 0000000000..1ce4087c1b --- /dev/null +++ b/assets/voxygen/element/skills/hammer/breach.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8a793dc16d7d97b5ef81e8eaef5c27326c41ab8cb97ae0a5566be1f4f4cb042 +size 1106 diff --git a/assets/voxygen/i18n/en/hud/ability.ftl b/assets/voxygen/i18n/en/hud/ability.ftl index ecf1ac2555..d46c4d636c 100644 --- a/assets/voxygen/i18n/en/hud/ability.ftl +++ b/assets/voxygen/i18n/en/hud/ability.ftl @@ -410,4 +410,7 @@ common-abilities-hammer-retaliate = Retaliate common-abilities-hammer-spine_cracker = Spine Cracker .desc = When you foe turns their back to you, strike them hard in the back, targeting the weak part of their spine. +common-abilities-hammer-breach = Breach + .desc = + Breach through your enemy's attempt at defense with a heavy strike from your hammer. diff --git a/common/src/combat.rs b/common/src/combat.rs index 06b0efe7e3..079bf82dd5 100644 --- a/common/src/combat.rs +++ b/common/src/combat.rs @@ -663,6 +663,9 @@ impl Attack { false } }, + CombatRequirement::TargetBlocking => target.char_state.map_or(false, |cs| { + cs.is_block(attack_source) || cs.is_parry(attack_source) + }), }); if requirements_met { is_applied = true; @@ -1023,6 +1026,7 @@ pub enum CombatRequirement { TargetHasBuff(BuffKind), TargetPoised, BehindTarget, + TargetBlocking, } #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] @@ -1643,8 +1647,15 @@ pub fn precision_mult_from_flank( attack_dir: Vec3, target_ori: Option<&Ori>, precision_flank_multiplier: f32, + precision_flank_invert: bool, ) -> Option { - let angle = target_ori.map(|t_ori| t_ori.look_dir().angle_between(attack_dir)); + let angle = target_ori.map(|t_ori| { + t_ori.look_dir().angle_between(if precision_flank_invert { + -attack_dir + } else { + attack_dir + }) + }); match angle { Some(angle) if angle < FULL_FLANK_ANGLE => { Some(MAX_BACK_FLANK_PRECISION * precision_flank_multiplier) diff --git a/common/src/comp/ability.rs b/common/src/comp/ability.rs index d6fbef19b6..d1c1f5e194 100644 --- a/common/src/comp/ability.rs +++ b/common/src/comp/ability.rs @@ -1114,6 +1114,7 @@ impl Default for CharacterAbility { simultaneous_hits: 1, custom_combo: None, precision_flank_multiplier: 1.0, + precision_flank_invert: false, }, ori_modifier: 1.0, frontend_specifier: None, diff --git a/common/src/comp/melee.rs b/common/src/comp/melee.rs index f808e8d35d..7efa21c480 100644 --- a/common/src/comp/melee.rs +++ b/common/src/comp/melee.rs @@ -24,6 +24,7 @@ pub struct Melee { pub break_block: Option<(Vec3, Option)>, pub simultaneous_hits: u32, pub precision_flank_multiplier: f32, + pub precision_flank_invert: bool, } #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] @@ -81,6 +82,8 @@ pub struct MeleeConstructor { pub custom_combo: Option, #[serde(default = "default_precision_flank_multiplier")] pub precision_flank_multiplier: f32, + #[serde(default)] + pub precision_flank_invert: bool, } #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] @@ -391,6 +394,7 @@ impl MeleeConstructor { break_block: None, simultaneous_hits: self.simultaneous_hits, precision_flank_multiplier: self.precision_flank_multiplier, + precision_flank_invert: self.precision_flank_invert, } } diff --git a/common/systems/src/beam.rs b/common/systems/src/beam.rs index a2e24b837f..74cc61671e 100644 --- a/common/systems/src/beam.rs +++ b/common/systems/src/beam.rs @@ -264,6 +264,7 @@ impl<'a> System<'a> for Sys { beam.bezier.ctrl - beam.bezier.start, target_info.ori, 1.0, + false, ); let precision_from_time = { diff --git a/common/systems/src/melee.rs b/common/systems/src/melee.rs index 30c6af5fa9..215e21b954 100644 --- a/common/systems/src/melee.rs +++ b/common/systems/src/melee.rs @@ -249,6 +249,7 @@ impl<'a> System<'a> for Sys { .unwrap_or(ori.look_vec()), target_ori, melee_attack.precision_flank_multiplier, + melee_attack.precision_flank_invert, ); let precision_from_poise = { diff --git a/common/systems/src/projectile.rs b/common/systems/src/projectile.rs index e5e4c818b3..55741cc5cd 100644 --- a/common/systems/src/projectile.rs +++ b/common/systems/src/projectile.rs @@ -390,7 +390,7 @@ fn dispatch_hit( .map_or(false, |i| i.projectiles); let precision_from_flank = - combat::precision_mult_from_flank(*projectile_dir, target_info.ori, 1.0); + combat::precision_mult_from_flank(*projectile_dir, target_info.ori, 1.0, false); let precision_from_head = { // This performs a cylinder and line segment intersection check. The cylinder is diff --git a/voxygen/anim/src/character/alpha.rs b/voxygen/anim/src/character/alpha.rs index 21b5e9cf91..4379bea5ab 100644 --- a/voxygen/anim/src/character/alpha.rs +++ b/voxygen/anim/src/character/alpha.rs @@ -133,6 +133,27 @@ impl Animation for AlphaAnimation { next.control_l.orientation.rotate_z(move2 * -2.3); next.control_r.orientation.rotate_z(move2 * -2.3); }, + Some("common.abilities.hammer.breach") => { + hammer_start(&mut next, s_a); + let (move1, move2, move3) = match stage_section { + Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), + Some(StageSection::Action) => (1.0, anim_time, 0.0), + Some(StageSection::Recover) => (1.0, 1.0, anim_time), + _ => (0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move3; + let move1 = move1 * pullback; + let move2 = move2 * pullback; + + next.control.orientation.rotate_x(move1 * 2.5); + next.control.orientation.rotate_z(move1 * -4.8); + next.control.position += Vec3::new(-12.0, 0.0, 22.0) * move1; + twist_back(&mut next, move1, 0.6, 0.2, 0.0, 0.3); + + twist_forward(&mut next, move2, 1.6, 0.4, 0.2, 0.7); + next.control.orientation.rotate_x(move2 * -4.5); + next.control.position += Vec3::new(0.0, 0.0, -20.0) * move2; + }, _ => { let (move1, move2, _move3, move2h) = match stage_section { Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0), diff --git a/voxygen/src/audio/sfx/event_mapper/combat/tests.rs b/voxygen/src/audio/sfx/event_mapper/combat/tests.rs index 0dcd6e2e1d..e7a494f1de 100644 --- a/voxygen/src/audio/sfx/event_mapper/combat/tests.rs +++ b/voxygen/src/audio/sfx/event_mapper/combat/tests.rs @@ -91,6 +91,7 @@ fn maps_basic_melee() { simultaneous_hits: 1, custom_combo: None, precision_flank_multiplier: 1.0, + precision_flank_invert: false, }, ori_modifier: 1.0, ability_info: empty_ability_info(), diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index d335a632c9..916fd79d1c 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -324,6 +324,7 @@ image_ids! { hammer_intercept: "voxygen.element.skills.hammer.intercept", hammer_retaliate: "voxygen.element.skills.hammer.retaliate", hammer_spine_cracker: "voxygen.element.skills.hammer.spine_cracker", + hammer_breach: "voxygen.element.skills.hammer.breach", // Skilltree Icons health_plus_skill: "voxygen.element.skills.skilltree.health_plus", energy_plus_skill: "voxygen.element.skills.skilltree.energy_plus", diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index 4519afac59..755ef5ba05 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -633,6 +633,7 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id { "common.abilities.hammer.dual_intercept" => imgs.hammer_intercept, "common.abilities.hammer.retaliate" => imgs.hammer_retaliate, "common.abilities.hammer.spine_cracker" => imgs.hammer_spine_cracker, + "common.abilities.hammer.breach" => imgs.hammer_breach, // Bow "common.abilities.bow.charged" => imgs.bow_m1, "common.abilities.bow.repeater" => imgs.bow_m2, From 76dc1969965499c83cc80f8839fcb89a40341150 Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 24 Feb 2024 18:50:27 -0500 Subject: [PATCH 14/31] Pile Driver --- .../common/abilities/ability_set_manifest.ron | 2 +- .../common/abilities/hammer/pile_driver.ron | 24 ++++++++++++++++ .../element/de_buffs/debuff_rooted.png | 3 ++ .../element/skills/hammer/pile_driver.png | 3 ++ assets/voxygen/i18n/en/buff.ftl | 3 ++ assets/voxygen/i18n/en/hud/ability.ftl | 4 ++- common/src/cmd.rs | 1 + common/src/comp/buff.rs | 28 ++++++++++++++++++- server/src/cmd.rs | 3 +- voxygen/anim/src/character/alpha.rs | 25 +++++++++++++++++ voxygen/i18n-helpers/src/lib.rs | 3 +- voxygen/src/hud/img_ids.rs | 2 ++ voxygen/src/hud/mod.rs | 1 + voxygen/src/hud/util.rs | 8 ++++-- 14 files changed, 103 insertions(+), 7 deletions(-) create mode 100644 assets/common/abilities/hammer/pile_driver.ron create mode 100644 assets/voxygen/element/de_buffs/debuff_rooted.png create mode 100644 assets/voxygen/element/skills/hammer/pile_driver.png diff --git a/assets/common/abilities/ability_set_manifest.ron b/assets/common/abilities/ability_set_manifest.ron index a11122f77a..dd56229a4f 100644 --- a/assets/common/abilities/ability_set_manifest.ron +++ b/assets/common/abilities/ability_set_manifest.ron @@ -232,7 +232,7 @@ ((), (Hammer(Intercept), "common.abilities.hammer.intercept")), ], ), - // Simple(Hammer(PileDriver), "common.abilities.hammer.pile_driver"), + Simple(Hammer(PileDriver), "common.abilities.hammer.pile_driver"), // Simple(Hammer(LungPummel), "common.abilities.hammer.lung_pummel"), // Simple(Hammer(HelmCrusher), "common.abilities.hammer.helm_crusher"), // Simple(Hammer(Rampart), "common.abilities.hammer.rampart"), diff --git a/assets/common/abilities/hammer/pile_driver.ron b/assets/common/abilities/hammer/pile_driver.ron new file mode 100644 index 0000000000..8ce019e007 --- /dev/null +++ b/assets/common/abilities/hammer/pile_driver.ron @@ -0,0 +1,24 @@ +BasicMelee( + energy_cost: 20, + buildup_duration: 0.4, + swing_duration: 0.1, + hit_timing: 0.9, + recover_duration: 0.2, + melee_constructor: ( + kind: Bash( + damage: 25, + poise: 30, + knockback: 0, + energy_regen: 0, + ), + range: 3.0, + angle: 15.0, + damage_effect: Some(Buff(( + kind: Rooted, + dur_secs: 4.0, + strength: Value(1.0), + chance: 1.0, + ))), + ), + ori_modifier: 0.6, +) \ No newline at end of file diff --git a/assets/voxygen/element/de_buffs/debuff_rooted.png b/assets/voxygen/element/de_buffs/debuff_rooted.png new file mode 100644 index 0000000000..bcdb4edc24 --- /dev/null +++ b/assets/voxygen/element/de_buffs/debuff_rooted.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6040e18d377f36aeb3343424c674e11e269016960efc3f3ee0c5f82e909b63c4 +size 1017 diff --git a/assets/voxygen/element/skills/hammer/pile_driver.png b/assets/voxygen/element/skills/hammer/pile_driver.png new file mode 100644 index 0000000000..b67f605b13 --- /dev/null +++ b/assets/voxygen/element/skills/hammer/pile_driver.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb6a5109c93d5cf839db709b371fef45fa1f9930cc478fc240aa1a62ffbf45fe +size 1064 diff --git a/assets/voxygen/i18n/en/buff.ftl b/assets/voxygen/i18n/en/buff.ftl index 96c83f48fe..815e05913c 100644 --- a/assets/voxygen/i18n/en/buff.ftl +++ b/assets/voxygen/i18n/en/buff.ftl @@ -124,6 +124,9 @@ buff-heatstroke = Heatstroke ## Scornful Taunt buff-scornfultaunt = Scornful Taunt .desc = You scornfully taunt your enemies, granting you bolstered fortitude and stamina. However, your death will bolster your killer. +## Rooted +buff-rooted = Rooted + .desc = You are stuck in place and cannot move. ## Util buff-text-over_seconds = over { $dur_secs } seconds buff-text-for_seconds = for { $dur_secs } seconds diff --git a/assets/voxygen/i18n/en/hud/ability.ftl b/assets/voxygen/i18n/en/hud/ability.ftl index d46c4d636c..e94a379286 100644 --- a/assets/voxygen/i18n/en/hud/ability.ftl +++ b/assets/voxygen/i18n/en/hud/ability.ftl @@ -413,4 +413,6 @@ common-abilities-hammer-spine_cracker = Spine Cracker common-abilities-hammer-breach = Breach .desc = Breach through your enemy's attempt at defense with a heavy strike from your hammer. - +common-abilities-hammer-pile_driver = Pile Driver + .desc = + Strike your enemy into the ground, stopping their movement until they free their legs. diff --git a/common/src/cmd.rs b/common/src/cmd.rs index 014694f6e9..f3fc520ece 100644 --- a/common/src/cmd.rs +++ b/common/src/cmd.rs @@ -190,6 +190,7 @@ lazy_static! { BuffKind::Berserk => "berserk", BuffKind::Heatstroke => "heatstroke", BuffKind::ScornfulTaunt => "scornful_taunt", + BuffKind::Rooted => "rooted", }; let mut buff_parser = HashMap::new(); for kind in BuffKind::iter() { diff --git a/common/src/comp/buff.rs b/common/src/comp/buff.rs index 04489a2050..e42fd79a2c 100644 --- a/common/src/comp/buff.rs +++ b/common/src/comp/buff.rs @@ -177,6 +177,14 @@ pub enum BuffKind { /// 33.3% and energy reward reduced by 200%. Energy reward can't be /// reduced by more than 200%, to a minimum value of -100%. Heatstroke, + /// Reduces movement speed to 0. + /// Strength increases the relative mass of the creature that can be + /// targeted. A strength of 1.0 means that a creature of the same mass gets + /// rooted for the full duration. A strength of 2.0 means a creature of + /// twice the mass gets rooted for the full duration. If the target's mass + /// is higher than the strength allows for, duration gets reduced using a + /// mutiplier from the ratio of masses. + Rooted, // Complex, non-obvious buffs /// Changed into another body. Polymorphed, @@ -239,7 +247,8 @@ impl BuffKind { | BuffKind::Poisoned | BuffKind::Parried | BuffKind::PotionSickness - | BuffKind::Heatstroke => BuffDescriptor::SimpleNegative, + | BuffKind::Heatstroke + | BuffKind::Rooted => BuffDescriptor::SimpleNegative, BuffKind::Polymorphed => BuffDescriptor::Complex, } } @@ -479,6 +488,7 @@ impl BuffKind { duration: data.duration, }), ], + BuffKind::Rooted => vec![BuffEffect::MovementSpeed(0.0)], } } @@ -493,6 +503,21 @@ impl BuffKind { } cat_ids } + + fn modify_data(&self, mut data: BuffData) -> BuffData { + // TODO: Remove clippy allow after another buff needs this + #[allow(clippy::single_match)] + match self { + BuffKind::Rooted => { + let source_mass = 50.0; + let dest_mass = 50.0_f64; + let ratio = (source_mass / dest_mass).min(1.0); + data.duration = data.duration.map(|dur| Secs(dur.0 * ratio)); + }, + _ => {}, + } + data + } } // Struct used to store data relevant to a buff @@ -687,6 +712,7 @@ impl Buff { time: Time, stats: Option<&Stats>, ) -> Self { + let data = kind.modify_data(data); let effects = kind.effects(&data, stats); let cat_ids = kind.extend_cat_ids(cat_ids); let start_time = Time(time.0 + data.delay.map_or(0.0, |delay| delay.0)); diff --git a/server/src/cmd.rs b/server/src/cmd.rs index 55d03eb3df..c1c6dffa84 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -4551,7 +4551,8 @@ fn build_buff( | BuffKind::Parried | BuffKind::PotionSickness | BuffKind::Heatstroke - | BuffKind::ScornfulTaunt => { + | BuffKind::ScornfulTaunt + | BuffKind::Rooted => { if buff_kind.is_simple() { unreachable!("is_simple() above") } else { diff --git a/voxygen/anim/src/character/alpha.rs b/voxygen/anim/src/character/alpha.rs index 4379bea5ab..f0ec60c302 100644 --- a/voxygen/anim/src/character/alpha.rs +++ b/voxygen/anim/src/character/alpha.rs @@ -154,6 +154,31 @@ impl Animation for AlphaAnimation { next.control.orientation.rotate_x(move2 * -4.5); next.control.position += Vec3::new(0.0, 0.0, -20.0) * move2; }, + Some("common.abilities.hammer.pile_driver") => { + hammer_start(&mut next, s_a); + let (move1, move2, move3) = match stage_section { + Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), + Some(StageSection::Action) => (1.0, anim_time, 0.0), + Some(StageSection::Recover) => (1.0, 1.0, anim_time), + _ => (0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move3; + let shake = (move1 * 15.0).sin(); + let move1 = (move1 * 2.0).min(1.0) * pullback; + let move2 = move2 * pullback; + + twist_back(&mut next, move1, 0.9, 0.3, 0.1, 0.5); + next.control.orientation.rotate_x(move1 * 2.4); + next.control.position += Vec3::new(-14.0, 0.0, 14.0) * move1; + next.control.orientation.rotate_z(move1 * 1.8); + + next.control.orientation.rotate_x(shake * 0.15); + + twist_forward(&mut next, move2, 1.6, 0.5, 0.2, 0.9); + next.control.orientation.rotate_x(move2 * -4.0); + next.control.orientation.rotate_z(move2 * 0.4); + next.control.position += Vec3::new(0.0, 0.0, -12.0) * move2; + }, _ => { let (move1, move2, _move3, move2h) = match stage_section { Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0), diff --git a/voxygen/i18n-helpers/src/lib.rs b/voxygen/i18n-helpers/src/lib.rs index 846af23e9a..e5e6e5bc35 100644 --- a/voxygen/i18n-helpers/src/lib.rs +++ b/voxygen/i18n-helpers/src/lib.rs @@ -406,7 +406,8 @@ fn get_buff_ident(buff: BuffKind) -> &'static str { | BuffKind::Parried | BuffKind::PotionSickness | BuffKind::Polymorphed - | BuffKind::Heatstroke => { + | BuffKind::Heatstroke + | BuffKind::Rooted => { tracing::error!("Player was killed by a debuff that doesn't do damage!"); "mysterious" }, diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 916fd79d1c..5971406f21 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -325,6 +325,7 @@ image_ids! { hammer_retaliate: "voxygen.element.skills.hammer.retaliate", hammer_spine_cracker: "voxygen.element.skills.hammer.spine_cracker", hammer_breach: "voxygen.element.skills.hammer.breach", + hammer_pile_driver: "voxygen.element.skills.hammer.pile_driver", // Skilltree Icons health_plus_skill: "voxygen.element.skills.skilltree.health_plus", energy_plus_skill: "voxygen.element.skills.skilltree.energy_plus", @@ -814,6 +815,7 @@ image_ids! { debuff_potionsickness_0: "voxygen.element.de_buffs.debuff_potionsickness_0", debuff_polymorphed: "voxygen.element.de_buffs.debuff_polymorphed", debuff_heatstroke_0: "voxygen.element.de_buffs.debuff_heatstroke_0", + debuff_rooted: "voxygen.element.de_buffs.debuff_rooted", // Animation Frames // Buff Frame diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index c1e6610059..a9b5d16950 100755 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -5275,6 +5275,7 @@ pub fn get_buff_image(buff: BuffKind, imgs: &Imgs) -> conrod_core::image::Id { BuffKind::PotionSickness => imgs.debuff_potionsickness_0, BuffKind::Polymorphed => imgs.debuff_polymorphed, BuffKind::Heatstroke => imgs.debuff_heatstroke_0, + BuffKind::Rooted => imgs.debuff_rooted, } } diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index 755ef5ba05..12960ffa71 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -210,6 +210,7 @@ fn buff_key(buff: BuffKind) -> &'static str { BuffKind::Parried => "buff-parried", BuffKind::PotionSickness => "buff-potionsickness", BuffKind::Heatstroke => "buff-heatstroke", + BuffKind::Rooted => "buff-rooted", // Neutral BuffKind::Polymorphed => "buff-polymorphed", } @@ -320,7 +321,8 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec { | BuffKind::Bloodfeast | BuffKind::Berserk | BuffKind::Heatstroke - | BuffKind::ScornfulTaunt => Cow::Borrowed(""), + | BuffKind::ScornfulTaunt + | BuffKind::Rooted => Cow::Borrowed(""), }; write!(&mut description, "{}", buff_desc).unwrap(); @@ -371,7 +373,8 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec { | BuffKind::Bloodfeast | BuffKind::Berserk | BuffKind::Heatstroke - | BuffKind::ScornfulTaunt => Cow::Borrowed(""), + | BuffKind::ScornfulTaunt + | BuffKind::Rooted => Cow::Borrowed(""), } } else if let BuffKind::Saturation | BuffKind::Regeneration @@ -634,6 +637,7 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id { "common.abilities.hammer.retaliate" => imgs.hammer_retaliate, "common.abilities.hammer.spine_cracker" => imgs.hammer_spine_cracker, "common.abilities.hammer.breach" => imgs.hammer_breach, + "common.abilities.hammer.pile_driver" => imgs.hammer_pile_driver, // Bow "common.abilities.bow.charged" => imgs.bow_m1, "common.abilities.bow.repeater" => imgs.bow_m2, From 38c74bf182a0057234b38b42d1ccb1d1b43d0c41 Mon Sep 17 00:00:00 2001 From: Sam Date: Sun, 25 Feb 2024 13:42:12 -0500 Subject: [PATCH 15/31] Finish rooted debuff impl and Lung Pummel --- .../common/abilities/ability_set_manifest.ron | 2 +- assets/common/abilities/hammer/breach.ron | 2 +- .../common/abilities/hammer/lung_pummel.ron | 25 ++ .../common/abilities/hammer/spine_cracker.ron | 2 +- .../element/de_buffs/debuff_winded.png | 3 + .../element/skills/hammer/lung_pummel.png | 3 + assets/voxygen/i18n/en/buff.ftl | 3 + assets/voxygen/i18n/en/hud/ability.ftl | 3 + common/src/cmd.rs | 1 + common/src/combat.rs | 59 ++-- common/src/comp/ability.rs | 2 +- common/src/comp/buff.rs | 43 ++- common/src/comp/melee.rs | 12 +- common/src/states/self_buff.rs | 10 +- common/src/states/utils.rs | 9 +- common/systems/src/aura.rs | 148 +++++----- common/systems/src/beam.rs | 9 +- common/systems/src/buff.rs | 53 ++-- common/systems/src/melee.rs | 9 +- common/systems/src/projectile.rs | 13 +- common/systems/src/shockwave.rs | 5 +- server/src/cmd.rs | 13 +- server/src/events/entity_manipulation.rs | 255 +++++++++--------- server/src/events/inventory_manip.rs | 7 + server/src/state_ext.rs | 115 +------- voxygen/anim/src/character/finishermelee.rs | 21 ++ voxygen/i18n-helpers/src/lib.rs | 3 +- .../audio/sfx/event_mapper/combat/tests.rs | 2 +- voxygen/src/hud/img_ids.rs | 2 + voxygen/src/hud/mod.rs | 1 + voxygen/src/hud/util.rs | 9 +- 31 files changed, 463 insertions(+), 381 deletions(-) create mode 100644 assets/common/abilities/hammer/lung_pummel.ron create mode 100644 assets/voxygen/element/de_buffs/debuff_winded.png create mode 100644 assets/voxygen/element/skills/hammer/lung_pummel.png diff --git a/assets/common/abilities/ability_set_manifest.ron b/assets/common/abilities/ability_set_manifest.ron index dd56229a4f..202916a41b 100644 --- a/assets/common/abilities/ability_set_manifest.ron +++ b/assets/common/abilities/ability_set_manifest.ron @@ -233,7 +233,7 @@ ], ), Simple(Hammer(PileDriver), "common.abilities.hammer.pile_driver"), - // Simple(Hammer(LungPummel), "common.abilities.hammer.lung_pummel"), + Simple(Hammer(LungPummel), "common.abilities.hammer.lung_pummel"), // Simple(Hammer(HelmCrusher), "common.abilities.hammer.helm_crusher"), // Simple(Hammer(Rampart), "common.abilities.hammer.rampart"), // Simple(Hammer(Tenacity), "common.abilities.hammer.tenacity"), diff --git a/assets/common/abilities/hammer/breach.ron b/assets/common/abilities/hammer/breach.ron index 38fba8b8be..4350098b5c 100644 --- a/assets/common/abilities/hammer/breach.ron +++ b/assets/common/abilities/hammer/breach.ron @@ -14,7 +14,7 @@ BasicMelee( range: 3.0, angle: 15.0, attack_effect: Some((Poise(40), TargetBlocking)), - precision_flank_multiplier: 1.5, + precision_flank_multipliers: (back: 1.0, side: 1.0, front: 1.5), precision_flank_invert: true, ), ori_modifier: 0.6, diff --git a/assets/common/abilities/hammer/lung_pummel.ron b/assets/common/abilities/hammer/lung_pummel.ron new file mode 100644 index 0000000000..64deb87eb5 --- /dev/null +++ b/assets/common/abilities/hammer/lung_pummel.ron @@ -0,0 +1,25 @@ +FinisherMelee( + energy_cost: 0, + buildup_duration: 0.15, + swing_duration: 0.15, + recover_duration: 0.2, + melee_constructor: ( + kind: Bash( + damage: 20, + poise: 20, + knockback: 12, + energy_regen: 0, + ), + range: 4.0, + angle: 60.0, + damage_effect: Some(Buff(( + kind: Winded, + dur_secs: 8, + strength: Value(1.0), + chance: 1.0, + ))), + precision_flank_multipliers: (front: 1.0, side: 2.0, back: 1.0), + ), + minimum_combo: 0, + combo_consumption: Cost, +) diff --git a/assets/common/abilities/hammer/spine_cracker.ron b/assets/common/abilities/hammer/spine_cracker.ron index 23ec67d73a..329ee0e08e 100644 --- a/assets/common/abilities/hammer/spine_cracker.ron +++ b/assets/common/abilities/hammer/spine_cracker.ron @@ -13,7 +13,7 @@ FinisherMelee( range: 4.0, angle: 15.0, attack_effect: Some((Poise(50), BehindTarget)), - precision_flank_multiplier: 2.0, + precision_flank_multipliers: (front: 1.0, side: 1.0, back: 2.0), ), minimum_combo: 10, combo_consumption: Cost, diff --git a/assets/voxygen/element/de_buffs/debuff_winded.png b/assets/voxygen/element/de_buffs/debuff_winded.png new file mode 100644 index 0000000000..763accec2a --- /dev/null +++ b/assets/voxygen/element/de_buffs/debuff_winded.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e38da416a0e92cc4301135b3c74f61aa6390e225a7419d155d70eeddff5b5f0c +size 1011 diff --git a/assets/voxygen/element/skills/hammer/lung_pummel.png b/assets/voxygen/element/skills/hammer/lung_pummel.png new file mode 100644 index 0000000000..920d68aa5c --- /dev/null +++ b/assets/voxygen/element/skills/hammer/lung_pummel.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:731e02691015ec5a99186c8ad781d6996a60f8515c663e9a279f91c87df6c47c +size 1018 diff --git a/assets/voxygen/i18n/en/buff.ftl b/assets/voxygen/i18n/en/buff.ftl index 815e05913c..f59ef7ae7b 100644 --- a/assets/voxygen/i18n/en/buff.ftl +++ b/assets/voxygen/i18n/en/buff.ftl @@ -127,6 +127,9 @@ buff-scornfultaunt = Scornful Taunt ## Rooted buff-rooted = Rooted .desc = You are stuck in place and cannot move. +## Winded +buff-winded = Winded + .desc = You can barely breathe hampering how much energy you can recover and how quickly you can move. ## Util buff-text-over_seconds = over { $dur_secs } seconds buff-text-for_seconds = for { $dur_secs } seconds diff --git a/assets/voxygen/i18n/en/hud/ability.ftl b/assets/voxygen/i18n/en/hud/ability.ftl index e94a379286..f4158fc9e9 100644 --- a/assets/voxygen/i18n/en/hud/ability.ftl +++ b/assets/voxygen/i18n/en/hud/ability.ftl @@ -416,3 +416,6 @@ common-abilities-hammer-breach = Breach common-abilities-hammer-pile_driver = Pile Driver .desc = Strike your enemy into the ground, stopping their movement until they free their legs. +common-abilities-hammer-lung_pummel = Lung Pummel + .desc = + Swipe your hammer into your foe's side, winding them. diff --git a/common/src/cmd.rs b/common/src/cmd.rs index f3fc520ece..23d13322e4 100644 --- a/common/src/cmd.rs +++ b/common/src/cmd.rs @@ -191,6 +191,7 @@ lazy_static! { BuffKind::Heatstroke => "heatstroke", BuffKind::ScornfulTaunt => "scornful_taunt", BuffKind::Rooted => "rooted", + BuffKind::Winded => "winded", }; let mut buff_parser = HashMap::new(); for kind in BuffKind::iter() { diff --git a/common/src/combat.rs b/common/src/combat.rs index 079bf82dd5..df49bd25c0 100644 --- a/common/src/combat.rs +++ b/common/src/combat.rs @@ -2,7 +2,7 @@ use crate::{ comp::{ ability::Capability, aura::{AuraKindVariant, EnteredAuras}, - buff::{Buff, BuffChange, BuffData, BuffKind, BuffSource}, + buff::{Buff, BuffChange, BuffData, BuffKind, BuffSource, DestInfo}, inventory::{ item::{ armor::Protection, @@ -13,7 +13,7 @@ use crate::{ }, skillset::SkillGroupKind, Alignment, Body, Buffs, CharacterState, Combo, Energy, Group, Health, HealthChange, - Inventory, Ori, Player, Poise, PoiseChange, SkillSet, Stats, + Inventory, Mass, Ori, Player, Poise, PoiseChange, SkillSet, Stats, }, event::{ BuffEvent, ComboChangeEvent, EmitExt, EnergyChangeEvent, EntityAttackedHookEvent, @@ -72,6 +72,7 @@ pub struct AttackerInfo<'a> { pub combo: Option<&'a Combo>, pub inventory: Option<&'a Inventory>, pub stats: Option<&'a Stats>, + pub mass: Option<&'a Mass>, } pub struct TargetInfo<'a> { @@ -85,6 +86,7 @@ pub struct TargetInfo<'a> { pub char_state: Option<&'a CharacterState>, pub energy: Option<&'a Energy>, pub buffs: Option<&'a Buffs>, + pub mass: Option<&'a Mass>, } #[derive(Clone, Copy)] @@ -464,8 +466,8 @@ impl Attack { entity: target.entity, buff_change: BuffChange::Add(b.to_buff( time, - attacker.map(|a| a.uid), - target.stats, + attacker, + target, applied_damage, strength_modifier, )), @@ -697,8 +699,8 @@ impl Attack { entity: target.entity, buff_change: BuffChange::Add(b.to_buff( time, - attacker.map(|a| a.uid), - target.stats, + attacker, + target, accumulated_damage, strength_modifier, )), @@ -1322,17 +1324,21 @@ impl CombatBuff { fn to_buff( self, time: Time, - uid: Option, - tgt_stats: Option<&Stats>, + attacker_info: Option, + target_info: &TargetInfo, damage: f32, strength_modifier: f32, ) -> Buff { // TODO: Generate BufCategoryId vec (probably requires damage overhaul?) - let source = if let Some(uid) = uid { + let source = if let Some(uid) = attacker_info.map(|a| a.uid) { BuffSource::Character { by: uid } } else { BuffSource::Unknown }; + let dest_info = DestInfo { + stats: target_info.stats, + mass: target_info.mass, + }; Buff::new( self.kind, BuffData::new( @@ -1342,7 +1348,8 @@ impl CombatBuff { Vec::new(), source, time, - tgt_stats, + dest_info, + attacker_info.and_then(|a| a.mass), ) } } @@ -1646,7 +1653,7 @@ pub fn compute_poise_resilience( pub fn precision_mult_from_flank( attack_dir: Vec3, target_ori: Option<&Ori>, - precision_flank_multiplier: f32, + precision_flank_multipliers: FlankMults, precision_flank_invert: bool, ) -> Option { let angle = target_ori.map(|t_ori| { @@ -1657,16 +1664,38 @@ pub fn precision_mult_from_flank( }) }); match angle { - Some(angle) if angle < FULL_FLANK_ANGLE => { - Some(MAX_BACK_FLANK_PRECISION * precision_flank_multiplier) - }, + Some(angle) if angle < FULL_FLANK_ANGLE => Some( + MAX_BACK_FLANK_PRECISION + * if precision_flank_invert { + precision_flank_multipliers.front + } else { + precision_flank_multipliers.back + }, + ), Some(angle) if angle < PARTIAL_FLANK_ANGLE => { - Some(MAX_SIDE_FLANK_PRECISION * precision_flank_multiplier) + Some(MAX_SIDE_FLANK_PRECISION * precision_flank_multipliers.side) }, Some(_) | None => None, } } +#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FlankMults { + pub back: f32, + pub front: f32, + pub side: f32, +} + +impl Default for FlankMults { + fn default() -> Self { + FlankMults { + back: 1.0, + front: 1.0, + side: 1.0, + } + } +} + pub fn block_strength(inventory: &Inventory, char_state: &CharacterState) -> f32 { match char_state { CharacterState::BasicBlock(data) => data.static_data.block_strength, diff --git a/common/src/comp/ability.rs b/common/src/comp/ability.rs index d1c1f5e194..5d951bfaa0 100644 --- a/common/src/comp/ability.rs +++ b/common/src/comp/ability.rs @@ -1113,7 +1113,7 @@ impl Default for CharacterAbility { attack_effect: None, simultaneous_hits: 1, custom_combo: None, - precision_flank_multiplier: 1.0, + precision_flank_multipliers: Default::default(), precision_flank_invert: false, }, ori_modifier: 1.0, diff --git a/common/src/comp/buff.rs b/common/src/comp/buff.rs index e42fd79a2c..b99578d0a6 100644 --- a/common/src/comp/buff.rs +++ b/common/src/comp/buff.rs @@ -4,7 +4,7 @@ use crate::{ AttackEffect, CombatBuff, CombatBuffStrength, CombatEffect, CombatRequirement, DamagedEffect, DeathEffect, }, - comp::{aura::AuraKey, Stats}, + comp::{aura::AuraKey, Mass, Stats}, resources::{Secs, Time}, uid::Uid, }; @@ -185,6 +185,11 @@ pub enum BuffKind { /// is higher than the strength allows for, duration gets reduced using a /// mutiplier from the ratio of masses. Rooted, + /// Slows movement speed and reduces energy reward + /// Both scale non-linearly with strength, 0.5 leads to 50% reduction of + /// energy reward and 33% reduction of move speed. 1.0 leads to 67% + /// reduction of energy reward and 50% reduction of move speed. + Winded, // Complex, non-obvious buffs /// Changed into another body. Polymorphed, @@ -248,7 +253,8 @@ impl BuffKind { | BuffKind::Parried | BuffKind::PotionSickness | BuffKind::Heatstroke - | BuffKind::Rooted => BuffDescriptor::SimpleNegative, + | BuffKind::Rooted + | BuffKind::Winded => BuffDescriptor::SimpleNegative, BuffKind::Polymorphed => BuffDescriptor::Complex, } } @@ -286,7 +292,10 @@ impl BuffKind { pub fn effects(&self, data: &BuffData, stats: Option<&Stats>) -> Vec { // Normalized nonlinear scaling + // TODO: Do we want to make denominator term parameterized. Come back to if we + // add nn_scaling3. let nn_scaling = |a| a / (a + 0.5); + let nn_scaling2 = |a| a / (a + 1.0); let instance = rand::random(); match self { BuffKind::Bleeding => vec![BuffEffect::HealthChangeOverTime { @@ -489,6 +498,10 @@ impl BuffKind { }), ], BuffKind::Rooted => vec![BuffEffect::MovementSpeed(0.0)], + BuffKind::Winded => vec![ + BuffEffect::MovementSpeed(1.0 - nn_scaling2(data.strength)), + BuffEffect::EnergyReward(1.0 - nn_scaling(data.strength)), + ], } } @@ -504,13 +517,18 @@ impl BuffKind { cat_ids } - fn modify_data(&self, mut data: BuffData) -> BuffData { + fn modify_data( + &self, + mut data: BuffData, + source_mass: Option<&Mass>, + dest_mass: Option<&Mass>, + ) -> BuffData { // TODO: Remove clippy allow after another buff needs this #[allow(clippy::single_match)] match self { BuffKind::Rooted => { - let source_mass = 50.0; - let dest_mass = 50.0_f64; + let source_mass = source_mass.map_or(50.0, |m| m.0 as f64); + let dest_mass = dest_mass.map_or(50.0, |m| m.0 as f64); let ratio = (source_mass / dest_mass).min(1.0); data.duration = data.duration.map(|dur| Secs(dur.0 * ratio)); }, @@ -710,10 +728,12 @@ impl Buff { cat_ids: Vec, source: BuffSource, time: Time, - stats: Option<&Stats>, + dest_info: DestInfo, + // Create source_info if we need more parameters from source + source_mass: Option<&Mass>, ) -> Self { - let data = kind.modify_data(data); - let effects = kind.effects(&data, stats); + let data = kind.modify_data(data, source_mass, dest_info.mass); + let effects = kind.effects(&data, dest_info.stats); let cat_ids = kind.extend_cat_ids(cat_ids); let start_time = Time(time.0 + data.delay.map_or(0.0, |delay| delay.0)); let end_time = if cat_ids @@ -958,6 +978,12 @@ impl Component for Buffs { type Storage = DerefFlaggedStorage>; } +#[derive(Default, Copy, Clone)] +pub struct DestInfo<'a> { + pub stats: Option<&'a Stats>, + pub mass: Option<&'a Mass>, +} + #[cfg(test)] pub mod tests { use crate::comp::buff::*; @@ -973,6 +999,7 @@ pub mod tests { Vec::new(), BuffSource::Unknown, time, + DestInfo::default(), None, ) } diff --git a/common/src/comp/melee.rs b/common/src/comp/melee.rs index 7efa21c480..695b6d5e34 100644 --- a/common/src/comp/melee.rs +++ b/common/src/comp/melee.rs @@ -1,7 +1,8 @@ use crate::{ combat::{ Attack, AttackDamage, AttackEffect, CombatBuff, CombatBuffStrength, CombatEffect, - CombatRequirement, Damage, DamageKind, DamageSource, GroupTarget, Knockback, KnockbackDir, + CombatRequirement, Damage, DamageKind, DamageSource, FlankMults, GroupTarget, Knockback, + KnockbackDir, }, comp::{ buff::BuffKind, @@ -23,7 +24,7 @@ pub struct Melee { pub multi_target: Option, pub break_block: Option<(Vec3, Option)>, pub simultaneous_hits: u32, - pub precision_flank_multiplier: f32, + pub precision_flank_multipliers: FlankMults, pub precision_flank_invert: bool, } @@ -53,7 +54,6 @@ impl Component for Melee { } fn default_simultaneous_hits() -> u32 { 1 } -fn default_precision_flank_multiplier() -> f32 { 1.0 } #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Scaled { @@ -80,8 +80,8 @@ pub struct MeleeConstructor { #[serde(default = "default_simultaneous_hits")] pub simultaneous_hits: u32, pub custom_combo: Option, - #[serde(default = "default_precision_flank_multiplier")] - pub precision_flank_multiplier: f32, + #[serde(default)] + pub precision_flank_multipliers: FlankMults, #[serde(default)] pub precision_flank_invert: bool, } @@ -393,7 +393,7 @@ impl MeleeConstructor { multi_target: self.multi_target, break_block: None, simultaneous_hits: self.simultaneous_hits, - precision_flank_multiplier: self.precision_flank_multiplier, + precision_flank_multipliers: self.precision_flank_multipliers, precision_flank_invert: self.precision_flank_invert, } } diff --git a/common/src/states/self_buff.rs b/common/src/states/self_buff.rs index 85bc52372f..ac070567d0 100644 --- a/common/src/states/self_buff.rs +++ b/common/src/states/self_buff.rs @@ -1,6 +1,6 @@ use crate::{ comp::{ - buff::{Buff, BuffCategory, BuffChange, BuffData, BuffKind, BuffSource}, + buff::{Buff, BuffCategory, BuffChange, BuffData, BuffKind, BuffSource, DestInfo}, character_state::OutputEvents, CharacterState, StateUpdate, }, @@ -116,6 +116,11 @@ impl CharacterBehavior for Data { }); } + let dest_info = DestInfo { + stats: Some(data.stats), + mass: Some(data.mass), + }; + // Creates buff let buff = Buff::new( self.static_data.buff_kind, @@ -126,7 +131,8 @@ impl CharacterBehavior for Data { buff_cat_ids, BuffSource::Character { by: *data.uid }, *data.time, - Some(data.stats), + dest_info, + Some(data.mass), ); output_events.emit_server(BuffEvent { entity: data.entity, diff --git a/common/src/states/utils.rs b/common/src/states/utils.rs index 9c0a53ca92..ec6d816564 100644 --- a/common/src/states/utils.rs +++ b/common/src/states/utils.rs @@ -3,7 +3,7 @@ use crate::{ comp::{ ability::{AbilityInitEvent, AbilityMeta, Capability, SpecifiedAbility, Stance}, arthropod, biped_large, biped_small, bird_medium, - buff::{Buff, BuffCategory, BuffChange, BuffData, BuffSource}, + buff::{Buff, BuffCategory, BuffChange, BuffData, BuffSource, DestInfo}, character_state::OutputEvents, controller::InventoryManip, golem, @@ -1332,6 +1332,10 @@ fn handle_ability( strength, duration, } => { + let dest_info = DestInfo { + stats: Some(data.stats), + mass: Some(data.mass), + }; output_events.emit_server(BuffEvent { entity: data.entity, buff_change: BuffChange::Add(Buff::new( @@ -1340,7 +1344,8 @@ fn handle_ability( vec![BuffCategory::SelfBuff], BuffSource::Character { by: *data.uid }, *data.time, - Some(data.stats), + dest_info, + Some(data.mass), )), }); }, diff --git a/common/systems/src/aura.rs b/common/systems/src/aura.rs index 372ac93e42..02f51c9d9e 100644 --- a/common/systems/src/aura.rs +++ b/common/systems/src/aura.rs @@ -4,9 +4,9 @@ use common::{ combat, comp::{ aura::{AuraChange, AuraKey, AuraKind, AuraTarget, EnteredAuras}, - buff::{Buff, BuffCategory, BuffChange, BuffSource}, + buff::{Buff, BuffCategory, BuffChange, BuffSource, DestInfo}, group::Group, - Alignment, Aura, Auras, BuffKind, Buffs, CharacterState, Health, Player, Pos, Stats, + Alignment, Aura, Auras, BuffKind, Buffs, CharacterState, Health, Mass, Player, Pos, Stats, }, event::{AuraEvent, BuffEvent, EmitExt}, event_emitters, @@ -41,6 +41,7 @@ pub struct ReadData<'a> { buffs: ReadStorage<'a, Buffs>, auras: ReadStorage<'a, Auras>, entered_auras: ReadStorage<'a, EnteredAuras>, + masses: ReadStorage<'a, Mass>, } #[derive(Default)] @@ -86,80 +87,74 @@ impl<'a> System<'a> for Sys { read_data.healths.get(target)?, read_data.uids.get(target)?, read_data.entered_auras.get(target)?, - read_data.stats.get(target), )) }) }); - target_iter.for_each( - |(target, target_pos, health, target_uid, entered_auras, stats)| { - let target_buffs = match read_data.buffs.get(target) { - Some(buff) => buff, - None => return, + target_iter.for_each(|(target, target_pos, health, target_uid, entered_auras)| { + let target_buffs = match read_data.buffs.get(target) { + Some(buff) => buff, + None => return, + }; + + // Ensure entity is within the aura radius + if target_pos.0.distance_squared(pos.0) < aura.radius.powi(2) { + // Ensure the entity is in the group we want to target + let same_group = |uid: Uid| { + read_data + .id_maps + .uid_entity(uid) + .and_then(|e| read_data.groups.get(e)) + .map_or(false, |owner_group| { + Some(owner_group) == read_data.groups.get(target) + }) + || *target_uid == uid }; - // Ensure entity is within the aura radius - if target_pos.0.distance_squared(pos.0) < aura.radius.powi(2) { - // Ensure the entity is in the group we want to target - let same_group = |uid: Uid| { - read_data - .id_maps - .uid_entity(uid) - .and_then(|e| read_data.groups.get(e)) - .map_or(false, |owner_group| { - Some(owner_group) == read_data.groups.get(target) - }) - || *target_uid == uid - }; + let allow_friendly_fire = + combat::allow_friendly_fire(&read_data.entered_auras, entity, target); - let allow_friendly_fire = combat::allow_friendly_fire( - &read_data.entered_auras, - entity, - target, - ); - - if !(allow_friendly_fire && entity != target - || match aura.target { - AuraTarget::GroupOf(uid) => same_group(uid), - AuraTarget::NotGroupOf(uid) => !same_group(uid), - AuraTarget::All => true, - }) - { - return; - } - - let did_activate = activate_aura( - key, - aura, - *uid, - target, - health, - target_buffs, - stats, - allow_friendly_fire, - &read_data, - &mut emitters, - ); - - if did_activate { - if entered_auras - .auras - .get(aura.aura_kind.as_ref()) - .map_or(true, |auras| !auras.contains(&(*uid, key))) - { - emitters.emit(AuraEvent { - entity: target, - aura_change: AuraChange::EnterAura( - *uid, - key, - *aura.aura_kind.as_ref(), - ), - }); - } - active_auras.insert((*uid, *target_uid, key)); - } + if !(allow_friendly_fire && entity != target + || match aura.target { + AuraTarget::GroupOf(uid) => same_group(uid), + AuraTarget::NotGroupOf(uid) => !same_group(uid), + AuraTarget::All => true, + }) + { + return; } - }, - ); + + let did_activate = activate_aura( + key, + aura, + entity, + *uid, + target, + health, + target_buffs, + allow_friendly_fire, + &read_data, + &mut emitters, + ); + + if did_activate { + if entered_auras + .auras + .get(aura.aura_kind.as_ref()) + .map_or(true, |auras| !auras.contains(&(*uid, key))) + { + emitters.emit(AuraEvent { + entity: target, + aura_change: AuraChange::EnterAura( + *uid, + key, + *aura.aura_kind.as_ref(), + ), + }); + } + active_auras.insert((*uid, *target_uid, key)); + } + } + }); } if !expired_auras.is_empty() { emitters.emit(AuraEvent { @@ -200,11 +195,11 @@ impl<'a> System<'a> for Sys { fn activate_aura( key: AuraKey, aura: &Aura, - applier: Uid, + applier: EcsEntity, + applier_uid: Uid, target: EcsEntity, health: &Health, target_buffs: &Buffs, - stats: Option<&Stats>, allow_friendly_fire: bool, read_data: &ReadData, emitters: &mut impl EmitExt, @@ -286,20 +281,25 @@ fn activate_aura( let emit_buff = !target_buffs.buffs.iter().any(|(_, buff)| { buff.cat_ids .iter() - .any(|cat_id| matches!(cat_id, BuffCategory::FromActiveAura(uid, aura_key) if *aura_key == key && *uid == applier)) + .any(|cat_id| matches!(cat_id, BuffCategory::FromActiveAura(uid, aura_key) if *aura_key == key && *uid == applier_uid)) && buff.kind == kind && buff.data.strength >= data.strength }); if emit_buff { + let dest_info = DestInfo { + stats: read_data.stats.get(target), + mass: read_data.masses.get(target), + }; emitters.emit(BuffEvent { entity: target, buff_change: BuffChange::Add(Buff::new( kind, data, - vec![category, BuffCategory::FromActiveAura(applier, key)], + vec![category, BuffCategory::FromActiveAura(applier_uid, key)], source, *read_data.time, - stats, + dest_info, + read_data.masses.get(applier), )), }); } diff --git a/common/systems/src/beam.rs b/common/systems/src/beam.rs index 74cc61671e..9a415647fe 100644 --- a/common/systems/src/beam.rs +++ b/common/systems/src/beam.rs @@ -3,8 +3,8 @@ use common::{ comp::{ agent::{Sound, SoundKind}, aura::EnteredAuras, - Alignment, Beam, Body, Buffs, CharacterState, Combo, Energy, Group, Health, Inventory, Ori, - Player, Pos, Scale, Stats, + Alignment, Beam, Body, Buffs, CharacterState, Combo, Energy, Group, Health, Inventory, + Mass, Ori, Player, Pos, Scale, Stats, }, event::{self, EmitExt, EventBus}, event_emitters, @@ -63,6 +63,7 @@ pub struct ReadData<'a> { entered_auras: ReadStorage<'a, EnteredAuras>, outcomes: Read<'a, EventBus>, events: ReadAttackEvents<'a>, + masses: ReadStorage<'a, Mass>, } /// This system is responsible for handling beams that heal or do damage @@ -230,6 +231,7 @@ impl<'a> System<'a> for Sys { combo: read_data.combos.get(entity), inventory: read_data.inventories.get(entity), stats: read_data.stats.get(entity), + mass: read_data.masses.get(entity), }); let target_info = TargetInfo { @@ -243,6 +245,7 @@ impl<'a> System<'a> for Sys { char_state: read_data.character_states.get(target), energy: read_data.energies.get(target), buffs: read_data.buffs.get(target), + mass: read_data.masses.get(target), }; let target_dodging = read_data @@ -263,7 +266,7 @@ impl<'a> System<'a> for Sys { let precision_from_flank = combat::precision_mult_from_flank( beam.bezier.ctrl - beam.bezier.start, target_info.ori, - 1.0, + Default::default(), false, ); diff --git a/common/systems/src/buff.rs b/common/systems/src/buff.rs index 2a0ef88ca5..6b50e65335 100644 --- a/common/systems/src/buff.rs +++ b/common/systems/src/buff.rs @@ -6,12 +6,12 @@ use common::{ body::{object, Body}, buff::{ Buff, BuffCategory, BuffChange, BuffData, BuffEffect, BuffKey, BuffKind, BuffSource, - Buffs, + Buffs, DestInfo, }, fluid_dynamics::{Fluid, LiquidKind}, item::MaterialStatManifest, - Alignment, Energy, Group, Health, HealthChange, Inventory, LightEmitter, ModifierKind, - PhysicsState, Player, Pos, Stats, + Alignment, Energy, Group, Health, HealthChange, Inventory, LightEmitter, Mass, + ModifierKind, PhysicsState, Player, Pos, Stats, }, event::{ BuffEvent, ChangeBodyEvent, CreateSpriteEvent, EmitExt, EnergyChangeEvent, @@ -68,6 +68,7 @@ pub struct ReadData<'a> { alignments: ReadStorage<'a, Alignment>, players: ReadStorage<'a, Player>, uids: ReadStorage<'a, Uid>, + masses: ReadStorage<'a, Mass>, } #[derive(Default)] @@ -153,10 +154,16 @@ impl<'a> System<'a> for Sys { &read_data.energies, read_data.uids.maybe(), read_data.physics_states.maybe(), + read_data.masses.maybe(), ) .lend_join(); buff_join.for_each(|comps| { - let (entity, buff_comp, mut stat, body, health, energy, uid, physics_state) = comps; + let (entity, buff_comp, mut stat, body, health, energy, uid, physics_state, mass) = + comps; + let dest_info = DestInfo { + stats: Some(&stat), + mass, + }; // Apply buffs to entity based off of their current physics_state if let Some(physics_state) = physics_state { // Set nearby entities on fire if burning @@ -185,7 +192,13 @@ impl<'a> System<'a> for Sys { vec![BuffCategory::Natural], source, *read_data.time, - None, + DestInfo { + // Can't mutably access stats, and for burning debuff stats + // has no effect (for now) + stats: None, + mass: read_data.masses.get(t_entity), + }, + mass, )), }); } @@ -204,7 +217,8 @@ impl<'a> System<'a> for Sys { Vec::new(), BuffSource::World, *read_data.time, - Some(&stat), + dest_info, + None, )), }); } @@ -221,7 +235,8 @@ impl<'a> System<'a> for Sys { Vec::new(), BuffSource::World, *read_data.time, - Some(&stat), + dest_info, + None, )), }); } @@ -251,7 +266,8 @@ impl<'a> System<'a> for Sys { Vec::new(), BuffSource::World, *read_data.time, - Some(&stat), + dest_info, + None, )), }); } @@ -269,7 +285,8 @@ impl<'a> System<'a> for Sys { Vec::new(), BuffSource::World, *read_data.time, - Some(&stat), + dest_info, + None, )), }); } @@ -286,7 +303,8 @@ impl<'a> System<'a> for Sys { Vec::new(), BuffSource::World, *read_data.time, - Some(&stat), + dest_info, + None, )), }); } @@ -303,7 +321,8 @@ impl<'a> System<'a> for Sys { Vec::new(), BuffSource::World, *read_data.time, - Some(&stat), + dest_info, + None, )), }); // When standing on IceSpike also apply Frozen @@ -315,7 +334,8 @@ impl<'a> System<'a> for Sys { Vec::new(), BuffSource::World, *read_data.time, - Some(&stat), + dest_info, + None, )), }); } @@ -332,7 +352,8 @@ impl<'a> System<'a> for Sys { Vec::new(), BuffSource::World, *read_data.time, - Some(&stat), + dest_info, + None, )), }); } @@ -353,7 +374,8 @@ impl<'a> System<'a> for Sys { vec![BuffCategory::Natural], BuffSource::World, *read_data.time, - Some(&stat), + dest_info, + None, )), }); } else if matches!( @@ -429,7 +451,8 @@ impl<'a> System<'a> for Sys { .collect::>(), buff.source, *read_data.time, - Some(&stat), + dest_info, + None, )), }); } diff --git a/common/systems/src/melee.rs b/common/systems/src/melee.rs index 215e21b954..e37e268999 100644 --- a/common/systems/src/melee.rs +++ b/common/systems/src/melee.rs @@ -4,8 +4,8 @@ use common::{ agent::{Sound, SoundKind}, aura::EnteredAuras, melee::MultiTarget, - Alignment, Body, Buffs, CharacterState, Combo, Energy, Group, Health, Inventory, Melee, - Ori, Player, Pos, Scale, Stats, + Alignment, Body, Buffs, CharacterState, Combo, Energy, Group, Health, Inventory, Mass, + Melee, Ori, Player, Pos, Scale, Stats, }, event::{self, EmitExt, EventBus}, event_emitters, @@ -62,6 +62,7 @@ pub struct ReadData<'a> { buffs: ReadStorage<'a, Buffs>, entered_auras: ReadStorage<'a, EnteredAuras>, events: ReadAttackEvents<'a>, + masses: ReadStorage<'a, Mass>, } /// This system is responsible for handling accepted inputs like moving or @@ -213,6 +214,7 @@ impl<'a> System<'a> for Sys { combo: read_data.combos.get(attacker), inventory: read_data.inventories.get(attacker), stats: read_data.stats.get(attacker), + mass: read_data.masses.get(attacker), }); let target_ori = read_data.orientations.get(target); @@ -228,6 +230,7 @@ impl<'a> System<'a> for Sys { char_state: target_char_state, energy: read_data.energies.get(target), buffs: read_data.buffs.get(target), + mass: read_data.masses.get(target), }; // PvP check @@ -248,7 +251,7 @@ impl<'a> System<'a> for Sys { .try_normalized() .unwrap_or(ori.look_vec()), target_ori, - melee_attack.precision_flank_multiplier, + melee_attack.precision_flank_multipliers, melee_attack.precision_flank_invert, ); diff --git a/common/systems/src/projectile.rs b/common/systems/src/projectile.rs index 55741cc5cd..c69b5ee98d 100644 --- a/common/systems/src/projectile.rs +++ b/common/systems/src/projectile.rs @@ -4,7 +4,7 @@ use common::{ agent::{Sound, SoundKind}, aura::EnteredAuras, projectile, Alignment, Body, Buffs, CharacterState, Combo, Energy, Group, Health, - Inventory, Ori, PhysicsState, Player, Pos, Projectile, Stats, Vel, + Inventory, Mass, Ori, PhysicsState, Player, Pos, Projectile, Stats, Vel, }, event::{ BonkEvent, BuffEvent, ComboChangeEvent, DeleteEvent, EmitExt, Emitter, EnergyChangeEvent, @@ -73,6 +73,7 @@ pub struct ReadData<'a> { terrain: ReadExpect<'a, TerrainGrid>, buffs: ReadStorage<'a, Buffs>, entered_auras: ReadStorage<'a, EnteredAuras>, + masses: ReadStorage<'a, Mass>, } /// This system is responsible for handling projectile effect triggers @@ -340,6 +341,7 @@ fn dispatch_hit( combo: read_data.combos.get(entity), inventory: read_data.inventories.get(entity), stats: read_data.stats.get(entity), + mass: read_data.masses.get(entity), }); let target_info = TargetInfo { @@ -353,6 +355,7 @@ fn dispatch_hit( char_state: read_data.character_states.get(target), energy: read_data.energies.get(target), buffs: read_data.buffs.get(target), + mass: read_data.masses.get(target), }; // TODO: Is it possible to have projectile without body?? @@ -389,8 +392,12 @@ fn dispatch_hit( .and_then(|cs| cs.attack_immunities()) .map_or(false, |i| i.projectiles); - let precision_from_flank = - combat::precision_mult_from_flank(*projectile_dir, target_info.ori, 1.0, false); + let precision_from_flank = combat::precision_mult_from_flank( + *projectile_dir, + target_info.ori, + Default::default(), + false, + ); let precision_from_head = { // This performs a cylinder and line segment intersection check. The cylinder is diff --git a/common/systems/src/shockwave.rs b/common/systems/src/shockwave.rs index 5aac5b350f..cd39b90138 100644 --- a/common/systems/src/shockwave.rs +++ b/common/systems/src/shockwave.rs @@ -4,7 +4,7 @@ use common::{ agent::{Sound, SoundKind}, aura::EnteredAuras, shockwave::ShockwaveDodgeable, - Alignment, Body, Buffs, CharacterState, Combo, Energy, Group, Health, Inventory, Ori, + Alignment, Body, Buffs, CharacterState, Combo, Energy, Group, Health, Inventory, Mass, Ori, PhysicsState, Player, Pos, Scale, Shockwave, ShockwaveHitEntities, Stats, }, event::{ @@ -64,6 +64,7 @@ pub struct ReadData<'a> { character_states: ReadStorage<'a, CharacterState>, buffs: ReadStorage<'a, Buffs>, entered_auras: ReadStorage<'a, EnteredAuras>, + masses: ReadStorage<'a, Mass>, } /// This system is responsible for handling accepted inputs like moving or @@ -233,6 +234,7 @@ impl<'a> System<'a> for Sys { combo: read_data.combos.get(entity), inventory: read_data.inventories.get(entity), stats: read_data.stats.get(entity), + mass: read_data.masses.get(entity), }); let target_info = TargetInfo { @@ -246,6 +248,7 @@ impl<'a> System<'a> for Sys { char_state: read_data.character_states.get(target), energy: read_data.energies.get(target), buffs: read_data.buffs.get(target), + mass: read_data.masses.get(target), }; let target_dodging = read_data diff --git a/server/src/cmd.rs b/server/src/cmd.rs index c1c6dffa84..f1ff31ae0a 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -30,7 +30,7 @@ use common::{ comp::{ self, aura::{AuraKindVariant, AuraTarget}, - buff::{Buff, BuffData, BuffKind, BuffSource, MiscBuffData}, + buff::{Buff, BuffData, BuffKind, BuffSource, DestInfo, MiscBuffData}, inventory::{ item::{all_items_expect, tool::AbilityMap, MaterialStatManifest, Quality}, slot::Slot, @@ -4552,7 +4552,8 @@ fn build_buff( | BuffKind::PotionSickness | BuffKind::Heatstroke | BuffKind::ScornfulTaunt - | BuffKind::Rooted => { + | BuffKind::Rooted + | BuffKind::Winded => { if buff_kind.is_simple() { unreachable!("is_simple() above") } else { @@ -4569,8 +4570,13 @@ fn cast_buff(buffkind: BuffKind, data: BuffData, server: &mut Server, target: Ec let ecs = &server.state.ecs(); let mut buffs_all = ecs.write_storage::(); let stats = ecs.read_storage::(); + let masses = ecs.read_storage::(); let time = ecs.read_resource::