mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Fixed issue #132 tokens of Army of the Damned were put into play untapped instead of tapped.
This commit is contained in:
parent
127e63ce0d
commit
b968e2b4c4
1 changed files with 42 additions and 5 deletions
|
@ -27,16 +27,21 @@
|
|||
*/
|
||||
package mage.sets.innistrad;
|
||||
|
||||
import mage.Constants;
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.TimingRule;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlashbackAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.ZombieToken;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author nantuko
|
||||
|
@ -50,10 +55,10 @@ public class ArmyOfTheDamned extends CardImpl<ArmyOfTheDamned> {
|
|||
this.color.setBlack(true);
|
||||
|
||||
// Put thirteen 2/2 black Zombie creature tokens onto the battlefield tapped.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken(), 13));
|
||||
this.getSpellAbility().addEffect(new ArmyOfTheDamnedEffect());
|
||||
|
||||
// Flashback {7}{B}{B}{B}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{7}{B}{B}{B}"), Constants.TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{7}{B}{B}{B}"), TimingRule.SORCERY));
|
||||
}
|
||||
|
||||
public ArmyOfTheDamned(final ArmyOfTheDamned card) {
|
||||
|
@ -65,3 +70,35 @@ public class ArmyOfTheDamned extends CardImpl<ArmyOfTheDamned> {
|
|||
return new ArmyOfTheDamned(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ArmyOfTheDamnedEffect extends OneShotEffect<ArmyOfTheDamnedEffect> {
|
||||
|
||||
public ArmyOfTheDamnedEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "Put thirteen 2/2 black Zombie creature tokens onto the battlefield tapped";
|
||||
}
|
||||
|
||||
public ArmyOfTheDamnedEffect(final ArmyOfTheDamnedEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArmyOfTheDamnedEffect copy() {
|
||||
return new ArmyOfTheDamnedEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
ZombieToken token = new ZombieToken();
|
||||
for (int i = 0; i < 13; i++) {
|
||||
token.putOntoBattlefield(1, game, source.getId(), source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(token.getLastAddedToken());
|
||||
permanent.setTapped(true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue