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 a4e6d4e99c4..ecd98792b1d 100644 --- a/forge-game/src/main/java/forge/game/card/Card.java +++ b/forge-game/src/main/java/forge/game/card/Card.java @@ -5426,6 +5426,10 @@ public class Card extends GameEntity implements Comparable { if (this.isInstant() || this.isSorcery()) { 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")) { if (!source.getChosenCard().contains(this)) { return false; @@ -8273,8 +8277,7 @@ public class Card extends GameEntity implements Comparable { continue; } if (kw.equals("Protection from white")) { - if (source.isWhite() && !source.getName().equals("White Ward") - && !source.getName().contains("Pledge of Loyalty")) { + if (source.isWhite() && !source.getName().contains("Pledge of Loyalty")) { return true; } } else if (kw.equals("Protection from blue")) { diff --git a/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java b/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java index c56e9b1b8c8..a01b66b65c9 100644 --- a/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java +++ b/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java @@ -162,9 +162,10 @@ public class StaticAbilityContinuous { addKeywords[w] = addKeywords[w].replaceAll("ChosenType", chosenType); } 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++) { 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")) { diff --git a/forge-gui/res/cardsfolder/w/white_ward.txt b/forge-gui/res/cardsfolder/w/white_ward.txt index 9add7c7f492..1ad1969ce3e 100644 --- a/forge-gui/res/cardsfolder/w/white_ward.txt +++ b/forge-gui/res/cardsfolder/w/white_ward.txt @@ -3,7 +3,7 @@ ManaCost:W Types:Enchantment Aura K:Enchant creature 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: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.