mirror of
https://github.com/correl/mage.git
synced 2024-11-21 19:18:40 +00:00
...
This commit is contained in:
parent
5fb516a05e
commit
a3e2a8dae0
13 changed files with 19 additions and 41 deletions
|
@ -160,9 +160,7 @@ public class Mana implements Comparable<Mana>, Serializable {
|
|||
for (int i = 0; i < white; i++)
|
||||
sbMana.append("{W}");
|
||||
if (colorless > 0) {
|
||||
sbMana.append("{");
|
||||
sbMana.append(Integer.toString(colorless));
|
||||
sbMana.append("}");
|
||||
sbMana.append("{").append(Integer.toString(colorless)).append("}");
|
||||
}
|
||||
return sbMana.toString();
|
||||
}
|
||||
|
|
|
@ -151,8 +151,7 @@ public abstract class AbilityImpl implements Ability, Serializable {
|
|||
|
||||
if (!(this instanceof SpellAbility)) {
|
||||
if (!costs.getText().equals("")) {
|
||||
sbRule.append(costs.getText());
|
||||
sbRule.append(": ");
|
||||
sbRule.append(costs.getText()).append(": ");
|
||||
}
|
||||
}
|
||||
sbRule.append(effects.getText());
|
||||
|
|
|
@ -54,8 +54,7 @@ public abstract class AbstractCosts<T extends Cost> extends ArrayList<T> impleme
|
|||
|
||||
StringBuilder sbText = new StringBuilder();
|
||||
for (T cost: this) {
|
||||
sbText.append(cost.getText());
|
||||
sbText.append(", ");
|
||||
sbText.append(cost.getText()).append(", ");
|
||||
}
|
||||
sbText.setLength(sbText.length() - 2);
|
||||
return sbText.toString();
|
||||
|
|
|
@ -58,8 +58,7 @@ public class CostsImpl<T extends Cost> extends ArrayList<T> implements Costs<T>
|
|||
|
||||
StringBuilder sbText = new StringBuilder();
|
||||
for (T cost: this) {
|
||||
sbText.append(cost.getText());
|
||||
sbText.append(", ");
|
||||
sbText.append(cost.getText()).append(", ");
|
||||
}
|
||||
sbText.setLength(sbText.length() - 2);
|
||||
return sbText.toString();
|
||||
|
|
|
@ -272,7 +272,7 @@ public class ContinuousEffects implements Serializable {
|
|||
public String getText() {
|
||||
StringBuilder sbText = new StringBuilder();
|
||||
for (ContinuousEffect effect: effects) {
|
||||
sbText.append(effect.getText() + " ");
|
||||
sbText.append(effect.getText()).append(" ");
|
||||
}
|
||||
return sbText.toString();
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public class Effects extends ArrayList<Effect> {
|
|||
public String getText() {
|
||||
StringBuilder sbText = new StringBuilder();
|
||||
for (Effect effect: this) {
|
||||
sbText.append(effect.getText() + ". ");
|
||||
sbText.append(effect.getText()).append(". ");
|
||||
}
|
||||
return sbText.toString();
|
||||
}
|
||||
|
|
|
@ -85,8 +85,7 @@ public class BoostControlledEffect extends ContinuousEffectImpl {
|
|||
sb.append("Creatures");
|
||||
else
|
||||
sb.append(filter.getMessage());
|
||||
sb.append(" you control get ");
|
||||
sb.append(String.format("%1$+d/%2$+d", power, toughness));
|
||||
sb.append(" you control get ").append(String.format("%1$+d/%2$+d", power, toughness));
|
||||
sb.append((duration==Duration.EndOfTurn?" until end of turn":""));
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
|
@ -88,16 +88,11 @@ public class SearchLibraryPutInPlayEffect extends OneShotEffect {
|
|||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Search your library for ");
|
||||
if (target.getNumberOfTargets() == 0 && target.getMaxNumberOfTargets() > 0) {
|
||||
sb.append("up to ");
|
||||
sb.append(target.getMaxNumberOfTargets());
|
||||
sb.append(" ");
|
||||
sb.append(target.getTargetName());
|
||||
sb.append(", and put them onto the battlefield");
|
||||
sb.append("up to ").append(target.getMaxNumberOfTargets()).append(" ");
|
||||
sb.append(target.getTargetName()).append(", and put them onto the battlefield");
|
||||
}
|
||||
else {
|
||||
sb.append("a ");
|
||||
sb.append(target.getTargetName());
|
||||
sb.append(", and put it onto the battlefield");
|
||||
sb.append("a ").append(target.getTargetName()).append(", and put it onto the battlefield");
|
||||
}
|
||||
sb.append(". Then shuffle your library");
|
||||
return sb.toString();
|
||||
|
|
|
@ -76,16 +76,11 @@ public class SearchLibraryRevealPutInHandEffect extends OneShotEffect {
|
|||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Search your library for ");
|
||||
if (target.getNumberOfTargets() == 0 && target.getMaxNumberOfTargets() > 0) {
|
||||
sb.append("up to ");
|
||||
sb.append(target.getMaxNumberOfTargets());
|
||||
sb.append(" ");
|
||||
sb.append(target.getTargetName());
|
||||
sb.append(", reveal them, and put them into your hand");
|
||||
sb.append("up to ").append(target.getMaxNumberOfTargets()).append(" ");
|
||||
sb.append(target.getTargetName()).append(", reveal them, and put them into your hand");
|
||||
}
|
||||
else {
|
||||
sb.append("a ");
|
||||
sb.append(target.getTargetName());
|
||||
sb.append(", reveal that card, and put it into your hand");
|
||||
sb.append("a ").append(target.getTargetName()).append(", reveal that card, and put it into your hand");
|
||||
}
|
||||
sb.append(". Then shuffle your library");
|
||||
|
||||
|
|
|
@ -61,8 +61,7 @@ public abstract class TargetObject extends TargetImpl {
|
|||
public String getTargetedName(Game game) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (UUID targetId: getTargets()) {
|
||||
sb.append(game.getObject(targetId).getName());
|
||||
sb.append(" ");
|
||||
sb.append(game.getObject(targetId).getName()).append(" ");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
|
@ -101,8 +101,7 @@ public class TargetPlayer extends TargetImpl {
|
|||
public String getTargetedName(Game game) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (UUID targetId: getTargets()) {
|
||||
sb.append(game.getPlayer(targetId).getName());
|
||||
sb.append(" ");
|
||||
sb.append(game.getPlayer(targetId).getName()).append(" ");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
|
@ -107,13 +107,11 @@ public class TargetCreatureOrPlayer extends TargetImpl {
|
|||
for (UUID targetId: getTargets()) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null) {
|
||||
sb.append(permanent.getName());
|
||||
sb.append(" ");
|
||||
sb.append(permanent.getName()).append(" ");
|
||||
}
|
||||
else {
|
||||
Player player = game.getPlayer(targetId);
|
||||
sb.append(player.getName());
|
||||
sb.append(" ");
|
||||
sb.append(player.getName()).append(" ");
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
|
|
|
@ -92,13 +92,11 @@ public class TargetDefender extends TargetImpl {
|
|||
for (UUID targetId: getTargets()) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null) {
|
||||
sb.append(permanent.getName());
|
||||
sb.append(" ");
|
||||
sb.append(permanent.getName()).append(" ");
|
||||
}
|
||||
else {
|
||||
Player player = game.getPlayer(targetId);
|
||||
sb.append(player.getName());
|
||||
sb.append(" ");
|
||||
sb.append(player.getName()).append(" ");
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
|
|
Loading…
Reference in a new issue