From 9f6f3db682ab927fef4f1399d13c4cfc91313f82 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Thu, 14 Jun 2018 17:26:23 +0200 Subject: deal with multiple boss agents Exemplary done with Xera. --- src/statistics/gamedata.rs | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'src/statistics') diff --git a/src/statistics/gamedata.rs b/src/statistics/gamedata.rs index ea1be39..1b5fec6 100644 --- a/src/statistics/gamedata.rs +++ b/src/statistics/gamedata.rs @@ -5,9 +5,24 @@ use super::boon::{BoonQueue, BoonType}; /// Enum containing all bosses with their IDs. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum Boss { - ValeGuardian = 15483, + ValeGuardian = 0x3C4E, + + /// Xera ID for phase 1. + /// + /// This is only half of Xera's ID, as there will be a second agent for the + /// second phase. This agent will have another ID, see + /// [`XERA_PHASE2_ID`](constant.XERA_PHASE2_ID.html). + Xera = 0x3F76, } +/// ID for Xera in the second phase. +/// +/// The original Xera will despawn, and after the tower phase, a separate spawn +/// will take over. This new Xera will have this ID. Care needs to be taken when +/// calculating boss damage on this encounter, as both Xeras have to be taken +/// into account. +pub const XERA_PHASE2_ID: u16 = 0x3F9E; + /// Contains a boon. /// /// Fields: @@ -103,11 +118,9 @@ macro_rules! mechanics { } /// 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), +]}]; /// Get all mechanics that belong to the given boss. pub fn get_mechanics(boss_id: u16) -> Vec<&'static Mechanic> { -- cgit v1.2.3