clear effects on ko

This commit is contained in:
ntr 2019-12-11 18:36:23 +10:00
parent fb78e7cfae
commit 145302d8da
2 changed files with 16 additions and 1 deletions

View File

@ -588,7 +588,10 @@ impl Game {
let casts = match event {
Event::Damage { construct, colour, amount, mitigation, display: _ } =>
self.construct_by_id(*construct).unwrap().damage_trigger_casts(cast, event),
// Event::Ko {} => recalculate_stats()
Event::Ko { construct } =>{
self.construct_by_id(*construct).unwrap().effects.clear();
vec![]
},
// Event::Cast {} => set_cooldown()
_ => vec![],
};

View File

@ -751,6 +751,10 @@ impl Cast {
colour: Colour::Blue,
values: vec![Value::Stat { construct: self.source, stat: Stat::BluePower, mult: self.skill.multiplier() }],
},
Action::Effect {
construct: self.target,
effect: ConstructEffect { effect: Effect::Siphoned, duration: 1, meta: None }, // immunity to additional ticks
},
Action::Heal {
construct: self.source,
colour: Colour::Green,
@ -768,6 +772,10 @@ impl Cast {
colour: Colour::Blue,
values: vec![Value::Stat { construct: self.source, stat: Stat::BluePower, mult: self.skill.multiplier() }],
},
Action::Effect {
construct: self.target,
effect: ConstructEffect { effect: Effect::Siphoned, duration: 1, meta: None }, // immunity to additional ticks
},
Action::Heal {
construct: self.source,
colour: Colour::Green,
@ -785,6 +793,10 @@ impl Cast {
colour: Colour::Blue,
values: vec![Value::Stat { construct: self.source, stat: Stat::BluePower, mult: self.skill.multiplier() }],
},
Action::Effect {
construct: self.target,
effect: ConstructEffect { effect: Effect::Siphoned, duration: 1, meta: None }, // immunity to additional ticks
},
Action::Heal {
construct: self.source,
colour: Colour::Green,