[ONE] Implement Furnace Punisher (#9995)

This commit is contained in:
Merlingilb 2023-02-19 03:10:15 +01:00 committed by GitHub
parent 1caee038cb
commit cfa2523eeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 81 additions and 0 deletions

View file

@ -0,0 +1,80 @@
package mage.cards.f;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterLandPermanent;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
public class FurnacePunisher extends CardImpl {
public FurnacePunisher(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
this.addSubType(SubType.PHYREXIAN);
this.addSubType(SubType.WARRIOR);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
//Menace
this.addAbility(new MenaceAbility(false));
//At the beginning of each players upkeep, Furnace Punisher deals 2 damage to that player unless they control
//two or more basic lands.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new FurnacePunisherEffect(),
TargetController.EACH_PLAYER,
false
).setTriggerPhrase("At the beginning of each player's upkeep, "));
}
private FurnacePunisher(final FurnacePunisher card) {
super(card);
}
@Override
public FurnacePunisher copy() {
return new FurnacePunisher(this);
}
}
class FurnacePunisherEffect extends OneShotEffect {
private static final FilterLandPermanent filter = new FilterLandPermanent();
static {
filter.add(SuperType.BASIC.getPredicate());
}
FurnacePunisherEffect() {
super(Outcome.Benefit);
staticText = "{this} deals 2 damage to that player unless they control two or more basic lands";
}
private FurnacePunisherEffect(final FurnacePunisherEffect effect) {
super(effect);
}
@Override
public FurnacePunisherEffect copy() {
return new FurnacePunisherEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(game.getActivePlayerId());
if (player != null) {
if (!game.getBattlefield().containsControlled(filter, player.getId(), source, game, 2)) {
player.damage(2, source, game);
}
return true;
}
return false;
}
}

View file

@ -83,6 +83,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet {
cards.add(new SetCardInfo("Font of Progress", 51, Rarity.UNCOMMON, mage.cards.f.FontOfProgress.class));
cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Free from Flesh", 131, Rarity.COMMON, mage.cards.f.FreeFromFlesh.class));
cards.add(new SetCardInfo("Furnace Punisher", 132, Rarity.UNCOMMON, mage.cards.f.FurnacePunisher.class));
cards.add(new SetCardInfo("Furnace Skullbomb", 228, Rarity.COMMON, mage.cards.f.FurnaceSkullbomb.class));
cards.add(new SetCardInfo("Furnace Strider", 133, Rarity.COMMON, mage.cards.f.FurnaceStrider.class));
cards.add(new SetCardInfo("Gitaxian Anatomist", 52, Rarity.COMMON, mage.cards.g.GitaxianAnatomist.class));