- Added Windbrisk Heights

This commit is contained in:
moomarc
2012-08-29 12:29:03 +00:00
parent 8dcd8d7134
commit 3b386eb88d
6 changed files with 65 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -10837,6 +10837,7 @@ res/cardsfolder/w/wind_spirit.txt -text
res/cardsfolder/w/wind_zendikon.txt svneol=native#text/plain
res/cardsfolder/w/windborn_muse.txt svneol=native#text/plain
res/cardsfolder/w/windborne_charge.txt svneol=native#text/plain
res/cardsfolder/w/windbrisk_heights.txt -text
res/cardsfolder/w/windbrisk_raptor.txt svneol=native#text/plain
res/cardsfolder/w/windfall.txt svneol=native#text/plain
res/cardsfolder/w/winding_canyons.txt -text

View File

@@ -0,0 +1,16 @@
Name:Windbrisk Heights
ManaCost:no cost
Types:Land
Text:no text
K:Hideaway
T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDig | TriggerDescription$ This land enters the battlefield tapped. When it does, look at the top four cards of your library, exile one face down, then put the rest on the bottom of your library.
SVar:TrigDig:AB$ Dig | Cost$ 0 | Defined$ You | DigNum$ 4 | DestinationZone$ Exile | ExileFaceDown$ True | RememberChanged$ True
A:AB$ Mana | Cost$ T | Produced$ W | SpellDescription$ Add W to your mana pool.
A:AB$ Play | Cost$ W T | Defined$ Remembered | Controller$ You | WithoutManaCost$ True | Optional$ True | ConditionCheckSVar$ X | ConditionSVarCompare$ GE3 | ForgetRemembered$ True | PlayerTurn$ True | SpellDescription$ You may play the exiled card without paying its mana cost if you attacked with three or more creatures this turn.
SVar:X:Count$AttackersDeclared
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/windbrisk_heights.jpg
SetInfo:LRW|Rare|http://magiccards.info/scans/en/lw/281.jpg
Oracle:Hideaway (This land enters the battlefield tapped. When it does, look at the top four cards of your library, exile one face down, then put the rest on the bottom of your library.)\n{T}: Add {W} to your mana pool.\n{W}, {T}: You may play the exiled card without paying its mana cost if you attacked with three or more creatures this turn.
End

View File

@@ -2487,6 +2487,12 @@ public class CardFactoryUtil {
}
}
if (sq[0].contains("AttackersDeclared")) {
if (players.size() > 0) {
return CardFactoryUtil.doXMath(players.get(0).getAttackersDeclaredThisTurn(), m, source);
}
}
return CardFactoryUtil.doXMath(n, m, source);
}
@@ -3036,6 +3042,11 @@ public class CardFactoryUtil {
return CardFactoryUtil.doXMath(res.size(), m, c);
}
// Count$AttackersDeclared
if (sq[0].contains("AttackersDeclared")) {
return CardFactoryUtil.doXMath(cardController.getAttackersDeclaredThisTurn(), m, c);
}
// Count$ThisTurnCast <Valid>
// Count$LastTurnCast <Valid>
if (sq[0].contains("ThisTurnCast") || sq[0].contains("LastTurnCast")) {

View File

@@ -2638,6 +2638,7 @@ public class CombatUtil {
c.getDamageHistory().setCreatureAttackedThisCombat(true);
c.getController().setAttackedWithCreatureThisTurn(true);
c.getController().incrementAttackersDeclaredThisTurn();
} // checkDeclareAttackers
/**

View File

@@ -459,6 +459,7 @@ public class PhaseHandler extends MyObservable implements java.io.Serializable {
player.setAttackedWithCreatureThisTurn(false);
player.setNumLandsPlayed(0);
player.clearAssignedDamage();
player.resetAttackersDeclaredThisTurn();
}
this.getPlayerTurn().removeKeyword("Skip all combat phases of this turn.");
break;

View File

@@ -31,6 +31,7 @@ import javax.swing.JOptionPane;
import forge.AllZone;
import forge.AllZoneUtil;
import forge.Card;
import forge.CardDamageHistory;
import forge.CardList;
import forge.CardUtil;
import forge.Constant;
@@ -134,6 +135,9 @@ public abstract class Player extends GameEntity {
/** The attackedWithCreatureThisTurn. */
private boolean attackedWithCreatureThisTurn = false;
/** The playerAttackCountThisTurn. */
private int attackersDeclaredThisTurn = 0;
/** The zones. */
private final Map<ZoneType, PlayerZone> zones = new EnumMap<ZoneType, PlayerZone>(ZoneType.class);
@@ -2042,6 +2046,37 @@ public abstract class Player extends GameEntity {
this.attackedWithCreatureThisTurn = b;
}
/**
* <p>
* Gets the number of attackers declared by Player this turn.
* </p>
*
* @return a boolean.
*/
public final int getAttackersDeclaredThisTurn() {
return this.attackersDeclaredThisTurn;
}
/**
* <p>
* Increase number of attackers declared by Player this turn.
* </p>
*
*/
public final void incrementAttackersDeclaredThisTurn() {
this.attackersDeclaredThisTurn++;
}
/**
* <p>
* Resets number of attackers declared by Player this turn.
* </p>
*
*/
public final void resetAttackersDeclaredThisTurn() {
this.attackersDeclaredThisTurn = 0;
}
// //////////////////////////////
/**
* <p>