Fix getTotalPreventionShieldAmount (#3654)

* Fix scripts

* Fix damage prevention display

* Optimize attachment tracking for netplay

* Phasing fix

* Fix NPE

* Tweak logic order

* Clean up

* Fix scripts

* Clean up

* Fix FailedToTarget

---------

Co-authored-by: TRT <>
This commit is contained in:
tool4ever
2023-08-23 10:34:50 +02:00
committed by GitHub
parent de72773634
commit 2025487c34
22 changed files with 74 additions and 56 deletions

View File

@@ -595,8 +595,7 @@ public class PlayArea extends CardPanelContainer implements CardPanelMouseListen
Iterable<CardView> cards = model.getCards(zone);
if (cards != null) {
modelCopy = Lists.newArrayList(cards);
}
else {
} else {
modelCopy = Lists.newArrayList();
}
}
@@ -648,17 +647,17 @@ public class PlayArea extends CardPanelContainer implements CardPanelMouseListen
doLayout();
}
invalidate(); //pfps do the extra invalidate before any scrolling
invalidate(); //pfps do the extra invalidate before any scrolling
if (!newPanels.isEmpty()) {
int i = newPanels.size();
int i = newPanels.size();
for (final CardPanel toPanel : newPanels) {
if ( --i == 0 ) { // only scroll to last panel to be added
scrollRectToVisible(new Rectangle(toPanel.getCardX(), toPanel.getCardY(), toPanel.getCardWidth(), toPanel.getCardHeight()));
}
if ( --i == 0 ) { // only scroll to last panel to be added
scrollRectToVisible(new Rectangle(toPanel.getCardX(), toPanel.getCardY(), toPanel.getCardWidth(), toPanel.getCardHeight()));
}
Animation.moveCard(toPanel);
}
}
repaint();
}
repaint();
}
public boolean updateCard(final CardView card, boolean fromRefresh) {