mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
implement [M3C] Tarmogoyf Nest (#12377)
This commit is contained in:
parent
24b184c28f
commit
7ee897eb26
3 changed files with 102 additions and 0 deletions
59
Mage.Sets/src/mage/cards/t/TarmogoyfNest.java
Normal file
59
Mage.Sets/src/mage/cards/t/TarmogoyfNest.java
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.permanent.token.TarmogoyfToken;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author grimreap124
|
||||
*/
|
||||
public final class TarmogoyfNest extends CardImpl {
|
||||
|
||||
public TarmogoyfNest(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[] { CardType.TRIBAL, CardType.ENCHANTMENT }, "{2}{G}");
|
||||
|
||||
this.subtype.add(SubType.LHURGOYF);
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
// Enchant land
|
||||
TargetPermanent auraTarget = new TargetLandPermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit));
|
||||
this.addAbility(new EnchantAbility(auraTarget));
|
||||
|
||||
// Enchanted land has "{1}{G}, {T}: Create a Tarmogoyf token."
|
||||
Ability gainedAbility = new SimpleActivatedAbility(new CreateTokenEffect(new TarmogoyfToken()),
|
||||
new TapSourceCost());
|
||||
gainedAbility.addCost(new ManaCostsImpl<>("{1}{G}"));
|
||||
Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA);
|
||||
this.addAbility(new SimpleStaticAbility(effect));
|
||||
|
||||
}
|
||||
|
||||
private TarmogoyfNest(final TarmogoyfNest card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TarmogoyfNest copy() {
|
||||
return new TarmogoyfNest(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -249,6 +249,7 @@ public final class ModernHorizons3Commander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Talisman of Progress", 313, Rarity.UNCOMMON, mage.cards.t.TalismanOfProgress.class));
|
||||
cards.add(new SetCardInfo("Talisman of Resilience", 314, Rarity.UNCOMMON, mage.cards.t.TalismanOfResilience.class));
|
||||
cards.add(new SetCardInfo("Talon Gates of Madara", 82, Rarity.RARE, mage.cards.t.TalonGatesOfMadara.class));
|
||||
cards.add(new SetCardInfo("Tarmogoyf Nest", 68, Rarity.RARE, mage.cards.t.TarmogoyfNest.class));
|
||||
cards.add(new SetCardInfo("Tatyova, Benthic Druid", 273, Rarity.UNCOMMON, mage.cards.t.TatyovaBenthicDruid.class));
|
||||
cards.add(new SetCardInfo("Tectonic Edge", 384, Rarity.UNCOMMON, mage.cards.t.TectonicEdge.class));
|
||||
cards.add(new SetCardInfo("Temple of Abandon", 385, Rarity.RARE, mage.cards.t.TempleOfAbandon.class));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount;
|
||||
import mage.abilities.effects.common.continuous.SetBasePowerToughnessPlusOneSourceEffect;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
* @author LoneFox
|
||||
*/
|
||||
public final class TarmogoyfToken extends TokenImpl {
|
||||
|
||||
private static final DynamicValue powerValue = CardTypesInGraveyardCount.ALL;
|
||||
|
||||
public TarmogoyfToken() {
|
||||
super("Tarmogoyf Token",
|
||||
"Tarmogoyf’s power is equal to the number of card types among cards in all graveyards and its toughness is equal to that number plus 1.");
|
||||
manaCost = new ManaCostsImpl<>("{1}{G}");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setGreen(true);
|
||||
subtype.add(SubType.LHURGOYF);
|
||||
power = new MageInt(0);
|
||||
toughness = new MageInt(1);
|
||||
|
||||
// Tarmogoyf’s power is equal to the number of card types among cards in all
|
||||
// graveyards and its toughness is equal to that number plus 1.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetBasePowerToughnessPlusOneSourceEffect(powerValue)));
|
||||
}
|
||||
|
||||
private TarmogoyfToken(final TarmogoyfToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TarmogoyfToken copy() {
|
||||
return new TarmogoyfToken(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue