diff --git a/.gitattributes b/.gitattributes index a795e584991..46a36f24af0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore index eec99a0e7ec..db2af797153 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /*.iml /*.tmp .settings/org.eclipse.core.resources.prefs +/build /forge.log /forge.preferences /release.properties diff --git a/res/cardsfolder/t/thieves_fortune.txt b/res/cardsfolder/t/thieves_fortune.txt new file mode 100644 index 00000000000..75bbb8c455f --- /dev/null +++ b/res/cardsfolder/t/thieves_fortune.txt @@ -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 \ No newline at end of file diff --git a/src/main/java/forge/Phase.java b/src/main/java/forge/Phase.java index 1ae748d0859..4bc5d495c4d 100644 --- a/src/main/java/forge/Phase.java +++ b/src/main/java/forge/Phase.java @@ -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); } diff --git a/src/main/java/forge/Player.java b/src/main/java/forge/Player.java index c702238938a..1c20af4ffa4 100644 --- a/src/main/java/forge/Player.java +++ b/src/main/java/forge/Player.java @@ -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(); 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 runParams = new HashMap(); @@ -1619,6 +1624,19 @@ public abstract class Player extends MyObservable { CardList list = ((DefaultPlayerZone) AllZone.getZone("Battlefield", this)).getCardsAddedThisTurn("Any").getType("Land"); return !list.isEmpty(); } + + /** + *

hasProwl.

+ * + * @return a boolean. + */ + public boolean hasProwl() { + return prowl; + } + + public void setProwl(boolean newProwl) { + prowl = newProwl; + } private ArrayList handSizeOperations; diff --git a/src/main/java/forge/card/spellability/SpellAbility_Restriction.java b/src/main/java/forge/card/spellability/SpellAbility_Restriction.java index e336330aa27..ceabbbe5b9b 100644 --- a/src/main/java/forge/card/spellability/SpellAbility_Restriction.java +++ b/src/main/java/forge/card/spellability/SpellAbility_Restriction.java @@ -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); diff --git a/src/main/java/forge/card/spellability/SpellAbility_Variables.java b/src/main/java/forge/card/spellability/SpellAbility_Variables.java index 9a6f8794fa9..d57a259ad2c 100644 --- a/src/main/java/forge/card/spellability/SpellAbility_Variables.java +++ b/src/main/java/forge/card/spellability/SpellAbility_Variables.java @@ -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; } + + /** + *

Setter for the field prowl.

+ * + * @param bProwl a boolean. + */ + public void setProwl(boolean bProwl) { + prowl = bProwl; + } //IsPresent for Valid battlefield stuff