Clean up Ghoulcaller Gisa code, fix zombie tokens created not having images in some sets

This commit is contained in:
PurpleCrowbar 2023-03-23 20:18:52 +00:00
parent 8f742081b6
commit d93e533c75

View file

@ -8,7 +8,6 @@ import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.SacrificeCostCreaturesPower; import mage.abilities.dynamicvalue.common.SacrificeCostCreaturesPower;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
@ -19,7 +18,6 @@ import mage.constants.SubType;
import mage.constants.SuperType; import mage.constants.SuperType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.game.permanent.token.Token;
import mage.game.permanent.token.ZombieToken; import mage.game.permanent.token.ZombieToken;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent;
@ -39,10 +37,7 @@ public final class GhoulcallerGisa extends CardImpl {
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
// {B}, {tap}, Sacrifice another creature: create X 2/2 black Zombie creature tokens, where X is the sacrificed creature's power. // {B}, {tap}, Sacrifice another creature: create X 2/2 black Zombie creature tokens, where X is the sacrificed creature's power.
DynamicValue xValue = SacrificeCostCreaturesPower.instance; Effect effect = new CreateTokenEffect(new ZombieToken(), SacrificeCostCreaturesPower.instance);
Token zombie = new ZombieToken();
zombie.setTokenType(2);
Effect effect = new CreateTokenEffect(zombie, xValue);
effect.setText("create X 2/2 black Zombie creature tokens, where X is the sacrificed creature's power"); effect.setText("create X 2/2 black Zombie creature tokens, where X is the sacrificed creature's power");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{B}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{B}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());