Implement [CLU] Stampede Surfer (#11844)

This commit is contained in:
Benjamin Giese 2024-02-24 00:02:27 -07:00 committed by GitHub
parent 5ae2244e2c
commit 59a62c92cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 71 additions and 0 deletions

View file

@ -0,0 +1,70 @@
package mage.cards.s;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.game.Game;
import mage.game.permanent.token.BoarToken;
import mage.game.permanent.token.Token;
import java.util.UUID;
public final class StampedeSurfer extends CardImpl {
public StampedeSurfer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R/G}{R/G}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WARRIOR);
this.power = new mage.MageInt(4);
this.toughness = new mage.MageInt(4);
// Haste
this.addAbility(HasteAbility.getInstance());
// Whenever Stampede Surfer attacks, for each opponent, you create a 2/2 green Boar creature token that's tapped and attacking that opponent.
this.addAbility(new AttacksTriggeredAbility(new StampedeSurferEffect()));
}
private StampedeSurfer(final StampedeSurfer card) {
super(card);
}
@Override
public StampedeSurfer copy() {
return new StampedeSurfer(this);
}
}
class StampedeSurferEffect extends OneShotEffect {
private static final Token token = new BoarToken();
StampedeSurferEffect() {
super(Outcome.Benefit);
staticText = "for each opponent, you create a 2/2 green Boar creature token that's tapped and attacking that opponent";
}
private StampedeSurferEffect(final StampedeSurferEffect effect) {
super(effect);
}
@Override
public StampedeSurferEffect copy() {
return new StampedeSurferEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
for (UUID playerId : game.getOpponents(source.getControllerId())) {
token.putOntoBattlefield(1, game, source, source.getControllerId(), true, true, playerId);
}
return true;
}
}

View file

@ -214,6 +214,7 @@ public final class RavnicaClueEdition extends ExpansionSet {
cards.add(new SetCardInfo("Snow Day", 100, Rarity.UNCOMMON, mage.cards.s.SnowDay.class));
cards.add(new SetCardInfo("Spawn of Mayhem", 122, Rarity.MYTHIC, mage.cards.s.SpawnOfMayhem.class));
cards.add(new SetCardInfo("Spellgorger Weird", 148, Rarity.COMMON, mage.cards.s.SpellgorgerWeird.class));
cards.add(new SetCardInfo("Stampede Surfer", 44, Rarity.RARE, mage.cards.s.StampedeSurfer.class));
cards.add(new SetCardInfo("Status // Statue", 210, Rarity.UNCOMMON, mage.cards.s.StatusStatue.class));
cards.add(new SetCardInfo("Steam Vents", 280, Rarity.RARE, mage.cards.s.SteamVents.class));
cards.add(new SetCardInfo("Steeple Creeper", 174, Rarity.COMMON, mage.cards.s.SteepleCreeper.class));