mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Changed rule text from "put token onto the battlefield" to "create token".
This commit is contained in:
parent
ecc012c9f6
commit
70126988c5
792 changed files with 1563 additions and 1600 deletions
|
|
@ -19,7 +19,7 @@ public class InvestigateEffect extends CreateTokenEffect {
|
|||
|
||||
public InvestigateEffect() {
|
||||
super(new ClueArtifactToken());
|
||||
this.staticText = "Investigate. <i>(Put a colorless Clue artifact token onto the battlefield with \"{2}, Sacrifice this artifact: Draw a card.\")</i>";
|
||||
this.staticText = "Investigate. <i>(Create a colorless Clue artifact token onto the battlefield with \"{2}, Sacrifice this artifact: Draw a card.\")</i>";
|
||||
}
|
||||
|
||||
public InvestigateEffect(final InvestigateEffect effect) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package mage.abilities.keyword;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
|
|
@ -15,17 +14,18 @@ import mage.game.permanent.token.Token;
|
|||
import mage.players.Player;
|
||||
|
||||
public class LivingWeaponAbility extends EntersBattlefieldTriggeredAbility {
|
||||
|
||||
public LivingWeaponAbility() {
|
||||
super(new LivingWeaponEffect());
|
||||
}
|
||||
|
||||
public LivingWeaponAbility(final LivingWeaponAbility ability) {
|
||||
public LivingWeaponAbility(final LivingWeaponAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Living weapon <i>(When this Equipment enters the battlefield, put a 0/0 black Germ creature token onto the battlefield, then attach this to it.)</i>";
|
||||
return "Living weapon <i>(When this Equipment enters the battlefield, create a 0/0 black Germ creature token, then attach this to it.)</i>";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -35,6 +35,7 @@ public class LivingWeaponAbility extends EntersBattlefieldTriggeredAbility {
|
|||
}
|
||||
|
||||
class LivingWeaponEffect extends CreateTokenEffect {
|
||||
|
||||
LivingWeaponEffect() {
|
||||
super(new GermToken());
|
||||
}
|
||||
|
|
@ -81,4 +82,4 @@ class GermToken extends Token {
|
|||
power = new MageInt(0);
|
||||
toughness = new MageInt(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ package mage.game.permanent.token;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
|
|
@ -52,7 +51,7 @@ public class ClueArtifactToken extends Token {
|
|||
}
|
||||
|
||||
public ClueArtifactToken() {
|
||||
super("Clue", "colorless Clue artifact token onto the battlefield with \"{2}, Sacrifice this artifact: Draw a card.\"");
|
||||
super("Clue", "colorless Clue artifact token with \"{2}, Sacrifice this artifact: Draw a card.\"");
|
||||
availableImageSetCodes = tokenImageSets;
|
||||
cardType.add(CardType.ARTIFACT);
|
||||
subtype.add("Clue");
|
||||
|
|
@ -65,7 +64,6 @@ public class ClueArtifactToken extends Token {
|
|||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setExpansionSetCodeForImage(String code) {
|
||||
super.setExpansionSetCodeForImage(code);
|
||||
|
|
|
|||
|
|
@ -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()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue