mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Added Gaea's Touch.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -4092,6 +4092,7 @@ res/cardsfolder/g/gaeas_liege.txt svneol=native#text/plain
|
|||||||
res/cardsfolder/g/gaeas_might.txt svneol=native#text/plain
|
res/cardsfolder/g/gaeas_might.txt svneol=native#text/plain
|
||||||
res/cardsfolder/g/gaeas_revenge.txt svneol=native#text/plain
|
res/cardsfolder/g/gaeas_revenge.txt svneol=native#text/plain
|
||||||
res/cardsfolder/g/gaeas_skyfolk.txt svneol=native#text/plain
|
res/cardsfolder/g/gaeas_skyfolk.txt svneol=native#text/plain
|
||||||
|
res/cardsfolder/g/gaeas_touch.txt -text
|
||||||
res/cardsfolder/g/gainsay.txt svneol=native#text/plain
|
res/cardsfolder/g/gainsay.txt svneol=native#text/plain
|
||||||
res/cardsfolder/g/gale_force.txt svneol=native#text/plain
|
res/cardsfolder/g/gale_force.txt svneol=native#text/plain
|
||||||
res/cardsfolder/g/galepowder_mage.txt svneol=native#text/plain
|
res/cardsfolder/g/galepowder_mage.txt svneol=native#text/plain
|
||||||
|
|||||||
7
res/cardsfolder/g/gaeas_touch.txt
Normal file
7
res/cardsfolder/g/gaeas_touch.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Name:Gaea's Touch
|
||||||
|
ManaCost:G G
|
||||||
|
Types:Enchantment
|
||||||
|
A:AB$ Mana | Cost$ Sac<1/CARDNAME> | Produced$ G G | SpellDescription$ Add G G to your mana pool.
|
||||||
|
S:Mode$ Continuous | Affected$ You | AddKeyword$ AdjustBasicForestPlays:1 | Description$ You may play an additional land during your turn if that land is a basic Forest.
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/gaeas_touch.jpg
|
||||||
|
Oracle:You may play an additional land during your turn if that land is a basic Forest.\nSacrifice Gaea's Touch: Add {G}{G} to your mana pool.
|
||||||
@@ -76,6 +76,7 @@ public class RestartGameEffect extends SpellAbilityEffect {
|
|||||||
player.setStartingLife(psc.getStartingLife());
|
player.setStartingLife(psc.getStartingLife());
|
||||||
player.setPoisonCounters(0);
|
player.setPoisonCounters(0);
|
||||||
player.setNumLandsPlayed(0);
|
player.setNumLandsPlayed(0);
|
||||||
|
player.setNumBasicForestsPlayed(0);
|
||||||
GameNew.putCardsOnBattlefield(player, psc.getCardsOnBattlefield(player));
|
GameNew.putCardsOnBattlefield(player, psc.getCardsOnBattlefield(player));
|
||||||
|
|
||||||
PlayerZone library = player.getZone(ZoneType.Library);
|
PlayerZone library = player.getZone(ZoneType.Library);
|
||||||
|
|||||||
@@ -109,11 +109,9 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
/** The prowl. */
|
/** The prowl. */
|
||||||
private ArrayList<String> prowl = new ArrayList<String>();
|
private ArrayList<String> prowl = new ArrayList<String>();
|
||||||
|
|
||||||
/** The max lands to play. */
|
|
||||||
private final static int maxLandsToPlay = 1;
|
|
||||||
|
|
||||||
/** The num lands played. */
|
/** The num lands played. */
|
||||||
private int numLandsPlayed = 0;
|
private int numLandsPlayed = 0;
|
||||||
|
private int numBasicForestsPlayed = 0;
|
||||||
|
|
||||||
/** The max hand size. */
|
/** The max hand size. */
|
||||||
private int maxHandSize = 7;
|
private int maxHandSize = 7;
|
||||||
@@ -1751,6 +1749,9 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
game.getAction().moveTo(this.getZone(ZoneType.Battlefield), land);
|
game.getAction().moveTo(this.getZone(ZoneType.Battlefield), land);
|
||||||
CardFactoryUtil.playLandEffects(land);
|
CardFactoryUtil.playLandEffects(land);
|
||||||
this.numLandsPlayed++;
|
this.numLandsPlayed++;
|
||||||
|
if (land.isBasicLand() && land.isType("Forest")) {
|
||||||
|
this.numBasicForestsPlayed++;
|
||||||
|
}
|
||||||
|
|
||||||
// check state effects for static animate (Living Lands, Conversion,
|
// check state effects for static animate (Living Lands, Conversion,
|
||||||
// etc...)
|
// etc...)
|
||||||
@@ -1807,24 +1808,46 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
if( land != null && land.getOwner() != this && !land.hasKeyword("May be played by your opponent"))
|
if( land != null && land.getOwner() != this && !land.hasKeyword("May be played by your opponent"))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// **** Check for land play limit per turn ****
|
||||||
// Dev Mode
|
// Dev Mode
|
||||||
if (this.getLobbyPlayer().getType() == PlayerType.HUMAN && Preferences.DEV_MODE &&
|
if (this.getLobbyPlayer().getType() == PlayerType.HUMAN && Preferences.DEV_MODE &&
|
||||||
Singletons.getModel().getPreferences().getPrefBoolean(FPref.DEV_UNLIMITED_LAND)) {
|
Singletons.getModel().getPreferences().getPrefBoolean(FPref.DEV_UNLIMITED_LAND)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (this.isCardInPlay("Fastbond") || this.isCardInCommand("Naya")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// check for adjusted max lands play per turn
|
// check for adjusted max lands play per turn
|
||||||
int adjMax = 0;
|
int adjMax = 1;
|
||||||
for (String keyword : this.getKeywords()) {
|
for (String keyword : this.getKeywords()) {
|
||||||
if (keyword.startsWith("AdjustLandPlays")) {
|
if (keyword.startsWith("AdjustLandPlays")) {
|
||||||
final String[] k = keyword.split(":");
|
final String[] k = keyword.split(":");
|
||||||
adjMax += Integer.valueOf(k[1]);
|
adjMax += Integer.valueOf(k[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
final int adjCheck = Player.maxLandsToPlay + adjMax;
|
if (this.numLandsPlayed < adjMax) {
|
||||||
// System.out.println("Max lands for player " + this.getName() + ": " + adjCheck);
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return this.numLandsPlayed < adjCheck || this.isCardInPlay("Fastbond") || this.isCardInCommand("Naya");
|
//Gaea's Touch
|
||||||
|
int adjMaxForests = 0;
|
||||||
|
int forestsPlayed = this.numBasicForestsPlayed;
|
||||||
|
if (land.isBasicLand() && land.isType("Forest"))
|
||||||
|
forestsPlayed++;
|
||||||
|
|
||||||
|
for (String keyword : this.getKeywords()) {
|
||||||
|
if (keyword.startsWith("AdjustBasicForestPlays")) {
|
||||||
|
final String[] k = keyword.split(":");
|
||||||
|
adjMaxForests += Integer.valueOf(k[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
adjMaxForests = Math.min(adjMaxForests, forestsPlayed);
|
||||||
|
if (this.numLandsPlayed < adjMax + adjMaxForests) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2489,6 +2512,18 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
return this.lifeGainedThisTurn;
|
return this.lifeGainedThisTurn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Setter for the field <code>numBasicForestsPlayed</code>.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @param n
|
||||||
|
* a int.
|
||||||
|
*/
|
||||||
|
public final void setNumBasicForestsPlayed(final int n) {
|
||||||
|
this.numBasicForestsPlayed = n;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Setter for the field <code>lifeGainedThisTurn</code>.
|
* Setter for the field <code>lifeGainedThisTurn</code>.
|
||||||
@@ -2728,6 +2763,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
resetNumDiscardedThisTurn();
|
resetNumDiscardedThisTurn();
|
||||||
setAttackedWithCreatureThisTurn(false);
|
setAttackedWithCreatureThisTurn(false);
|
||||||
setNumLandsPlayed(0);
|
setNumLandsPlayed(0);
|
||||||
|
setNumBasicForestsPlayed(0);
|
||||||
clearAssignedDamage();
|
clearAssignedDamage();
|
||||||
resetAttackersDeclaredThisTurn();
|
resetAttackersDeclaredThisTurn();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user