Merge branch 'develop' into release/0.3.0

This commit is contained in:
ntr
2019-08-26 18:43:41 +10:00
4 changed files with 11 additions and 18 deletions
-16
View File
@@ -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;
}
+3
View File
@@ -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() {
+5
View File
@@ -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);
};