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;
|
||||
}
|
||||
|
||||
public static final String applyAbilityTextChangeEffects(final String def, final CardTraitBase ability) {
|
||||
if (ability == null || !ability.isIntrinsic()) {
|
||||
public static final String applyAbilityTextChangeEffects(final String def, final CardTraitBase ability) {
|
||||
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,7 +4612,9 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user