mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
Prevent activating unplayable abilities
This commit is contained in:
@@ -59,10 +59,10 @@ public class InputPassPriority extends InputSyncronizedBase {
|
|||||||
|
|
||||||
public SpellAbility getChosenSa() { return chosenSa; }
|
public SpellAbility getChosenSa() { return chosenSa; }
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCardSelected(final Card card, final ITriggerEvent triggerEvent) {
|
protected void onCardSelected(final Card card, final ITriggerEvent triggerEvent) {
|
||||||
List<SpellAbility> abilities = card.getAllPossibleAbilities(player, false);
|
//remove unplayable unless triggerEvent specified, in which case unplayable may be shown as disabled options
|
||||||
|
List<SpellAbility> abilities = card.getAllPossibleAbilities(player, triggerEvent == null);
|
||||||
if (abilities.isEmpty()) {
|
if (abilities.isEmpty()) {
|
||||||
flashIncorrectAction();
|
flashIncorrectAction();
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user