diff --git a/res/cardsfolder/a/angels_grace.txt b/res/cardsfolder/a/angels_grace.txt index e13f3eb131f..73dd5c6e417 100644 --- a/res/cardsfolder/a/angels_grace.txt +++ b/res/cardsfolder/a/angels_grace.txt @@ -3,11 +3,10 @@ ManaCost:W Types:Instant Text:no text K:Split second -A:SP$ Effect | Cost$ W | Name$ Angel's Grace Effect | Keywords$ CantLose,OppsCantWin,AliFromCairo | SpellDescription$ You can't lose the game this turn and your opponents can't win the game this turn. Until end of turn, damage that would reduce your life total to less than 1 reduces it to 1 instead. +A:SP$ Effect | Cost$ W | Name$ Angel's Grace Effect | Keywords$ CantLose,OppsCantWin,AliFromCairo | AILogic$ Fog | SpellDescription$ You can't lose the game this turn and your opponents can't win the game this turn. Until end of turn, damage that would reduce your life total to less than 1 reduces it to 1 instead. SVar:CantLose:You can't lose the game. SVar:OppsCantWin:Your opponents can't win the game. SVar:AliFromCairo:Damage that would reduce your life total to less than 1 reduces it to 1 instead. -SVar:RemAIDeck:True SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/angels_grace.jpg SetInfo:TSP|Rare|http://magiccards.info/scans/en/ts/3.jpg diff --git a/res/cardsfolder/c/chameleon_blur.txt b/res/cardsfolder/c/chameleon_blur.txt index e10d810cb2a..f3e4a7cf81b 100644 --- a/res/cardsfolder/c/chameleon_blur.txt +++ b/res/cardsfolder/c/chameleon_blur.txt @@ -2,7 +2,7 @@ Name:Chameleon Blur ManaCost:3 G Types:Instant Text:no text -A:SP$ Effect | Cost$ 3 G | Name$ Chameleon Blur Effect | StaticAbilities$ STPrevent | SpellDescription$ Prevent all damage that creatures would deal to players this turn. +A:SP$ Effect | Cost$ 3 G | Name$ Chameleon Blur Effect | StaticAbilities$ STPrevent | AILogic$ Fog | SpellDescription$ Prevent all damage that creatures would deal to players this turn. SVar:STPrevent:Mode$ PreventDamage | Source$ Creature | Target$ Player | Description$ Prevent all damage that creatures would deal to players this turn. SVar:RemAIDeck:True SVar:Rarity:Common diff --git a/res/cardsfolder/e/endure.txt b/res/cardsfolder/e/endure.txt index 8e0382abc5b..3dd54efd78d 100644 --- a/res/cardsfolder/e/endure.txt +++ b/res/cardsfolder/e/endure.txt @@ -2,7 +2,7 @@ Name:Endure ManaCost:3 W W Types:Instant Text:no text -A:SP$ Effect | Cost$ 3 W W | Name$ Endure Effect | StaticAbilities$ STPrevent | SpellDescription$ Prevent all damage that would be dealt to you and permanents you control this turn. +A:SP$ Effect | Cost$ 3 W W | Name$ Endure Effect | StaticAbilities$ STPrevent | AILogic$ Fog | SpellDescription$ Prevent all damage that would be dealt to you and permanents you control this turn. SVar:STPrevent:Mode$ PreventDamage | Target$ You,Permanent.YouCtrl | Description$ Prevent all damage that would be dealt to you and permanents you control this turn. SVar:RemAIDeck:True SVar:Rarity:Uncommon diff --git a/res/cardsfolder/e/ethereal_haze.txt b/res/cardsfolder/e/ethereal_haze.txt index c0e7696f037..535f8b9e815 100644 --- a/res/cardsfolder/e/ethereal_haze.txt +++ b/res/cardsfolder/e/ethereal_haze.txt @@ -2,9 +2,8 @@ Name:Ethereal Haze ManaCost:W Types:Instant Text:no text -A:SP$ Effect | Cost$ W | Name$ Chameleon Ethereal Haze Effect | StaticAbilities$ STPrevent | SpellDescription$ Prevent all damage that would be dealt by creatures this turn. +A:SP$ Effect | Cost$ W | Name$ Chameleon Ethereal Haze Effect | StaticAbilities$ STPrevent | AILogic$ Fog | SpellDescription$ Prevent all damage that would be dealt by creatures this turn. SVar:STPrevent:Mode$ PreventDamage | Source$ Creature | Description$ Prevent all damage that would be dealt by creatures this turn. -SVar:RemAIDeck:True SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/ethereal_haze.jpg SetInfo:CHK|Common|http://magiccards.info/scans/en/chk/9.jpg diff --git a/res/cardsfolder/h/harmless_assault.txt b/res/cardsfolder/h/harmless_assault.txt index 4e3584bd746..7608b03e9a9 100644 --- a/res/cardsfolder/h/harmless_assault.txt +++ b/res/cardsfolder/h/harmless_assault.txt @@ -2,9 +2,8 @@ Name:Harmless Assault ManaCost:2 W W Types:Instant Text:no text -A:SP$ Effect | Cost$ 2 W W | Name$ Harmless Assault Effect | StaticAbilities$ STPrevent | SpellDescription$ Prevent all combat damage that would be dealt this turn by attacking creatures. +A:SP$ Effect | Cost$ 2 W W | Name$ Harmless Assault Effect | StaticAbilities$ STPrevent | AILogic$ Fog | SpellDescription$ Prevent all combat damage that would be dealt this turn by attacking creatures. SVar:STPrevent:Mode$ PreventDamage | Source$ Creature.attacking | CombatDamage$ True | Description$ Prevent all combat damage that would be dealt this turn by attacking creatures. -SVar:RemAIDeck:True SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/harmless_assault.jpg SetInfo:ROE|Common|http://magiccards.info/scans/en/roe/24.jpg diff --git a/res/cardsfolder/s/safe_passage.txt b/res/cardsfolder/s/safe_passage.txt index e8ea75aadd7..f5defa0de85 100644 --- a/res/cardsfolder/s/safe_passage.txt +++ b/res/cardsfolder/s/safe_passage.txt @@ -2,9 +2,8 @@ Name:Safe Passage ManaCost:2 W Types:Instant Text:no text -A:SP$ Effect | Cost$ 2 W | Name$ Safe Passage Effect | StaticAbilities$ STPrevent | SpellDescription$ Prevent all damage that would be dealt to you and creatures you control this turn. +A:SP$ Effect | Cost$ 2 W | Name$ Safe Passage Effect | StaticAbilities$ STPrevent | AILogic$ Fog | SpellDescription$ Prevent all damage that would be dealt to you and creatures you control this turn. SVar:STPrevent:Mode$ PreventDamage | Target$ You,Creature.YouCtrl | Description$ Prevent all damage that would be dealt to you and creatures you control this turn. -SVar:RemAIDeck:True SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/safe_passage.jpg SetInfo:M11|Common|http://magiccards.info/scans/en/m11/26.jpg diff --git a/res/cardsfolder/s/silence.txt b/res/cardsfolder/s/silence.txt index 92ff6e8f133..62ee70ff879 100644 --- a/res/cardsfolder/s/silence.txt +++ b/res/cardsfolder/s/silence.txt @@ -2,9 +2,8 @@ Name:Silence ManaCost:W Types:Instant Text:no text -A:SP$ Effect | Cost$ W | Name$ Silence Effect | StaticAbilities$ STCantBeCast | SpellDescription$ Your opponents can't cast spells this turn. (Spells cast before this resolves are unaffected.) +A:SP$ Effect | Cost$ W | Name$ Silence Effect | StaticAbilities$ STCantBeCast | AILogic$ BeginningOfOppTurn | SpellDescription$ Your opponents can't cast spells this turn. (Spells cast before this resolves are unaffected.) SVar:STCantBeCast:Mode$ CantBeCast | ValidCard$ Card | Caster$ Opponent | Description$ Your opponents can't cast spells. -SVar:RemAIDeck:True SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/silence.jpg SetInfo:M11|Rare|http://magiccards.info/scans/en/m11/30.jpg diff --git a/res/cardsfolder/t/tanglesap.txt b/res/cardsfolder/t/tanglesap.txt index 804cbe70027..d4a18f5ea5f 100644 --- a/res/cardsfolder/t/tanglesap.txt +++ b/res/cardsfolder/t/tanglesap.txt @@ -2,9 +2,8 @@ Name:Tanglesap ManaCost:1 G Types:Instant Text:no text -A:SP$ Effect | Cost$ 1 G | Name$ Tanglesap Effect | StaticAbilities$ STPrevent | SpellDescription$ Prevent all combat damage that would be dealt this turn by creatures without trample. +A:SP$ Effect | Cost$ 1 G | Name$ Tanglesap Effect | StaticAbilities$ STPrevent | AILogic$ Fog | SpellDescription$ Prevent all combat damage that would be dealt this turn by creatures without trample. SVar:STPrevent:Mode$ PreventDamage | Source$ Creature.withoutTrample | CombatDamage$ True | Description$ Prevent all combat damage that would be dealt this turn by creatures without trample. -SVar:RemAIDeck:True SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/tanglesap.jpg SetInfo:ZEN|Common|http://magiccards.info/scans/en/zen/186.jpg diff --git a/src/main/java/forge/card/abilityfactory/AbilityFactoryEffect.java b/src/main/java/forge/card/abilityfactory/AbilityFactoryEffect.java index f77cfdb5439..dc309935ed1 100644 --- a/src/main/java/forge/card/abilityfactory/AbilityFactoryEffect.java +++ b/src/main/java/forge/card/abilityfactory/AbilityFactoryEffect.java @@ -7,6 +7,7 @@ import forge.AllZone; import forge.AllZoneUtil; import forge.Card; import forge.CardList; +import forge.CombatUtil; import forge.Command; import forge.ComputerUtil; import forge.Constant; @@ -208,9 +209,22 @@ public class AbilityFactoryEffect { if(phase.isPlayerTurn(AllZone.getComputerPlayer()) || phase.isAfter(Constant.Phase.DRAW)) { return false; - } else { - randomReturn = true; } + randomReturn = true; + } else if (logic.equals("Fog")) { + if (AllZone.getPhase().isPlayerTurn(sa.getActivatingPlayer())) { + return false; + } + if (!AllZone.getPhase().is(Constant.Phase.COMBAT_DECLARE_BLOCKERS_INSTANT_ABILITY)) { + return false; + } + if (AllZone.getStack().size() != 0) { + return false; + } + if (AllZone.getPhase().isPreventCombatDamageThisTurn()) { + return false; + } + randomReturn = CombatUtil.lifeInDanger(AllZone.getCombat()); } }