fix ko electrify (effect removal in post effect)
This commit is contained in:
parent
a06f3a75ae
commit
d995e936ad
@ -599,11 +599,6 @@ impl Construct {
|
||||
}
|
||||
}
|
||||
|
||||
if self.is_ko() {
|
||||
events.push(Event::Ko ());
|
||||
self.effects.clear();
|
||||
}
|
||||
|
||||
return events;
|
||||
}
|
||||
|
||||
@ -677,12 +672,6 @@ impl Construct {
|
||||
}
|
||||
};
|
||||
|
||||
if self.is_ko() {
|
||||
events.push(Event::Ko ());
|
||||
self.effects.clear();
|
||||
}
|
||||
|
||||
|
||||
return events;
|
||||
}
|
||||
|
||||
@ -752,11 +741,6 @@ impl Construct {
|
||||
}
|
||||
};
|
||||
|
||||
if self.is_ko() {
|
||||
events.push(Event::Ko ());
|
||||
self.effects.clear();
|
||||
}
|
||||
|
||||
return events;
|
||||
}
|
||||
|
||||
|
||||
@ -1165,6 +1165,9 @@ mod tests {
|
||||
let x_construct = x_player.constructs[0].clone();
|
||||
let y_construct = y_player.constructs[0].clone();
|
||||
|
||||
// one shot the target construct (should still get debuffed)
|
||||
game.player_by_id(y_player.id).unwrap().construct_by_id(y_construct.id).unwrap().red_power.force(1000000000);
|
||||
|
||||
game.construct_by_id(x_construct.id).unwrap().learn_mut(Skill::Electrify);
|
||||
|
||||
while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::Electrify).is_some() {
|
||||
|
||||
@ -344,6 +344,11 @@ fn post_resolve(_skill: Skill, game: &mut Game, mut resolutions: Resolutions) ->
|
||||
_ => (),
|
||||
};
|
||||
|
||||
if target.is_ko() {
|
||||
resolutions.push(Resolution::new(&source, &target).event(Event::Ko()));
|
||||
target.effects.clear();
|
||||
}
|
||||
|
||||
game.update_construct(&mut source);
|
||||
game.update_construct(&mut target);
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user