Take working implementation of Ms. Bumbleflower from pull request, clean up unnecessary static rules text, and merge. (#12699)

Co-authored-by: DreamWaker
This commit is contained in:
Grath 2024-08-21 22:16:49 -04:00 committed by GitHub
parent 4cef508c86
commit 98989040ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,69 @@
package mage.cards.m;
import java.util.*;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.DrawCardTargetEffect;
import mage.abilities.effects.common.IfAbilityHasResolvedXTimesEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.constants.*;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.target.common.TargetCreaturePermanent;
import mage.target.common.TargetOpponent;
import mage.target.targetpointer.FirstTargetPointer;
import mage.target.targetpointer.SecondTargetPointer;
import mage.watchers.common.AbilityResolvedWatcher;
/**
*
* @author DreamWaker
*/
public final class MsBumbleflower extends CardImpl {
public MsBumbleflower(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[] { CardType.CREATURE }, "{1}{G}{W}{U}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.RABBIT);
this.subtype.add(SubType.CITIZEN);
this.power = new MageInt(1);
this.toughness = new MageInt(5);
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// Whenever you cast a spell, target opponent draws a card. Put a +1/+1 counter on target creature. It gains
// flying until end of turn. If this is the second time this ability has resolved this turn, you draw two cards.
Effect draw = new DrawCardTargetEffect(1);
draw.setTargetPointer(new FirstTargetPointer());
Effect counters = new AddCountersTargetEffect(CounterType.P1P1.createInstance());
counters.setTargetPointer(new SecondTargetPointer());
Effect flying = new GainAbilityTargetEffect(FlyingAbility.getInstance()).setText(" It gains flying until end of turn.");
flying.setTargetPointer(new SecondTargetPointer());
Ability ability = new SpellCastControllerTriggeredAbility(draw,StaticFilters.FILTER_SPELL_A, false);
ability.addTarget(new TargetOpponent());
ability.addEffect(counters);
ability.addEffect(flying);
ability.addTarget(new TargetCreaturePermanent(1));
ability.addEffect(new IfAbilityHasResolvedXTimesEffect(2, new DrawCardSourceControllerEffect(2, true)));
this.addAbility(ability, new AbilityResolvedWatcher());
}
private MsBumbleflower(final MsBumbleflower card) {
super(card);
}
@Override
public MsBumbleflower copy() {
return new MsBumbleflower(this);
}
}

View file

@ -178,6 +178,7 @@ public final class BloomburrowCommander extends ExpansionSet {
cards.add(new SetCardInfo("Morbid Opportunist", 183, Rarity.UNCOMMON, mage.cards.m.MorbidOpportunist.class));
cards.add(new SetCardInfo("Mossfire Valley", 316, Rarity.RARE, mage.cards.m.MossfireValley.class));
cards.add(new SetCardInfo("Mosswort Bridge", 317, Rarity.RARE, mage.cards.m.MosswortBridge.class));
cards.add(new SetCardInfo("Ms. Bumbleflower", 3, Rarity.MYTHIC, mage.cards.m.MsBumbleflower.class));
cards.add(new SetCardInfo("Murmuration", 10, Rarity.RARE, mage.cards.m.Murmuration.class));
cards.add(new SetCardInfo("Mystic Monastery", 318, Rarity.UNCOMMON, mage.cards.m.MysticMonastery.class));
cards.add(new SetCardInfo("Nadier's Nightblade", 184, Rarity.UNCOMMON, mage.cards.n.NadiersNightblade.class));