mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
remove CharacterAbility::Climb
This commit is contained in:
parent
d0df01fe51
commit
9e11a574d2
@ -124,10 +124,6 @@ pub enum CharacterAbility {
|
||||
roll_strength: f32,
|
||||
immune_melee: bool,
|
||||
},
|
||||
Climb {
|
||||
energy_cost: f32,
|
||||
movement_speed: f32,
|
||||
},
|
||||
ComboMelee {
|
||||
stage_data: Vec<combo_melee::Stage<f32>>,
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user