forked from External/mage
[BLC] Implement Twenty-Toed Toad
This commit is contained in:
parent
e322e130f2
commit
641f9e6952
2 changed files with 77 additions and 0 deletions
75
Mage.Sets/src/mage/cards/t/TwentyToedToad.java
Normal file
75
Mage.Sets/src/mage/cards/t/TwentyToedToad.java
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.common.AttacksWithCreaturesTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.WinGameSourceControllerEffect;
|
||||
import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author PurpleCrowbar
|
||||
*/
|
||||
public final class TwentyToedToad extends CardImpl {
|
||||
|
||||
public TwentyToedToad(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
||||
this.subtype.add(SubType.FROG, SubType.WIZARD);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Your maximum hand size is twenty.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MaximumHandSizeControllerEffect(20, Duration.WhileOnBattlefield, MaximumHandSizeControllerEffect.HandSizeModification.SET)));
|
||||
|
||||
// Whenever you attack with two or more creatures, put a +1/+1 counter on Twenty-Toed Toad and draw a card.
|
||||
Ability ability = new AttacksWithCreaturesTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), 2);
|
||||
ability.addEffect(new DrawCardSourceControllerEffect(1).concatBy(" and"));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Whenever Twenty-Toed Toad attacks, you win the game if there are twenty or more counters on it or you have twenty or more cards in hand.
|
||||
this.addAbility(new AttacksTriggeredAbility(new ConditionalOneShotEffect(
|
||||
new WinGameSourceControllerEffect(), TwentyToedToadCondition.instance
|
||||
).setText("you win the game if there are twenty or more counters on it or you have twenty or more cards in hand")));
|
||||
}
|
||||
|
||||
private TwentyToedToad(final TwentyToedToad card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TwentyToedToad copy() {
|
||||
return new TwentyToedToad(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum TwentyToedToadCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (player == null || permanent == null) {
|
||||
return false;
|
||||
}
|
||||
return permanent.getCounters(game).getTotalCount() >= 20
|
||||
|| player.getHand().size() >= 20;
|
||||
}
|
||||
}
|
||||
|
|
@ -299,6 +299,8 @@ public final class BloomburrowCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Trailtracker Scout", 35, Rarity.RARE, mage.cards.t.TrailtrackerScout.class));
|
||||
cards.add(new SetCardInfo("Tranquil Thicket", 350, Rarity.COMMON, mage.cards.t.TranquilThicket.class));
|
||||
cards.add(new SetCardInfo("Triskaidekaphile", 178, Rarity.RARE, mage.cards.t.Triskaidekaphile.class));
|
||||
cards.add(new SetCardInfo("Twenty-Toed Toad", 16, Rarity.RARE, mage.cards.t.TwentyToedToad.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Twenty-Toed Toad", 51, Rarity.RARE, mage.cards.t.TwentyToedToad.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Twilight Mire", 351, Rarity.RARE, mage.cards.t.TwilightMire.class));
|
||||
cards.add(new SetCardInfo("Unnatural Growth", 245, Rarity.RARE, mage.cards.u.UnnaturalGrowth.class));
|
||||
cards.add(new SetCardInfo("Viridescent Bog", 352, Rarity.RARE, mage.cards.v.ViridescentBog.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue