Fixed error with no abilities

This commit is contained in:
Oleg Agafonov 2020-01-04 20:18:16 +04:00
parent b3ec79f467
commit a249dcffd8

View file

@ -83,6 +83,7 @@ public class EntersBattlefieldAbility extends StaticAbility {
return abilityRule;
}
String superRule = super.getRule();
return (optional ? "you may have " : "") + "{this} enter" + (optional ? "" : "s") + " the battlefield" + (superRule.charAt(0) == ' ' ? "" : " ") + superRule;
return (optional ? "you may have " : "") + "{this} enter" + (optional ? "" : "s") + " the battlefield"
+ (!superRule.isEmpty() && superRule.charAt(0) == ' ' ? "" : " ") + superRule;
}
}