From 14a9126933c96d7ff3fd94dce4fefedc0a9f9ee1 Mon Sep 17 00:00:00 2001 From: swordshine Date: Wed, 26 Feb 2014 07:35:33 +0000 Subject: [PATCH] - Better script for Daybreak Coronet --- forge-game/src/main/java/forge/game/card/Card.java | 11 +++++++++++ forge-gui/res/cardsfolder/d/daybreak_coronet.txt | 5 +---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/forge-game/src/main/java/forge/game/card/Card.java b/forge-game/src/main/java/forge/game/card/Card.java index 53cdd39dda8..e89145f585f 100644 --- a/forge-game/src/main/java/forge/game/card/Card.java +++ b/forge-game/src/main/java/forge/game/card/Card.java @@ -5608,6 +5608,13 @@ public class Card extends GameEntity implements Comparable { } } } + } else { // EnchantedBy Aura.Other + for (final Card aura : this.getEnchantedBy()){ + if (aura.isValid(restriction, sourceController, source)) { + return true; + } + } + return false; } } } else if (property.startsWith("NotEnchantedBy")) { @@ -6388,6 +6395,10 @@ public class Card extends GameEntity implements Comparable { if (!this.isEnchanted()) { return false; } + } else if (property.startsWith("enchanted")) { + if (!this.isEnchanted()) { + return false; + } } else if (property.startsWith("unenchanted")) { if (this.isEnchanted()) { return false; diff --git a/forge-gui/res/cardsfolder/d/daybreak_coronet.txt b/forge-gui/res/cardsfolder/d/daybreak_coronet.txt index 05aebae8988..ab4de08cd71 100644 --- a/forge-gui/res/cardsfolder/d/daybreak_coronet.txt +++ b/forge-gui/res/cardsfolder/d/daybreak_coronet.txt @@ -2,10 +2,7 @@ Name:Daybreak Coronet ManaCost:W W Types:Enchantment Aura K:Enchant creature with another Aura attached to it -A:SP$ Attach | Cost$ W W | ValidTgts$ Creature.enchanted | TgtPrompt$ Select target enchanted creature | AILogic$ Pump +A:SP$ Attach | Cost$ W W | ValidTgts$ Creature.EnchantedBy Aura.Other | TgtPrompt$ Select target enchanted creature | AILogic$ Pump S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ 3 | AddToughness$ 3 | AddKeyword$ First Strike & Vigilance & Lifelink | Description$ Enchanted creature gets +3/+3 and has first strike, vigilance, and lifelink. (Damage dealt by the creature also causes its controller to gain that much life.) -T:Mode$ Always | TriggerZones$ Battlefield | CheckSVar$ X | SVarCompare$ EQ1 | Execute$ TrigRemove | Static$ True -SVar:TrigRemove:AB$ ChangeZone | Cost$ 0 | Origin$ Battlefield | Destination$ Graveyard | Defined$ Self -SVar:X:Count$Valid Aura.AttachedTo Creature.EnchantedBy SVar:Picture:http://www.wizards.com/global/images/magic/general/daybreak_coronet.jpg Oracle:Enchant creature with another Aura attached to it\nEnchanted creature gets +3/+3 and has first strike, vigilance, and lifelink. (Damage dealt by the creature also causes its controller to gain that much life.) \ No newline at end of file