diff --git a/assets/common/abilities/sword/spin.ron b/assets/common/abilities/sword/spin.ron index a0cef50ca7..171d2ec2d2 100644 --- a/assets/common/abilities/sword/spin.ron +++ b/assets/common/abilities/sword/spin.ron @@ -1,5 +1,5 @@ SpinMelee( - buildup_duration: 0.6, + buildup_duration: 0.35, swing_duration: 0.4, recover_duration: 0.5, base_damage: 160, diff --git a/common/src/combat.rs b/common/src/combat.rs index 031b04d91d..f761f9d751 100644 --- a/common/src/combat.rs +++ b/common/src/combat.rs @@ -131,11 +131,12 @@ impl Attack { { if ori.look_vec().angle_between(-*dir) < data.static_data.max_angle.to_radians() { + let parry = matches!(data.stage_section, StageSection::Buildup); emit_outcome(Outcome::Block { - parry: data.parry, + parry, pos: target.pos, }); - if data.parry && matches!(data.stage_section, StageSection::Buildup) { + if parry { 1.0 } else { data.static_data.block_strength diff --git a/common/src/comp/ability.rs b/common/src/comp/ability.rs index 36c4f720ea..7e55976bb1 100644 --- a/common/src/comp/ability.rs +++ b/common/src/comp/ability.rs @@ -1277,7 +1277,6 @@ impl From<(&CharacterAbility, AbilityInfo)> for CharacterState { }, timer: Duration::default(), stage_section: StageSection::Buildup, - parry: false, }), CharacterAbility::Roll { energy_cost: _, diff --git a/common/src/states/basic_block.rs b/common/src/states/basic_block.rs index 4ecb58802b..dffe356fe8 100644 --- a/common/src/states/basic_block.rs +++ b/common/src/states/basic_block.rs @@ -30,8 +30,6 @@ pub struct Data { pub timer: Duration, /// What section the character stage is in pub stage_section: StageSection, - /// Whether the block was cancelled early enough to become a parry - pub parry: bool, } impl CharacterBehavior for Data { @@ -49,18 +47,13 @@ impl CharacterBehavior for Data { .timer .checked_add(Duration::from_secs_f32(data.dt.0)) .unwrap_or_default(), - parry: self.parry || !input_is_pressed(data, InputKind::Block), ..*self }); } else { // Transitions to swing section of stage update.character = CharacterState::BasicBlock(Data { timer: Duration::default(), - stage_section: if self.parry { - StageSection::Recover - } else { - StageSection::Swing - }, + stage_section: StageSection::Swing, ..*self }); } diff --git a/voxygen/src/audio/sfx/mod.rs b/voxygen/src/audio/sfx/mod.rs index c5df2925b2..2ada3b1cf1 100644 --- a/voxygen/src/audio/sfx/mod.rs +++ b/voxygen/src/audio/sfx/mod.rs @@ -429,8 +429,7 @@ impl SfxMgr { ][rand::thread_rng().gen_range(1..2)]; if *parry { audio.play_sfx(file_ref_parry, *pos, Some(2.0)); - } - else { + } else { audio.play_sfx(file_ref_block, *pos, Some(2.0)); } },