diff options
author | Daniel Schadt <kingdread@gmx.de> | 2018-07-07 03:23:25 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2018-07-07 03:23:25 +0200 |
commit | 22051473844bddb60c8c062f511fd4b1f90d48bd (patch) | |
tree | 8001a9ff97ae7d065c2e6c56cf5fe5a98d44e6b4 /src/statistics/gamedata.rs | |
parent | 4ea1d4f3e5082925874a271d14cc143ebf80912f (diff) | |
download | evtclib-22051473844bddb60c8c062f511fd4b1f90d48bd.tar.gz evtclib-22051473844bddb60c8c062f511fd4b1f90d48bd.tar.bz2 evtclib-22051473844bddb60c8c062f511fd4b1f90d48bd.zip |
base for mechanic tracking
Diffstat (limited to 'src/statistics/gamedata.rs')
-rw-r--r-- | src/statistics/gamedata.rs | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/statistics/gamedata.rs b/src/statistics/gamedata.rs index 1b5fec6..3bd895e 100644 --- a/src/statistics/gamedata.rs +++ b/src/statistics/gamedata.rs @@ -13,6 +13,8 @@ pub enum Boss { /// second phase. This agent will have another ID, see /// [`XERA_PHASE2_ID`](constant.XERA_PHASE2_ID.html). Xera = 0x3F76, + + Samarog = 0x4324, } /// ID for Xera in the second phase. @@ -112,15 +114,23 @@ pub enum Trigger { pub struct Mechanic(pub u16, pub Trigger, pub &'static str); macro_rules! mechanics { - ($boss_id:expr => [ $($name:expr => $trigger:expr,)* ]) => { - $(Mechanic($boss_id as u16, $trigger, $name)),* + ( $( $boss_id:expr => [ $($name:expr => $trigger:expr,)* ], )* ) => { + &[ + $( $(Mechanic($boss_id as u16, $trigger, $name)),* ),* + ] } } /// A slice of all mechanics that we know about. -pub static MECHANICS: &[Mechanic] = &[mechanics! { Boss::ValeGuardian => [ - "Unstable Magic Spike" => Trigger::SkillOnPlayer(31860), -]}]; +pub static MECHANICS: &[Mechanic] = mechanics! { + Boss::ValeGuardian => [ + "Unstable Magic Spike" => Trigger::SkillOnPlayer(31860), + ], + Boss::Samarog => [ + "Prisoner Sweep" => Trigger::SkillOnPlayer(38168), + "Shockwave" => Trigger::SkillOnPlayer(37996), + ], +}; /// Get all mechanics that belong to the given boss. pub fn get_mechanics(boss_id: u16) -> Vec<&'static Mechanic> { |