From 09b25d4f747dd9bb72934519126619918a709f7e Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 25 Jan 2024 20:10:26 -0500 Subject: [PATCH] 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 {