mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
CardView: updateStateForView on GameAction changeZone
This commit is contained in:
@@ -376,6 +376,9 @@ public class GameAction {
|
|||||||
copied.clearEtbCounters();
|
copied.clearEtbCounters();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update state for view
|
||||||
|
copied.updateStateForView();
|
||||||
|
|
||||||
if (fromBattlefield) {
|
if (fromBattlefield) {
|
||||||
c.setDamage(0); //clear damage after a card leaves the battlefield
|
c.setDamage(0); //clear damage after a card leaves the battlefield
|
||||||
c.setHasBeenDealtDeathtouchDamage(false);
|
c.setHasBeenDealtDeathtouchDamage(false);
|
||||||
|
|||||||
@@ -539,8 +539,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final void updatePowerToughnessForView() {
|
public final void updatePowerToughnessForView() {
|
||||||
currentState.getView().updatePower(this);
|
view.updateCounters(this);
|
||||||
currentState.getView().updateToughness(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void updateTypesForView() {
|
public final void updateTypesForView() {
|
||||||
|
|||||||
@@ -659,6 +659,8 @@ public class CardView extends GameEntityView {
|
|||||||
if (c.getGame() != null) {
|
if (c.getGame() != null) {
|
||||||
currentStateView.updateColors(currentState);
|
currentStateView.updateColors(currentState);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
currentStateView.updateLoyalty(currentState);
|
||||||
}
|
}
|
||||||
currentState.getView().updateKeywords(c, currentState); //update keywords even if state doesn't change
|
currentState.getView().updateKeywords(c, currentState); //update keywords even if state doesn't change
|
||||||
|
|
||||||
@@ -685,6 +687,8 @@ public class CardView extends GameEntityView {
|
|||||||
if (c.getGame() != null) {
|
if (c.getGame() != null) {
|
||||||
alternateStateView.updateColors(alternateState);
|
alternateStateView.updateColors(alternateState);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
alternateStateView.updateLoyalty(alternateState);
|
||||||
}
|
}
|
||||||
alternateState.getView().updateKeywords(c, alternateState);
|
alternateState.getView().updateKeywords(c, alternateState);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user