[BLC] Implement Flubs, the Fool (#12586)

This commit is contained in:
Cameron Merkel 2024-07-17 23:29:05 -05:00 committed by GitHub
parent 96b08ee6bf
commit 0d3590e579
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 81 additions and 0 deletions

View file

@ -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);
}
}

View file

@ -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));
}
}