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:
@@ -1517,8 +1517,8 @@ public class AbilityUtils {
|
|||||||
return sas;
|
return sas;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String applyAbilityTextChangeEffects(final String def, final CardTraitBase ability) {
|
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 def;
|
||||||
}
|
}
|
||||||
return applyTextChangeEffects(def, ability.getHostCard());
|
return applyTextChangeEffects(def, ability.getHostCard());
|
||||||
|
|||||||
@@ -4593,6 +4593,10 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final void updateKeywordsChangedText(final Long timestamp) {
|
private final void updateKeywordsChangedText(final Long timestamp) {
|
||||||
|
if (this.hasSVar("LockInKeywords")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final List<String> addKeywords = Lists.newArrayList(),
|
final List<String> addKeywords = Lists.newArrayList(),
|
||||||
removeKeywords = Lists.newArrayList(this.keywordsGrantedByTextChanges);
|
removeKeywords = Lists.newArrayList(this.keywordsGrantedByTextChanges);
|
||||||
|
|
||||||
@@ -4608,7 +4612,9 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final void updateKeywordsOnRemoveChangedText(final KeywordsChange k) {
|
private final void updateKeywordsOnRemoveChangedText(final KeywordsChange k) {
|
||||||
this.keywordsGrantedByTextChanges.removeAll(k.getKeywords());
|
if (k != null) {
|
||||||
|
this.keywordsGrantedByTextChanges.removeAll(k.getKeywords());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -8403,12 +8409,10 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.getKeyword() != null) {
|
final List<String> keywords = this.getKeyword();
|
||||||
final List<String> list = this.getKeyword();
|
if (keywords != null) {
|
||||||
|
for (int i = 0; i < keywords.size(); i++) {
|
||||||
String kw = "";
|
final String kw = keywords.get(i);
|
||||||
for (int i = 0; i < list.size(); i++) {
|
|
||||||
kw = list.get(i);
|
|
||||||
if (!kw.startsWith("Protection")) {
|
if (!kw.startsWith("Protection")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ Name:Etched Champion
|
|||||||
ManaCost:3
|
ManaCost:3
|
||||||
Types:Artifact Creature Soldier
|
Types:Artifact Creature Soldier
|
||||||
PT:2/2
|
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:BuffedBy:Artifact
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/etched_champion.jpg
|
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.
|
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
|
Name:Favor of the Mighty
|
||||||
ManaCost:1 W
|
ManaCost:1 W
|
||||||
Types:Tribal Enchantment Giant
|
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:NonStackingEffect:True
|
||||||
SVar:RemRandomDeck:True
|
SVar:RemRandomDeck:True
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/favor_of_the_mighty.jpg
|
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 black
|
||||||
K:Protection from red
|
K:Protection from red
|
||||||
K:Protection from green
|
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
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/iridescent_angel.jpg
|
||||||
Oracle:Flying, protection from all colors
|
Oracle:Flying, protection from all colors
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ ManaCost:4 W W
|
|||||||
Types:Creature Angel
|
Types:Creature Angel
|
||||||
PT:4/4
|
PT:4/4
|
||||||
K:Flying
|
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.
|
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:TrigUntap:AB$Untap | Cost$ 0 | Defined$ Self
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/pristine_angel.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/pristine_angel.jpg
|
||||||
|
|||||||
Reference in New Issue
Block a user