diff --git a/WORKLOG.md b/WORKLOG.md index a2ff9398..bb9934a4 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -24,8 +24,9 @@ * make our own toasts / msg pane * send account_instances on players update -* only clear effects on post_resolve - electrify doesn't work if you ko the construct +* convert PlusPlus to ++ or rename +* clear skill (if currently targetted) +* increase power to speed up early rounds ## SOON *SERVER* diff --git a/server/src/construct.rs b/server/src/construct.rs index 884da671..652acb1b 100644 --- a/server/src/construct.rs +++ b/server/src/construct.rs @@ -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; } diff --git a/server/src/game.rs b/server/src/game.rs index 6cdeda4c..2c64d05f 100644 --- a/server/src/game.rs +++ b/server/src/game.rs @@ -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() { diff --git a/server/src/skill.rs b/server/src/skill.rs index 97cbeacb..e00d86e9 100644 --- a/server/src/skill.rs +++ b/server/src/skill.rs @@ -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); };