* Din of the Fireherd - Fixed that the created token was not counted for the sacrifice effect.

This commit is contained in:
LevelX2 2016-06-19 16:22:40 +02:00
parent f691017cda
commit 4022a47a0d

View file

@ -60,7 +60,6 @@ public class DinOfTheFireherd extends CardImpl {
// Put a 5/5 black and red Elemental creature token onto the battlefield. Target opponent sacrifices a creature for each black creature you control, then sacrifices a land for each red creature you control.
this.getSpellAbility().addEffect(new DinOfTheFireherdEffect());
this.getSpellAbility().addTarget(new TargetOpponent());
}
public DinOfTheFireherd(final DinOfTheFireherd card) {
@ -99,13 +98,13 @@ class DinOfTheFireherdEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
boolean applied = false;
int blackCreaturesControllerControls = game.getBattlefield().countAll(blackCreatureFilter, source.getControllerId(), game);
int redCreaturesControllerControls = game.getBattlefield().countAll(redCreatureFilter, source.getControllerId(), game);
boolean applied;
Token token = new DinOfTheFireherdToken();
applied = token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
int blackCreaturesControllerControls = game.getBattlefield().countAll(blackCreatureFilter, source.getControllerId(), game);
int redCreaturesControllerControls = game.getBattlefield().countAll(redCreatureFilter, source.getControllerId(), game);
Player targetOpponent = game.getPlayer(targetPointer.getFirst(game, source));
if (targetOpponent != null) {
Effect effect = new SacrificeEffect(new FilterControlledCreaturePermanent(), blackCreaturesControllerControls, "Target Opponent");
@ -122,6 +121,7 @@ class DinOfTheFireherdEffect extends OneShotEffect {
}
class DinOfTheFireherdToken extends Token {
public DinOfTheFireherdToken() {
super("", "5/5 black and red Elemental creature");
cardType.add(CardType.CREATURE);