mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
Changed create token handling of Hero of Bladehold and Army of the Damned. Minor formating to Budoka Gardener. Fixed #195. Bug concerning Budoka Gardener #194 was already fixed with changes to the handling of continious effects committed yesterday.
This commit is contained in:
parent
a22d8d8309
commit
7bc69ba1da
3 changed files with 20 additions and 85 deletions
|
@ -27,7 +27,12 @@
|
|||
*/
|
||||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import mage.Constants.*;
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -52,8 +57,6 @@ import mage.game.permanent.Permanent;
|
|||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
|
@ -73,9 +76,12 @@ public class BudokaGardener extends CardImpl<BudokaGardener> {
|
|||
|
||||
// {T}: You may put a land card from your hand onto the battlefield. If you control ten or more lands, flip Budoka Gardener.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BudokaGardenerEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetCardInHand(new FilterLandCard()));
|
||||
ability.addTarget(new TargetCardInHand(0, 1, new FilterLandCard()));
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new DokaiWeaverofLife()), FlippedCondition.getInstance(), "")));
|
||||
|
||||
Ability flipAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new DokaiWeaverofLife()), FlippedCondition.getInstance(), "{this} becomes Dokai, Weaver of Life"));
|
||||
ability.setRuleVisible(false);
|
||||
this.addAbility(flipAbility);
|
||||
}
|
||||
|
||||
public BudokaGardener(final BudokaGardener card) {
|
||||
|
@ -156,4 +162,3 @@ class DokaiWeaverofLifeToken extends Token {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(controlledLands, controlledLands, Duration.WhileOnBattlefield)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,18 +29,13 @@ package mage.sets.innistrad;
|
|||
|
||||
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.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
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;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -55,7 +50,7 @@ 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 ArmyOfTheDamnedEffect());
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken(), 13, true, false));
|
||||
|
||||
// Flashback {7}{B}{B}{B}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{7}{B}{B}{B}"), TimingRule.SORCERY));
|
||||
|
@ -70,35 +65,3 @@ 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,20 +29,14 @@
|
|||
package mage.sets.mirrodinbesieged;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.BattleCryAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.SoldierToken;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
|
@ -57,8 +51,13 @@ public class HeroOfBladehold extends CardImpl<HeroOfBladehold> {
|
|||
this.color.setWhite(true);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Battle cry (Whenever this creature attacks, each other attacking creature gets +1/+0 until end of turn.)
|
||||
this.addAbility(new BattleCryAbility());
|
||||
this.addAbility(new AttacksTriggeredAbility(new HeroOfBladeholdEffect(), false));
|
||||
|
||||
// Whenever Hero of Bladehold attacks, put two 1/1 white Soldier creature tokens onto the battlefield tapped and attacking.
|
||||
this.addAbility(new AttacksTriggeredAbility(new CreateTokenEffect(new SoldierToken(), 2, true, true), false));
|
||||
|
||||
}
|
||||
|
||||
public HeroOfBladehold(final HeroOfBladehold card) {
|
||||
|
@ -71,35 +70,3 @@ public class HeroOfBladehold extends CardImpl<HeroOfBladehold> {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
class HeroOfBladeholdEffect extends OneShotEffect<HeroOfBladeholdEffect> {
|
||||
HeroOfBladeholdEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
staticText = "put two 1/1 white Soldier creature tokens onto the battlefield tapped and attacking";
|
||||
}
|
||||
|
||||
HeroOfBladeholdEffect(final HeroOfBladeholdEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
SoldierToken token = new SoldierToken();
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
token.putOntoBattlefield(1, game, source.getId(), source.getControllerId());
|
||||
Permanent p = game.getPermanent(token.getLastAddedToken());
|
||||
p.setTapped(true);
|
||||
game.getCombat().addAttackingCreature(p.getId(), game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HeroOfBladeholdEffect copy() {
|
||||
return new HeroOfBladeholdEffect(this);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue