mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
Implement Tome Anima from Core 2021 (#6668)
* Implement Tome Anima from Core 2021 * newline at end of file
This commit is contained in:
parent
6b14c5a4d3
commit
c22c93ea90
2 changed files with 59 additions and 0 deletions
58
Mage.Sets/src/mage/cards/t/TomeAnima.java
Normal file
58
Mage.Sets/src/mage/cards/t/TomeAnima.java
Normal file
|
@ -0,0 +1,58 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.CantBeBlockedSourceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.watchers.common.CardsDrawnThisTurnWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author arcox
|
||||
*/
|
||||
public final class TomeAnima extends CardImpl {
|
||||
|
||||
public TomeAnima(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
||||
|
||||
this.subtype.add(SubType.SPIRIT);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Tome Anima can’t be blocked as long as you’ve drawn two or more cards this turn.
|
||||
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||
new GainAbilitySourceEffect(new CantBeBlockedSourceAbility(), Duration.WhileOnBattlefield),
|
||||
TomeAnimaCondition.instance,
|
||||
"{this} can’t be blocked as long as you’ve drawn two or more cards this turn"
|
||||
)), new CardsDrawnThisTurnWatcher());
|
||||
}
|
||||
|
||||
private TomeAnima(final TomeAnima card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TomeAnima copy() {
|
||||
return new TomeAnima(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum TomeAnimaCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
CardsDrawnThisTurnWatcher watcher = game.getState().getWatcher(CardsDrawnThisTurnWatcher.class);
|
||||
return watcher != null && watcher.getCardsDrawnThisTurn(source.getControllerId()) > 1;
|
||||
}
|
||||
}
|
|
@ -272,6 +272,7 @@ public final class CoreSet2021 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Tide Skimmer", 79, Rarity.UNCOMMON, mage.cards.t.TideSkimmer.class));
|
||||
cards.add(new SetCardInfo("Titanic Growth", 210, Rarity.COMMON, mage.cards.t.TitanicGrowth.class));
|
||||
cards.add(new SetCardInfo("Tolarian Kraken", 80, Rarity.UNCOMMON, mage.cards.t.TolarianKraken.class));
|
||||
cards.add(new SetCardInfo("Tome Anima", 81, Rarity.COMMON, mage.cards.t.TomeAnima.class));
|
||||
cards.add(new SetCardInfo("Tormod's Crypt", 241, Rarity.UNCOMMON, mage.cards.t.TormodsCrypt.class));
|
||||
cards.add(new SetCardInfo("Traitorous Greed", 166, Rarity.UNCOMMON, mage.cards.t.TraitorousGreed.class));
|
||||
cards.add(new SetCardInfo("Tranquil Cove", 258, Rarity.COMMON, mage.cards.t.TranquilCove.class));
|
||||
|
|
Loading…
Reference in a new issue