1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-08 17:00:07 -09:00

* Images: fixed that amass ability uses single Zombie Army token instead different;

This commit is contained in:
Oleg Agafonov 2021-07-05 22:15:34 +04:00
parent 364b456ef6
commit 9624b27b3a

View file

@ -1,9 +1,11 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.util.RandomUtil;
import java.util.Arrays;
/**
* @author TheElk801
@ -12,13 +14,15 @@ public final class ZombieArmyToken extends TokenImpl {
public ZombieArmyToken() {
super("Zombie Army", "0/0 black Zombie Army creature token");
setExpansionSetCodeForImage("WAR"); // default
cardType.add(CardType.CREATURE);
color.setBlack(true);
subtype.add(SubType.ZOMBIE);
subtype.add(SubType.ARMY);
power = new MageInt(0);
toughness = new MageInt(0);
availableImageSetCodes = Arrays.asList("WAR", "MH2");
}
private ZombieArmyToken(final ZombieArmyToken token) {
@ -29,4 +33,13 @@ public final class ZombieArmyToken extends TokenImpl {
public ZombieArmyToken copy() {
return new ZombieArmyToken(this);
}
@Override
public void setExpansionSetCodeForImage(String code) {
super.setExpansionSetCodeForImage(code);
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("WAR")) {
this.setTokenType(RandomUtil.nextInt(3) + 1); // 1..3
}
}
}