diff --git a/.gitattributes b/.gitattributes index 70dfe75c578..c98d3efad4c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8856,6 +8856,7 @@ res/cardsfolder/r/runeboggle.txt svneol=native#text/plain res/cardsfolder/r/runechanters_pike.txt -text res/cardsfolder/r/runeclaw_bear.txt svneol=native#text/plain res/cardsfolder/r/runed_arch.txt svneol=native#text/plain +res/cardsfolder/r/runed_halo.txt -text res/cardsfolder/r/runed_servitor.txt svneol=native#text/plain res/cardsfolder/r/runed_stalactite.txt svneol=native#text/plain res/cardsfolder/r/runeflare_trap.txt -text diff --git a/res/cardsfolder/r/runed_halo.txt b/res/cardsfolder/r/runed_halo.txt new file mode 100644 index 00000000000..a0e4629d059 --- /dev/null +++ b/res/cardsfolder/r/runed_halo.txt @@ -0,0 +1,10 @@ +Name:Runed Halo +ManaCost:W W +Types:Enchantment +K:ETBReplacement:Other:DBNameCard +SVar:DBNameCard:DB$ NameCard | Defined$ You | SpellDescription$ As CARDNAME enters the battlefield, name a card. +S:Mode$ Continuous | Affected$ You | AddKeyword$ Protection:ChosenName | Description$ You have protection from the chosen name. (You can't be targeted, dealt damage, or enchanted by anything with that name.) +SVar:RemAIDeck:True +SVar:Picture:http://www.wizards.com/global/images/magic/general/runed_halo.jpg +Oracle:As Runed Halo enters the battlefield, name a card.\nYou have protection from the chosen name. (You can't be targeted, dealt damage, or enchanted by anything with that name.) +SetInfo:SHM Rare \ No newline at end of file diff --git a/src/main/java/forge/card/staticability/StaticAbilityContinuous.java b/src/main/java/forge/card/staticability/StaticAbilityContinuous.java index 9fd6329501b..99107790b03 100644 --- a/src/main/java/forge/card/staticability/StaticAbilityContinuous.java +++ b/src/main/java/forge/card/staticability/StaticAbilityContinuous.java @@ -154,6 +154,12 @@ public class StaticAbilityContinuous { for (int w = 0; w < addKeywords.length; w++) { addKeywords[w] = addKeywords[w].replaceAll("ChosenType", chosenType); } + final String chosenName = hostCard.getNamedCard(); + for (int w = 0; w < addKeywords.length; w++) { + if (addKeywords[w].startsWith("Protection:")) { + addKeywords[w] = addKeywords[w].replaceAll("ChosenName", "Card.named" + chosenName); + } + } } if (params.containsKey("AddHiddenKeyword")) {