forked from External/mage
Fixed tags cost and MageObjectReference usage (#11500)
* Fix costs tag clearing while permanent still on the battlefield * Improved version of game.getPermanentOrLKIBattlefield with MageObjectReference * Improve documentation
This commit is contained in:
parent
aea49d3c2b
commit
f3e310cfd3
4 changed files with 32 additions and 7 deletions
|
|
@ -717,6 +717,16 @@ public abstract class GameImpl implements Game {
|
|||
return permanent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Permanent getPermanentOrLKIBattlefield(MageObjectReference permanentRef) {
|
||||
UUID id = permanentRef.getSourceId();
|
||||
Permanent permanent = state.getPermanent(id);
|
||||
if (permanent == null || state.getZoneChangeCounter(id) != permanentRef.getZoneChangeCounter()) {
|
||||
permanent = (Permanent) this.getLastKnownInformation(id, Zone.BATTLEFIELD, permanentRef.getZoneChangeCounter());
|
||||
}
|
||||
return permanent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Permanent getPermanentEntering(UUID permanentId) {
|
||||
return permanentsEntering.get(permanentId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue