mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Removed a lot of copies of "updateObservers()" (please report if you see anything funny).
This commit is contained in:
@@ -3802,7 +3802,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
*/
|
||||
public final void setOwner(final Player player) {
|
||||
this.owner = player;
|
||||
this.updateObservers();
|
||||
//this.updateObservers();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5806,7 +5806,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
*/
|
||||
public final void setUniqueNumber(final int n) {
|
||||
this.uniqueNumber = n;
|
||||
this.updateObservers();
|
||||
//this.updateObservers();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -151,7 +151,6 @@ public class ManaPool {
|
||||
this.floatingTotals[i]++;
|
||||
}
|
||||
}
|
||||
owner.updateObservers();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -182,7 +181,7 @@ public class ManaPool {
|
||||
|
||||
if (this.floatingMana.size() == 0) {
|
||||
this.calculateManaTotals();
|
||||
this.owner.updateObservers();
|
||||
//this.owner.updateObservers();
|
||||
return numRemoved;
|
||||
}
|
||||
|
||||
@@ -202,7 +201,7 @@ public class ManaPool {
|
||||
this.floatingMana.clear();
|
||||
}
|
||||
this.calculateManaTotals();
|
||||
this.owner.updateObservers();
|
||||
//this.owner.updateObservers();
|
||||
|
||||
return numRemoved;
|
||||
}
|
||||
@@ -381,7 +380,7 @@ public class ManaPool {
|
||||
this.floatingTotals[i]--;
|
||||
}
|
||||
}
|
||||
owner.updateObservers();
|
||||
//owner.updateObservers();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ public class InputPassPriority extends Input implements java.io.Serializable {
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public final void showMessage() {
|
||||
GuiDisplayUtil.updateGUI();
|
||||
//GuiDisplayUtil.updateGUI();
|
||||
ButtonUtil.enableOnlyOK();
|
||||
|
||||
final PhaseType phase = Singletons.getModel().getGameState().getPhaseHandler().getPhase();
|
||||
|
||||
@@ -195,7 +195,7 @@ public class InputPayManaCostUtil {
|
||||
|
||||
manaCost = AllZone.getHumanPlayer().getManaPool().payManaFromAbility(sa, manaCost, chosen);
|
||||
|
||||
AllZone.getHumanPlayer().getZone(ZoneType.Battlefield).updateObservers();
|
||||
//AllZone.getHumanPlayer().getZone(ZoneType.Battlefield).updateObservers();
|
||||
// DO NOT REMOVE THIS, otherwise the cards don't always tap (copied)
|
||||
return manaCost;
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ public class PhaseUtil {
|
||||
Singletons.getModel().getGameState().getUntap().executeAt();
|
||||
|
||||
// otherwise land seems to stay tapped when it is really untapped
|
||||
AllZone.getHumanPlayer().getZone(ZoneType.Battlefield).updateObservers();
|
||||
//AllZone.getHumanPlayer().getZone(ZoneType.Battlefield).updateObservers();
|
||||
|
||||
Singletons.getModel().getGameState().getPhaseHandler().setNeedToNextPhase(true);
|
||||
}
|
||||
|
||||
@@ -562,16 +562,11 @@ public final class GuiDisplayUtil {
|
||||
|
||||
Singletons.getModel().getGameAction().checkStateEffects();
|
||||
Singletons.getModel().getGameState().getPhaseHandler().updateObservers();
|
||||
AllZone.getHumanPlayer().getZone(ZoneType.Exile).updateObservers();
|
||||
AllZone.getComputerPlayer().getZone(ZoneType.Exile).updateObservers();
|
||||
AllZone.getHumanPlayer().updateObservers();
|
||||
AllZone.getHumanPlayer().getZone(ZoneType.Hand).updateObservers();
|
||||
AllZone.getComputerPlayer().getZone(ZoneType.Hand).updateObservers();
|
||||
AllZone.getHumanPlayer().getZone(ZoneType.Graveyard).updateObservers();
|
||||
AllZone.getComputerPlayer().getZone(ZoneType.Graveyard).updateObservers();
|
||||
AllZone.getHumanPlayer().getZone(ZoneType.Battlefield).updateObservers();
|
||||
AllZone.getComputerPlayer().updateObservers();
|
||||
AllZone.getComputerPlayer().getZone(ZoneType.Battlefield).updateObservers();
|
||||
AllZone.getHumanPlayer().getZone(ZoneType.Library).updateObservers();
|
||||
AllZone.getComputerPlayer().getZone(ZoneType.Library).updateObservers();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user