- Fixed White Ward

This commit is contained in:
swordshine
2014-07-21 09:25:50 +00:00
parent 28364f97ec
commit 49a5ae3e77
3 changed files with 8 additions and 4 deletions

View File

@@ -5426,6 +5426,10 @@ public class Card extends GameEntity implements Comparable<Card> {
if (this.isInstant() || this.isSorcery()) { if (this.isInstant() || this.isSorcery()) {
return false; return false;
} }
} else if (property.startsWith("CardUID_")) {// Protection with "doesn't remove effect"
if (this.getUniqueNumber() != Integer.parseInt(property.split("CardUID_")[1])) {
return false;
}
} else if (property.equals("ChosenCard")) { } else if (property.equals("ChosenCard")) {
if (!source.getChosenCard().contains(this)) { if (!source.getChosenCard().contains(this)) {
return false; return false;
@@ -8273,8 +8277,7 @@ public class Card extends GameEntity implements Comparable<Card> {
continue; continue;
} }
if (kw.equals("Protection from white")) { if (kw.equals("Protection from white")) {
if (source.isWhite() && !source.getName().equals("White Ward") if (source.isWhite() && !source.getName().contains("Pledge of Loyalty")) {
&& !source.getName().contains("Pledge of Loyalty")) {
return true; return true;
} }
} else if (kw.equals("Protection from blue")) { } else if (kw.equals("Protection from blue")) {

View File

@@ -162,9 +162,10 @@ public class StaticAbilityContinuous {
addKeywords[w] = addKeywords[w].replaceAll("ChosenType", chosenType); addKeywords[w] = addKeywords[w].replaceAll("ChosenType", chosenType);
} }
final String chosenName = hostCard.getNamedCard(); final String chosenName = hostCard.getNamedCard();
final String hostCardUID = Integer.toString(hostCard.getUniqueNumber()); // Protection with "doesn't remove" effect
for (int w = 0; w < addKeywords.length; w++) { for (int w = 0; w < addKeywords.length; w++) {
if (addKeywords[w].startsWith("Protection:")) { if (addKeywords[w].startsWith("Protection:")) {
addKeywords[w] = addKeywords[w].replaceAll("ChosenName", "Card.named" + chosenName); addKeywords[w] = addKeywords[w].replaceAll("ChosenName", "Card.named" + chosenName).replace("HostCardUID", hostCardUID);
} }
} }
if (params.containsKey("SharedKeywordsZone")) { if (params.containsKey("SharedKeywordsZone")) {

View File

@@ -3,7 +3,7 @@ ManaCost:W
Types:Enchantment Aura Types:Enchantment Aura
K:Enchant creature K:Enchant creature
A:SP$ Attach | Cost$ W | ValidTgts$ Creature | AILogic$ Pump A:SP$ Attach | Cost$ W | ValidTgts$ Creature | AILogic$ Pump
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ Protection from white | Description$ Enchanted creature has protection from white. This effect doesn't remove White Ward. S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ Protection:Card.White:Protection from white:Card.CardUID_HostCardUID | Description$ Enchanted creature has protection from white. This effect doesn't remove CARDNAME.
SVar:RemRandomDeck:True SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/white_ward.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/white_ward.jpg
Oracle:Enchant creature\nEnchanted creature has protection from white. This effect doesn't remove White Ward. Oracle:Enchant creature\nEnchanted creature has protection from white. This effect doesn't remove White Ward.