forked from External/mage
Create common implementation for predefined tokens (#11065)
* adds token abilities * updated cards to use new abilities
This commit is contained in:
parent
d67539746e
commit
2cd8bc6f6c
19 changed files with 112 additions and 134 deletions
|
|
@ -1,14 +1,8 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.token.FoodAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
* @author jmharmon
|
||||
|
|
@ -21,13 +15,7 @@ public final class FoodToken extends TokenImpl {
|
|||
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));
|
||||
ability.addCost(new TapSourceCost());
|
||||
SacrificeSourceCost cost = new SacrificeSourceCost();
|
||||
cost.setText("Sacrifice this artifact");
|
||||
ability.addCost(cost);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new FoodAbility(false));
|
||||
}
|
||||
|
||||
protected FoodToken(final FoodToken token) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue