diff --git a/.gitattributes b/.gitattributes index 7bf2dea4a3c..6af084229f5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2221,6 +2221,7 @@ res/cardsfolder/d/daru_sanctifier.txt svneol=native#text/plain res/cardsfolder/d/daru_spiritualist.txt -text res/cardsfolder/d/daru_stinger.txt -text res/cardsfolder/d/daru_warchief.txt svneol=native#text/plain +res/cardsfolder/d/dash_hopes.txt -text res/cardsfolder/d/daunting_defender.txt svneol=native#text/plain res/cardsfolder/d/dauntless_dourbark.txt svneol=native#text/plain res/cardsfolder/d/dauntless_escort.txt svneol=native#text/plain diff --git a/res/cardsfolder/d/dash_hopes.txt b/res/cardsfolder/d/dash_hopes.txt new file mode 100644 index 00000000000..7c961fc9451 --- /dev/null +++ b/res/cardsfolder/d/dash_hopes.txt @@ -0,0 +1,12 @@ +Name:Dash Hopes +ManaCost:B B +Types:Instant +Text:no text +T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ TrigCounter | TriggerDescription$ When you cast CARDNAME, any player may pay 5 life. If a player does, counter CARDNAME. +SVar:TrigCounter:DB$ Counter | Cost$ 0 | UnlessCost$ PayLife<5> | Defined$ TriggeredSpellAbility | UnlessPayer$ Player | UnlessSwitched$ True +A:SP$ Counter | Cost$ B B | TargetType$ Spell | ValidTgts$ Card | SpellDescription$ Counter target spell. +SVar:Rarity:Common +SVar:Picture:http://www.wizards.com/global/images/magic/general/dash_hopes.jpg +SetInfo:PLC|Common|http://magiccards.info/scans/en/pc/68.jpg +Oracle:When you cast Dash Hopes, any player may pay 5 life. If a player does, counter Dash Hopes.\nCounter target spell. +End \ No newline at end of file diff --git a/res/cardsfolder/e/emrakul_the_aeons_torn.txt b/res/cardsfolder/e/emrakul_the_aeons_torn.txt index a3bdcd3dbe1..4d2112ee6d0 100644 --- a/res/cardsfolder/e/emrakul_the_aeons_torn.txt +++ b/res/cardsfolder/e/emrakul_the_aeons_torn.txt @@ -10,7 +10,7 @@ K:Annihilator 6 T:Mode$ ChangesZone | Origin$ Any | Destination$ Graveyard | ValidCard$ Creature.Self | Execute$ TrigShuffle | TriggerDescription$ When CARDNAME is put into a graveyard from anywhere, its owner shuffles his or her graveyard into his or her library. SVar:TrigShuffle:AB$ChangeZoneAll | Cost$ 0 | Defined$ TriggeredCardController | ChangeType$ Card | Origin$ Graveyard | Destination$ Library | Shuffle$ True T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ TrigAddTurn | TriggerDescription$ When you cast CARDNAME, take an extra turn after this one. -SVar:TrigAddTurn:AB$AddTurn | Cost$ 0 | Defined$ You | NumTurns$ 1 +SVar:TrigAddTurn:AB$ AddTurn | Cost$ 0 | Defined$ You | NumTurns$ 1 SVar:Rarity:Mythic SVar:Picture:http://www.wizards.com/global/images/magic/general/emrakul_the_aeons_torn.jpg SetInfo:ROE|Mythic|http://magiccards.info/scans/en/roe/4.jpg diff --git a/src/main/java/forge/card/abilityfactory/AbilityFactory.java b/src/main/java/forge/card/abilityfactory/AbilityFactory.java index 470dee09070..9b831e211aa 100644 --- a/src/main/java/forge/card/abilityfactory/AbilityFactory.java +++ b/src/main/java/forge/card/abilityfactory/AbilityFactory.java @@ -1580,7 +1580,7 @@ public class AbilityFactory { } }; - final Command paidCommand = new Command() { + Command paidCommand = new Command() { private static final long serialVersionUID = 8094833091127334678L; @Override @@ -1601,6 +1601,13 @@ public class AbilityFactory { AbilityFactory.resolveSubAbilities(sa, usedStack); } }; + + if (sa.hasParam("UnlessSwitched")) { + final Command dummy = paidCommand; + paidCommand = unpaidCommand; + unpaidCommand = dummy; + } + boolean paid = false; for (Player payer : payers) { if (payer.isComputer()) { diff --git a/src/main/java/forge/card/trigger/TriggerHandler.java b/src/main/java/forge/card/trigger/TriggerHandler.java index 0df5eb5e207..43b8b4ad83c 100644 --- a/src/main/java/forge/card/trigger/TriggerHandler.java +++ b/src/main/java/forge/card/trigger/TriggerHandler.java @@ -420,18 +420,17 @@ public class TriggerHandler { } // Torpor Orb check - if (!regtrig.isStatic() && mode.equals(TriggerType.ChangesZone)) { + if (game.getStaticEffects().getGlobalRuleChange(GlobalRuleChange.noCreatureETBTriggers) + && !regtrig.isStatic() && mode.equals(TriggerType.ChangesZone)) { if (runParams.get("Destination") instanceof String) { String dest = (String) runParams.get("Destination"); if (dest.equals("Battlefield") && runParams.get("Card") instanceof Card) { Card card = (Card) runParams.get("Card"); - if (card.isCreature() - && game.getStaticEffects().getGlobalRuleChange(GlobalRuleChange.noCreatureETBTriggers)) { + if (card.isCreature()) { return false; } } } - } // Torpor Orb check // Any trigger should cause the phase not to skip @@ -484,12 +483,10 @@ public class TriggerHandler { } sa.setStackDescription(sa.toString()); - // ---TODO - for Charms to supports AI, this needs to be removed - //if (sa[0].getActivatingPlayer().isHuman()) { if (sa.getApi() == ApiType.Charm && !sa.isWrapper()) { CharmEffect.makeChoices(sa); } - //} + Player decider = null; boolean mand = false; if (triggerParams.containsKey("OptionalDecider")) { @@ -515,15 +512,6 @@ public class TriggerHandler { wrapperAbility.setTrigger(true); wrapperAbility.setMandatory(isMandatory); wrapperAbility.setDescription(wrapperAbility.getStackDescription()); - /* - * if(host.getController().isHuman()) { - * Singletons.getModel().getGameAction().playSpellAbility(wrapperAbility); } else { - * wrapperAbility.doTrigger(isMandatory); - * ComputerUtil.playStack(wrapperAbility); } - */ - - // Card src = (Card)(sa[0].getSourceCard().getTriggeringObject("Card")); - // System.out.println("Trigger going on stack for "+mode+". Card = "+src); if (regtrig.isStatic()) { if (wrapperAbility.getActivatingPlayer().isHuman()) { @@ -532,7 +520,6 @@ public class TriggerHandler { wrapperAbility.doTrigger(isMandatory); ComputerUtil.playNoStack(wrapperAbility.getActivatingPlayer(), wrapperAbility); } - //Singletons.getModel().getGameAction().playSpellAbilityNoStack(wrapperAbility, false); } else { game.getStack().addSimultaneousStackEntry(wrapperAbility); }