Handle TripleStrike stages individually.

This commit is contained in:
Shane Handley 2020-05-04 21:12:32 +10:00
parent afc6d2ab13
commit 337c277a6b
2 changed files with 26 additions and 10 deletions

View File

@ -32,13 +32,30 @@
], ],
threshold: 1.2, threshold: 1.2,
), ),
Attack(TripleStrike, Sword): ( Attack(TripleStrike(First), Sword): (
files: [ files: [
"voxygen.audio.sfx.weapon.sword_triple_strike_01", "voxygen.audio.sfx.weapon.whoosh_normal_01",
"voxygen.audio.sfx.weapon.sword_triple_strike_02", "voxygen.audio.sfx.weapon.whoosh_normal_02",
"voxygen.audio.sfx.weapon.sword_triple_strike_03", "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): ( Attack(BasicRanged, Bow): (
files: [ files: [
@ -76,7 +93,6 @@
], ],
threshold: 0.5, threshold: 0.5,
), ),
Inventory(Collected): ( Inventory(Collected): (
files: [ files: [
"voxygen.audio.sfx.inventory.add_item", "voxygen.audio.sfx.inventory.add_item",

View File

@ -1,7 +1,7 @@
use crate::{ use crate::{
comp::{ comp::{
item::Item, Body, CharacterState, EnergySource, Gravity, LightEmitter, Projectile, ability::Stage, item::Item, Body, CharacterState, EnergySource, Gravity, LightEmitter,
StateUpdate, Projectile, StateUpdate,
}, },
states::{triple_strike::*, *}, states::{triple_strike::*, *},
sys::character_behavior::JoinData, sys::character_behavior::JoinData,
@ -17,7 +17,7 @@ pub enum CharacterAbilityType {
Boost, Boost,
DashMelee, DashMelee,
BasicBlock, BasicBlock,
TripleStrike, TripleStrike(Stage),
} }
impl From<&CharacterState> for CharacterAbilityType { impl From<&CharacterState> for CharacterAbilityType {
@ -28,7 +28,7 @@ impl From<&CharacterState> for CharacterAbilityType {
CharacterState::Boost(_) => Self::Boost, CharacterState::Boost(_) => Self::Boost,
CharacterState::DashMelee(_) => Self::DashMelee, CharacterState::DashMelee(_) => Self::DashMelee,
CharacterState::BasicBlock => Self::BasicBlock, CharacterState::BasicBlock => Self::BasicBlock,
CharacterState::TripleStrike(_) => Self::TripleStrike, CharacterState::TripleStrike(data) => Self::TripleStrike(data.stage),
_ => Self::BasicMelee, _ => Self::BasicMelee,
} }
} }