* Ephara, God of the Polis - Fixed its watcher not able to handle copies of it correctly.

This commit is contained in:
LevelX2 2016-11-06 15:56:31 +01:00
parent da67a67eaa
commit efa1ce2429

View file

@ -43,6 +43,9 @@ public class PermanentsEnteredBattlefieldWatcher extends Watcher {
public void watch(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD) {
Permanent perm = game.getPermanentEntering(event.getTargetId());
if (perm == null) {
perm = game.getPermanent(event.getTargetId());
}
if (perm != null) {
List<Permanent> permanents;
if (!enteringBattlefield.containsKey(perm.getControllerId())) {
@ -69,10 +72,12 @@ public class PermanentsEnteredBattlefieldWatcher extends Watcher {
}
public boolean AnotherCreatureEnteredBattlefieldUnderPlayersControlLastTurn(Permanent sourcePermanent, Game game) {
for (Permanent permanent : enteringBattlefield.get(sourcePermanent.getControllerId())) {
if (!permanent.getId().equals(sourcePermanent.getId())
|| permanent.getZoneChangeCounter(game) != sourcePermanent.getZoneChangeCounter(game)) {
return true;
if (enteringBattlefieldLastTurn.containsKey(sourcePermanent.getControllerId())) {
for (Permanent permanent : enteringBattlefieldLastTurn.get(sourcePermanent.getControllerId())) {
if (!permanent.getId().equals(sourcePermanent.getId())
|| permanent.getZoneChangeCounter(game) != sourcePermanent.getZoneChangeCounter(game)) {
return true;
}
}
}
return false;