mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 03:39:54 -08:00
Implemented Full Flowering
This commit is contained in:
parent
8b9cdcd48c
commit
5ee9ed5fa8
2 changed files with 66 additions and 0 deletions
65
Mage.Sets/src/mage/cards/f/FullFlowering.java
Normal file
65
Mage.Sets/src/mage/cards/f/FullFlowering.java
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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("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("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("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("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("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));
|
cards.add(new SetCardInfo("Ghastly Conscription", 115, Rarity.MYTHIC, mage.cards.g.GhastlyConscription.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue