Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Food token - fixed that it doesn't use multiple images;
- Loading branch information
Showing
with
10 additions
and
9 deletions.
-
+10
−9
Mage/src/main/java/mage/game/permanent/token/FoodToken.java
|
|
@@ -9,6 +9,7 @@ |
|
|
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 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 FoodToken(String setCode, int tokenType) { |
|
|
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); |
|
|
} |
|
|
|