CardView: updateStateForView on GameAction changeZone

This commit is contained in:
Hanmac
2019-08-03 10:39:15 +02:00
parent 773f2b280f
commit e5b9c313b4
3 changed files with 8 additions and 2 deletions

View File

@@ -376,6 +376,9 @@ public class GameAction {
copied.clearEtbCounters();
}
// update state for view
copied.updateStateForView();
if (fromBattlefield) {
c.setDamage(0); //clear damage after a card leaves the battlefield
c.setHasBeenDealtDeathtouchDamage(false);

View File

@@ -539,8 +539,7 @@ public class Card extends GameEntity implements Comparable<Card> {
}
public final void updatePowerToughnessForView() {
currentState.getView().updatePower(this);
currentState.getView().updateToughness(this);
view.updateCounters(this);
}
public final void updateTypesForView() {

View File

@@ -659,6 +659,8 @@ public class CardView extends GameEntityView {
if (c.getGame() != null) {
currentStateView.updateColors(currentState);
}
} else {
currentStateView.updateLoyalty(currentState);
}
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) {
alternateStateView.updateColors(alternateState);
}
} else {
alternateStateView.updateLoyalty(alternateState);
}
alternateState.getView().updateKeywords(c, alternateState);
}