From 38bd41cec6694e6d1a2c9f979676169d12f663e0 Mon Sep 17 00:00:00 2001 From: Agetian Date: Tue, 9 Sep 2014 05:46:49 +0000 Subject: [PATCH] - Added a special AI logic to guild lands such that the AI does not bounce played guild lands back to hand with their own triggered ability. --- forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java | 8 ++++++++ forge-gui/res/cardsfolder/a/azorius_chancery.txt | 2 +- forge-gui/res/cardsfolder/b/boros_garrison.txt | 2 +- forge-gui/res/cardsfolder/d/dimir_aqueduct.txt | 2 +- forge-gui/res/cardsfolder/g/golgari_rot_farm.txt | 2 +- forge-gui/res/cardsfolder/g/gruul_turf.txt | 2 +- forge-gui/res/cardsfolder/i/izzet_boilerworks.txt | 2 +- forge-gui/res/cardsfolder/o/orzhov_basilica.txt | 2 +- forge-gui/res/cardsfolder/r/rakdos_carnarium.txt | 2 +- forge-gui/res/cardsfolder/s/selesnya_sanctuary.txt | 2 +- forge-gui/res/cardsfolder/s/simic_growth_chamber.txt | 2 +- 11 files changed, 18 insertions(+), 10 deletions(-) diff --git a/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java b/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java index 1238cb96b04..0c80479e16f 100644 --- a/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java @@ -1133,6 +1133,14 @@ public class ChangeZoneAi extends SpellAbilityAi { if( fetchList.isEmpty() ) return null; + + if (sa.hasParam("AILogic") && sa.getParam("AILogic").equals("NeverBounceItself")) { + Card source = sa.getHostCard(); + if (fetchList.contains(source)) { + // For cards that should never be bounced back to hand with their own [e.g. triggered] abilities, such as guild lands. + fetchList.remove(source); + } + } String type = sa.getParam("ChangeType"); if (type == null) { diff --git a/forge-gui/res/cardsfolder/a/azorius_chancery.txt b/forge-gui/res/cardsfolder/a/azorius_chancery.txt index b7540fd6613..4328c9df1ef 100644 --- a/forge-gui/res/cardsfolder/a/azorius_chancery.txt +++ b/forge-gui/res/cardsfolder/a/azorius_chancery.txt @@ -4,7 +4,7 @@ Types:Land K:CARDNAME enters the battlefield tapped. A:AB$ Mana | Cost$ T | Produced$ W U | SpellDescription$ Add {W}{U} to your mana pool. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigReturn | TriggerDescription$ When CARDNAME enters the battlefield, return a land you control to its owner's hand. -SVar:TrigReturn:DB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl +SVar:TrigReturn:DB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl | AILogic$ NeverBounceItself SVar:NeedsToPlay:Land.Basic+YouCtrl SVar:Picture:http://www.wizards.com/global/images/magic/general/azorius_chancery.jpg Oracle:Azorius Chancery enters the battlefield tapped.\nWhen Azorius Chancery enters the battlefield, return a land you control to its owner's hand.\n{T}: Add {W}{U} to your mana pool. diff --git a/forge-gui/res/cardsfolder/b/boros_garrison.txt b/forge-gui/res/cardsfolder/b/boros_garrison.txt index c9cb313ac02..8433ec4fb29 100644 --- a/forge-gui/res/cardsfolder/b/boros_garrison.txt +++ b/forge-gui/res/cardsfolder/b/boros_garrison.txt @@ -4,7 +4,7 @@ Types:Land K:CARDNAME enters the battlefield tapped. A:AB$ Mana | Cost$ T | Produced$ R W | SpellDescription$ Add {R}{W} to your mana pool. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigReturn | TriggerDescription$ When CARDNAME enters the battlefield, return a land you control to its owner's hand. -SVar:TrigReturn:DB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl +SVar:TrigReturn:DB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl | AILogic$ NeverBounceItself SVar:NeedsToPlay:Land.Basic+YouCtrl SVar:Picture:http://www.wizards.com/global/images/magic/general/boros_garrison.jpg Oracle:Boros Garrison enters the battlefield tapped.\nWhen Boros Garrison enters the battlefield, return a land you control to its owner's hand.\n{T}: Add {R}{W} to your mana pool. diff --git a/forge-gui/res/cardsfolder/d/dimir_aqueduct.txt b/forge-gui/res/cardsfolder/d/dimir_aqueduct.txt index c92e4bf570e..e5c3e69e5bf 100644 --- a/forge-gui/res/cardsfolder/d/dimir_aqueduct.txt +++ b/forge-gui/res/cardsfolder/d/dimir_aqueduct.txt @@ -4,7 +4,7 @@ Types:Land K:CARDNAME enters the battlefield tapped. A:AB$ Mana | Cost$ T | Produced$ U B | SpellDescription$ Add {U}{B} to your mana pool. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigReturn | TriggerDescription$ When CARDNAME enters the battlefield, return a land you control to its owner's hand. -SVar:TrigReturn:AB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl +SVar:TrigReturn:AB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl | AILogic$ NeverBounceItself SVar:NeedsToPlay:Land.Basic+YouCtrl SVar:Picture:http://www.wizards.com/global/images/magic/general/dimir_aqueduct.jpg Oracle:Dimir Aqueduct enters the battlefield tapped.\nWhen Dimir Aqueduct enters the battlefield, return a land you control to its owner's hand.\n{T}: Add {U}{B} to your mana pool. diff --git a/forge-gui/res/cardsfolder/g/golgari_rot_farm.txt b/forge-gui/res/cardsfolder/g/golgari_rot_farm.txt index 9c8f7d53225..a99c28da5d1 100644 --- a/forge-gui/res/cardsfolder/g/golgari_rot_farm.txt +++ b/forge-gui/res/cardsfolder/g/golgari_rot_farm.txt @@ -4,7 +4,7 @@ Types:Land K:CARDNAME enters the battlefield tapped. A:AB$ Mana | Cost$ T | Produced$ B G | SpellDescription$ Add {B}{G} to your mana pool. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigReturn | TriggerDescription$ When CARDNAME enters the battlefield, return a land you control to its owner's hand. -SVar:TrigReturn:AB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl +SVar:TrigReturn:AB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl | AILogic$ NeverBounceItself SVar:NeedsToPlay:Land.Basic+YouCtrl SVar:Picture:http://www.wizards.com/global/images/magic/general/golgari_rot_farm.jpg Oracle:Golgari Rot Farm enters the battlefield tapped.\nWhen Golgari Rot Farm enters the battlefield, return a land you control to its owner's hand.\n{T}: Add {B}{G} to your mana pool. diff --git a/forge-gui/res/cardsfolder/g/gruul_turf.txt b/forge-gui/res/cardsfolder/g/gruul_turf.txt index b10d339ce18..0133b313660 100644 --- a/forge-gui/res/cardsfolder/g/gruul_turf.txt +++ b/forge-gui/res/cardsfolder/g/gruul_turf.txt @@ -4,7 +4,7 @@ Types:Land K:CARDNAME enters the battlefield tapped. A:AB$ Mana | Cost$ T | Produced$ R G | SpellDescription$ Add {R}{G} to your mana pool. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigReturn | TriggerDescription$ When CARDNAME enters the battlefield, return a land you control to its owner's hand. -SVar:TrigReturn:AB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl +SVar:TrigReturn:AB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl | AILogic$ NeverBounceItself SVar:NeedsToPlay:Land.Basic+YouCtrl SVar:Picture:http://www.wizards.com/global/images/magic/general/gruul_turf.jpg Oracle:Gruul Turf enters the battlefield tapped.\nWhen Gruul Turf enters the battlefield, return a land you control to its owner's hand.\n{T}: Add {R}{G} to your mana pool. diff --git a/forge-gui/res/cardsfolder/i/izzet_boilerworks.txt b/forge-gui/res/cardsfolder/i/izzet_boilerworks.txt index 0a00d61b675..f97e01baec4 100644 --- a/forge-gui/res/cardsfolder/i/izzet_boilerworks.txt +++ b/forge-gui/res/cardsfolder/i/izzet_boilerworks.txt @@ -4,7 +4,7 @@ Types:Land K:CARDNAME enters the battlefield tapped. A:AB$ Mana | Cost$ T | Produced$ U R | SpellDescription$ Add {U}{R} to your mana pool. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigReturn | TriggerDescription$ When CARDNAME enters the battlefield, return a land you control to its owner's hand. -SVar:TrigReturn:AB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl +SVar:TrigReturn:AB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl | AILogic$ NeverBounceItself SVar:NeedsToPlay:Land.Basic+YouCtrl SVar:Picture:http://www.wizards.com/global/images/magic/general/izzet_boilerworks.jpg Oracle:Izzet Boilerworks enters the battlefield tapped.\nWhen Izzet Boilerworks enters the battlefield, return a land you control to its owner's hand.\n{T}: Add {U}{R} to your mana pool. diff --git a/forge-gui/res/cardsfolder/o/orzhov_basilica.txt b/forge-gui/res/cardsfolder/o/orzhov_basilica.txt index f3226fd5eaa..3ed27cedd42 100644 --- a/forge-gui/res/cardsfolder/o/orzhov_basilica.txt +++ b/forge-gui/res/cardsfolder/o/orzhov_basilica.txt @@ -3,7 +3,7 @@ ManaCost:no cost Types:Land K:CARDNAME enters the battlefield tapped. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigReturn | TriggerDescription$ When CARDNAME enters the battlefield, return a land you control to its owner's hand. -SVar:TrigReturn:AB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl +SVar:TrigReturn:AB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl | AILogic$ NeverBounceItself A:AB$ Mana | Cost$ T | Produced$ W B | SpellDescription$ Add {W}{B} to your mana pool. SVar:NeedsToPlay:Land.Basic+YouCtrl SVar:Picture:http://www.wizards.com/global/images/magic/general/orzhov_basilica.jpg diff --git a/forge-gui/res/cardsfolder/r/rakdos_carnarium.txt b/forge-gui/res/cardsfolder/r/rakdos_carnarium.txt index 22023a18b5d..824677170c8 100644 --- a/forge-gui/res/cardsfolder/r/rakdos_carnarium.txt +++ b/forge-gui/res/cardsfolder/r/rakdos_carnarium.txt @@ -4,7 +4,7 @@ Types:Land K:CARDNAME enters the battlefield tapped. A:AB$ Mana | Cost$ T | Produced$ B R | SpellDescription$ Add {B}{R} to your mana pool. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigReturn | TriggerDescription$ When CARDNAME enters the battlefield, return a land you control to its owner's hand. -SVar:TrigReturn:AB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl +SVar:TrigReturn:AB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl | AILogic$ NeverBounceItself SVar:NeedsToPlay:Land.Basic+YouCtrl SVar:Picture:http://www.wizards.com/global/images/magic/general/rakdos_carnarium.jpg Oracle:Rakdos Carnarium enters the battlefield tapped.\nWhen Rakdos Carnarium enters the battlefield, return a land you control to its owner's hand.\n{T}: Add {B}{R} to your mana pool. diff --git a/forge-gui/res/cardsfolder/s/selesnya_sanctuary.txt b/forge-gui/res/cardsfolder/s/selesnya_sanctuary.txt index 9e6b4392232..b691d664119 100644 --- a/forge-gui/res/cardsfolder/s/selesnya_sanctuary.txt +++ b/forge-gui/res/cardsfolder/s/selesnya_sanctuary.txt @@ -4,7 +4,7 @@ Types:Land K:CARDNAME enters the battlefield tapped. A:AB$ Mana | Cost$ T | Produced$ G W | SpellDescription$ Add {G}{W} to your mana pool. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigReturn | TriggerDescription$ When CARDNAME enters the battlefield, return a land you control to its owner's hand. -SVar:TrigReturn:AB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl +SVar:TrigReturn:AB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl | AILogic$ NeverBounceItself SVar:NeedsToPlay:Land.Basic+YouCtrl SVar:Picture:http://www.wizards.com/global/images/magic/general/selesnya_sanctuary.jpg Oracle:Selesnya Sanctuary enters the battlefield tapped.\nWhen Selesnya Sanctuary enters the battlefield, return a land you control to its owner's hand.\n{T}: Add {G}{W} to your mana pool. diff --git a/forge-gui/res/cardsfolder/s/simic_growth_chamber.txt b/forge-gui/res/cardsfolder/s/simic_growth_chamber.txt index 609898a37c8..d855af0a86b 100644 --- a/forge-gui/res/cardsfolder/s/simic_growth_chamber.txt +++ b/forge-gui/res/cardsfolder/s/simic_growth_chamber.txt @@ -4,7 +4,7 @@ Types:Land K:CARDNAME enters the battlefield tapped. A:AB$ Mana | Cost$ T | Produced$ G U | SpellDescription$ Add {G}{U} to your mana pool. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigReturn | TriggerDescription$ When CARDNAME enters the battlefield, return a land you control to its owner's hand. -SVar:TrigReturn:AB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl +SVar:TrigReturn:AB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouCtrl | AILogic$ NeverBounceItself SVar:NeedsToPlay:Land.Basic+YouCtrl SVar:Picture:http://www.wizards.com/global/images/magic/general/simic_growth_chamber.jpg Oracle:Simic Growth Chamber enters the battlefield tapped.\nWhen Simic Growth Chamber enters the battlefield, return a land you control to its owner's hand.\n{T}: Add {G}{U} to your mana pool.