mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[AFR] fixed game log issue with +2 Mace
This commit is contained in:
parent
90d52413df
commit
b193ffc627
1 changed files with 4 additions and 2 deletions
|
@ -3,6 +3,8 @@ package mage.util;
|
|||
import mage.MageObject;
|
||||
import mage.ObjectColor;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
@ -30,7 +32,7 @@ public final class GameLog {
|
|||
static final String LOG_COLOR_NEUTRAL = "#F0F8FF"; // AliceBlue
|
||||
|
||||
public static String replaceNameByColoredName(MageObject mageObject, String text) {
|
||||
return text.replaceAll(mageObject.getName(), getColoredObjectIdName(mageObject));
|
||||
return replaceNameByColoredName(mageObject, text, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -40,7 +42,7 @@ public final class GameLog {
|
|||
* @return
|
||||
*/
|
||||
public static String replaceNameByColoredName(MageObject mageObject, String text, MageObject alternativeObject) {
|
||||
return text.replaceAll(mageObject.getName(), getColoredObjectIdName(mageObject, alternativeObject));
|
||||
return text.replaceAll(Pattern.quote(mageObject.getName()), getColoredObjectIdName(mageObject, alternativeObject));
|
||||
}
|
||||
|
||||
public static String getColoredObjectName(MageObject mageObject) {
|
||||
|
|
Loading…
Reference in a new issue