From 345cacade914401d201f3239f9eecca776195bcb Mon Sep 17 00:00:00 2001 From: excessum Date: Sat, 7 Jun 2014 11:06:49 +0000 Subject: [PATCH] - Changed useRemovalNow() condition from isSpell() to !isTrigger. Added "PlayMain1" to Xenagod to make use of pre-combat trigger. --- forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java | 2 +- forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java | 2 +- forge-ai/src/main/java/forge/ai/ability/DestroyAi.java | 2 +- forge-ai/src/main/java/forge/ai/ability/PumpAi.java | 2 +- forge-gui/res/cardsfolder/x/xenagos_god_of_revels.txt | 1 + 5 files changed, 5 insertions(+), 4 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 6fda90246b5..54b88e7a428 100644 --- a/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java @@ -912,7 +912,7 @@ public class ChangeZoneAi extends SpellAbilityAi { choice = mostExpensive; } //option to hold removal instead only applies for single targeted removal - if (sa.isSpell() && tgt.getMaxTargets(source, sa) == 1) { + if (!sa.isTrigger() && tgt.getMaxTargets(source, sa) == 1) { if (!ComputerUtilCard.useRemovalNow(sa, choice, 0, destination)) { return false; } diff --git a/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java b/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java index 84e161e12e9..d57dcea4f72 100644 --- a/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java @@ -360,7 +360,7 @@ public class DamageDealAi extends DamageAiBase { final Card c = this.dealDamageChooseTgtC(ai, sa, dmg, noPrevention, enemy, mandatory); if (c != null) { //option to hold removal instead only applies for single targeted removal - if (sa.isSpell() && tgt.getMaxTargets(sa.getHostCard(), sa) == 1 && !divided) { + if (!sa.isTrigger() && tgt.getMaxTargets(sa.getHostCard(), sa) == 1 && !divided) { if (!ComputerUtilCard.useRemovalNow(sa, c, dmg, ZoneType.Graveyard)) { return false; } diff --git a/forge-ai/src/main/java/forge/ai/ability/DestroyAi.java b/forge-ai/src/main/java/forge/ai/ability/DestroyAi.java index 90b9e596874..a3e0cc30b58 100644 --- a/forge-ai/src/main/java/forge/ai/ability/DestroyAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/DestroyAi.java @@ -157,7 +157,7 @@ public class DestroyAi extends SpellAbilityAi { choice = ComputerUtilCard.getMostExpensivePermanentAI(list, sa, true); } //option to hold removal instead only applies for single targeted removal - if (sa.isSpell() && abTgt.getMaxTargets(sa.getHostCard(), sa) == 1) { + if (!sa.isTrigger() && abTgt.getMaxTargets(sa.getHostCard(), sa) == 1) { if (!ComputerUtilCard.useRemovalNow(sa, choice, 0, ZoneType.Graveyard)) { return false; } diff --git a/forge-ai/src/main/java/forge/ai/ability/PumpAi.java b/forge-ai/src/main/java/forge/ai/ability/PumpAi.java index 6fe636da592..a1ae6ee2651 100644 --- a/forge-ai/src/main/java/forge/ai/ability/PumpAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/PumpAi.java @@ -339,7 +339,7 @@ public class PumpAi extends PumpAiBase { t = ComputerUtilCard.getBestAI(list); //option to hold removal instead only applies for single targeted removal - if (sa.isSpell() && tgt.getMaxTargets(source, sa) == 1 && sa.isCurse()) { + if (!sa.isTrigger() && tgt.getMaxTargets(source, sa) == 1 && sa.isCurse()) { if (!ComputerUtilCard.useRemovalNow(sa, t, -defense, ZoneType.Graveyard)) { return false; } diff --git a/forge-gui/res/cardsfolder/x/xenagos_god_of_revels.txt b/forge-gui/res/cardsfolder/x/xenagos_god_of_revels.txt index 360b0041a79..99f52825426 100644 --- a/forge-gui/res/cardsfolder/x/xenagos_god_of_revels.txt +++ b/forge-gui/res/cardsfolder/x/xenagos_god_of_revels.txt @@ -8,6 +8,7 @@ SVar:X:Count$DevotionDual.R.G T:Mode$ Phase | Phase$ BeginCombat | ValidPlayer$ You | Execute$ TrigPump | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of combat on your turn, another target creature you control gains haste and gets +X/+X until end of turn, where X is that creature's power. SVar:TrigPump:AB$ Pump | Cost$ 0 | ValidTgts$ Creature.Other+YouCtrl | TgtPrompt$ Select another target creature you control | NumAtt$ +Y | NumDef$ +Y | KW$ Haste | References$ Y SVar:Y:Targeted$CardPower +SVar:PlayMain1:TRUE SVar:BuffedBy:Permanent.Red,Permanent.Green SVar:Picture:http://www.wizards.com/global/images/magic/general/xenagos_god_of_revels.jpg Oracle:Indestructible\nAs long as your devotion to red and green is less than seven, Xenagos isn't a creature.\nAt the beginning of combat on your turn, another target creature you control gains haste and gets +X/+X until end of turn, where X is that creature's power.