mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48: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) {
|
final CardList computer, final int humanLife, final int computerLife, final QuestEvent qe) {
|
||||||
this.newGame(humanDeck, computerDeck);
|
this.newGame(humanDeck, computerDeck);
|
||||||
|
|
||||||
AllZone.getComputerPlayer().setLife(computerLife, null);
|
AllZone.getComputerPlayer().setStartingLife(computerLife);
|
||||||
AllZone.getHumanPlayer().setLife(humanLife, null);
|
AllZone.getHumanPlayer().setStartingLife(humanLife);
|
||||||
|
|
||||||
for (final Card c : human) {
|
for (final Card c : human) {
|
||||||
|
|
||||||
@@ -1347,6 +1347,9 @@ public class GameAction {
|
|||||||
// AllZone.getComputer() = new ComputerAI_Input(new
|
// AllZone.getComputer() = new ComputerAI_Input(new
|
||||||
// ComputerAI_General());
|
// ComputerAI_General());
|
||||||
Constant.Quest.FANTASY_QUEST[0] = false;
|
Constant.Quest.FANTASY_QUEST[0] = false;
|
||||||
|
|
||||||
|
AllZone.getComputerPlayer().setStartingLife(20);
|
||||||
|
AllZone.getHumanPlayer().setStartingLife(20);
|
||||||
|
|
||||||
AllZone.newGameCleanup();
|
AllZone.newGameCleanup();
|
||||||
this.canShowWinLose = true;
|
this.canShowWinLose = true;
|
||||||
|
|||||||
@@ -53,6 +53,9 @@ public abstract class Player extends GameEntity {
|
|||||||
|
|
||||||
/** The life. */
|
/** The life. */
|
||||||
private int life;
|
private int life;
|
||||||
|
|
||||||
|
/** The life this player started the game with. */
|
||||||
|
private int startingLife;
|
||||||
|
|
||||||
/** The assigned damage. */
|
/** The assigned damage. */
|
||||||
private int assignedDamage;
|
private int assignedDamage;
|
||||||
@@ -258,6 +261,16 @@ public abstract class Player extends GameEntity {
|
|||||||
this.updateObservers();
|
this.updateObservers();
|
||||||
return change;
|
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>
|
* <p>
|
||||||
@@ -269,6 +282,17 @@ public abstract class Player extends GameEntity {
|
|||||||
public final int getLife() {
|
public final int getLife() {
|
||||||
return this.life;
|
return this.life;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Getter for the field <code>startingLife</code>.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @return a int.
|
||||||
|
*/
|
||||||
|
public final int getStartingLife() {
|
||||||
|
return this.startingLife;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
|||||||
@@ -2832,6 +2832,16 @@ public class CardFactoryUtil {
|
|||||||
}
|
}
|
||||||
return CardFactoryUtil.doXMath(n, m, c);
|
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
|
// Count$YourLifeTotal
|
||||||
if (sq[0].contains("YourLifeTotal")) {
|
if (sq[0].contains("YourLifeTotal")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user