mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
Some changes related to #4893.
This commit is contained in:
parent
9919a3403d
commit
cddd81123b
37 changed files with 245 additions and 137 deletions
|
|
@ -157,6 +157,8 @@ public abstract class AbilityImpl implements Ability {
|
|||
public void newId() {
|
||||
if (!(this instanceof MageSingleton)) {
|
||||
this.id = UUID.randomUUID();
|
||||
// this.sourceObject = null;
|
||||
// this.sourceObjectZoneChangeCounter = -1;
|
||||
}
|
||||
getEffects().newId();
|
||||
}
|
||||
|
|
@ -1211,7 +1213,7 @@ public abstract class AbilityImpl implements Ability {
|
|||
|
||||
@Override
|
||||
public Permanent getSourcePermanentIfItStillExists(Game game) {
|
||||
if (sourceObject == null) {
|
||||
if (sourceObject == null || !sourceObject.getId().equals(getSourceId())) {
|
||||
setSourceObject(game.getObject(getSourceId()), game);
|
||||
}
|
||||
if (sourceObject instanceof Permanent) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue