mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Show that the card was Exerted this turn in the card detail panel.
This commit is contained in:
@@ -6116,6 +6116,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
public void exert() {
|
||||
exertedByPlayer.add(getController());
|
||||
exertThisTurn++;
|
||||
view.updateExertedThisTurn(this, true);
|
||||
}
|
||||
|
||||
public boolean isExertedBy(final Player player) {
|
||||
@@ -6124,6 +6125,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
|
||||
public void removeExertedBy(final Player player) {
|
||||
exertedByPlayer.remove(player);
|
||||
view.updateExertedThisTurn(this, getExertedThisTurn() > 0);
|
||||
}
|
||||
|
||||
protected void resetExtertedThisTurn() {
|
||||
|
||||
@@ -139,6 +139,13 @@ public class CardView extends GameEntityView {
|
||||
set(TrackableProperty.Attacking, combat != null && combat.isAttacking(c));
|
||||
}
|
||||
|
||||
public boolean isExertedThisTurn() {
|
||||
return get(TrackableProperty.ExertedThisTurn);
|
||||
}
|
||||
void updateExertedThisTurn(Card c, boolean exerted) {
|
||||
set(TrackableProperty.ExertedThisTurn, exerted);
|
||||
}
|
||||
|
||||
public boolean isBlocking() {
|
||||
return get(TrackableProperty.Blocking);
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ public enum TrackableProperty {
|
||||
CurrentState(TrackableTypes.CardStateViewType, false), //can't respect freeze, otherwise card constructor can crash
|
||||
AlternateState(TrackableTypes.CardStateViewType),
|
||||
HiddenId(TrackableTypes.IntegerType),
|
||||
ExertedThisTurn(TrackableTypes.BooleanType),
|
||||
|
||||
//Card State
|
||||
Name(TrackableTypes.StringType),
|
||||
|
||||
@@ -532,6 +532,14 @@ public class CardDetailUtil {
|
||||
area.append("Must block " + mustBlockThese);
|
||||
}
|
||||
|
||||
// exerted
|
||||
if (card.isExertedThisTurn()) {
|
||||
if (area.length() != 0) {
|
||||
area.append("\n\n");
|
||||
}
|
||||
area.append("^Exerted^");
|
||||
}
|
||||
|
||||
//show current card colors if enabled
|
||||
String curCardColors = formatCurrentCardColors(state);
|
||||
if (!curCardColors.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user