diff --git a/common/src/comp/ability.rs b/common/src/comp/ability.rs index 4e2da69593..25a8433b14 100644 --- a/common/src/comp/ability.rs +++ b/common/src/comp/ability.rs @@ -124,10 +124,6 @@ pub enum CharacterAbility { roll_strength: f32, immune_melee: bool, }, - Climb { - energy_cost: f32, - movement_speed: f32, - }, ComboMelee { stage_data: Vec>, initial_energy_gain: f32, @@ -408,7 +404,6 @@ impl CharacterAbility { *movement_duration /= speed; *recover_duration /= speed; }, - Climb { .. } => {}, ComboMelee { ref mut stage_data, .. } => { @@ -543,7 +538,6 @@ impl CharacterAbility { | RepeaterRanged { energy_cost, .. } | DashMelee { energy_cost, .. } | Roll { energy_cost, .. } - | Climb { energy_cost, .. } | LeapMelee { energy_cost, .. } | SpinMelee { energy_cost, .. } | ChargedMelee { energy_cost, .. } @@ -1072,23 +1066,26 @@ impl CharacterAbility { _ => {}, } }, - None => if let CharacterAbility::Roll{ - ref mut immune_melee, - ref mut energy_cost, - ref mut roll_strength, - ref mut movement_duration, - .. - } = self { - use skills::RollSkill::*; - *immune_melee = skillset.has_skill(Skill::Roll(ImmuneMelee)); - if let Ok(Some(level)) = skillset.skill_level(Skill::Roll(Cost)) { - *energy_cost *= 0.8_f32.powi(level.into()); - } - if let Ok(Some(level)) = skillset.skill_level(Skill::Roll(Strength)) { - *roll_strength *= 1.2_f32.powi(level.into()); - } - if let Ok(Some(level)) = skillset.skill_level(Skill::Roll(Duration)) { - *movement_duration *= 1.2_f32.powi(level.into()); + None => { + if let CharacterAbility::Roll { + ref mut immune_melee, + ref mut energy_cost, + ref mut roll_strength, + ref mut movement_duration, + .. + } = self + { + use skills::RollSkill::*; + *immune_melee = skillset.has_skill(Skill::Roll(ImmuneMelee)); + if let Ok(Some(level)) = skillset.skill_level(Skill::Roll(Cost)) { + *energy_cost *= 0.8_f32.powi(level.into()); + } + if let Ok(Some(level)) = skillset.skill_level(Skill::Roll(Strength)) { + *roll_strength *= 1.2_f32.powi(level.into()); + } + if let Ok(Some(level)) = skillset.skill_level(Skill::Roll(Duration)) { + *movement_duration *= 1.2_f32.powi(level.into()); + } } }, Some(_) => {}, @@ -1227,15 +1224,6 @@ impl From<(&CharacterAbility, AbilityInfo)> for CharacterState { was_sneak: false, was_combo: None, }), - CharacterAbility::Climb { - energy_cost, - movement_speed, - } => CharacterState::Climb(climb::Data { - static_data: climb::StaticData { - energy_cost: *energy_cost, - movement_speed: *movement_speed, - }, - }), CharacterAbility::ComboMelee { stage_data, initial_energy_gain,