* Added to all toUpperCase/toLowerCase calls the Locale.ENGLISH to prevent problems with some languages (e.g. Turkish). Removed some unused import statements. (#4634).

This commit is contained in:
LevelX2 2018-03-18 18:18:54 +01:00
parent 03ebdc17d8
commit b073ce1c42
147 changed files with 1419 additions and 1496 deletions

View file

@ -27,6 +27,7 @@
*/
package mage.abilities.common;
import java.util.Locale;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.Effect;
import mage.constants.TargetController;
@ -141,9 +142,9 @@ public class BeginningOfUpkeepTriggeredAbility extends TriggeredAbilityImpl {
switch (targetController) {
case YOU:
if (this.optional) {
if (sb.substring(0, 6).toLowerCase().equals("target")) {
if (sb.substring(0, 6).toLowerCase(Locale.ENGLISH).equals("target")) {
sb.insert(0, "you may have ");
} else if (!sb.substring(0, 4).toLowerCase().equals("you ")) {
} else if (!sb.substring(0, 4).toLowerCase(Locale.ENGLISH).equals("you ")) {
sb.insert(0, "you may ");
}
}