mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Add Once Upon a Time
This commit is contained in:
@@ -70,6 +70,7 @@ public class RestartGameEffect extends SpellAbilityEffect {
|
||||
|
||||
player.setStartingLife(psc.getStartingLife());
|
||||
player.setPoisonCounters(0, sa.getHostCard());
|
||||
player.resetSpellCastThisGame();
|
||||
player.setLandsPlayedLastTurn(0);
|
||||
player.resetLandsPlayedThisTurn();
|
||||
player.resetInvestigatedThisTurn();
|
||||
|
||||
@@ -917,6 +917,10 @@ public class CardFactoryUtil {
|
||||
return doXMath(cc.getSurveilThisTurn(), m, c);
|
||||
}
|
||||
|
||||
if (sq[0].equals("YouCastThisGame")) {
|
||||
return doXMath(cc.getSpellsCastThisGame(), m, c);
|
||||
}
|
||||
|
||||
if (sq[0].equals("FirstSpellTotalManaSpent")) {
|
||||
try{
|
||||
return doXMath(c.getFirstSpellAbility().getTotalManaSpent(), m, c);
|
||||
@@ -926,6 +930,7 @@ public class CardFactoryUtil {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (sq[0].equals("StormCount")) {
|
||||
return doXMath(game.getStack().getSpellsCastThisTurn().size() - 1, m, c);
|
||||
}
|
||||
|
||||
@@ -84,6 +84,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
private final Map<Card, Integer> assignedDamage = Maps.newHashMap();
|
||||
private final Map<Card, Integer> assignedCombatDamage = Maps.newHashMap();
|
||||
private int spellsCastThisTurn = 0;
|
||||
private int spellsCastThisGame = 0;
|
||||
private int spellsCastLastTurn = 0;
|
||||
private int landsPlayedThisTurn = 0;
|
||||
private int landsPlayedLastTurn = 0;
|
||||
@@ -2209,6 +2210,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
}
|
||||
public final void addSpellCastThisTurn() {
|
||||
spellsCastThisTurn++;
|
||||
spellsCastThisGame++;
|
||||
achievementTracker.spellsCast++;
|
||||
if (spellsCastThisTurn > achievementTracker.maxStormCount) {
|
||||
achievementTracker.maxStormCount = spellsCastThisTurn;
|
||||
@@ -2220,7 +2222,12 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
public final void setSpellsCastLastTurn(int num) {
|
||||
spellsCastLastTurn = num;
|
||||
}
|
||||
|
||||
public final int getSpellsCastThisGame() {
|
||||
return spellsCastThisGame;
|
||||
}
|
||||
public final void resetSpellCastThisGame() {
|
||||
spellsCastThisGame = 0;
|
||||
}
|
||||
public final int getLifeGainedByTeamThisTurn() {
|
||||
return lifeGainedByTeamThisTurn;
|
||||
}
|
||||
|
||||
7
forge-gui/res/cardsfolder/upcoming/once_upon_a_time.txt
Normal file
7
forge-gui/res/cardsfolder/upcoming/once_upon_a_time.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
Name:Once Upon a Time
|
||||
ManaCost:1 G
|
||||
Types:Instant
|
||||
S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ All | CheckSVar$ X | SVarCompare$ EQ0 | MayPlay$ True | MayPlayWithoutManaCost$ True | Description$ If this spell is the first spell you've cast this game, you may cast it without paying its mana cost.
|
||||
SVar:X:Count$YouCastThisGame
|
||||
A:SP$ Dig | Cost$ 1 G | DigNum$ 5 | ChangeNum$ 1 | Optional$ True | ForceRevealToController$ True | ChangeValid$ Card.Creature,Card.Land | RestRandomOrder$ True | SpellDescription$ Look at the top five cards of your library. You may reveal a creature or land card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
Oracle:If this spell is the first spell you've cast this game, you may cast it without paying its mana cost.\nLook at the top five cards of your library. You may reveal a creature or land card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
Reference in New Issue
Block a user