mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Initial implementation of new dash melee.
This commit is contained in:
@ -3,7 +3,7 @@ use crate::{
|
||||
item::{armor::Protection, Item, ItemKind},
|
||||
Body, CharacterState, EnergySource, Gravity, LightEmitter, Projectile, StateUpdate,
|
||||
},
|
||||
states::*,
|
||||
states::{utils::StageSection, *},
|
||||
sys::character_behavior::JoinData,
|
||||
};
|
||||
use arraygen::Arraygen;
|
||||
@ -72,9 +72,19 @@ pub enum CharacterAbility {
|
||||
},
|
||||
DashMelee {
|
||||
energy_cost: u32,
|
||||
buildup_duration: Duration,
|
||||
recover_duration: Duration,
|
||||
base_damage: u32,
|
||||
max_damage: u32,
|
||||
base_knockback: f32,
|
||||
max_knockback: f32,
|
||||
range: f32,
|
||||
angle: f32,
|
||||
energy_drain: u32,
|
||||
forward_speed: f32,
|
||||
buildup_duration: Duration,
|
||||
charge_duration: Duration,
|
||||
infinite_charge: bool,
|
||||
swing_duration: Duration,
|
||||
recover_duration: Duration,
|
||||
},
|
||||
BasicBlock,
|
||||
Roll,
|
||||
@ -310,15 +320,36 @@ impl From<&CharacterAbility> for CharacterState {
|
||||
}),
|
||||
CharacterAbility::DashMelee {
|
||||
energy_cost: _,
|
||||
buildup_duration,
|
||||
recover_duration,
|
||||
base_damage,
|
||||
max_damage,
|
||||
base_knockback,
|
||||
max_knockback,
|
||||
range,
|
||||
angle,
|
||||
energy_drain,
|
||||
forward_speed,
|
||||
buildup_duration,
|
||||
charge_duration,
|
||||
infinite_charge,
|
||||
swing_duration,
|
||||
recover_duration,
|
||||
} => CharacterState::DashMelee(dash_melee::Data {
|
||||
initialize: true,
|
||||
exhausted: false,
|
||||
buildup_duration: *buildup_duration,
|
||||
recover_duration: *recover_duration,
|
||||
base_damage: *base_damage,
|
||||
max_damage: *max_damage,
|
||||
base_knockback: *base_knockback,
|
||||
max_knockback: *max_knockback,
|
||||
range: *range,
|
||||
angle: *angle,
|
||||
energy_drain: *energy_drain,
|
||||
forward_speed: *forward_speed,
|
||||
buildup_duration: *buildup_duration,
|
||||
charge_duration: *charge_duration,
|
||||
charge_duration_attained: Duration::default(),
|
||||
infinite_charge: *infinite_charge,
|
||||
swing_duration: *swing_duration,
|
||||
recover_duration: *recover_duration,
|
||||
timer: Duration::default(),
|
||||
stage_section: StageSection::Buildup,
|
||||
}),
|
||||
CharacterAbility::BasicBlock => CharacterState::BasicBlock,
|
||||
CharacterAbility::Roll => CharacterState::Roll(roll::Data {
|
||||
@ -341,7 +372,7 @@ impl From<&CharacterAbility> for CharacterState {
|
||||
energy_increase: *energy_increase,
|
||||
combo_duration: *combo_duration,
|
||||
timer: Duration::default(),
|
||||
stage_section: wielding::StageSection::Buildup,
|
||||
stage_section: StageSection::Buildup,
|
||||
next_stage: false,
|
||||
}),
|
||||
CharacterAbility::LeapMelee {
|
||||
|
Reference in New Issue
Block a user