mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
*Added Count$<Your/Opp>StartingLife.
This commit is contained in:
@@ -1314,8 +1314,8 @@ public class GameAction {
|
||||
final CardList computer, final int humanLife, final int computerLife, final QuestEvent qe) {
|
||||
this.newGame(humanDeck, computerDeck);
|
||||
|
||||
AllZone.getComputerPlayer().setLife(computerLife, null);
|
||||
AllZone.getHumanPlayer().setLife(humanLife, null);
|
||||
AllZone.getComputerPlayer().setStartingLife(computerLife);
|
||||
AllZone.getHumanPlayer().setStartingLife(humanLife);
|
||||
|
||||
for (final Card c : human) {
|
||||
|
||||
@@ -1347,6 +1347,9 @@ public class GameAction {
|
||||
// AllZone.getComputer() = new ComputerAI_Input(new
|
||||
// ComputerAI_General());
|
||||
Constant.Quest.FANTASY_QUEST[0] = false;
|
||||
|
||||
AllZone.getComputerPlayer().setStartingLife(20);
|
||||
AllZone.getHumanPlayer().setStartingLife(20);
|
||||
|
||||
AllZone.newGameCleanup();
|
||||
this.canShowWinLose = true;
|
||||
|
||||
@@ -53,6 +53,9 @@ public abstract class Player extends GameEntity {
|
||||
|
||||
/** The life. */
|
||||
private int life;
|
||||
|
||||
/** The life this player started the game with. */
|
||||
private int startingLife;
|
||||
|
||||
/** The assigned damage. */
|
||||
private int assignedDamage;
|
||||
@@ -258,6 +261,16 @@ public abstract class Player extends GameEntity {
|
||||
this.updateObservers();
|
||||
return change;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the starting life for a game. Should only be called from newGame()'s.
|
||||
*
|
||||
* @param startLife
|
||||
* a int.
|
||||
*/
|
||||
public final void setStartingLife(final int startLife) {
|
||||
this.startingLife = this.life = startLife;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -269,6 +282,17 @@ public abstract class Player extends GameEntity {
|
||||
public final int getLife() {
|
||||
return this.life;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Getter for the field <code>startingLife</code>.
|
||||
* </p>
|
||||
*
|
||||
* @return a int.
|
||||
*/
|
||||
public final int getStartingLife() {
|
||||
return this.startingLife;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
||||
@@ -2832,6 +2832,16 @@ public class CardFactoryUtil {
|
||||
}
|
||||
return CardFactoryUtil.doXMath(n, m, c);
|
||||
}
|
||||
|
||||
// Count$YourStartingLife
|
||||
if (sq[0].contains("YourStartingLife")) {
|
||||
return CardFactoryUtil.doXMath(cardController.getStartingLife(), m, c);
|
||||
}
|
||||
|
||||
// Count$OppStartingLife
|
||||
if (sq[0].contains("OppStartingLife")) {
|
||||
return CardFactoryUtil.doXMath(oppController.getStartingLife(), m, c);
|
||||
}
|
||||
|
||||
// Count$YourLifeTotal
|
||||
if (sq[0].contains("YourLifeTotal")) {
|
||||
|
||||
Reference in New Issue
Block a user