mirror of
https://github.com/correl/mage.git
synced 2025-04-10 01:01:05 -09:00
* Ephara, God of the Polis - Fixed its watcher not able to handle copies of it correctly.
This commit is contained in:
parent
da67a67eaa
commit
efa1ce2429
1 changed files with 9 additions and 4 deletions
|
@ -43,6 +43,9 @@ public class PermanentsEnteredBattlefieldWatcher extends Watcher {
|
||||||
public void watch(GameEvent event, Game game) {
|
public void watch(GameEvent event, Game game) {
|
||||||
if (event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD) {
|
if (event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD) {
|
||||||
Permanent perm = game.getPermanentEntering(event.getTargetId());
|
Permanent perm = game.getPermanentEntering(event.getTargetId());
|
||||||
|
if (perm == null) {
|
||||||
|
perm = game.getPermanent(event.getTargetId());
|
||||||
|
}
|
||||||
if (perm != null) {
|
if (perm != null) {
|
||||||
List<Permanent> permanents;
|
List<Permanent> permanents;
|
||||||
if (!enteringBattlefield.containsKey(perm.getControllerId())) {
|
if (!enteringBattlefield.containsKey(perm.getControllerId())) {
|
||||||
|
@ -69,10 +72,12 @@ public class PermanentsEnteredBattlefieldWatcher extends Watcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean AnotherCreatureEnteredBattlefieldUnderPlayersControlLastTurn(Permanent sourcePermanent, Game game) {
|
public boolean AnotherCreatureEnteredBattlefieldUnderPlayersControlLastTurn(Permanent sourcePermanent, Game game) {
|
||||||
for (Permanent permanent : enteringBattlefield.get(sourcePermanent.getControllerId())) {
|
if (enteringBattlefieldLastTurn.containsKey(sourcePermanent.getControllerId())) {
|
||||||
if (!permanent.getId().equals(sourcePermanent.getId())
|
for (Permanent permanent : enteringBattlefieldLastTurn.get(sourcePermanent.getControllerId())) {
|
||||||
|| permanent.getZoneChangeCounter(game) != sourcePermanent.getZoneChangeCounter(game)) {
|
if (!permanent.getId().equals(sourcePermanent.getId())
|
||||||
return true;
|
|| permanent.getZoneChangeCounter(game) != sourcePermanent.getZoneChangeCounter(game)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue