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 { if target.is_ko() && event_target.green == 0 {
// Make sure target ko is from this event // Make sure target ko is from this event
target.effects.clear(); target.effects.clear();
resolutions.push(Resolution::new(&source, &target).event(Event::Ko()).stages(EventStages::PostOnly)); 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);