Fix drawn card being revealed during ability resolve

This commit is contained in:
tool4EvEr
2021-08-07 13:17:06 +02:00
parent 058ad2b1dd
commit f78c3ba441
9 changed files with 74 additions and 29 deletions

View File

@@ -356,11 +356,9 @@ public abstract class InputPayMana extends InputSyncronizedBase {
player.getManaPool().payManaFromAbility(saPaidFor, InputPayMana.this.manaCost, chosen);
}
onManaAbilityPaid();
onStateChanged();
} else {
// Need to call this to unlock
onStateChanged();
}
// Need to call this to unlock
onStateChanged();
}
});

View File

@@ -36,6 +36,8 @@ public abstract class InputSyncronizedBase extends InputBase implements InputSyn
}
protected final void stop() {
onStop();
// ensure input won't accept any user actions.
FThreads.invokeInEdtNowOrLater(new Runnable() {
@Override
@@ -44,8 +46,6 @@ public abstract class InputSyncronizedBase extends InputBase implements InputSyn
}
});
onStop();
// thread irrelevant
if (getController().getInputQueue().getInput() != null) {
getController().getInputQueue().removeInput(InputSyncronizedBase.this);

View File

@@ -171,7 +171,7 @@ public class HumanPlaySpellAbility {
manapool.restoreColorReplacements();
human.decNumManaConversion();
}
game.clearTopLibsCast();
game.clearTopLibsCast(ability);
return false;
}
@@ -197,7 +197,7 @@ public class HumanPlaySpellAbility {
manapool.restoreColorReplacements();
}
}
game.clearTopLibsCast();
game.clearTopLibsCast(ability);
return true;
}