[EVE] fixed implementation of Hotheaded Giant

This commit is contained in:
Evan Kranzler 2022-02-28 08:45:13 -05:00
parent 63de2dc258
commit 6c643fdc5e
5 changed files with 63 additions and 11 deletions

View file

@ -147,6 +147,14 @@ public class MageObjectReference implements Comparable<MageObjectReference>, Ser
return false;
}
public boolean refersTo(Ability source, Game game) {
if (source == null || !source.getSourceId().equals(sourceId)) {
return false;
}
return zoneChangeCounter * source.getSourceObjectZoneChangeCounter() == 0
|| zoneChangeCounter == source.getSourceObjectZoneChangeCounter();
}
public Permanent getPermanent(Game game) {
Permanent permanent = game.getPermanent(sourceId);
if (permanent != null && permanent.getZoneChangeCounter(game) == zoneChangeCounter) {