mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Fix changing color words in "Protection from all colors".
This commit is contained in:
@@ -1518,7 +1518,7 @@ public class AbilityUtils {
|
||||
}
|
||||
|
||||
public static final String applyAbilityTextChangeEffects(final String def, final CardTraitBase ability) {
|
||||
if (ability == null || !ability.isIntrinsic()) {
|
||||
if (ability == null || !ability.isIntrinsic() || ability.getMapParams().containsKey("LockInText")) {
|
||||
return def;
|
||||
}
|
||||
return applyTextChangeEffects(def, ability.getHostCard());
|
||||
|
||||
@@ -4593,6 +4593,10 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
}
|
||||
|
||||
private final void updateKeywordsChangedText(final Long timestamp) {
|
||||
if (this.hasSVar("LockInKeywords")) {
|
||||
return;
|
||||
}
|
||||
|
||||
final List<String> addKeywords = Lists.newArrayList(),
|
||||
removeKeywords = Lists.newArrayList(this.keywordsGrantedByTextChanges);
|
||||
|
||||
@@ -4608,8 +4612,10 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
}
|
||||
|
||||
private final void updateKeywordsOnRemoveChangedText(final KeywordsChange k) {
|
||||
if (k != null) {
|
||||
this.keywordsGrantedByTextChanges.removeAll(k.getKeywords());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the changed text of the intrinsic spell abilities and keywords.
|
||||
@@ -8403,12 +8409,10 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this.getKeyword() != null) {
|
||||
final List<String> list = this.getKeyword();
|
||||
|
||||
String kw = "";
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
kw = list.get(i);
|
||||
final List<String> keywords = this.getKeyword();
|
||||
if (keywords != null) {
|
||||
for (int i = 0; i < keywords.size(); i++) {
|
||||
final String kw = keywords.get(i);
|
||||
if (!kw.startsWith("Protection")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@ Name:Etched Champion
|
||||
ManaCost:3
|
||||
Types:Artifact Creature Soldier
|
||||
PT:2/2
|
||||
S:Mode$ Continuous | Affected$ Card.Self | AddKeyword$ Protection from white & Protection from blue & Protection from black & Protection from red & Protection from green | Condition$ Metalcraft | Description$ Metalcraft - CARDNAME has protection from all colors as long as you control three or more artifacts.
|
||||
# Lock in text so can't change color words in "Protection from all colors"
|
||||
S:Mode$ Continuous | Affected$ Card.Self | AddKeyword$ Protection from white & Protection from blue & Protection from black & Protection from red & Protection from green | LockInText$ True | Condition$ Metalcraft | Description$ Metalcraft - CARDNAME has protection from all colors as long as you control three or more artifacts.
|
||||
SVar:BuffedBy:Artifact
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/etched_champion.jpg
|
||||
Oracle:Metalcraft - Etched Champion has protection from all colors as long as you control three or more artifacts.
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
Name:Favor of the Mighty
|
||||
ManaCost:1 W
|
||||
Types:Tribal Enchantment Giant
|
||||
S:Mode$ Continuous | Affected$ Creature.greatestCMC | AddKeyword$ Protection from white & Protection from blue & Protection from black & Protection from red & Protection from green | Description$ Each creature with the highest converted mana cost has protection from all colors.
|
||||
# Lock in text so can't change color words in "Protection from all colors"
|
||||
S:Mode$ Continuous | Affected$ Creature.greatestCMC | AddKeyword$ Protection from white & Protection from blue & Protection from black & Protection from red & Protection from green | LockInText$ True | Description$ Each creature with the highest converted mana cost has protection from all colors.
|
||||
SVar:NonStackingEffect:True
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/favor_of_the_mighty.jpg
|
||||
|
||||
@@ -8,5 +8,7 @@ K:Protection from blue
|
||||
K:Protection from black
|
||||
K:Protection from red
|
||||
K:Protection from green
|
||||
# Lock in keywords so can't change color words in "Protection from all colors"
|
||||
SVar:LockInKeywords:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/iridescent_angel.jpg
|
||||
Oracle:Flying, protection from all colors
|
||||
|
||||
@@ -3,7 +3,8 @@ ManaCost:4 W W
|
||||
Types:Creature Angel
|
||||
PT:4/4
|
||||
K:Flying
|
||||
S:Mode$ Continuous | Affected$ Card.Self+untapped | AddKeyword$ Protection from artifacts & Protection from white & Protection from blue & Protection from black & Protection from red & Protection from green | Description$ As long as CARDNAME is untapped, it has protection from artifacts and from all colors.
|
||||
# Lock in text so can't change color words in "Protection from all colors"
|
||||
S:Mode$ Continuous | Affected$ Card.Self+untapped | AddKeyword$ Protection from artifacts & Protection from white & Protection from blue & Protection from black & Protection from red & Protection from green | LockInText$ True | Description$ As long as CARDNAME is untapped, it has protection from artifacts and from all colors.
|
||||
T:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigUntap | TriggerDescription$ Whenever you cast a spell, you may untap CARDNAME.
|
||||
SVar:TrigUntap:AB$Untap | Cost$ 0 | Defined$ Self
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/pristine_angel.jpg
|
||||
|
||||
Reference in New Issue
Block a user