Add Word of Command

This commit is contained in:
Lyu Zong-Hong
2021-03-27 12:25:20 +09:00
parent 407c742124
commit 2e768cb77b
7 changed files with 101 additions and 1 deletions

View File

@@ -57,6 +57,9 @@ public abstract class InputPayMana extends InputSyncronizedBase {
game = player.getGame();
saPaidFor = saPaidFor0;
// Set current paid for SA for player to be able to reference it later
player.pushPaidForSA(saPaidFor);
//if player is floating mana, show mana pool to make it easier to use that mana
wasFloatingMana = !player.getManaPool().isEmpty();
if (wasFloatingMana) {
@@ -66,6 +69,9 @@ public abstract class InputPayMana extends InputSyncronizedBase {
@Override
protected void onStop() {
// Clear current paid for SA
player.popPaidForSA();
if (wasFloatingMana) { //hide mana pool if it was shown due to floating mana
getController().getGui().hideManaPool(PlayerView.get(player));
}
@@ -351,6 +357,9 @@ public abstract class InputPayMana extends InputSyncronizedBase {
}
onManaAbilityPaid();
onStateChanged();
} else {
// Need to call this to unlock
onStateChanged();
}
}
});