[MH2] Implemented Territorial Kavu

This commit is contained in:
Evan Kranzler 2021-05-31 10:28:29 -04:00
parent ca7a732c5c
commit 9770882c21
2 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,67 @@
package mage.cards.t;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DomainValue;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
import mage.abilities.hint.common.DomainHint;
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.target.common.TargetCardInGraveyard;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TerritorialKavu extends CardImpl {
private static final DynamicValue xValue = new DomainValue();
public TerritorialKavu(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{G}");
this.subtype.add(SubType.KAVU);
this.power = new MageInt(0);
this.toughness = new MageInt(0);
// Domain Territorial Kavu's power and toughness are each equal to the number of basic land types among lands you control.
this.addAbility(new SimpleStaticAbility(
Zone.ALL, new SetPowerToughnessSourceEffect(xValue, Duration.EndOfGame)
).addHint(DomainHint.instance));
// Whenever Territorial Kavu attacks, choose one
// Discard a card. If you do, draw a card.
Ability ability = new AttacksTriggeredAbility(new DoIfCostPaid(
new DrawCardSourceControllerEffect(1),
null, new DiscardCardCost(), false
), false);
// Exile up to one target card from a graveyard.
Mode mode = new Mode(new ExileTargetEffect());
mode.addTarget(new TargetCardInGraveyard(0, 1));
ability.addMode(mode);
this.addAbility(ability);
}
private TerritorialKavu(final TerritorialKavu card) {
super(card);
}
@Override
public TerritorialKavu copy() {
return new TerritorialKavu(this);
}
}

View file

@ -162,6 +162,7 @@ public final class ModernHorizons2 extends ExpansionSet {
cards.add(new SetCardInfo("Sylvan Anthem", 176, Rarity.RARE, mage.cards.s.SylvanAnthem.class));
cards.add(new SetCardInfo("Tanglepool Bridge", 257, Rarity.COMMON, mage.cards.t.TanglepoolBridge.class));
cards.add(new SetCardInfo("Terramorph", 177, Rarity.UNCOMMON, mage.cards.t.Terramorph.class));
cards.add(new SetCardInfo("Territorial Kavu", 216, Rarity.RARE, mage.cards.t.TerritorialKavu.class));
cards.add(new SetCardInfo("The Underworld Cookbook", 240, Rarity.UNCOMMON, mage.cards.t.TheUnderworldCookbook.class));
cards.add(new SetCardInfo("Thornglint Bridge", 258, Rarity.COMMON, mage.cards.t.ThornglintBridge.class));
cards.add(new SetCardInfo("Thought Monitor", 71, Rarity.RARE, mage.cards.t.ThoughtMonitor.class));