mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
* Fixed some target pointer handling.
This commit is contained in:
parent
88dd301f82
commit
c02c5a175b
14 changed files with 140 additions and 108 deletions
|
|
@ -1211,6 +1211,19 @@ public abstract class AbilityImpl implements Ability {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Permanent getSourcePermanentIfItStillExists(Game game) {
|
||||
if (sourceObject == null) {
|
||||
setSourceObject(game.getObject(getSourceId()), game);
|
||||
}
|
||||
if (sourceObject instanceof Permanent) {
|
||||
if (game.getState().getZoneChangeCounter(getSourceId()) == getSourceObjectZoneChangeCounter()) {
|
||||
return (Permanent) sourceObject;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSourceObjectZoneChangeCounter() {
|
||||
return sourceObjectZoneChangeCounter;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue