- Added Prowl keyword.

- Added Thieves' Fortune.
This commit is contained in:
Sloth
2011-08-24 14:33:53 +00:00
parent ce25a3cedc
commit 48bc240d9a
7 changed files with 47 additions and 1 deletions

1
.gitattributes vendored
View File

@@ -7741,6 +7741,7 @@ res/cardsfolder/t/thermokarst.txt svneol=native#text/plain
res/cardsfolder/t/thermopod.txt svneol=native#text/plain
res/cardsfolder/t/thicket_basilisk.txt svneol=native#text/plain
res/cardsfolder/t/thief_of_hope.txt svneol=native#text/plain
res/cardsfolder/t/thieves_fortune.txt -text
res/cardsfolder/t/thieving_magpie.txt svneol=native#text/plain
res/cardsfolder/t/think_tank.txt svneol=native#text/plain
res/cardsfolder/t/think_twice.txt svneol=native#text/plain

1
.gitignore vendored
View File

@@ -2,6 +2,7 @@
/*.iml
/*.tmp
.settings/org.eclipse.core.resources.prefs
/build
/forge.log
/forge.preferences
/release.properties

View File

@@ -0,0 +1,10 @@
Name:Thieves' Fortune
ManaCost:2 U
Types:Tribal Instant Rogue
Text:no text
A:SP$ Dig | Cost$ U | Activation$ Prowl | DigNum$ 4 | ChangeNum$ 1 | PrecostDesc$ Prowl U | SpellDescription$ (You may cast this for its prowl cost if you dealt combat damage to a player this turn with a Rogue.)
A:SP$ Dig | Cost$ 2 U | DigNum$ 4 | ChangeNum$ 1 | SpellDescription$ Look at the top four cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order.
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/thieves_fortune.jpg
End

View File

@@ -479,6 +479,8 @@ public class Phase extends MyObservable implements java.io.Serializable {
Player nextTurn = extraTurns.isEmpty() ? getPlayerTurn().getOpponent() : extraTurns.pop();
AllZone.resetZoneMoveTracking();
AllZone.getComputerPlayer().setProwl(false);
AllZone.getHumanPlayer().setProwl(false);
return skipTurnTimeVault(nextTurn);
}

View File

@@ -32,6 +32,7 @@ public abstract class Player extends MyObservable {
protected int nTurns = 0;
protected boolean skipNextUntap = false;
protected boolean prowl = false;
protected int maxLandsToPlay = 1;
protected int numLandsPlayed = 0;
@@ -90,6 +91,7 @@ public abstract class Player extends MyObservable {
loseConditionSpell = null;
maxLandsToPlay = 1;
numLandsPlayed = 0;
prowl = false;
handSizeOperations = new ArrayList<HandSizeOp>();
keywords.clear();
@@ -374,6 +376,9 @@ public abstract class Player extends MyObservable {
addAssignedDamage(damageToDo);
GameActionUtil.executeDamageDealingEffects(source, damageToDo);
GameActionUtil.executeDamageToPlayerEffects(this, source, damageToDo);
if(isCombat && source.isType("Rogue"))
source.getController().setProwl(true);
//Run triggers
HashMap<String, Object> runParams = new HashMap<String, Object>();
@@ -1619,6 +1624,19 @@ public abstract class Player extends MyObservable {
CardList list = ((DefaultPlayerZone) AllZone.getZone("Battlefield", this)).getCardsAddedThisTurn("Any").getType("Land");
return !list.isEmpty();
}
/**
* <p>hasProwl.</p>
*
* @return a boolean.
*/
public boolean hasProwl() {
return prowl;
}
public void setProwl(boolean newProwl) {
prowl = newProwl;
}
private ArrayList<HandSizeOp> handSizeOperations;

View File

@@ -39,6 +39,7 @@ public class SpellAbility_Restriction extends SpellAbility_Variables {
if (value.equals("Threshold")) setThreshold(true);
if (value.equals("Metalcraft")) setMetalcraft(true);
if (value.equals("Hellbent")) setHellbent(true);
if (value.equals("Prowl")) setProwl(true);
}
if (params.containsKey("ActivationZone"))
@@ -180,7 +181,10 @@ public class SpellAbility_Restriction extends SpellAbility_Variables {
if (!activator.hasMetalcraft())
return false;
}
if (prowl) {
if (!activator.hasProwl())
return false;
}
if (sIsPresent != null) {
CardList list = AllZoneUtil.getCardsInZone(presentZone);

View File

@@ -40,6 +40,7 @@ public class SpellAbility_Variables {
protected boolean threshold = false;
protected boolean metalcraft = false;
protected boolean hellbent = false;
protected boolean prowl = false;
protected String sIsPresent = null;
protected String presentCompare = "GE1"; // Default Compare to Greater or Equal to 1
@@ -261,6 +262,15 @@ public class SpellAbility_Variables {
public void setMetalcraft(boolean bMetalcraft) {
metalcraft = bMetalcraft;
}
/**
* <p>Setter for the field <code>prowl</code>.</p>
*
* @param bProwl a boolean.
*/
public void setProwl(boolean bProwl) {
prowl = bProwl;
}
//IsPresent for Valid battlefield stuff