forked from External/mage
Refactoring
This commit is contained in:
parent
be7d27d457
commit
d602aac403
3 changed files with 8 additions and 2 deletions
|
|
@ -274,7 +274,7 @@ public abstract class CardImpl<T extends CardImpl<T>> extends MageObjectImpl<T>
|
|||
break;
|
||||
case BATTLEFIELD:
|
||||
PermanentCard permanent = new PermanentCard(this, ownerId);
|
||||
game.getBattlefield().addPermanent(permanent);
|
||||
game.addPermanent(permanent);
|
||||
permanent.entersBattlefield(sourceId, game);
|
||||
game.applyEffects();
|
||||
if (flag)
|
||||
|
|
@ -386,7 +386,7 @@ public abstract class CardImpl<T extends CardImpl<T>> extends MageObjectImpl<T>
|
|||
}
|
||||
updateZoneChangeCounter();
|
||||
PermanentCard permanent = new PermanentCard(this, controllerId);
|
||||
game.getBattlefield().addPermanent(permanent);
|
||||
game.addPermanent(permanent);
|
||||
game.setZone(objectId, Zone.BATTLEFIELD);
|
||||
game.applyEffects();
|
||||
permanent.entersBattlefield(sourceId, game);
|
||||
|
|
|
|||
|
|
@ -165,6 +165,7 @@ public interface Game extends MageItem, Serializable {
|
|||
public void emptyManaPools();
|
||||
public void addEffect(ContinuousEffect continuousEffect, Ability source);
|
||||
public void addEmblem(Emblem emblem, Ability source);
|
||||
public void addPermanent(Permanent permanent);
|
||||
|
||||
/**
|
||||
* This version supports copying of copies of any depth.
|
||||
|
|
|
|||
|
|
@ -773,6 +773,11 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
|
|||
state.addEmblem(newEmblem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPermanent(Permanent permanent) {
|
||||
getBattlefield().addPermanent(permanent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void copyPermanent(Permanent copyFromPermanent, Permanent copyToPermanent, Ability source, ApplyToPermanent applier) {
|
||||
Permanent permanent = copyFromPermanent.copy();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue