- Added AI support for Paralyze.

This commit is contained in:
Sloth
2013-04-11 15:07:10 +00:00
parent 92cacb6471
commit 77195b1e03
2 changed files with 7 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.S
SVar:TrigTap:AB$ Tap | Cost$ 0 | Defined$ Enchanted SVar:TrigTap:AB$ Tap | Cost$ 0 | Defined$ Enchanted
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddHiddenKeyword$ CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step. S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddHiddenKeyword$ CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ EnchantedController | TriggerZones$ Battlefield | Execute$ TrigUntap | TriggerDescription$ At the beginning of the upkeep of enchanted creature's controller, that player may pay {4}. If he or she does, untap the creature. T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ EnchantedController | TriggerZones$ Battlefield | Execute$ TrigUntap | TriggerDescription$ At the beginning of the upkeep of enchanted creature's controller, that player may pay {4}. If he or she does, untap the creature.
SVar:TrigUntap:AB$ Untap | Cost$ 0 | Defined$ Enchanted | UnlessCost$ 4 | UnlessPayer$ EnchantedController | UnlessSwitched$ True SVar:TrigUntap:AB$ Untap | Cost$ 0 | Defined$ Enchanted | UnlessCost$ 4 | UnlessPayer$ EnchantedController | UnlessSwitched$ True | UnlessAI$ Paralyze
SVar:Picture:http://www.wizards.com/global/images/magic/general/paralyze.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/paralyze.jpg
Oracle:Enchant creature\nWhen Paralyze enters the battlefield, tap enchanted creature.\nEnchanted creature doesn't untap during its controller's untap step.\nAt the beginning of the upkeep of enchanted creature's controller, that player may pay {4}. If he or she does, untap the creature. Oracle:Enchant creature\nWhen Paralyze enters the battlefield, tap enchanted creature.\nEnchanted creature doesn't untap during its controller's untap step.\nAt the beginning of the upkeep of enchanted creature's controller, that player may pay {4}. If he or she does, untap the creature.
SetInfo:2ED Common SetInfo:2ED Common

View File

@@ -385,7 +385,7 @@ public class ComputerUtilCost {
} }
public static boolean willPayUnlessCost(SpellAbility sa, Player payer, SpellAbility ability, boolean alreadyPaid, List<Player> payers) { public static boolean willPayUnlessCost(SpellAbility sa, Player payer, SpellAbility ability, boolean alreadyPaid, List<Player> payers) {
Card source = sa.getSourceCard(); final Card source = sa.getSourceCard();
boolean payForOwnOnly = "OnlyOwn".equals(sa.getParam("UnlessAI")); boolean payForOwnOnly = "OnlyOwn".equals(sa.getParam("UnlessAI"));
boolean payOwner = sa.hasParam("UnlessAI") ? sa.getParam("UnlessAI").startsWith("Defined") : false; boolean payOwner = sa.hasParam("UnlessAI") ? sa.getParam("UnlessAI").startsWith("Defined") : false;
boolean payNever = "Never".equals(sa.getParam("UnlessAI")); boolean payNever = "Never".equals(sa.getParam("UnlessAI"));
@@ -410,6 +410,11 @@ public class ComputerUtilCost {
} }
} }
return false; return false;
} else if ("Paralyze".equals(sa.getParam("UnlessAI"))) {
final Card c = source.getEnchantingCard();
if (c == null || c.isUntapped()) {
return false;
}
} }
// AI will only pay when it's not already payed and only opponents abilities // AI will only pay when it's not already payed and only opponents abilities