mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Updating Label observers after a ChangeZone
This commit is contained in:
@@ -111,6 +111,10 @@ public class GameAction {
|
|||||||
public static Card changeZone(final PlayerZone prev, final PlayerZone zone, final Card c) {
|
public static Card changeZone(final PlayerZone prev, final PlayerZone zone, final Card c) {
|
||||||
if ((prev == null) && !c.isToken()) {
|
if ((prev == null) && !c.isToken()) {
|
||||||
zone.add(c);
|
zone.add(c);
|
||||||
|
Player p = zone.getPlayer();
|
||||||
|
if (p != null){
|
||||||
|
p.updateLabelObservers();
|
||||||
|
}
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -191,6 +195,11 @@ public class GameAction {
|
|||||||
prev.remove(c);
|
prev.remove(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Player p = zone.getPlayer();
|
||||||
|
if (p != null){
|
||||||
|
p.updateLabelObservers();
|
||||||
|
}
|
||||||
|
|
||||||
final HashMap<String, Object> runParams = new HashMap<String, Object>();
|
final HashMap<String, Object> runParams = new HashMap<String, Object>();
|
||||||
runParams.put("Card", lastKnownInfo);
|
runParams.put("Card", lastKnownInfo);
|
||||||
if (prev != null) {
|
if (prev != null) {
|
||||||
|
|||||||
@@ -2734,6 +2734,10 @@ public abstract class Player extends GameEntity {
|
|||||||
return this.mustAttackEntity;
|
return this.mustAttackEntity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final void updateLabelObservers() {
|
||||||
|
this.getZone(Zone.Hand).updateObservers();
|
||||||
|
}
|
||||||
|
|
||||||
// //////////////////////////////
|
// //////////////////////////////
|
||||||
//
|
//
|
||||||
// generic Object overrides
|
// generic Object overrides
|
||||||
|
|||||||
Reference in New Issue
Block a user