From df82cd3fb4c90ae792b695dc3d92414f7dc0001d Mon Sep 17 00:00:00 2001 From: swordshine Date: Sat, 30 Mar 2013 04:59:02 +0000 Subject: [PATCH] - Added Soulbright Flamekin --- .gitattributes | 1 + res/cardsfolder/s/soulbright_flamekin.txt | 16 ++++++++++++++++ .../forge/card/ability/effects/ManaEffect.java | 7 +++++++ 3 files changed, 24 insertions(+) create mode 100644 res/cardsfolder/s/soulbright_flamekin.txt diff --git a/.gitattributes b/.gitattributes index 58b2e4bc3f9..f171d371d86 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9946,6 +9946,7 @@ res/cardsfolder/s/soul_tithe.txt -text res/cardsfolder/s/soul_warden.txt svneol=native#text/plain res/cardsfolder/s/soulblast.txt -text res/cardsfolder/s/soulbound_guardians.txt svneol=native#text/plain +res/cardsfolder/s/soulbright_flamekin.txt -text res/cardsfolder/s/soulcage_fiend.txt -text res/cardsfolder/s/soulcatcher.txt svneol=native#text/plain res/cardsfolder/s/soulcatchers_aerie.txt svneol=native#text/plain diff --git a/res/cardsfolder/s/soulbright_flamekin.txt b/res/cardsfolder/s/soulbright_flamekin.txt new file mode 100644 index 00000000000..358d61a0e3c --- /dev/null +++ b/res/cardsfolder/s/soulbright_flamekin.txt @@ -0,0 +1,16 @@ +Name:Soulbright Flamekin +ManaCost:1 R +Types:Creature Elemental Shaman +PT:2/1 +A:AB$ Pump | Cost$ 2 | ValidTgts$ Creature | TgtPrompt$ Select target creature | KW$ Trample | SubAbility$ StoreNum | SpellDescription$ Target creature gains trample until end of turn. If this is the third time this ability has resolved this turn, you may add R R R R R R R R to your mana pool. +SVar:StoreNum:DB$ StoreSVar | SVar$ SoulbrightNum | Type$ CountSVar | Expression$ SoulbrightNum/Plus.1 | SubAbility$ SoulbrightMana +SVar:SoulbrightMana:DB$ Mana | Produced$ R R R R R R R R | ConditionCheckSVar$ SoulbrightNum | ConditionSVarCompare$ EQ3 | Optional$ True +SVar:SoulbrightNum:Number$0 +T:Mode$ Phase | Phase$ Cleanup | Execute$ TrigReset | Static$ True +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigReset | Static$ True +SVar:TrigReset:AB$ StoreSVar | Cost$ 0 | SVar$ SoulbrightNum | Type$ Number | Expression$ 0 +SVar:RemAIDeck:True +SVar:Picture:http://www.wizards.com/global/images/magic/general/soulbright_flamekin.jpg +Oracle:{2}: Target creature gains trample until end of turn. If this is the third time this ability has resolved this turn, you may add {R}{R}{R}{R}{R}{R}{R}{R} to your mana pool. +SetInfo:DD2 Common +SetInfo:LRW Common \ No newline at end of file diff --git a/src/main/java/forge/card/ability/effects/ManaEffect.java b/src/main/java/forge/card/ability/effects/ManaEffect.java index 6af32728246..669217c6e61 100644 --- a/src/main/java/forge/card/ability/effects/ManaEffect.java +++ b/src/main/java/forge/card/ability/effects/ManaEffect.java @@ -18,6 +18,7 @@ import forge.game.ai.ComputerUtilCard; import forge.game.player.Player; import forge.game.zone.ZoneType; import forge.gui.GuiChoose; +import forge.gui.GuiDialog; public class ManaEffect extends SpellAbilityEffect { @@ -37,7 +38,13 @@ public class ManaEffect extends SpellAbilityEffect { final List tgtPlayers = getTargetPlayers(sa); final Target tgt = sa.getTarget(); + final boolean optional = sa.hasParam("Optional"); + if (optional) { + if (!GuiDialog.confirm(sa.getSourceCard(), "Do you want to add mana to your mana pool?")) { + return; + } + } if (abMana.isComboMana()) { for (Player p : tgtPlayers) { int amount = sa.hasParam("Amount") ? AbilityUtils.calculateAmount(card, sa.getParam("Amount"), sa) : 1;