forked from External/mage
implement [MH3] Arena of Glory and usage of ManaSpentDelayedTriggeredAbility (#12404)
This commit is contained in:
parent
0cd2fda764
commit
3e18b58cac
6 changed files with 200 additions and 3 deletions
|
|
@ -103,9 +103,10 @@ public class MageObjectReference implements Comparable<MageObjectReference>, Ser
|
|||
}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return "("+zoneChangeCounter+"|"+sourceId.toString().substring(0,3)+")";
|
||||
public String toString() {
|
||||
return "(" + zoneChangeCounter + "|" + sourceId.toString().substring(0, 3) + ")";
|
||||
}
|
||||
|
||||
public UUID getSourceId() {
|
||||
return sourceId;
|
||||
}
|
||||
|
|
@ -185,6 +186,14 @@ public class MageObjectReference implements Comparable<MageObjectReference>, Ser
|
|||
return null;
|
||||
}
|
||||
|
||||
public Spell getSpell(Game game) {
|
||||
Spell spell = game.getSpell(sourceId);
|
||||
if (spell != null && spell.getZoneChangeCounter(game) == zoneChangeCounter) {
|
||||
return spell;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean zoneCounterIsCurrent(Game game) {
|
||||
return game.getState().getZoneChangeCounter(sourceId) == zoneChangeCounter;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue