Added informing players about damage prevented.

This commit is contained in:
magenoxx 2011-08-16 21:43:08 +04:00
parent 11fab4b4e9
commit 4da3f0c62d

View file

@ -66,6 +66,7 @@ public class PreventAllCombatDamageEffect extends PreventionEffectImpl<PreventAl
if (!game.replaceEvent(preventEvent)) {
int damage = event.getAmount();
event.setAmount(0);
game.informPlayers("Damage has been prevented: " + damage);
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, source.getFirstTarget(), source.getId(), source.getControllerId(), damage));
}
return false;