[AFR] Implemented Swarming Goblins

This commit is contained in:
Evan Kranzler 2021-07-01 22:18:22 -04:00
parent c6d270e4e4
commit ed1c3ef7c6
2 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,60 @@
package mage.cards.s;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.RollDieWithResultTableEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.game.permanent.token.GoblinToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SwarmingGoblins extends CardImpl {
public SwarmingGoblins(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}");
this.subtype.add(SubType.GOBLIN);
this.power = new MageInt(4);
this.toughness = new MageInt(3);
// When Swarming Goblins enters the battlefield, roll a d20.
RollDieWithResultTableEffect effect = new RollDieWithResultTableEffect();
this.addAbility(new EntersBattlefieldTriggeredAbility(effect));
// 1-9 | Create a 1/1 red Goblin creature token.
effect.addTableEntry(
1, 9,
new CreateTokenEffect(new GoblinToken())
);
// 10-19 | Create two of those tokens.
effect.addTableEntry(
10, 19,
new CreateTokenEffect(new GoblinToken(), 2)
.setText("create two of those tokens")
);
// 20 | Create three of those tokens.
effect.addTableEntry(
20, 20,
new CreateTokenEffect(new GoblinToken(), 3)
.setText("create three of those tokens")
);
}
private SwarmingGoblins(final SwarmingGoblins card) {
super(card);
}
@Override
public SwarmingGoblins copy() {
return new SwarmingGoblins(this);
}
}

View file

@ -104,6 +104,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet {
cards.add(new SetCardInfo("Shambling Ghast", 119, Rarity.COMMON, mage.cards.s.ShamblingGhast.class));
cards.add(new SetCardInfo("Shortcut Seeker", 73, Rarity.COMMON, mage.cards.s.ShortcutSeeker.class));
cards.add(new SetCardInfo("Swamp", 270, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Swarming Goblins", 162, Rarity.COMMON, mage.cards.s.SwarmingGoblins.class));
cards.add(new SetCardInfo("Targ Nar, Demon-Fang Gnoll", 234, Rarity.UNCOMMON, mage.cards.t.TargNarDemonFangGnoll.class));
cards.add(new SetCardInfo("Tasha's Hideous Laughter", 78, Rarity.RARE, mage.cards.t.TashasHideousLaughter.class));
cards.add(new SetCardInfo("Tiamat", 235, Rarity.MYTHIC, mage.cards.t.Tiamat.class));