Secondaries for all stances

This commit is contained in:
Sam 2022-11-27 16:11:19 -05:00
parent 596fe715b8
commit fce9211d49
37 changed files with 498 additions and 390 deletions

View File

@ -342,8 +342,8 @@
abilities: [],
),
Custom("Roshwalr"): (
primary: "common.abilities.custom.roshwalr.doublehusk",
secondary: "common.abilities.custom.roshwalr.slowcharge",
primary: Simple(None, "common.abilities.custom.roshwalr.doublehusk"),
secondary: Simple(None, "common.abilities.custom.roshwalr.slowcharge"),
abilities: [
Simple(None, "common.abilities.custom.roshwalr.freezeshockwave"),
],

View File

@ -4,7 +4,7 @@ ComboMelee2(
melee_constructor: (
kind: Slash(
damage: 3,
poise: 0,
poise: 2,
knockback: 0,
energy_regen: 5,
),
@ -21,7 +21,7 @@ ComboMelee2(
melee_constructor: (
kind: Slash(
damage: 6,
poise: 0,
poise: 3,
knockback: 0,
energy_regen: 5,
),

View File

@ -4,9 +4,9 @@ ComboMelee2(
melee_constructor: (
kind: Slash(
damage: 12,
poise: 0,
poise: 5,
knockback: 0,
energy_regen: 5,
energy_regen: 0,
),
range: 3.0,
angle: 45.0,
@ -23,7 +23,7 @@ ComboMelee2(
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 0,
energy_cost_per_strike: 10,
meta: (
init_event: Some(EnterStance(Sword(Agile))),
),

View File

@ -1,39 +1,20 @@
ComboMelee2(
strikes: [
(
melee_constructor: (
kind: Slash(
damage: 5,
poise: 0,
knockback: 0,
energy_regen: 5,
),
range: 3.0,
angle: 45.0,
),
buildup_duration: 0.15,
swing_duration: 0.05,
hit_timing: 0.5,
recover_duration: 0.1,
ori_modifier: 0.6,
RapidMelee(
buildup_duration: 0.2,
swing_duration: 0.1,
recover_duration: 0.3,
melee_constructor: (
kind: Slash(
damage: 3,
poise: 1,
knockback: 0,
energy_regen: 2,
),
(
melee_constructor: (
kind: Slash(
damage: 10,
poise: 0,
knockback: 0,
energy_regen: 7.5,
),
range: 3.0,
angle: 45.0,
),
buildup_duration: 0.1,
swing_duration: 0.1,
hit_timing: 0.5,
recover_duration: 0.2,
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 0,
)
range: 6.0,
angle: 360.0,
multi_target: Some(Normal),
),
energy_cost: 0,
max_strikes: None,
move_modifier: 0.35,
ori_modifier: 0.25,
)

View File

@ -4,9 +4,9 @@ ComboMelee2(
melee_constructor: (
kind: Slash(
damage: 8,
poise: 0,
poise: 5,
knockback: 0,
energy_regen: 5,
energy_regen: 0,
),
range: 3.0,
angle: 45.0,
@ -23,7 +23,7 @@ ComboMelee2(
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 0,
energy_cost_per_strike: 10,
meta: (
init_event: Some(EnterStance(Sword(Agile))),
),

View File

@ -4,7 +4,7 @@ ComboMelee2(
melee_constructor: (
kind: Slash(
damage: 5,
poise: 0,
poise: 5,
knockback: 0,
energy_regen: 5,
),
@ -21,7 +21,7 @@ ComboMelee2(
melee_constructor: (
kind: Slash(
damage: 10,
poise: 0,
poise: 5,
knockback: 0,
energy_regen: 10,
),

View File

@ -1,39 +1,24 @@
ComboMelee2(
strikes: [
(
melee_constructor: (
kind: Slash(
damage: 5,
poise: 0,
knockback: 0,
energy_regen: 5,
),
range: 3.0,
angle: 45.0,
),
buildup_duration: 0.15,
swing_duration: 0.05,
hit_timing: 0.5,
recover_duration: 0.1,
ori_modifier: 0.6,
ChargedMelee(
energy_cost: 0,
energy_drain: 0,
melee_constructor: (
kind: Slash(
damage: 0,
poise: 0,
knockback: 0,
energy_regen: 0,
),
(
melee_constructor: (
kind: Slash(
damage: 10,
poise: 0,
knockback: 0,
energy_regen: 7.5,
),
range: 3.0,
angle: 45.0,
),
buildup_duration: 0.1,
swing_duration: 0.1,
hit_timing: 0.5,
recover_duration: 0.2,
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 0,
)
scaled: Some(Slash(
damage: 25,
poise: 10,
knockback: 0,
energy_regen: 20,
)),
range: 4.5,
angle: 10.0,
),
charge_duration: 0.5,
swing_duration: 0.1,
hit_timing: 0.2,
recover_duration: 0.2,
)

View File

@ -4,7 +4,7 @@ ComboMelee2(
melee_constructor: (
kind: Slash(
damage: 5,
poise: 0,
poise: 5,
knockback: 0,
energy_regen: 5,
),
@ -22,7 +22,7 @@ ComboMelee2(
melee_constructor: (
kind: Slash(
damage: 10,
poise: 0,
poise: 5,
knockback: 0,
energy_regen: 5,
),

View File

@ -1,5 +1,5 @@
DiveMelee(
energy_cost: 25,
energy_cost: 15,
vertical_speed: 5,
movement_duration: 5,
swing_duration: 0.1,
@ -9,11 +9,11 @@ DiveMelee(
damage: 0,
poise: 0,
knockback: 0,
energy_regen: 10,
energy_regen: 0,
),
scaled: Some(Slash(
damage: 10,
poise: 5,
poise: 10,
knockback: 0,
energy_regen: 0,
)),

View File

@ -1,39 +1,25 @@
ComboMelee2(
strikes: [
(
melee_constructor: (
kind: Slash(
damage: 5,
poise: 0,
knockback: 0,
energy_regen: 5,
),
range: 3.0,
angle: 45.0,
),
buildup_duration: 0.15,
swing_duration: 0.05,
hit_timing: 0.5,
recover_duration: 0.1,
ori_modifier: 0.6,
ChargedMelee(
energy_cost: 0,
energy_drain: 0,
melee_constructor: (
kind: Slash(
damage: 10,
poise: 0,
knockback: 0,
energy_regen: 0,
),
(
melee_constructor: (
kind: Slash(
damage: 10,
poise: 0,
knockback: 0,
energy_regen: 7.5,
),
range: 3.0,
angle: 45.0,
),
buildup_duration: 0.1,
swing_duration: 0.1,
hit_timing: 0.5,
recover_duration: 0.2,
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 0,
scaled: Some(Slash(
damage: 15,
poise: 10,
knockback: 0,
energy_regen: 10,
)),
range: 3.0,
angle: 360.0,
multi_target: Some(Normal),
),
charge_duration: 0.5,
swing_duration: 0.2,
hit_timing: 0.2,
recover_duration: 0.3,
)

View File

@ -5,16 +5,18 @@ RapidMelee(
melee_constructor: (
kind: Slash(
damage: 15,
poise: 0,
poise: 5,
knockback: 0,
energy_regen: 5,
energy_regen: 0,
),
range: 6.0,
range: 4.0,
angle: 360.0,
multi_target: Some(Normal),
),
energy_cost: 10,
max_strikes: 2,
max_strikes: Some(2),
ori_modifier: 1.0,
move_modifier: 1.0,
meta: (
init_event: Some(EnterStance(Sword(Cleaving))),
),

View File

@ -1,39 +1,35 @@
ComboMelee2(
strikes: [
(
melee_constructor: (
kind: Slash(
damage: 5,
poise: 0,
knockback: 0,
energy_regen: 5,
),
range: 3.0,
angle: 45.0,
),
buildup_duration: 0.15,
swing_duration: 0.05,
hit_timing: 0.5,
recover_duration: 0.1,
ori_modifier: 0.6,
ChargedMelee(
energy_cost: 0,
energy_drain: 0,
melee_constructor: (
kind: Slash(
damage: 0,
poise: 0,
knockback: 0,
energy_regen: 0,
),
(
melee_constructor: (
kind: Slash(
damage: 10,
poise: 0,
knockback: 0,
energy_regen: 7.5,
),
range: 3.0,
angle: 45.0,
),
buildup_duration: 0.1,
swing_duration: 0.1,
hit_timing: 0.5,
recover_duration: 0.2,
ori_modifier: 0.6,
scaled: Some(Slash(
damage: 16,
poise: 5,
knockback: 0,
energy_regen: 15,
)),
damage_effect: Some(BuffsVulnerable(0.5, Bleeding)),
range: 4.5,
angle: 10.0,
),
buildup_strike: Some((0.3, (
kind: Slash(
damage: 8,
poise: 0,
knockback: 0,
energy_regen: 5,
),
],
energy_cost_per_strike: 0,
)
range: 4.5,
angle: 10.0,
))),
charge_duration: 0.5,
swing_duration: 0.1,
hit_timing: 0.2,
recover_duration: 0.3,
)

View File

@ -4,7 +4,7 @@ ComboMelee2(
melee_constructor: (
kind: Slash(
damage: 5,
poise: 0,
poise: 5,
knockback: 0,
energy_regen: 5,
),
@ -22,7 +22,7 @@ ComboMelee2(
melee_constructor: (
kind: Slash(
damage: 10,
poise: 0,
poise: 5,
knockback: 0,
energy_regen: 10,
),

View File

@ -4,9 +4,9 @@ ComboMelee2(
melee_constructor: (
kind: Slash(
damage: 10,
poise: 0,
poise: 5,
knockback: 0,
energy_regen: 5,
energy_regen: 0,
),
range: 4.0,
angle: 45.0,
@ -24,7 +24,7 @@ ComboMelee2(
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 20,
energy_cost_per_strike: 15,
meta: (
init_event: Some(EnterStance(Sword(Crippling))),
),

View File

@ -4,9 +4,9 @@ ComboMelee2(
melee_constructor: (
kind: Slash(
damage: 15,
poise: 0,
poise: 5,
knockback: 0,
energy_regen: 5,
energy_regen: 0,
),
range: 4.0,
angle: 45.0,
@ -24,7 +24,7 @@ ComboMelee2(
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 20,
energy_cost_per_strike: 15,
meta: (
init_event: Some(EnterStance(Sword(Crippling))),
),

View File

@ -4,9 +4,9 @@ ComboMelee2(
melee_constructor: (
kind: Slash(
damage: 16,
poise: 0,
poise: 5,
knockback: 0,
energy_regen: 5,
energy_regen: 0,
),
range: 6.0,
angle: 45.0,

View File

@ -4,7 +4,7 @@ ComboMelee2(
melee_constructor: (
kind: Slash(
damage: 4,
poise: 0,
poise: 5,
knockback: 0,
energy_regen: 5,
),
@ -21,7 +21,7 @@ ComboMelee2(
melee_constructor: (
kind: Slash(
damage: 8,
poise: 0,
poise: 5,
knockback: 0,
energy_regen: 10,
),

View File

@ -1,39 +1,12 @@
ComboMelee2(
strikes: [
(
melee_constructor: (
kind: Slash(
damage: 5,
poise: 0,
knockback: 0,
energy_regen: 5,
),
range: 3.0,
angle: 45.0,
),
buildup_duration: 0.15,
swing_duration: 0.05,
hit_timing: 0.5,
recover_duration: 0.1,
ori_modifier: 0.6,
),
(
melee_constructor: (
kind: Slash(
damage: 10,
poise: 0,
knockback: 0,
energy_regen: 7.5,
),
range: 3.0,
angle: 45.0,
),
buildup_duration: 0.1,
swing_duration: 0.1,
hit_timing: 0.5,
recover_duration: 0.2,
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 0,
BasicBlock(
buildup_duration: 0.2,
recover_duration: 0.1,
max_angle: 45.0,
block_strength: 0.75,
parry_window: (
buildup: true,
recover: false,
),
energy_cost: 0,
can_hold: true,
)

View File

@ -6,7 +6,7 @@ RiposteMelee(
melee_constructor: (
kind: Slash(
damage: 25,
poise: 0,
poise: 5,
knockback: 0,
energy_regen: 5,
),

View File

@ -4,7 +4,7 @@ ComboMelee2(
melee_constructor: (
kind: Slash(
damage: 10,
poise: 5,
poise: 10,
knockback: 0,
energy_regen: 10,
),
@ -21,7 +21,7 @@ ComboMelee2(
melee_constructor: (
kind: Slash(
damage: 15,
poise: 10,
poise: 15,
knockback: 0,
energy_regen: 15,
),

View File

@ -4,7 +4,7 @@ ComboMelee2(
melee_constructor: (
kind: Bash(
damage: 20,
poise: 50,
poise: 60,
knockback: 0,
energy_regen: 0,
),
@ -18,7 +18,7 @@ ComboMelee2(
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 25,
energy_cost_per_strike: 15,
meta: (
init_event: Some(EnterStance(Sword(Heavy))),
),

View File

@ -1,39 +1,24 @@
ComboMelee2(
strikes: [
(
melee_constructor: (
kind: Slash(
damage: 5,
poise: 0,
knockback: 0,
energy_regen: 5,
),
range: 3.0,
angle: 45.0,
),
buildup_duration: 0.15,
swing_duration: 0.05,
hit_timing: 0.5,
recover_duration: 0.1,
ori_modifier: 0.6,
ChargedMelee(
energy_cost: 0,
energy_drain: 0,
melee_constructor: (
kind: Slash(
damage: 0,
poise: 0,
knockback: 0,
energy_regen: 0,
),
(
melee_constructor: (
kind: Slash(
damage: 10,
poise: 0,
knockback: 0,
energy_regen: 7.5,
),
range: 3.0,
angle: 45.0,
),
buildup_duration: 0.1,
swing_duration: 0.1,
hit_timing: 0.5,
recover_duration: 0.2,
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 0,
)
scaled: Some(Slash(
damage: 35,
poise: 30,
knockback: 0,
energy_regen: 30,
)),
range: 4.5,
angle: 10.0,
),
charge_duration: 0.8,
swing_duration: 0.1,
hit_timing: 0.2,
recover_duration: 0.4,
)

View File

@ -4,7 +4,7 @@ ComboMelee2(
melee_constructor: (
kind: Slash(
damage: 15,
poise: 10,
poise: 15,
knockback: 0,
energy_regen: 0,
),
@ -21,7 +21,7 @@ ComboMelee2(
melee_constructor: (
kind: Slash(
damage: 22,
poise: 20,
poise: 30,
knockback: 0,
energy_regen: 0,
),

View File

@ -8,8 +8,8 @@ use crate::{
slot::EquipSlot,
},
skillset::SkillGroupKind,
Alignment, Body, CharacterState, Combo, Energy, Health, HealthChange, Inventory, Ori,
Player, Poise, PoiseChange, SkillSet, Stats,
Alignment, Body, Buffs, CharacterState, Combo, Energy, Health, HealthChange, Inventory,
Ori, Player, Poise, PoiseChange, SkillSet, Stats,
},
event::ServerEvent,
outcome::Outcome,
@ -69,6 +69,7 @@ pub struct TargetInfo<'a> {
pub ori: Option<&'a Ori>,
pub char_state: Option<&'a CharacterState>,
pub energy: Option<&'a Energy>,
pub buffs: Option<&'a Buffs>,
}
#[derive(Clone, Copy)]
@ -440,13 +441,16 @@ impl Attack {
});
}
},
CombatEffect::BuildupsVulnerable => {
if target.char_state.map_or(false, |cs| {
matches!(
cs.stage_section(),
Some(StageSection::Buildup | StageSection::Charge)
)
}) {
CombatEffect::StageVulnerable(damage, section) => {
if target
.char_state
.map_or(false, |cs| cs.stage_section() == Some(*section))
{
let change = {
let mut change = change;
change.amount *= damage;
change
};
emit(ServerEvent::HealthChange {
entity: target.entity,
change,
@ -461,6 +465,19 @@ impl Attack {
});
}
},
CombatEffect::BuffsVulnerable(damage, buff) => {
if target.buffs.map_or(false, |b| b.contains(*buff)) {
let change = {
let mut change = change;
change.amount *= damage;
change
};
emit(ServerEvent::HealthChange {
entity: target.entity,
change,
});
}
},
}
}
}
@ -617,7 +634,7 @@ impl Attack {
}
},
// Only has an effect when attached to a damage
CombatEffect::BuildupsVulnerable => {},
CombatEffect::StageVulnerable(_, _) => {},
CombatEffect::RefreshBuff(chance, b) => {
if rng.gen::<f32>() < chance {
emit(ServerEvent::Buff {
@ -626,6 +643,8 @@ impl Attack {
});
}
},
// Only has an effect when attached to a damage
CombatEffect::BuffsVulnerable(_, _) => {},
}
}
}
@ -757,14 +776,21 @@ pub enum CombatEffect {
Lifesteal(f32),
Poise(f32),
Combo(i32),
// If the attack hits the target while they are in the buildup portion of a character state,
// deal double damage Only has an effect when attached to a damage, otherwise does nothing
// if only attached to the attack
/// If the attack hits the target while they are in the buildup portion of a
/// character state, deal increased damage
/// Only has an effect when attached to a damage, otherwise does nothing if
/// only attached to the attack
// TODO: Maybe try to make it do something if tied to
// attack, not sure if it should double count in that instance?
BuildupsVulnerable,
// Resets duration of all buffs of this buffkind, with some probability
StageVulnerable(f32, StageSection),
/// Resets duration of all buffs of this buffkind, with some probability
RefreshBuff(f32, BuffKind),
/// If the target hit by an attack has this buff, they will take increased
/// damage Only has an effect when attached to a damage, otherwise does
/// nothing if only attached to the attack
// TODO: Maybe try to make it do something if tied to attack, not sure if it should double
// count in that instance?
BuffsVulnerable(f32, BuffKind),
}
#[cfg(not(target_arch = "wasm32"))]

View File

@ -633,6 +633,7 @@ pub enum CharacterAbility {
ChargedMelee {
energy_cost: f32,
energy_drain: f32,
buildup_strike: Option<(f32, MeleeConstructor)>,
charge_duration: f32,
swing_duration: f32,
hit_timing: f32,
@ -798,8 +799,10 @@ pub enum CharacterAbility {
swing_duration: f32,
recover_duration: f32,
energy_cost: f32,
max_strikes: u32,
max_strikes: Option<u32>,
melee_constructor: MeleeConstructor,
move_modifier: f32,
ori_modifier: f32,
#[serde(default)]
meta: AbilityMeta,
},
@ -1177,6 +1180,7 @@ impl CharacterAbility {
ChargedMelee {
ref mut energy_cost,
ref mut energy_drain,
ref mut buildup_strike,
ref mut charge_duration,
ref mut swing_duration,
hit_timing: _,
@ -1187,6 +1191,8 @@ impl CharacterAbility {
meta: _,
} => {
*swing_duration /= stats.speed;
*buildup_strike = buildup_strike
.map(|(dur, strike)| (dur / stats.speed, strike.adjusted_by_stats(stats)));
*charge_duration /= stats.speed;
*recover_duration /= stats.speed;
*energy_cost /= stats.energy_efficiency;
@ -1451,6 +1457,8 @@ impl CharacterAbility {
ref mut energy_cost,
ref mut melee_constructor,
max_strikes: _,
move_modifier: _,
ori_modifier: _,
meta: _,
} => {
*buildup_duration /= stats.speed;
@ -2396,6 +2404,7 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState {
CharacterAbility::ChargedMelee {
energy_cost,
energy_drain,
buildup_strike,
charge_duration,
swing_duration,
hit_timing,
@ -2408,6 +2417,8 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState {
static_data: charged_melee::StaticData {
energy_cost: *energy_cost,
energy_drain: *energy_drain,
buildup_strike: buildup_strike
.map(|(dur, strike)| (Duration::from_secs_f32(dur), strike)),
charge_duration: Duration::from_secs_f32(*charge_duration),
swing_duration: Duration::from_secs_f32(*swing_duration),
hit_timing: *hit_timing,
@ -2417,7 +2428,11 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState {
specifier: *specifier,
damage_effect: *damage_effect,
},
stage_section: StageSection::Charge,
stage_section: if buildup_strike.is_some() {
StageSection::Buildup
} else {
StageSection::Charge
},
timer: Duration::default(),
exhausted: false,
charge_amount: 0.0,
@ -2778,6 +2793,8 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState {
melee_constructor,
energy_cost,
max_strikes,
move_modifier,
ori_modifier,
meta: _,
} => CharacterState::RapidMelee(rapid_melee::Data {
static_data: rapid_melee::StaticData {
@ -2787,6 +2804,8 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState {
melee_constructor: *melee_constructor,
energy_cost: *energy_cost,
max_strikes: *max_strikes,
move_modifier: *move_modifier,
ori_modifier: *ori_modifier,
ability_info,
},
timer: Duration::default(),

View File

@ -18,6 +18,11 @@ pub struct StaticData {
pub energy_drain: f32,
/// Energy cost per attack
pub energy_cost: f32,
/// The state can optionally have a buildup strike that applies after buildup before charging
pub buildup_strike: Option<(
Duration,
MeleeConstructor,
)>,
/// How long it takes to charge the weapon to max damage and knockback
pub charge_duration: Duration,
/// How long the weapon is swinging for
@ -60,6 +65,32 @@ impl CharacterBehavior for Data {
handle_jump(data, output_events, &mut update, 1.0);
match self.stage_section {
StageSection::Buildup => {
if let Some((buildup, strike)) = self.static_data.buildup_strike {
if self.timer < buildup {
if let CharacterState::ChargedMelee(c) = &mut update.character {
c.timer = tick_attack_or_default(data, self.timer, None);
}
} else {
let crit_data = get_crit_data(data, self.static_data.ability_info);
let buff_strength = get_buff_strength(data, self.static_data.ability_info);
data.updater.insert(
data.entity,
strike.create_melee(crit_data, buff_strength),
);
if let CharacterState::ChargedMelee(c) = &mut update.character {
c.stage_section = StageSection::Charge;
c.timer = Duration::default();
}
}
} else {
if let CharacterState::ChargedMelee(c) = &mut update.character {
c.stage_section = StageSection::Charge;
c.timer = Duration::default();
}
}
},
StageSection::Charge => {
if input_is_pressed(data, self.static_data.ability_info.input)
&& update.energy.current() >= self.static_data.energy_cost

View File

@ -21,8 +21,10 @@ pub struct StaticData {
pub melee_constructor: MeleeConstructor,
/// Energy cost per attack
pub energy_cost: f32,
/// Maximum number of consecutive strikes
pub max_strikes: u32,
/// Maximum number of consecutive strikes, if there is a max
pub max_strikes: Option<u32>,
pub move_modifier: f32,
pub ori_modifier: f32,
/// What key is used to press ability
pub ability_info: AbilityInfo,
}
@ -46,8 +48,8 @@ impl CharacterBehavior for Data {
fn behavior(&self, data: &JoinData, _: &mut OutputEvents) -> StateUpdate {
let mut update = StateUpdate::from(data);
handle_orientation(data, &mut update, 1.0, None);
handle_move(data, &mut update, 0.7);
handle_orientation(data, &mut update, self.static_data.ori_modifier, None);
handle_move(data, &mut update, self.static_data.move_modifier);
handle_interrupts(data, &mut update);
match self.stage_section {
@ -86,8 +88,10 @@ impl CharacterBehavior for Data {
if let CharacterState::RapidMelee(c) = &mut update.character {
c.timer = tick_attack_or_default(data, self.timer, None);
}
} else if self.current_strike < self.static_data.max_strikes
&& update
} else if match self.static_data.max_strikes {
Some(max) => self.current_strike < max,
None => input_is_pressed(data, self.static_data.ability_info.input),
} && update
.energy
.try_change_by(-self.static_data.energy_cost)
.is_ok()

View File

@ -2,7 +2,7 @@ use common::{
combat::{self, AttackOptions, AttackSource, AttackerInfo, TargetInfo},
comp::{
agent::{Sound, SoundKind},
Alignment, Beam, BeamSegment, Body, CharacterState, Combo, Energy, Group, Health,
Alignment, Beam, BeamSegment, Body, Buffs, CharacterState, Combo, Energy, Group, Health,
Inventory, Ori, Player, Pos, Scale, Stats,
},
event::{EventBus, ServerEvent},
@ -46,6 +46,7 @@ pub struct ReadData<'a> {
stats: ReadStorage<'a, Stats>,
combos: ReadStorage<'a, Combo>,
character_states: ReadStorage<'a, CharacterState>,
buffs: ReadStorage<'a, Buffs>,
}
/// This system is responsible for handling beams that heal or do damage
@ -227,6 +228,7 @@ impl<'a> System<'a> for Sys {
ori: read_data.orientations.get(target),
char_state: read_data.character_states.get(target),
energy: read_data.energies.get(target),
buffs: read_data.buffs.get(target),
};
let target_dodging = read_data

View File

@ -3,8 +3,8 @@ use common::{
comp::{
agent::{Sound, SoundKind},
melee::MultiTarget,
Alignment, Body, CharacterState, Combo, Energy, Group, Health, Inventory, Melee, Ori,
Player, Pos, Scale, Stats,
Alignment, Body, Buffs, CharacterState, Combo, Energy, Group, Health, Inventory, Melee,
Ori, Player, Pos, Scale, Stats,
},
event::{EventBus, ServerEvent},
outcome::Outcome,
@ -44,6 +44,7 @@ pub struct ReadData<'a> {
server_bus: Read<'a, EventBus<ServerEvent>>,
stats: ReadStorage<'a, Stats>,
combos: ReadStorage<'a, Combo>,
buffs: ReadStorage<'a, Buffs>,
}
/// This system is responsible for handling accepted inputs like moving or
@ -202,6 +203,7 @@ impl<'a> System<'a> for Sys {
ori: read_data.orientations.get(target),
char_state: read_data.char_states.get(target),
energy: read_data.energies.get(target),
buffs: read_data.buffs.get(target),
};
// PvP check

View File

@ -2,8 +2,8 @@ use common::{
combat::{self, AttackOptions, AttackSource, AttackerInfo, TargetInfo},
comp::{
agent::{Sound, SoundKind},
projectile, Alignment, Body, CharacterState, Combo, Energy, Group, Health, Inventory, Ori,
PhysicsState, Player, Pos, Projectile, Stats, Vel,
projectile, Alignment, Body, Buffs, CharacterState, Combo, Energy, Group, Health,
Inventory, Ori, PhysicsState, Player, Pos, Projectile, Stats, Vel,
},
event::{Emitter, EventBus, ServerEvent},
outcome::Outcome,
@ -47,6 +47,7 @@ pub struct ReadData<'a> {
bodies: ReadStorage<'a, Body>,
character_states: ReadStorage<'a, CharacterState>,
terrain: ReadExpect<'a, TerrainGrid>,
buffs: ReadStorage<'a, Buffs>,
}
/// This system is responsible for handling projectile effect triggers
@ -309,6 +310,7 @@ fn dispatch_hit(
ori: projectile_target_info.ori,
char_state: read_data.character_states.get(target),
energy: read_data.energies.get(target),
buffs: read_data.buffs.get(target),
};
// TODO: Is it possible to have projectile without body??

View File

@ -2,7 +2,7 @@ use common::{
combat::{self, AttackOptions, AttackSource, AttackerInfo, TargetInfo},
comp::{
agent::{Sound, SoundKind},
Alignment, Body, CharacterState, Combo, Energy, Group, Health, Inventory, Ori,
Alignment, Body, Buffs, CharacterState, Combo, Energy, Group, Health, Inventory, Ori,
PhysicsState, Player, Pos, Scale, Shockwave, ShockwaveHitEntities, Stats,
},
event::{EventBus, ServerEvent},
@ -42,6 +42,7 @@ pub struct ReadData<'a> {
stats: ReadStorage<'a, Stats>,
combos: ReadStorage<'a, Combo>,
character_states: ReadStorage<'a, CharacterState>,
buffs: ReadStorage<'a, Buffs>,
}
/// This system is responsible for handling accepted inputs like moving or
@ -209,6 +210,7 @@ impl<'a> System<'a> for Sys {
ori: read_data.orientations.get(target),
char_state: read_data.character_states.get(target),
energy: read_data.energies.get(target),
buffs: read_data.buffs.get(target),
};
let target_dodging = read_data

View File

@ -864,6 +864,7 @@ pub fn handle_explosion(server: &Server, pos: Vec3<f32>, explosion: Explosion, o
let alignments = &ecs.read_storage::<Alignment>();
let uid_allocator = &ecs.read_resource::<UidAllocator>();
let players = &ecs.read_storage::<Player>();
let buffs = &ecs.read_storage::<comp::Buffs>();
for (
entity_b,
pos_b,
@ -938,6 +939,7 @@ pub fn handle_explosion(server: &Server, pos: Vec3<f32>, explosion: Explosion, o
ori: ori_b_maybe,
char_state: char_state_b_maybe,
energy: energies.get(entity_b),
buffs: buffs.get(entity_b),
};
let target_dodging = char_state_b_maybe

View File

@ -259,11 +259,12 @@ impl Animation for BlockAnimation {
next.second = next.main;
}
},
Some("common.abilities.sword.parrying_parry") => {
let (move1, move2) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powi(2), 0.0),
Some(StageSection::Recover) => (1.0, anim_time.powf(0.5)),
_ => (0.0, 0.0),
Some("common.abilities.sword.defensive_parry") => {
let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powi(2), 0.0, 0.0),
Some(StageSection::Action) => (1.0, (anim_time * 20.0).sin(), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(0.5)),
_ => (0.0, 0.0, 0.0),
};
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
@ -281,16 +282,18 @@ impl Animation for BlockAnimation {
next.belt.orientation = Quaternion::rotation_z(move1 * -0.1);
next.shorts.orientation = Quaternion::rotation_z(move1 * 0.1);
next.control.orientation.rotate_y(move1 * -1.7);
next.control.orientation.rotate_z(move1 * 1.2);
next.control.position += Vec3::new(move1 * 5.0, move1 * 4.0, 0.0);
next.control.orientation.rotate_z(move1 * 0.6);
next.control.position += Vec3::new(move1 * 11.0, move1 * 2.0, move1 * 5.0);
next.chest.orientation.rotate_z(move2 * -0.6);
next.head.orientation.rotate_z(move2 * 0.4);
next.belt.orientation.rotate_z(move2 * 0.2);
next.shorts.orientation.rotate_z(move2 * 0.6);
next.control.position += Vec3::new(move2 * 6.0, 0.0, move2 * 9.0);
next.control.orientation.rotate_z(move2 * -0.5);
next.control.orientation.rotate_y(move2 * 0.6);
next.control.orientation.rotate_y(move2 / 50.0);
next.chest.orientation.rotate_z(move3 * -0.6);
next.head.orientation.rotate_z(move3 * 0.4);
next.belt.orientation.rotate_z(move3 * 0.2);
next.shorts.orientation.rotate_z(move3 * 0.6);
next.control.position += Vec3::new(move3 * 6.0, 0.0, move3 * 9.0);
next.control.orientation.rotate_z(move3 * -0.5);
next.control.orientation.rotate_y(move3 * 0.6);
},
_ => {},
}

View File

@ -43,7 +43,7 @@ impl Animation for ChargeswingAnimation {
next.off_weapon_trail = true;
match ability_id {
Some("common.abilities.sword.balanced_thrust") => {
Some("common.abilities.sword.basic_thrust") => {
let (move1, move2, move3, tension) = match stage_section {
Some(StageSection::Charge) => (
anim_time.powf(0.25).min(1.0),
@ -75,6 +75,159 @@ impl Animation for ChargeswingAnimation {
next.belt.orientation = Quaternion::rotation_z(move1 * -0.25 + move2 * 0.2);
next.shorts.orientation = Quaternion::rotation_z(move1 * -0.5 + move2 * 0.4);
},
Some("common.abilities.sword.heavy_slam") => {
let (move1, move2, move3, tension) = match stage_section {
Some(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),
_ => (0.0, 0.0, 0.0, 0.0),
};
let pullback = 1.0 - move3;
let move1 = move1 * pullback;
let move2 = move2 * pullback;
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
next.hand_l.orientation =
Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4);
next.hand_r.position =
Vec3::new(-s_a.sc.0 + 6.0 + move1 * -12.0, -4.0 + move1 * 3.0, -2.0);
next.control.position = Vec3::new(s_a.sc.0, s_a.sc.1, s_a.sc.2);
next.control.orientation = Quaternion::rotation_x(s_a.sc.3)
* Quaternion::rotation_z(move1 * 0.3 + move2 * -0.7);
next.control
.orientation
.rotate_x(move1 * 1.4 + tension / 50.0);
next.control.position +=
Vec3::new(move1 * -1.0, move1 * 2.0, move1 * 8.0) + Vec3::one() * tension / 4.0;
next.chest.orientation = Quaternion::rotation_z(move1 * 0.4 + tension / 50.0);
if move2 < f32::EPSILON {
next.main_weapon_trail = false;
next.off_weapon_trail = false;
}
next.control.orientation.rotate_x(move2 * -3.0);
next.control.orientation.rotate_z(move2 * -0.4);
next.control.position += Vec3::new(move2 * 10.0, 0.0, move2 * -10.0);
next.chest.orientation.rotate_z(move2 * -0.6);
},
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) => {
(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),
_ => (0.0, 0.0, 0.0, 0.0, 0.0),
};
let move1pre = move1.min(0.5) * 2.0;
let move1post = move1.max(0.5) * 2.0 - 1.0;
let pullback = 1.0 - move4;
let move1pre = move1pre * pullback;
let move1post = move1post * pullback;
let move2 = move2 * pullback;
let move3 = move3 * pullback;
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
next.hand_l.orientation =
Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4);
next.hand_r.position =
Vec3::new(-s_a.sc.0 + 6.0 + move1 * -12.0, -4.0 + move1 * 3.0, -2.0);
next.hand_r.orientation = Quaternion::rotation_x(0.9 + move1pre * 0.5);
next.control.position = Vec3::new(s_a.sc.0, s_a.sc.1, s_a.sc.2);
next.control.orientation =
Quaternion::rotation_x(s_a.sc.3) * Quaternion::rotation_z(move1pre * PI / 2.0);
next.foot_r.position += Vec3::new(0.0, move1pre * -3.0, 0.0);
next.foot_r.orientation.rotate_z(move1pre * -1.2);
next.chest.orientation = Quaternion::rotation_z(move1pre * -1.3);
next.head.orientation = Quaternion::rotation_z(move1pre * 0.7);
next.belt.orientation = Quaternion::rotation_z(move1pre * 0.4);
next.shorts.orientation = Quaternion::rotation_z(move1pre * 0.8);
next.control.orientation.rotate_y(move1pre * -1.5);
next.control.orientation.rotate_z(move1pre * 0.0);
next.control.position += Vec3::new(move1pre * 12.0, 0.0, 0.0);
next.chest.orientation.rotate_z(move1post * 1.2);
next.head.orientation.rotate_z(move1post * -0.7);
next.belt.orientation.rotate_z(move1post * -0.3);
next.shorts.orientation.rotate_z(move1post * -0.8);
next.foot_r.orientation.rotate_z(move1post * 1.2);
next.foot_r.orientation.rotate_x(move1post * -0.6);
next.control.orientation.rotate_z(move1post * -1.2);
next.control.position += Vec3::new(0.0, move1post * 4.0, move1post * 3.0);
next.control
.orientation
.rotate_y(move2 * -2.0 + tension / 10.0);
next.chest.orientation.rotate_z(move2 * -0.4 + move3 * -1.4);
next.control
.orientation
.rotate_z(move2 * 0.3 + move3 * -1.2);
next.head.orientation.rotate_z(move2 * 0.2 + move3 * 0.7);
next.belt.orientation.rotate_z(move3 * 0.3);
next.shorts.orientation.rotate_z(move2 * 0.2 + move3 * 0.7);
next.chest
.orientation
.rotate_y(move2 * -0.3 - tension / 100.0);
next.foot_r.orientation.rotate_z(move3 * -1.5);
},
Some("common.abilities.sword.cleaving_spiral_slash") => {
let (move1, tension, move2, move3) = match stage_section {
Some(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),
_ => (0.0, 0.0, 0.0, 0.0),
};
let pullback = 1.0 - move3;
let move2_no_pullback = move2;
let move2_pre = move2.min(0.3) * 10.0 / 3.0;
let move1 = move1 * pullback;
let move2 = move2 * pullback;
let move2_pre = move2_pre * pullback;
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
next.hand_l.orientation =
Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4);
next.hand_r.position =
Vec3::new(-s_a.sc.0 + 6.0 + move1 * -12.0, -4.0 + move1 * 3.0, -2.0);
next.hand_r.orientation = Quaternion::rotation_x(0.9 + move1 * 0.5);
next.control.position = Vec3::new(s_a.sc.0, s_a.sc.1, s_a.sc.2);
next.control.orientation = Quaternion::rotation_x(s_a.sc.3);
next.chest.orientation = Quaternion::rotation_z(move1 * 1.2 + tension / 50.0);
next.head.orientation = Quaternion::rotation_z(move1 * -0.7);
next.belt.orientation = Quaternion::rotation_z(move1 * -0.3);
next.shorts.orientation = Quaternion::rotation_z(move1 * -0.8);
next.control.orientation.rotate_x(move1 * 0.2);
next.foot_r
.orientation
.rotate_x(move1 * -0.4 + move2_pre * 0.4);
next.foot_r.orientation.rotate_z(move1 * 1.4);
next.control.orientation.rotate_y(move2_pre * -1.6);
next.control.position += Vec3::new(0.0, 0.0, move2_pre * 4.0);
next.torso.orientation.rotate_z(move2_no_pullback * -6.28);
next.chest.orientation.rotate_z(move2 * -2.0);
next.head.orientation.rotate_z(move2 * 1.3);
next.belt.orientation.rotate_z(move2 * 0.6);
next.shorts.orientation.rotate_z(move2 * 1.5);
next.foot_r.orientation.rotate_z(move2_pre * -1.7);
next.control.orientation.rotate_z(move2 * -1.8);
next.control.position += Vec3::new(move2 * 14.0, 0.0, 0.0);
},
_ => {
let lab: f32 = 1.0;

View File

@ -493,69 +493,6 @@ impl Animation for ComboAnimation {
_ => {},
}
},
Some("common.abilities.sword.crippling_combo") => {
let (move1, move2) = if strike == current_strike {
match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0),
Some(StageSection::Action) => (1.0, anim_time),
Some(StageSection::Recover) => (1.0, 1.0),
_ => (0.0, 0.0),
}
} else {
(1.0, 1.0)
};
let move1 = move1 * multi_strike_pullback;
let move2 = move2 * multi_strike_pullback;
match strike {
0 => {
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
next.hand_l.orientation = Quaternion::rotation_x(s_a.shl.3)
* Quaternion::rotation_y(s_a.shl.4);
next.hand_r.position = Vec3::new(
-s_a.sc.0 + 6.0 + move1 * -12.0,
-4.0 + move1 * 3.0,
-2.0,
);
next.hand_r.orientation = Quaternion::rotation_x(0.9 + move1 * 0.5);
next.control.position = Vec3::new(s_a.sc.0, s_a.sc.1, s_a.sc.2);
next.control.orientation = Quaternion::rotation_x(s_a.sc.3)
* Quaternion::rotation_z(move1 * PI / 2.0);
next.foot_r.position += Vec3::new(0.0, move1 * -3.0, 0.0);
next.foot_r.orientation.rotate_z(move1 * -1.2);
next.chest.orientation = Quaternion::rotation_z(move1 * -1.3);
next.head.orientation = Quaternion::rotation_z(move1 * 0.7);
next.belt.orientation = Quaternion::rotation_z(move1 * 0.4);
next.shorts.orientation = Quaternion::rotation_z(move1 * 0.8);
next.control.orientation.rotate_y(move1 * -1.5);
next.control.orientation.rotate_z(move1 * 0.0);
next.control.position += Vec3::new(move1 * 12.0, 0.0, 0.0);
next.chest.orientation.rotate_z(move2 * 1.2);
next.head.orientation.rotate_z(move2 * -0.7);
next.belt.orientation.rotate_z(move2 * -0.3);
next.shorts.orientation.rotate_z(move2 * -0.8);
next.foot_r.orientation.rotate_z(move2 * 1.2);
next.foot_r.orientation.rotate_x(move2 * -0.6);
next.control.orientation.rotate_z(move2 * -1.2);
next.control.position += Vec3::new(0.0, move2 * 4.0, move2 * 3.0);
},
1 => {
next.control.orientation.rotate_y(move1 * -2.0);
next.chest.orientation.rotate_z(move1 * -0.4 + move2 * -1.4);
next.control
.orientation
.rotate_z(move1 * 0.3 + move2 * -1.2);
next.head.orientation.rotate_z(move1 * 0.2 + move2 * 0.7);
next.belt.orientation.rotate_z(move2 * 0.3);
next.shorts.orientation.rotate_z(move1 * 0.2 + move2 * 0.7);
next.chest.orientation.rotate_y(move1 * -0.3);
next.foot_r.orientation.rotate_z(move2 * -1.5);
},
_ => {},
}
},
Some("common.abilities.sword.cleaving_combo") => {
let (move1, move2) = if strike == current_strike {
match stage_section {

View File

@ -10,7 +10,7 @@ impl Animation for RapidMeleeAnimation {
type Dependency<'a> = (
Option<&'a str>,
Option<StageSection>,
(u32, u32),
(u32, Option<u32>),
Option<AbilityInfo>,
);
type Skeleton = CharacterSkeleton;
@ -41,7 +41,7 @@ impl Animation for RapidMeleeAnimation {
match ability_id {
Some("common.abilities.sword.cleaving_whirlwind_slice") => {
let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
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.powi(4)),
_ => (0.0, 0.0, 0.0),
@ -49,11 +49,7 @@ impl Animation for RapidMeleeAnimation {
let pullback = 1.0 - move3;
let move2_no_pullback = move2 + current_strike as f32;
let move2 = if current_strike == 0 {
move2
} else {
1.0
};
let move2 = if current_strike == 0 { move2 } else { 1.0 };
let move2_pre = move2.min(0.3) * 10.0 / 3.0;
let move1 = move1 * pullback;
let move2 = move2 * pullback;
@ -62,12 +58,16 @@ impl Animation for RapidMeleeAnimation {
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
next.hand_l.orientation =
Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4);
next.hand_r.position =
Vec3::new(-s_a.sc.0 + 6.0 + move1 * -12.0, -4.0 + move1 * 3.0, -2.0);
next.hand_r.orientation = Quaternion::rotation_x(0.9 + move1 * 0.5);
next.hand_r.position = Vec3::new(-s_a.sc.0 + -6.0, -1.0, -2.0);
next.hand_r.orientation = Quaternion::rotation_x(1.4);
next.control.position = Vec3::new(s_a.sc.0, s_a.sc.1, s_a.sc.2);
next.control.orientation = Quaternion::rotation_x(s_a.sc.3);
next.control.orientation =
Quaternion::rotation_x(s_a.sc.3) * Quaternion::rotation_z(move1 * 3.14);
if move2 < f32::EPSILON {
next.main_weapon_trail = false;
next.off_weapon_trail = false;
}
next.chest.orientation = Quaternion::rotation_z(move1 * 1.2);
next.head.orientation = Quaternion::rotation_z(move1 * -0.7);
next.belt.orientation = Quaternion::rotation_z(move1 * -0.3);
@ -80,7 +80,7 @@ impl Animation for RapidMeleeAnimation {
next.control.orientation.rotate_y(move2_pre * -1.6);
next.control.position += Vec3::new(0.0, 0.0, move2_pre * 4.0);
next.torso.orientation.rotate_z(move2_no_pullback * -6.28);
next.torso.orientation.rotate_z(move2_no_pullback * 6.28);
next.chest.orientation.rotate_z(move2 * -2.0);
next.head.orientation.rotate_z(move2 * 1.3);
next.belt.orientation.rotate_z(move2 * 0.6);
@ -89,7 +89,7 @@ impl Animation for RapidMeleeAnimation {
next.control.orientation.rotate_z(move2 * -1.8);
next.control.position += Vec3::new(move2 * 14.0, 0.0, 0.0);
},
Some("common.abilities.sword.reaching_flurry") => {
Some("common.abilities.sword.agile_perforate") => {
let (move1, move2, move3, move2alt) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0),
Some(StageSection::Action) => (
@ -128,10 +128,6 @@ impl Animation for RapidMeleeAnimation {
next.shorts.orientation.rotate_z(move2 * 0.7);
next.control.orientation.rotate_z(move2 * 1.2);
next.control.position += Vec3::new(0.0, move2 * 12.0, 0.0);
if current_strike == max_strikes {
next.control.position += Vec3::new(move2alt * -6.0, move2alt * -6.0, 0.0);
}
},
_ => {},
}

View File

@ -1334,6 +1334,13 @@ impl FigureMgr {
let stage_time = s.timer.as_secs_f32();
let stage_progress = match s.stage_section {
StageSection::Buildup => {
if let Some((dur, _)) = s.static_data.buildup_strike {
stage_time / dur.as_secs_f32()
} else {
stage_time
}
},
StageSection::Charge => {
stage_time / s.static_data.charge_duration.as_secs_f32()
},
@ -2763,6 +2770,13 @@ impl FigureMgr {
let stage_time = s.timer.as_secs_f32();
let stage_progress = match s.stage_section {
StageSection::Buildup => {
if let Some((dur, _)) = s.static_data.buildup_strike {
stage_time / dur.as_secs_f32()
} else {
stage_time
}
},
StageSection::Charge => {
stage_time / s.static_data.charge_duration.as_secs_f32()
},
@ -4994,6 +5008,13 @@ impl FigureMgr {
let stage_time = s.timer.as_secs_f32();
let stage_progress = match s.stage_section {
StageSection::Buildup => {
if let Some((dur, _)) = s.static_data.buildup_strike {
stage_time / dur.as_secs_f32()
} else {
stage_time
}
},
StageSection::Charge => {
stage_time / s.static_data.charge_duration.as_secs_f32()
},