mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Fixed rule text generation
This commit is contained in:
parent
16854660f1
commit
1793c4cf1c
2 changed files with 12 additions and 4 deletions
|
@ -58,6 +58,7 @@ public class EntersBattlefieldAbility extends StaticAbility<EntersBattlefieldAbi
|
||||||
|
|
||||||
public EntersBattlefieldAbility(EntersBattlefieldAbility ability) {
|
public EntersBattlefieldAbility(EntersBattlefieldAbility ability) {
|
||||||
super(ability);
|
super(ability);
|
||||||
|
this.generateRule = ability.generateRule;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -81,14 +81,21 @@ public class CreateTokenEffect extends OneShotEffect<CreateTokenEffect> {
|
||||||
private void setText() {
|
private void setText() {
|
||||||
StringBuilder sb = new StringBuilder("put ");
|
StringBuilder sb = new StringBuilder("put ");
|
||||||
if (amount.toString().equals("1")) {
|
if (amount.toString().equals("1")) {
|
||||||
sb.append("a");
|
sb.append("a ").append(token.getDescription());
|
||||||
} else {
|
} else {
|
||||||
sb.append(amount.toString());
|
sb.append(amount.toString()).append(" ").append(token.getDescription());
|
||||||
|
if (token.getDescription().endsWith("token")) {
|
||||||
|
sb.append("s ");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sb.append(" ").append(token.getDescription()).append(" onto the battlefield");
|
sb.append(" onto the battlefield");
|
||||||
String message = amount.getMessage();
|
String message = amount.getMessage();
|
||||||
if (message.length() > 0) {
|
if (message.length() > 0) {
|
||||||
sb.append(" for each ");
|
if (message.startsWith("the ") || message.contains("number ")) {
|
||||||
|
sb.append(", where X is ");
|
||||||
|
} else {
|
||||||
|
sb.append(" for each ");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sb.append(message);
|
sb.append(message);
|
||||||
staticText = sb.toString();
|
staticText = sb.toString();
|
||||||
|
|
Loading…
Reference in a new issue