forked from External/mage
Added framework method for copying a StackAbility without casting it.
Modified the effects doing so with the new method.
This commit is contained in:
parent
b9ab16d945
commit
8823839a42
34 changed files with 158 additions and 313 deletions
|
|
@ -247,11 +247,9 @@ class ReplicateCopyEffect extends OneShotEffect {
|
|||
}
|
||||
// create the copies
|
||||
for (int i = 0; i < replicateCount; i++) {
|
||||
Spell copy = spell.copySpell(source.getControllerId());
|
||||
game.getStack().push(copy);
|
||||
copy.chooseNewTargets(game, source.getControllerId());
|
||||
if (!game.isSimulation()) {
|
||||
game.informPlayers(controller.getLogName() + copy.getActivatedMessage(game));
|
||||
StackObject newStackObject = spell.createCopyOnStack(game, source, source.getControllerId(), true);
|
||||
if (newStackObject != null && newStackObject instanceof Spell && !game.isSimulation()) {
|
||||
game.informPlayers(controller.getLogName() + ((Spell) newStackObject).getActivatedMessage(game));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue