diff --git a/.gitattributes b/.gitattributes index 78a9d9d66ba..ccdf1f7247d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1686,6 +1686,7 @@ res/cardsfolder/c/champions_drake.txt svneol=native#text/plain res/cardsfolder/c/champions_helm.txt svneol=native#text/plain res/cardsfolder/c/champions_victory.txt svneol=native#text/plain res/cardsfolder/c/chance_encounter.txt -text +res/cardsfolder/c/chancellor_of_the_annex.txt -text res/cardsfolder/c/chancellor_of_the_dross.txt -text res/cardsfolder/c/chancellor_of_the_forge.txt -text res/cardsfolder/c/chancellor_of_the_spires.txt -text diff --git a/res/cardsfolder/c/chancellor_of_the_annex.txt b/res/cardsfolder/c/chancellor_of_the_annex.txt new file mode 100644 index 00000000000..2d7fec26884 --- /dev/null +++ b/res/cardsfolder/c/chancellor_of_the_annex.txt @@ -0,0 +1,19 @@ +Name:Chancellor of the Annex +ManaCost:4 W W W +Types:Creature Angel +PT:5/6 +Text:You may reveal this card from your opening hand. If you do, when each opponent casts his or her first spell of the game, counter that spell unless that player pays 1. +K:Flying +K:MayEffectFromOpeningHand:CounterFirstSpellEffect +SVar:CounterFirstSpellEffect:AB$ RepeatEach | Cost$ 0 | RepeatPlayers$ Player.Opponent | RepeatSubAbility$ DBEffect +SVar:DBEffect:DB$ Effect | Triggers$ TrigCounter | SVars$ TrigCounterSpell,RemoveEffect,SpellsNeedExtraManaEffect | EffectOwner$ Player.IsRemembered | Duration$ Permanent +SVar:TrigCounter:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ You | Execute$ TrigCounterSpell | OneOff$ True | TriggerZones$ Command | TriggerDescription$ Whenever an opponent casts a spell for the first time, counter that spell unless that player pays 1. +SVar:TrigCounterSpell:AB$ Counter | Cost$ 0 | Defined$ TriggeredSpellAbility | UnlessCost$ 1 | UnlessPayer$ You | SubAbility$ RemoveEffect +SVar:RemoveEffect:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile +SVar:SpellsNeedExtraManaEffect:1 +T:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ Opponent | Execute$ CounterSpellOpp | TriggerZones$ Battlefield | TriggerDescription$ Whenever an opponent casts a spell, counter it unless that player pays 1. +SVar:CounterSpellOpp:AB$ Counter | Cost$ 0 | Defined$ TriggeredSpellAbility | UnlessCost$ 1 | UnlessPayer$ TriggeredActivator +SVar:AI_SpellsNeedExtraMana:1 Opponent +SVar:Picture:http://www.wizards.com/global/images/magic/general/chancellor_of_the_annex.jpg +Oracle:You may reveal this card from your opening hand. If you do, when each opponent casts his or her first spell of the game, counter that spell unless that player pays {1}.\nFlying\nWhenever an opponent casts a spell, counter it unless that player pays {1}. +SetInfo:NPH Rare \ No newline at end of file diff --git a/src/main/java/forge/game/ai/ComputerUtilCost.java b/src/main/java/forge/game/ai/ComputerUtilCost.java index cccb46ca8cb..33e87b4b83f 100644 --- a/src/main/java/forge/game/ai/ComputerUtilCost.java +++ b/src/main/java/forge/game/ai/ComputerUtilCost.java @@ -361,6 +361,16 @@ public class ComputerUtilCost { } } } + for (Card c : player.getCardsIn(ZoneType.Command)) { + final String snem = c.getSVar("SpellsNeedExtraManaEffect"); + if (!StringUtils.isBlank(snem)) { + try { + extraManaNeeded += Integer.parseInt(snem); + } catch (final NumberFormatException e) { + System.out.println("wrong SpellsNeedExtraManaEffect SVar format on " + c); + } + } + } } return ComputerUtilMana.canPayManaCost(sa, player, extraManaNeeded)