* Profane Command - Fixed a bug that target of second mode was not set correctly.

This commit is contained in:
LevelX2 2015-01-30 21:11:51 +01:00
parent d69edc00c7
commit e2b4128b2a

View file

@ -76,7 +76,7 @@ public class ProfaneCommand extends CardImpl {
// * Return target creature card with converted mana cost X or less from your graveyard to the battlefield.
Mode mode = new Mode();
mode.getEffects().add(new ReturnFromGraveyardToBattlefieldTargetEffect());
mode.getTargets().add(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
mode.getTargets().add(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card with converted mana cost X or less from your graveyard")));
this.getSpellAbility().addMode(mode);
// * Target creature gets -X/-X until end of turn.
@ -97,8 +97,8 @@ public class ProfaneCommand extends CardImpl {
@Override
public void adjustTargets(Ability ability, Game game) {
for (UUID modeId :ability.getModes().getSelectedModes()) {
Mode mode = ability.getModes().get(modeId);
// adjust targets is called for every selected mode
Mode mode = ability.getModes().getMode();
for (Effect effect :mode.getEffects()) {
if (effect instanceof ReturnFromGraveyardToBattlefieldTargetEffect) {
mode.getTargets().clear();
@ -115,7 +115,6 @@ public class ProfaneCommand extends CardImpl {
}
}
}
}
public ProfaneCommand(final ProfaneCommand card) {
super(card);