Fixed Rankle's triggered ability (#6064)

* Fixed Rankle's triggered ability

Any number of available modes can now be selected, including zero.

* Update AbilityImpl.java

* getTargets now returns empty Target for null Mode

Reverted null Target check changes in StackAbility.

* Update HumanPlayer.java
This commit is contained in:
Sarah Souders 2019-12-04 21:59:03 -05:00 committed by Jeff Wadsworth
parent e437577b5a
commit b208dc332f
3 changed files with 6 additions and 2 deletions

View file

@ -1856,6 +1856,10 @@ public class HumanPlayer extends PlayerImpl {
}
}
}
else if (modes.getSelectedModes().size() >= modes.getMinModes()) {
/* let the player cancel mode selection if they do not need to select any further modes */
done = true;
}
if (source.getAbilityType() != AbilityType.TRIGGERED) {
done = true;
}

View file

@ -51,7 +51,7 @@ public final class RankleMasterOfPranks extends CardImpl {
// Each player sacrifices a creature.
ability.addMode(new Mode(new SacrificeAllEffect(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
ability.getModes().setMinModes(1);
ability.getModes().setMinModes(0);
ability.getModes().setMaxModes(3);
ability.getModes().setChooseText("choose any number —");
this.addAbility(ability);

View file

@ -889,7 +889,7 @@ public abstract class AbilityImpl implements Ability {
if (getModes().getMode() != null) {
return getModes().getMode().getTargets();
}
return null;
return new Targets();
}
@Override