This commit is contained in:
igoudt 2017-09-08 13:12:03 +02:00
commit d79c57b907
120 changed files with 3943 additions and 620 deletions

View file

@ -114,7 +114,7 @@ public class CreateTokenEffect extends OneShotEffect {
public ArrayList<UUID> getLastAddedTokenIds() {
return lastAddedTokenIds;
}
public void exileTokensCreatedAtNextEndStep(Game game, Ability source) {
for (UUID tokenId : this.getLastAddedTokenIds()) {
Permanent tokenPermanent = game.getPermanent(tokenId);
@ -123,7 +123,7 @@ public class CreateTokenEffect extends OneShotEffect {
exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game));
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect), source);
}
}
}
}
public void exileTokensCreatedAtEndOfCombat(Game game, Ability source) {
@ -134,9 +134,9 @@ public class CreateTokenEffect extends OneShotEffect {
exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game));
game.addDelayedTriggeredAbility(new AtTheEndOfCombatDelayedTriggeredAbility(exileEffect), source);
}
}
}
}
private void setText() {
StringBuilder sb = new StringBuilder("create ");
if (amount.toString().equals("1")) {
@ -154,8 +154,13 @@ public class CreateTokenEffect extends OneShotEffect {
if (token.getDescription().endsWith("token")) {
sb.append("s");
}
int tokenLocation = sb.indexOf("token ");
if (tokenLocation != -1) {
sb.replace(tokenLocation, tokenLocation + 6, "tokens ");
}
}
if (attacking) {
sb.append(" that are");
if (tapped) {
sb.append(" tapped and");
}