Changed rule text from "put token onto the battlefield" to "create token".

This commit is contained in:
LevelX2 2016-10-29 23:42:19 +02:00
parent ecc012c9f6
commit 70126988c5
792 changed files with 1563 additions and 1600 deletions

View file

@ -29,7 +29,6 @@ package mage.game.permanent.token;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.UUID;
import mage.MageObject;
import mage.MageObjectImpl;
@ -115,23 +114,23 @@ public class Token extends MageObjectImpl {
this.copySourceCard = token.copySourceCard; // will never be changed
this.availableImageSetCodes = token.availableImageSetCodes;
}
private void setTokenDescriptor() {
this.tokenDescriptor = tokenDescriptor();
}
public String getTokenDescriptor() {
this.tokenDescriptor = tokenDescriptor();
return tokenDescriptor;
}
private String tokenDescriptor() {
String name = this.name.replaceAll("[^a-zA-Z0-9]", "");
String color = this.color.toString().replaceAll("[^a-zA-Z0-9]", "");
String subtype = this.subtype.toString().replaceAll("[^a-zA-Z0-9]", "");
String cardType = this.cardType.toString().replaceAll("[^a-zA-Z0-9]", "");
String originalset = this.getOriginalExpansionSetCode();
String descriptor = name + "." + color + "." + subtype + "." + cardType + "." + this.power + "." + this.toughness ;
String descriptor = name + "." + color + "." + subtype + "." + cardType + "." + this.power + "." + this.toughness;
descriptor = descriptor.toUpperCase();
return descriptor;
}
@ -231,7 +230,7 @@ public class Token extends MageObjectImpl {
game.getCombat().addAttackingCreature(permanent.getId(), game, attackedPlayer);
}
if (!game.isSimulation()) {
game.informPlayers(controller.getLogName() + " puts a " + permanent.getLogName() + " token onto the battlefield");
game.informPlayers(controller.getLogName() + " puts a " + permanent.getLogName() + " token");
}
}
@ -263,8 +262,8 @@ public class Token extends MageObjectImpl {
public void setOriginalCardNumber(String originalCardNumber) {
this.originalCardNumber = originalCardNumber;
}
public String getOriginalExpansionSetCode() {
public String getOriginalExpansionSetCode() {
return originalExpansionSetCode;
}
@ -287,20 +286,16 @@ public class Token extends MageObjectImpl {
if (availableImageSetCodes.size() > 0) {
if (availableImageSetCodes.contains(code)) {
setOriginalExpansionSetCode(code);
} else {
// we should not set random set if appropriate set is already used
if (getOriginalExpansionSetCode() == null || getOriginalExpansionSetCode().isEmpty()
|| !availableImageSetCodes.contains(getOriginalExpansionSetCode())) {
setOriginalExpansionSetCode(availableImageSetCodes.get(RandomUtil.nextInt(availableImageSetCodes.size())));
}
}
} else {
if (getOriginalExpansionSetCode() == null || getOriginalExpansionSetCode().isEmpty()) {
setOriginalExpansionSetCode(code);
} else // we should not set random set if appropriate set is already used
if (getOriginalExpansionSetCode() == null || getOriginalExpansionSetCode().isEmpty()
|| !availableImageSetCodes.contains(getOriginalExpansionSetCode())) {
setOriginalExpansionSetCode(availableImageSetCodes.get(RandomUtil.nextInt(availableImageSetCodes.size())));
}
} else if (getOriginalExpansionSetCode() == null || getOriginalExpansionSetCode().isEmpty()) {
setOriginalExpansionSetCode(code);
}
setTokenDescriptor();
}
}
public boolean updateExpansionSetCode(String setCode) {
if (setCode == null || setCode.isEmpty()) {