consolidate display construct
This commit is contained in:
parent
d53d14233a
commit
fc721c9ac5
@ -595,7 +595,7 @@ impl Construct {
|
||||
amount: red_damage_amount,
|
||||
mitigation: red_mitigation,
|
||||
colour: Colour::Red,
|
||||
stats: EventConstruct::new(self),
|
||||
display: EventConstruct::new(self),
|
||||
}, self.id));
|
||||
}
|
||||
|
||||
@ -624,7 +624,7 @@ impl Construct {
|
||||
amount: blue_damage_amount,
|
||||
mitigation: blue_mitigation,
|
||||
colour: Colour::Blue,
|
||||
stats: EventConstruct::new(self),
|
||||
display: EventConstruct::new(self),
|
||||
}, self.id));
|
||||
}
|
||||
}
|
||||
@ -670,7 +670,7 @@ impl Construct {
|
||||
amount: delta,
|
||||
mitigation: 0,
|
||||
colour: Colour::Green,
|
||||
stats: EventConstruct::new(self),
|
||||
display: EventConstruct::new(self),
|
||||
}, self.id));
|
||||
}
|
||||
}
|
||||
@ -713,7 +713,7 @@ impl Construct {
|
||||
amount: delta,
|
||||
mitigation,
|
||||
colour: Colour::Red,
|
||||
stats: EventConstruct::new(self),
|
||||
display: EventConstruct::new(self),
|
||||
},
|
||||
self.id
|
||||
));
|
||||
@ -779,7 +779,7 @@ impl Construct {
|
||||
amount: delta,
|
||||
mitigation,
|
||||
colour: Colour::Blue,
|
||||
stats: EventConstruct::new(self),
|
||||
display: EventConstruct::new(self),
|
||||
}, self.id));
|
||||
},
|
||||
true => {
|
||||
@ -835,7 +835,7 @@ impl Construct {
|
||||
EventVariant::Effect {
|
||||
effect: effect.effect,
|
||||
duration: effect.duration,
|
||||
construct_effects: self.effects.clone(),
|
||||
display: EventConstruct::new(self),
|
||||
}, self.id
|
||||
);
|
||||
|
||||
|
||||
@ -249,8 +249,11 @@ impl Event {
|
||||
#[derive(Debug,Clone,PartialEq,Serialize,Deserialize)]
|
||||
pub enum EventVariant {
|
||||
Hit { skill: Skill },
|
||||
Damage { amount: usize, mitigation: usize, colour: Colour, stats: EventConstruct },
|
||||
Effect { effect: Effect, duration: u8, construct_effects: Vec<ConstructEffect> },
|
||||
|
||||
Damage { amount: usize, mitigation: usize, colour: Colour, display: EventConstruct },
|
||||
Effect { effect: Effect, duration: u8, display: EventConstruct },
|
||||
Removal { effect: Option<Effect>, display: EventConstruct },
|
||||
|
||||
Disable { disable: Disable },
|
||||
Healing { amount: usize, overhealing: usize },
|
||||
Recharge { red: usize, blue: usize },
|
||||
@ -258,7 +261,6 @@ pub enum EventVariant {
|
||||
Reflection { skill: Skill },
|
||||
AoeSkill { skill: Skill },
|
||||
Skill { skill: Skill },
|
||||
Removal { effect: Option<Effect>, construct_effects: Vec<ConstructEffect> },
|
||||
TargetKo { skill: Skill },
|
||||
// skill not necessary but makes it neater as all events are arrays in js
|
||||
Ko (),
|
||||
@ -276,7 +278,7 @@ impl EventVariant {
|
||||
match self {
|
||||
EventVariant::Disable { disable: _}
|
||||
=> EventStages::PostOnly,
|
||||
EventVariant::Damage { amount: _, mitigation: _, colour: _, stats: _ }
|
||||
EventVariant::Damage { amount: _, mitigation: _, colour: _, display: _ }
|
||||
=> EventStages::PostOnly,
|
||||
EventVariant::Healing { amount: _, overhealing: _}
|
||||
=> EventStages::PostOnly,
|
||||
@ -290,9 +292,9 @@ impl EventVariant {
|
||||
=> EventStages::PostOnly,
|
||||
EventVariant::Skill { skill: _ }
|
||||
=> EventStages::PostOnly,
|
||||
EventVariant::Effect { effect: _, duration: _, construct_effects: _ }
|
||||
EventVariant::Effect { effect: _, duration: _, display: _ }
|
||||
=> EventStages::PostOnly,
|
||||
EventVariant::Removal { effect: _, construct_effects: _ }
|
||||
EventVariant::Removal { effect: _, display: _ }
|
||||
=> EventStages::PostOnly,
|
||||
EventVariant::TargetKo { skill: _ }
|
||||
=> EventStages::PostOnly,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user