Update Word of Command mana payment check conditions

This commit is contained in:
Lyu Zong-Hong
2021-03-28 15:09:01 +09:00
parent 6a56e29474
commit 7fc85a47be
7 changed files with 41 additions and 15 deletions

View File

@@ -57,9 +57,6 @@ 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) {
@@ -69,7 +66,8 @@ public abstract class InputPayMana extends InputSyncronizedBase {
@Override
protected void onStop() {
// Clear current paid for SA
// Clear current Mana cost being paid for SA
saPaidFor.setManaCostBeingPaid(null);
player.popPaidForSA();
if (wasFloatingMana) { //hide mana pool if it was shown due to floating mana

View File

@@ -19,6 +19,10 @@ public class InputPayManaOfCostPayment extends InputPayMana {
manaCost = cost;
extraMatrix = matrix;
applyMatrix();
// Set Mana cost being paid for SA to be able to reference it later
player.pushPaidForSA(saPaidFor);
saPaidFor.setManaCostBeingPaid(manaCost);
}
private static final long serialVersionUID = 3467312982164195091L;