mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
- Fixed White Ward
This commit is contained in:
@@ -5426,6 +5426,10 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
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<Card> {
|
||||
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")) {
|
||||
|
||||
@@ -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")) {
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user