Skip to content

Commit

Permalink
[MH3] Implement Spawn-Gang Commander
Browse files Browse the repository at this point in the history
  • Loading branch information
theelk801 committed Apr 30, 2024
1 parent 32ea5e9 commit f079a7a
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
59 changes: 59 additions & 0 deletions Mage.Sets/src/mage/cards/s/SpawnGangCommander.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package mage.cards.s;

import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CastSourceTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.keyword.DevoidAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
import mage.game.permanent.token.EldraziSpawnToken;
import mage.target.common.TargetAnyTarget;

import java.util.UUID;

/**
* @author TheElk801
*/
public final class SpawnGangCommander extends CardImpl {

private static final FilterControlledPermanent filter
= new FilterControlledPermanent(SubType.ELDRAZI, "an Eldrazi");

public SpawnGangCommander(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");

this.subtype.add(SubType.ELDRAZI);
this.subtype.add(SubType.GOBLIN);
this.power = new MageInt(2);
this.toughness = new MageInt(2);

// Devoid
this.addAbility(new DevoidAbility(this.color));

// When you cast this spell, create three 0/1 colorless Eldrazi Spawn creature tokens with "Sacrifice this creature: Add {C}."
this.addAbility(new CastSourceTriggeredAbility(new CreateTokenEffect(new EldraziSpawnToken(), 3)));

// {1}{C}, Sacrifice an Eldrazi: Spawn-Gang Commander deals 2 damage to any target.
Ability ability = new SimpleActivatedAbility(new DamageTargetEffect(2), new ManaCostsImpl<>("{1}{C}"));
ability.addCost(new SacrificeTargetCost(filter));
ability.addTarget(new TargetAnyTarget());
this.addAbility(ability);
}

private SpawnGangCommander(final SpawnGangCommander card) {
super(card);
}

@Override
public SpawnGangCommander copy() {
return new SpawnGangCommander(this);
}
}
1 change: 1 addition & 0 deletions Mage.Sets/src/mage/sets/ModernHorizons3.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ private ModernHorizons3() {
cards.add(new SetCardInfo("Psychic Frog", 199, Rarity.RARE, mage.cards.p.PsychicFrog.class));
cards.add(new SetCardInfo("Scurry of Gremlins", 203, Rarity.UNCOMMON, mage.cards.s.ScurryOfGremlins.class));
cards.add(new SetCardInfo("Snow-Covered Wastes", 229, Rarity.UNCOMMON, mage.cards.s.SnowCoveredWastes.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Spawn-Gang Commander", 140, Rarity.UNCOMMON, mage.cards.s.SpawnGangCommander.class));
cards.add(new SetCardInfo("Swamp", 306, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Sylvan Safekeeper", 287, Rarity.RARE, mage.cards.s.SylvanSafekeeper.class));
cards.add(new SetCardInfo("Windswept Heath", 235, Rarity.RARE, mage.cards.w.WindsweptHeath.class));
Expand Down

0 comments on commit f079a7a

Please sign in to comment.