[SNC] Implemented Evelyn the Covetous

This commit is contained in:
Evan Kranzler 2022-04-24 19:18:45 -04:00
parent cec8c54401
commit 6ba07e6607
4 changed files with 262 additions and 6 deletions

View file

@ -138,13 +138,17 @@ public class MageObjectReference implements Comparable<MageObjectReference>, Ser
}
public boolean refersTo(MageObject mageObject, Game game) {
if (mageObject != null) {
if (mageObject instanceof Spell) {
return Objects.equals(((Spell) mageObject).getSourceId(), this.sourceId) && this.zoneChangeCounter == mageObject.getZoneChangeCounter(game);
}
return mageObject.getId().equals(sourceId) && this.zoneChangeCounter == mageObject.getZoneChangeCounter(game);
return refersTo(mageObject, game, 0);
}
public boolean refersTo(MageObject mageObject, Game game, int offset) {
if (mageObject == null) {
return false;
}
return false;
if (mageObject instanceof Spell) {
return Objects.equals(((Spell) mageObject).getSourceId(), this.sourceId) && this.zoneChangeCounter + offset == mageObject.getZoneChangeCounter(game);
}
return mageObject.getId().equals(sourceId) && this.zoneChangeCounter + offset == mageObject.getZoneChangeCounter(game);
}
public boolean refersTo(Ability source, Game game) {