mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
Implement Garbage Elemental
This commit is contained in:
parent
167deb812e
commit
1949b5f727
3 changed files with 88 additions and 12 deletions
|
|
@ -37,7 +37,7 @@ public final class GarbageElementalC extends CardImpl {
|
||||||
this.addAbility(new BattleCryAbility());
|
this.addAbility(new BattleCryAbility());
|
||||||
|
|
||||||
// When Garbage Elemental enters the battlefield, roll two six-sided dice. Create a number of 1/1 red Goblin creature tokens equal to the difference between those results.
|
// When Garbage Elemental enters the battlefield, roll two six-sided dice. Create a number of 1/1 red Goblin creature tokens equal to the difference between those results.
|
||||||
this.addAbility(new EntersBattlefieldAbility(new GarbageElementalEffect(),
|
this.addAbility(new EntersBattlefieldAbility(new GarbageElementalCEffect(),
|
||||||
null,
|
null,
|
||||||
"When {this} enters the battlefield, roll two six-sided dice. Create a number of 1/1 red Goblin creature tokens equal to the difference between those results",
|
"When {this} enters the battlefield, roll two six-sided dice. Create a number of 1/1 red Goblin creature tokens equal to the difference between those results",
|
||||||
null));
|
null));
|
||||||
|
|
@ -54,26 +54,20 @@ public final class GarbageElementalC extends CardImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class GarbageElementalEffect extends OneShotEffect {
|
class GarbageElementalCEffect extends OneShotEffect {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterPermanent("permanent with a counter");
|
GarbageElementalCEffect() {
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(new CounterPredicate(null));
|
|
||||||
}
|
|
||||||
|
|
||||||
GarbageElementalEffect() {
|
|
||||||
super(Outcome.PutCreatureInPlay);
|
super(Outcome.PutCreatureInPlay);
|
||||||
this.staticText = "roll two six-sided dice. Create a number of 1/1 red Goblin creature tokens equal to the difference between those results";
|
this.staticText = "roll two six-sided dice. Create a number of 1/1 red Goblin creature tokens equal to the difference between those results";
|
||||||
}
|
}
|
||||||
|
|
||||||
GarbageElementalEffect(final GarbageElementalEffect effect) {
|
GarbageElementalCEffect(final GarbageElementalCEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public GarbageElementalEffect copy() {
|
public GarbageElementalCEffect copy() {
|
||||||
return new GarbageElementalEffect(this);
|
return new GarbageElementalCEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
81
Mage.Sets/src/mage/cards/g/GarbageElementalD.java
Normal file
81
Mage.Sets/src/mage/cards/g/GarbageElementalD.java
Normal file
|
|
@ -0,0 +1,81 @@
|
||||||
|
|
||||||
|
package mage.cards.g;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.keyword.CascadeAbility;
|
||||||
|
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.players.Player;
|
||||||
|
import mage.target.common.TargetOpponent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author spjspj
|
||||||
|
*/
|
||||||
|
public final class GarbageElementalD extends CardImpl {
|
||||||
|
|
||||||
|
public GarbageElementalD(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.ELEMENTAL);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// Cascade
|
||||||
|
this.addAbility(new CascadeAbility());
|
||||||
|
|
||||||
|
// When Garbage Elemental enters the battlefield, roll a six-sided die. Garbage Elemental deals damage equal to the result to target opponent.
|
||||||
|
Ability ability = new EntersBattlefieldAbility(new GarbageElementalDEffect(),
|
||||||
|
null,
|
||||||
|
"When {this} enters the battlefield, roll a six-sided die. {this} deals damage equal to the result to target opponent",
|
||||||
|
null);
|
||||||
|
ability.addTarget(new TargetOpponent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public GarbageElementalD(final GarbageElementalD card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GarbageElementalD copy() {
|
||||||
|
return new GarbageElementalD(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class GarbageElementalDEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
GarbageElementalDEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "roll a six-sided die. {this} deals damage equal to the result to target opponent";
|
||||||
|
}
|
||||||
|
|
||||||
|
GarbageElementalDEffect(final GarbageElementalDEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GarbageElementalDEffect copy() {
|
||||||
|
return new GarbageElementalDEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
Player opponent = game.getPlayer(source.getFirstTarget());
|
||||||
|
if (controller != null && opponent != null) {
|
||||||
|
int damage = controller.rollDice(game, 6);
|
||||||
|
return game.damagePlayerOrPlaneswalker(opponent.getId(), damage, source.getId(), game, false, true);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -45,6 +45,7 @@ public final class Unstable extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Forest", 216, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(FrameStyle.UST_FULL_ART_BASIC, false)));
|
cards.add(new SetCardInfo("Forest", 216, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(FrameStyle.UST_FULL_ART_BASIC, false)));
|
||||||
cards.add(new SetCardInfo("GO TO JAIL", 8, Rarity.COMMON, mage.cards.g.GOTOJAIL.class));
|
cards.add(new SetCardInfo("GO TO JAIL", 8, Rarity.COMMON, mage.cards.g.GOTOJAIL.class));
|
||||||
cards.add(new SetCardInfo("Garbage Elemental", "82c", Rarity.UNCOMMON, mage.cards.g.GarbageElementalC.class));
|
cards.add(new SetCardInfo("Garbage Elemental", "82c", Rarity.UNCOMMON, mage.cards.g.GarbageElementalC.class));
|
||||||
|
cards.add(new SetCardInfo("Garbage Elemental", "82d", Rarity.UNCOMMON, mage.cards.g.GarbageElementalD.class));
|
||||||
cards.add(new SetCardInfo("Ground Pounder", 110, Rarity.COMMON, mage.cards.g.GroundPounder.class));
|
cards.add(new SetCardInfo("Ground Pounder", 110, Rarity.COMMON, mage.cards.g.GroundPounder.class));
|
||||||
cards.add(new SetCardInfo("Hammer Helper", 85, Rarity.COMMON, mage.cards.h.HammerHelper.class));
|
cards.add(new SetCardInfo("Hammer Helper", 85, Rarity.COMMON, mage.cards.h.HammerHelper.class));
|
||||||
cards.add(new SetCardInfo("Hammer Jammer", 86, Rarity.UNCOMMON, mage.cards.h.HammerJammer.class));
|
cards.add(new SetCardInfo("Hammer Jammer", 86, Rarity.UNCOMMON, mage.cards.h.HammerJammer.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue