use of mage.game.events.DamageEvent in project mage by magefree.
the class BloodOfTheMartyrEffect method applies.
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
Player controller = game.getPlayer(source.getControllerId());
Permanent permanent = game.getPermanent(event.getTargetId());
DamageEvent damageEvent = (DamageEvent) event;
return controller != null && permanent != null && permanent.isCreature(game) && controller.chooseUse(outcome, "Have " + damageEvent.getAmount() + " damage dealt to you instead of " + permanent.getLogName() + "?", source, game);
}
Aggregations