- 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

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