@Override public boolean apply(Game game, Ability source) { Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source)); if (spell != null) { StackObject newStackObject = spell.createCopyOnStack(game, source, spell.getControllerId(), true); Player player = game.getPlayer(spell.getControllerId()); if (player != null && newStackObject instanceof Spell) { String activateMessage = ((Spell) newStackObject).getActivatedMessage(game); if (activateMessage.startsWith(" casts ")) { activateMessage = activateMessage.substring(6); } game.informPlayers(player.getLogName() + " copies " + activateMessage); } return true; } return false; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Spell spell = game.getStack().getSpell(source.getSourceId()); if (spell != null) { StackObject stackObjectCopy = spell.createCopyOnStack(game, source, source.getControllerId(), true); if (stackObjectCopy instanceof Spell) { String activateMessage = ((Spell) stackObjectCopy).getActivatedMessage(game); if (activateMessage.startsWith(" casts ")) { activateMessage = activateMessage.substring(6); } game.informPlayers(controller.getLogName() + " copies " + activateMessage); } return true; } } return false; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source)); if (spell != null) { StackObject stackObjectCopy = spell.createCopyOnStack(game, source, source.getControllerId(), true); if (stackObjectCopy instanceof Spell) { game.informPlayers(controller.getLogName() + ((Spell) stackObjectCopy).getActivatedMessage(game)); } Spell sourceSpell = (Spell) game.getStack().getStackObject(source.getSourceId()); if (sourceSpell != null) { if (sourceSpell.getFromZone() == Zone.GRAVEYARD) { stackObjectCopy = spell.createCopyOnStack(game, source, source.getControllerId(), true); if (stackObjectCopy instanceof Spell) { game.informPlayers(new StringBuilder(controller.getLogName()).append(((Spell) stackObjectCopy).getActivatedMessage(game)).toString()); } } } return true; } } return false; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null && conspiredSpell != null) { Card card = game.getCard(conspiredSpell.getSourceId()); if (card != null) { StackObject newStackObject = conspiredSpell.createCopyOnStack(game, source, source.getControllerId(), true); if (newStackObject instanceof Spell && !game.isSimulation()) { game.informPlayers(controller.getLogName() + ((Spell) newStackObject).getActivatedMessage(game)); } return true; } } return false; }
@Override public boolean apply(Game game, Ability source) { Spell spell; if (useLKI) { spell = game.getSpellOrLKIStack(targetPointer.getFirst(game, source)); } else { spell = game.getStack().getSpell(targetPointer.getFirst(game, source)); } if (spell == null) { spell = (Spell) game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.STACK); } if (spell != null) { StackObject newStackObject = spell.createCopyOnStack(game, source, useController ? spell.getControllerId() : source.getControllerId(), true); Player player = game.getPlayer(source.getControllerId()); if (player != null && newStackObject instanceof Spell) { String activateMessage = ((Spell) newStackObject).getActivatedMessage(game); if (activateMessage.startsWith(" casts ")) { activateMessage = activateMessage.substring(6); } if (!game.isSimulation()) { game.informPlayers(player.getLogName() + activateMessage); } } return true; } return false; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller == null) { return false; } Spell spell = game.getStack().getSpell(getTargetPointer().getFirst(game, source)); if (spell != null) { game.getStack().counter(spell.getId(), source.getSourceId(), game); if (SpellMasteryCondition.instance.apply(game, source) && controller.chooseUse(Outcome.PlayForFree, "Copy " + spell.getName() + " (you may choose new targets for the copy)?", source, game)) { StackObject newStackObject = spell.createCopyOnStack(game, source, source.getControllerId(), true); if (newStackObject instanceof Spell) { String activateMessage = ((Spell) newStackObject).getActivatedMessage(game); if (activateMessage.startsWith(" casts ")) { activateMessage = activateMessage.substring(6); } game.informPlayers(controller.getLogName() + activateMessage); } } return true; } return false; } }
StackObject newStackObject = spell.createCopyOnStack(game, source, player.getId(), true); if (newStackObject instanceof Spell) { String activateMessage = ((Spell) newStackObject).getActivatedMessage(game); if (activateMessage.startsWith(" casts ")) { activateMessage = activateMessage.substring(6);
String activateMessage = copy.getActivatedMessage(game); if (activateMessage.startsWith(" casts ")) { activateMessage = activateMessage.substring(6);
StackObject newStackObject = spell.createCopyOnStack(game, source, player.getId(), true); if (newStackObject instanceof Spell) { String activateMessage = ((Spell) newStackObject).getActivatedMessage(game); if (activateMessage.startsWith(" casts ")) { activateMessage = activateMessage.substring(6);
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Spell spell = (Spell) this.getValue("ReplicateSpell"); int replicateCount = (Integer) this.getValue("ReplicateCount"); if (spell != null && replicateCount > 0) { // reset replicate now so the copies don't report x times Replicate Card card = game.getCard(spell.getSourceId()); if (card != null) { for (Ability ability : card.getAbilities(game)) { if (ability instanceof ReplicateAbility) { if (((ReplicateAbility) ability).isActivated()) { ((ReplicateAbility) ability).resetReplicate(); } } } } // create the copies for (int i = 0; i < replicateCount; i++) { StackObject newStackObject = spell.createCopyOnStack(game, source, source.getControllerId(), true); if (newStackObject instanceof Spell && !game.isSimulation()) { game.informPlayers(controller.getLogName() + ((Spell) newStackObject).getActivatedMessage(game)); } } return true; } } return false; }
StackObject newStackObject = spell.createCopyOnStack(game, source, player.getId(), true); if (newStackObject instanceof Spell) { String activateMessage = ((Spell) newStackObject).getActivatedMessage(game); if (activateMessage.startsWith(" casts ")) { activateMessage = activateMessage.substring(6);
String activateMessage = copy.getActivatedMessage(game); if (activateMessage.startsWith(" casts ")) { activateMessage = activateMessage.substring(6);
game.fireEvent(event); if (!game.isSimulation()) { game.informPlayers(getLogName() + spell.getActivatedMessage(game));