mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Implement Food Token
This commit is contained in:
parent
52f2d6399c
commit
a10fbc765f
1 changed files with 60 additions and 0 deletions
60
Mage/src/main/java/mage/game/permanent/token/FoodToken.java
Normal file
60
Mage/src/main/java/mage/game/permanent/token/FoodToken.java
Normal file
|
@ -0,0 +1,60 @@
|
|||
package mage.game.permanent.token.custom;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.permanent.token.TokenImpl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jmharmon
|
||||
*/
|
||||
|
||||
public final class FoodToken extends TokenImpl {
|
||||
|
||||
static final private List<String> tokenImageSets = new ArrayList<>();
|
||||
|
||||
static {
|
||||
tokenImageSets.addAll(Arrays.asList("ELD"));
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
// {2}, {T}, Sacrifice this artifact: You gain 3 life.”
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(3), new GenericManaCost(2));
|
||||
SacrificeSourceCost cost = new SacrificeSourceCost();
|
||||
cost.setText("Sacrifice this artifact");
|
||||
ability.addCost(cost);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public FoodToken(final FoodToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public FoodToken copy() {
|
||||
return new FoodToken(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue