mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
support "that player's life total as the turn began"
This commit is contained in:
@@ -609,9 +609,15 @@ public class CardFactoryUtil {
|
|||||||
if (value.contains("LifeGainedThisTurn")) {
|
if (value.contains("LifeGainedThisTurn")) {
|
||||||
return doXMath(player.getLifeGainedThisTurn(), m, source);
|
return doXMath(player.getLifeGainedThisTurn(), m, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value.contains("LifeGainedByTeamThisTurn")) {
|
if (value.contains("LifeGainedByTeamThisTurn")) {
|
||||||
return doXMath(player.getLifeGainedByTeamThisTurn(), m, source);
|
return doXMath(player.getLifeGainedByTeamThisTurn(), m, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (value.contains("LifeStartedThisTurnWith")) {
|
||||||
|
return doXMath(player.getLifeStartedThisTurnWith(), m, source);
|
||||||
|
}
|
||||||
|
|
||||||
if (value.contains("PoisonCounters")) {
|
if (value.contains("PoisonCounters")) {
|
||||||
return doXMath(player.getPoisonCounters(), m, source);
|
return doXMath(player.getPoisonCounters(), m, source);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
|
|
||||||
private int life = 20;
|
private int life = 20;
|
||||||
private int startingLife = 20;
|
private int startingLife = 20;
|
||||||
|
private int lifeStartedThisTurnWith = startingLife;
|
||||||
private final Map<Card, Integer> assignedDamage = Maps.newHashMap();
|
private final Map<Card, Integer> assignedDamage = Maps.newHashMap();
|
||||||
private final Map<Card, Integer> assignedCombatDamage = Maps.newHashMap();
|
private final Map<Card, Integer> assignedCombatDamage = Maps.newHashMap();
|
||||||
private int spellsCastThisTurn = 0;
|
private int spellsCastThisTurn = 0;
|
||||||
@@ -1660,6 +1661,13 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
numCardsInHandStartedThisTurnWith = num;
|
numCardsInHandStartedThisTurnWith = num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getLifeStartedThisTurnWith() {
|
||||||
|
return lifeStartedThisTurnWith;
|
||||||
|
}
|
||||||
|
public void setLifeStartedThisTurnWith(int l) {
|
||||||
|
lifeStartedThisTurnWith = l;
|
||||||
|
}
|
||||||
|
|
||||||
public void addNoteForName(String notedFor, String noted) {
|
public void addNoteForName(String notedFor, String noted) {
|
||||||
if (!notes.containsKey(notedFor)) {
|
if (!notes.containsKey(notedFor)) {
|
||||||
notes.put(notedFor, new FCollection<>());
|
notes.put(notedFor, new FCollection<>());
|
||||||
@@ -3265,6 +3273,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
lifeGainedThisTurn = 0;
|
lifeGainedThisTurn = 0;
|
||||||
lifeGainedTimesThisTurn = 0;
|
lifeGainedTimesThisTurn = 0;
|
||||||
lifeGainedByTeamThisTurn = 0;
|
lifeGainedByTeamThisTurn = 0;
|
||||||
|
setLifeStartedThisTurnWith(getLife());
|
||||||
setLibrarySearched(0);
|
setLibrarySearched(0);
|
||||||
setNumManaConversion(0);
|
setNumManaConversion(0);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user