mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Merge pull request #1285 from tool4ever/viewPT
CardView: display expected P/T for unanimated vehicles
This commit is contained in:
@@ -1247,12 +1247,17 @@ public class CardView extends GameEntityView {
|
|||||||
return get(TrackableProperty.Power);
|
return get(TrackableProperty.Power);
|
||||||
}
|
}
|
||||||
void updatePower(Card c) {
|
void updatePower(Card c) {
|
||||||
if (c.getCurrentState().getView() == this || c.getAlternateState() == null) {
|
int num;
|
||||||
set(TrackableProperty.Power, c.getNetPower());
|
if (getType().hasSubtype("Vehicle") && !isCreature()) {
|
||||||
|
// use printed value so user can still see it
|
||||||
|
num = c.getCurrentPower();
|
||||||
|
} else {
|
||||||
|
num = c.getNetPower();
|
||||||
}
|
}
|
||||||
else {
|
if (c.getCurrentState().getView() != this && c.getAlternateState() != null) {
|
||||||
set(TrackableProperty.Power, c.getNetPower() - c.getBasePower() + c.getAlternateState().getBasePower());
|
num -= c.getBasePower() + c.getAlternateState().getBasePower();
|
||||||
}
|
}
|
||||||
|
set(TrackableProperty.Power, num);
|
||||||
}
|
}
|
||||||
void updatePower(CardState c) {
|
void updatePower(CardState c) {
|
||||||
Card card = c.getCard();
|
Card card = c.getCard();
|
||||||
@@ -1267,12 +1272,17 @@ public class CardView extends GameEntityView {
|
|||||||
return get(TrackableProperty.Toughness);
|
return get(TrackableProperty.Toughness);
|
||||||
}
|
}
|
||||||
void updateToughness(Card c) {
|
void updateToughness(Card c) {
|
||||||
if (c.getCurrentState().getView() == this || c.getAlternateState() == null) {
|
int num;
|
||||||
set(TrackableProperty.Toughness, c.getNetToughness());
|
if (getType().hasSubtype("Vehicle") && !isCreature()) {
|
||||||
|
// use printed value so user can still see it
|
||||||
|
num = c.getCurrentToughness();
|
||||||
|
} else {
|
||||||
|
num = c.getNetToughness();
|
||||||
}
|
}
|
||||||
else {
|
if (c.getCurrentState().getView() != this && c.getAlternateState() != null) {
|
||||||
set(TrackableProperty.Toughness, c.getNetToughness() - c.getBaseToughness() + c.getAlternateState().getBaseToughness());
|
num -= c.getBaseToughness() + c.getAlternateState().getBaseToughness();
|
||||||
}
|
}
|
||||||
|
set(TrackableProperty.Toughness, num);
|
||||||
}
|
}
|
||||||
void updateToughness(CardState c) {
|
void updateToughness(CardState c) {
|
||||||
Card card = c.getCard();
|
Card card = c.getCard();
|
||||||
|
|||||||
Reference in New Issue
Block a user