Add Event to the signature of updateZoneChangeCounter.

This is required to Implement Skullbriar, the Walking Grave
This commit is contained in:
Samuel Sandeen 2016-09-10 17:45:26 -04:00
parent d53f751711
commit cdff9bae78
10 changed files with 26 additions and 20 deletions

View file

@ -174,8 +174,9 @@ public class AuraReplacementEffect extends ReplacementEffectImpl {
if (targetCard != null || targetPermanent != null || targetPlayer != null) {
card = game.getCard(event.getTargetId());
card.removeFromZone(game, fromZone, sourceId);
card.updateZoneChangeCounter(game);
PermanentCard permanent = new PermanentCard(card, (controllingPlayer == null ? card.getOwnerId() : controllingPlayer.getId()), game);
ZoneChangeEvent zoneChangeEvent = new ZoneChangeEvent(permanent, controllerId, fromZone, Zone.BATTLEFIELD);
permanent.updateZoneChangeCounter(game, zoneChangeEvent);
game.getBattlefield().addPermanent(permanent);
card.setZone(Zone.BATTLEFIELD, game);
if (permanent.entersBattlefield(event.getSourceId(), game, fromZone, true)) {
@ -188,7 +189,7 @@ public class AuraReplacementEffect extends ReplacementEffectImpl {
}
game.applyEffects();
game.fireEvent(new ZoneChangeEvent(permanent, controllerId, fromZone, Zone.BATTLEFIELD));
game.fireEvent(zoneChangeEvent);
return true;
}