mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
battlefield will be updated after any mana ability was played
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
package forge.control.input;
|
package forge.control.input;
|
||||||
|
|
||||||
import forge.gui.match.CMatchUI;
|
|
||||||
import forge.view.ButtonUtil;
|
import forge.view.ButtonUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -306,7 +306,9 @@ public abstract class InputPayManaBase extends InputSyncronizedBase implements I
|
|||||||
if ( saPaymentSrc != null) // null comes when they've paid from pool
|
if ( saPaymentSrc != null) // null comes when they've paid from pool
|
||||||
this.manaCost = whoPays.getManaPool().payManaFromAbility(saPaidFor, manaCost, saPaymentSrc);
|
this.manaCost = whoPays.getManaPool().payManaFromAbility(saPaidFor, manaCost, saPaymentSrc);
|
||||||
|
|
||||||
onManaAbilityPaid();
|
onManaAbilityPaid();
|
||||||
|
if ( saPaymentSrc != null )
|
||||||
|
whoPays.getZone(ZoneType.Battlefield).updateObservers();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected final void checkIfAlredyPaid() {
|
protected final void checkIfAlredyPaid() {
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ import forge.control.input.Input;
|
|||||||
import forge.control.input.InputAttack;
|
import forge.control.input.InputAttack;
|
||||||
import forge.control.input.InputBlock;
|
import forge.control.input.InputBlock;
|
||||||
import forge.control.input.InputPayManaBase;
|
import forge.control.input.InputPayManaBase;
|
||||||
import forge.game.GameState;
|
|
||||||
import forge.game.phase.CombatUtil;
|
import forge.game.phase.CombatUtil;
|
||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
import forge.game.zone.PlayerZone;
|
import forge.game.zone.PlayerZone;
|
||||||
@@ -143,6 +142,7 @@ public class CField implements ICDoc {
|
|||||||
private final Observer observerPlay = new Observer() {
|
private final Observer observerPlay = new Observer() {
|
||||||
@Override
|
@Override
|
||||||
public void update(final Observable a, final Object b) {
|
public void update(final Observable a, final Object b) {
|
||||||
|
//FThreads.checkEDT("observerPlay.update", true);
|
||||||
CField.this.view.getTabletop().setupPlayZone();
|
CField.this.view.getTabletop().setupPlayZone();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -343,8 +343,7 @@ public class CField implements ICDoc {
|
|||||||
if ( CField.this.player != CField.this.playerViewer )
|
if ( CField.this.player != CField.this.playerViewer )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
final GameState game = Singletons.getModel().getGame();
|
final SpellAbility ab = player.getController().getAbilityToPlay(player.getGame().getAbilitesOfCard(c, player));
|
||||||
final SpellAbility ab = player.getController().getAbilityToPlay(game.getAbilitesOfCard(c, player));
|
|
||||||
if ( null != ab) {
|
if ( null != ab) {
|
||||||
FThreads.invokeInNewThread(new Runnable(){ @Override public void run(){
|
FThreads.invokeInNewThread(new Runnable(){ @Override public void run(){
|
||||||
player.playSpellAbility(c, ab);
|
player.playSpellAbility(c, ab);
|
||||||
|
|||||||
Reference in New Issue
Block a user