Skip to content

Commit

Permalink
[MH3] Implement Scurry of Gremlins
Browse files Browse the repository at this point in the history
  • Loading branch information
theelk801 committed Feb 24, 2024
1 parent ee0ba61 commit 6e8c667
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 0 deletions.
56 changes: 56 additions & 0 deletions Mage.Sets/src/mage/cards/s/ScurryOfGremlins.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package mage.cards.s;

import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.PayEnergyCost;
import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.StaticFilters;
import mage.game.permanent.token.GremlinToken;

import java.util.UUID;

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

public ScurryOfGremlins(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{W}");

// When Scurry of Gremlins enters the battlefield, create two 1/1 red Gremlin creature tokens. Then you get an amount of {E} equal to the number of creatures you control.
Ability ability = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new GremlinToken(), 2));
ability.addEffect(new GetEnergyCountersControllerEffect(CreaturesYouControlCount.instance)
.setText("then you get an amount of {E} equal to the number of creatures you control"));
this.addAbility(ability.addHint(CreaturesYouControlHint.instance));

// Pay {E}{E}{E}{E}: Creatures you control get +1/+0 and gain haste until end of turn.
ability = new SimpleActivatedAbility(new BoostControlledEffect(
1, 0, Duration.EndOfTurn
).setText("creatures you control get +1/+0"), new PayEnergyCost(4));
ability.addEffect(new GainAbilityControlledEffect(
HasteAbility.getInstance(), Duration.EndOfTurn,
StaticFilters.FILTER_PERMANENT_CREATURE
).setText("and gain haste until end of turn"));
this.addAbility(ability);
}

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

@Override
public ScurryOfGremlins copy() {
return new ScurryOfGremlins(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 @@ -31,6 +31,7 @@ private ModernHorizons3() {
cards.add(new SetCardInfo("Polluted Delta", 224, Rarity.RARE, mage.cards.p.PollutedDelta.class));
cards.add(new SetCardInfo("Priest of Titania", 286, Rarity.UNCOMMON, mage.cards.p.PriestOfTitania.class));
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("Swamp", 306, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Windswept Heath", 235, Rarity.RARE, mage.cards.w.WindsweptHeath.class));
cards.add(new SetCardInfo("Wooded Foothills", 236, Rarity.RARE, mage.cards.w.WoodedFoothills.class));
Expand Down
28 changes: 28 additions & 0 deletions Mage/src/main/java/mage/game/permanent/token/Gremlin11Token.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package mage.game.permanent.token;

import mage.MageInt;
import mage.constants.CardType;
import mage.constants.SubType;

/**
* @author TheElk801
*/
public final class Gremlin11Token extends TokenImpl {

public Gremlin11Token() {
super("Gremlin Token", "1/1 red Gremlin creature token");
cardType.add(CardType.CREATURE);
subtype.add(SubType.GREMLIN);
color.setRed(true);
power = new MageInt(1);
toughness = new MageInt(1);
}

private Gremlin11Token(final Gremlin11Token token) {
super(token);
}

public Gremlin11Token copy() {
return new Gremlin11Token(this);
}
}

0 comments on commit 6e8c667

Please sign in to comment.