From 0d3590e57918b5078d07c1e37e9736d45e9324ce Mon Sep 17 00:00:00 2001 From: Cameron Merkel <44722506+Cguy7777@users.noreply.github.com> Date: Wed, 17 Jul 2024 23:29:05 -0500 Subject: [PATCH] [BLC] Implement Flubs, the Fool (#12586) --- Mage.Sets/src/mage/cards/f/FlubsTheFool.java | 80 +++++++++++++++++++ .../src/mage/sets/BloomburrowCommander.java | 1 + 2 files changed, 81 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/FlubsTheFool.java diff --git a/Mage.Sets/src/mage/cards/f/FlubsTheFool.java b/Mage.Sets/src/mage/cards/f/FlubsTheFool.java new file mode 100644 index 00000000000..4eb42eba9b2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FlubsTheFool.java @@ -0,0 +1,80 @@ +package mage.cards.f; + +import java.util.UUID; + +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.HellbentCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.PlayAdditionalLandsControllerEffect; +import mage.abilities.effects.common.discard.DiscardControllerEffect; +import mage.constants.*; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * @author Cguy7777 + */ +public final class FlubsTheFool extends CardImpl { + + public FlubsTheFool(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{U}{R}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.FROG); + this.subtype.add(SubType.SCOUT); + this.power = new MageInt(0); + this.toughness = new MageInt(5); + + // You may play an additional land on each of your turns. + this.addAbility(new SimpleStaticAbility( + new PlayAdditionalLandsControllerEffect(1, Duration.WhileOnBattlefield))); + + // Whenever you play a land or cast a spell, draw a card if you have no cards in hand. Otherwise, discard a card. + this.addAbility(new FlubsTheFoolTriggeredAbility()); + } + + private FlubsTheFool(final FlubsTheFool card) { + super(card); + } + + @Override + public FlubsTheFool copy() { + return new FlubsTheFool(this); + } +} + +class FlubsTheFoolTriggeredAbility extends TriggeredAbilityImpl { + + FlubsTheFoolTriggeredAbility() { + super(Zone.BATTLEFIELD, new ConditionalOneShotEffect( + new DrawCardSourceControllerEffect(1), + new DiscardControllerEffect(1), + HellbentCondition.instance, + "draw a card if you have no cards in hand. Otherwise, discard a card")); + setTriggerPhrase("Whenever you play a land or cast a spell, "); + } + + private FlubsTheFoolTriggeredAbility(final FlubsTheFoolTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.LAND_PLAYED || event.getType() == GameEvent.EventType.SPELL_CAST; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return event.getPlayerId().equals(controllerId); + } + + @Override + public FlubsTheFoolTriggeredAbility copy() { + return new FlubsTheFoolTriggeredAbility(this); + } +} diff --git a/Mage.Sets/src/mage/sets/BloomburrowCommander.java b/Mage.Sets/src/mage/sets/BloomburrowCommander.java index 5717273cd4a..1184f9c3943 100644 --- a/Mage.Sets/src/mage/sets/BloomburrowCommander.java +++ b/Mage.Sets/src/mage/sets/BloomburrowCommander.java @@ -20,6 +20,7 @@ public final class BloomburrowCommander extends ExpansionSet { this.hasBasicLands = false; cards.add(new SetCardInfo("Chatterfang, Squirrel General", 82, Rarity.MYTHIC, mage.cards.c.ChatterfangSquirrelGeneral.class)); + cards.add(new SetCardInfo("Flubs, the Fool", 356, Rarity.MYTHIC, mage.cards.f.FlubsTheFool.class)); cards.add(new SetCardInfo("Jace, the Mind Sculptor", 75, Rarity.MYTHIC, mage.cards.j.JaceTheMindSculptor.class)); } }