mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
Food token - fixed that it doesn't use multiple images;
This commit is contained in:
parent
a74fb36053
commit
2227490413
1 changed files with 10 additions and 9 deletions
|
@ -9,6 +9,7 @@ import mage.abilities.effects.common.GainLifeEffect;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -27,17 +28,8 @@ public final class FoodToken extends TokenImpl {
|
|||
}
|
||||
|
||||
public FoodToken() {
|
||||
this(null, 0);
|
||||
}
|
||||
|
||||
public FoodToken(String setCode) {
|
||||
this(setCode, 0);
|
||||
}
|
||||
|
||||
public FoodToken(String setCode, int tokenType) {
|
||||
super("Food", "Food token");
|
||||
availableImageSetCodes = tokenImageSets;
|
||||
setOriginalExpansionSetCode(setCode);
|
||||
cardType.add(CardType.ARTIFACT);
|
||||
subtype.add(SubType.FOOD);
|
||||
|
||||
|
@ -50,6 +42,15 @@ public final class FoodToken extends TokenImpl {
|
|||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExpansionSetCodeForImage(String code) {
|
||||
super.setExpansionSetCodeForImage(code);
|
||||
|
||||
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("ELD")) {
|
||||
setTokenType(RandomUtil.nextInt(4) + 1); // 1...4
|
||||
}
|
||||
}
|
||||
|
||||
public FoodToken(final FoodToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue