mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Added AI support for Paralyze.
This commit is contained in:
@@ -7,7 +7,7 @@ T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.S
|
||||
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.
|
||||
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
|
||||
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
|
||||
|
||||
@@ -385,7 +385,7 @@ public class ComputerUtilCost {
|
||||
}
|
||||
|
||||
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 payOwner = sa.hasParam("UnlessAI") ? sa.getParam("UnlessAI").startsWith("Defined") : false;
|
||||
boolean payNever = "Never".equals(sa.getParam("UnlessAI"));
|
||||
@@ -410,6 +410,11 @@ public class ComputerUtilCost {
|
||||
}
|
||||
}
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user