only send ko event if theres damage

This commit is contained in:
Mashy 2019-11-15 11:22:05 +10:00
parent 9acb2229a8
commit fbae8f71eb

View File

@ -348,15 +348,16 @@ fn post_resolve(_skill: Skill, game: &mut Game, mut resolutions: Resolutions) ->
}; };
} }
} }
if target.is_ko() && event_target.green == 0 {
// Make sure target ko is from this event
target.effects.clear();
resolutions.push(Resolution::new(&source, &target).event(Event::Ko()).stages(EventStages::PostOnly));
}
}, },
_ => (), _ => (),
}; };
if target.is_ko() && event_target.green == 0 {
// Make sure target ko is from this event
target.effects.clear();
resolutions.push(Resolution::new(&source, &target).event(Event::Ko()).stages(EventStages::PostOnly));
}
game.update_construct(&mut source); game.update_construct(&mut source);
game.update_construct(&mut target); game.update_construct(&mut target);