From fc8bb427fb626d52c1c6644458f1d3c48efbf6a9 Mon Sep 17 00:00:00 2001 From: Shane Handley Date: Mon, 4 May 2020 21:12:32 +1000 Subject: [PATCH] Handle TripleStrike stages individually. --- assets/voxygen/audio/sfx.ron | 28 ++++++++++++++++++++++------ common/src/comp/ability.rs | 8 ++++---- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/assets/voxygen/audio/sfx.ron b/assets/voxygen/audio/sfx.ron index 9448f4e801..a7512238f3 100644 --- a/assets/voxygen/audio/sfx.ron +++ b/assets/voxygen/audio/sfx.ron @@ -32,13 +32,30 @@ ], threshold: 1.2, ), - Attack(TripleStrike, Sword): ( + Attack(TripleStrike(First), Sword): ( files: [ - "voxygen.audio.sfx.weapon.sword_triple_strike_01", - "voxygen.audio.sfx.weapon.sword_triple_strike_02", - "voxygen.audio.sfx.weapon.sword_triple_strike_03", + "voxygen.audio.sfx.weapon.whoosh_normal_01", + "voxygen.audio.sfx.weapon.whoosh_normal_02", + "voxygen.audio.sfx.weapon.whoosh_normal_03", + "voxygen.audio.sfx.weapon.whoosh_normal_04", ], - threshold: 0.8, + threshold: 0.5, + ), + Attack(TripleStrike(Second), Sword): ( + files: [ + "voxygen.audio.sfx.weapon.whoosh_low_01", + "voxygen.audio.sfx.weapon.whoosh_low_02", + "voxygen.audio.sfx.weapon.whoosh_low_03", + ], + threshold: 0.5, + ), + Attack(TripleStrike(Third), Sword): ( + files: [ + "voxygen.audio.sfx.weapon.whoosh_low_01", + "voxygen.audio.sfx.weapon.whoosh_low_02", + "voxygen.audio.sfx.weapon.whoosh_low_03", + ], + threshold: 0.5, ), Attack(BasicRanged, Bow): ( files: [ @@ -76,7 +93,6 @@ ], threshold: 0.5, ), - Inventory(Collected): ( files: [ "voxygen.audio.sfx.inventory.add_item", diff --git a/common/src/comp/ability.rs b/common/src/comp/ability.rs index 8f535eaa33..7673123e86 100644 --- a/common/src/comp/ability.rs +++ b/common/src/comp/ability.rs @@ -1,7 +1,7 @@ use crate::{ comp::{ - item::Item, Body, CharacterState, EnergySource, Gravity, LightEmitter, Projectile, - StateUpdate, + ability::Stage, item::Item, Body, CharacterState, EnergySource, Gravity, LightEmitter, + Projectile, StateUpdate, }, states::{triple_strike::*, *}, sys::character_behavior::JoinData, @@ -17,7 +17,7 @@ pub enum CharacterAbilityType { Boost, DashMelee, BasicBlock, - TripleStrike, + TripleStrike(Stage), } impl From<&CharacterState> for CharacterAbilityType { @@ -28,7 +28,7 @@ impl From<&CharacterState> for CharacterAbilityType { CharacterState::Boost(_) => Self::Boost, CharacterState::DashMelee(_) => Self::DashMelee, CharacterState::BasicBlock => Self::BasicBlock, - CharacterState::TripleStrike(_) => Self::TripleStrike, + CharacterState::TripleStrike(data) => Self::TripleStrike(data.stage), _ => Self::BasicMelee, } }