Added the monarch concept to xmage and all related cards.

This commit is contained in:
LevelX2 2016-11-27 01:14:32 +01:00
parent 8bf299e342
commit 68d0e6b9fa
33 changed files with 2149 additions and 281 deletions

View file

@ -1829,6 +1829,9 @@ public abstract class PlayerImpl implements Player, Serializable {
if (sourceAbilities != null && sourceAbilities.containsKey(InfectAbility.getInstance().getId())) {
addCounters(CounterType.POISON.createInstance(actualDamage), game);
} else {
if (getId().equals(game.getMonarchId()) && sourceControllerId != null) {
game.setMonarchId(null, sourceControllerId);
}
GameEvent damageToLifeLossEvent = new GameEvent(EventType.DAMAGE_CAUSES_LIFE_LOSS, playerId, sourceId, playerId, actualDamage, combatDamage);
if (!game.replaceEvent(damageToLifeLossEvent)) {
this.loseLife(damageToLifeLossEvent.getAmount(), game, combatDamage);