post_resolve
This commit is contained in:
parent
c99f189c69
commit
b6ce6a5277
@ -299,8 +299,8 @@ pub fn resolve(skill: Skill, source: &mut Construct, target: &mut Construct, mut
|
||||
}
|
||||
|
||||
fn post_resolve(_skill: Skill, game: &mut Game, mut resolutions: Resolutions) -> Resolutions {
|
||||
for Resolution { source, target: event_target, event, stages: _ } in resolutions.clone() {
|
||||
let mut source = game.construct_by_id(source.id).unwrap().clone();
|
||||
for Resolution { source: event_source, target: event_target, event, stages: _ } in resolutions.clone() {
|
||||
let mut source = game.construct_by_id(event_source.id).unwrap().clone();
|
||||
let mut target = game.construct_by_id(event_target.id).unwrap().clone();
|
||||
|
||||
match event {
|
||||
@ -353,7 +353,7 @@ fn post_resolve(_skill: Skill, game: &mut Game, mut resolutions: Resolutions) ->
|
||||
};
|
||||
|
||||
if target.is_ko() && event_target.green == 0 {
|
||||
// Check target is actually ko if sending ko event
|
||||
// Make sure target ko is from this event
|
||||
target.effects.clear();
|
||||
resolutions.push(Resolution::new(&source, &target).event(Event::Ko()).stages(EventStages::PostOnly));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user