1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-12 09:11:05 -09:00

Implemented Full Flowering

This commit is contained in:
Evan Kranzler 2019-08-07 13:40:03 -04:00
parent 8b9cdcd48c
commit 5ee9ed5fa8
2 changed files with 66 additions and 0 deletions
Mage.Sets/src/mage

View file

@ -0,0 +1,65 @@
package mage.cards.f;
import mage.abilities.Ability;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.PopulateEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.game.Game;
import java.util.UUID;
import java.util.stream.IntStream;
/**
* @author TheElk801
*/
public final class FullFlowering extends CardImpl {
public FullFlowering(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{G}");
// Populate X times.
this.getSpellAbility().addEffect(new FullFloweringEffect());
}
private FullFlowering(final FullFlowering card) {
super(card);
}
@Override
public FullFlowering copy() {
return new FullFlowering(this);
}
}
class FullFloweringEffect extends OneShotEffect {
private static final Effect effect = new PopulateEffect();
FullFloweringEffect() {
super(Outcome.Benefit);
staticText = "populate X times";
}
private FullFloweringEffect(final FullFloweringEffect effect) {
super(effect);
}
@Override
public FullFloweringEffect copy() {
return new FullFloweringEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
int xValue = source.getManaCostsToPay().getX();
if (xValue == 0) {
return true;
}
IntStream.range(0, xValue).forEach(i -> effect.apply(game, source));
return true;
}
}

View file

@ -51,6 +51,7 @@ public final class Commander2019Edition extends ExpansionSet {
cards.add(new SetCardInfo("Feldon of the Third Path", 141, Rarity.MYTHIC, mage.cards.f.FeldonOfTheThirdPath.class));
cards.add(new SetCardInfo("Forest", 300, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Forgotten Cave", 243, Rarity.UNCOMMON, mage.cards.f.ForgottenCave.class));
cards.add(new SetCardInfo("Full Flowering", 32, Rarity.COMMON, mage.cards.f.FullFlowering.class));
cards.add(new SetCardInfo("Garruk, Primal Hunter", 167, Rarity.MYTHIC, mage.cards.g.GarrukPrimalHunter.class));
cards.add(new SetCardInfo("Gerrard, Weatherlight Hero", 41, Rarity.RARE, mage.cards.g.GerrardWeatherlightHero.class));
cards.add(new SetCardInfo("Ghastly Conscription", 115, Rarity.MYTHIC, mage.cards.g.GhastlyConscription.class));