forked from External/mage
Implemented Twinning Staff
This commit is contained in:
parent
4e5e00d2be
commit
7522c0a049
15 changed files with 179 additions and 82 deletions
|
|
@ -101,9 +101,7 @@ class CommanderStormEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
game.informPlayers(spell.getLogName() + " will be copied " + stormCount + " time" + (stormCount > 1 ? "s" : ""));
|
||||
for (int i = 0; i < stormCount; i++) {
|
||||
spell.createCopyOnStack(game, source, source.getControllerId(), true);
|
||||
}
|
||||
spell.createCopyOnStack(game, source, source.getControllerId(), true, stormCount);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import mage.game.stack.StackObject;
|
|||
import mage.watchers.common.GravestormWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public class GravestormAbility extends TriggeredAbilityImpl {
|
||||
|
|
@ -75,7 +74,7 @@ class GravestormEffect extends OneShotEffect {
|
|||
MageObjectReference spellRef = (MageObjectReference) this.getValue("GravestormSpellRef");
|
||||
if (spellRef != null) {
|
||||
GravestormWatcher watcher = game.getState().getWatcher(GravestormWatcher.class);
|
||||
if(watcher != null) {
|
||||
if (watcher != null) {
|
||||
int gravestormCount = watcher.getGravestormCount();
|
||||
if (gravestormCount > 0) {
|
||||
Spell spell = (Spell) this.getValue("GravestormSpell");
|
||||
|
|
@ -83,9 +82,7 @@ class GravestormEffect extends OneShotEffect {
|
|||
if (!game.isSimulation()) {
|
||||
game.informPlayers("Gravestorm: " + spell.getName() + " will be copied " + gravestormCount + " time" + (gravestormCount > 1 ? "s" : ""));
|
||||
}
|
||||
for (int i = 0; i < gravestormCount; i++) {
|
||||
spell.createCopyOnStack(game, source, source.getControllerId(), true);
|
||||
}
|
||||
spell.createCopyOnStack(game, source, source.getControllerId(), true, gravestormCount);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -218,12 +218,7 @@ class ReplicateCopyEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
// 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));
|
||||
}
|
||||
}
|
||||
StackObject newStackObject = spell.createCopyOnStack(game, source, source.getControllerId(), true, replicateCount);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import mage.watchers.common.CastSpellLastTurnWatcher;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class StormAbility extends TriggeredAbilityImpl {
|
||||
|
|
@ -83,13 +82,11 @@ class StormEffect extends OneShotEffect {
|
|||
if (!game.isSimulation()) {
|
||||
game.informPlayers("Storm: " + spell.getLogName() + " will be copied " + stormCount + " time" + (stormCount > 1 ? "s" : ""));
|
||||
}
|
||||
for (int i = 0; i < stormCount; i++) {
|
||||
spell.createCopyOnStack(game, source, source.getControllerId(), true);
|
||||
}
|
||||
spell.createCopyOnStack(game, source, source.getControllerId(), true, stormCount);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Logger.getLogger(StormEffect.class).fatal("CastSpellLastTurnWatcher not found. game = " +game.getGameType().toString());
|
||||
Logger.getLogger(StormEffect.class).fatal("CastSpellLastTurnWatcher not found. game = " + game.getGameType().toString());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue