diff --git a/.gitattributes b/.gitattributes index e2d875ae9bc..52ba416b78e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1631,6 +1631,7 @@ res/cardsfolder/c/crosswinds.txt svneol=native#text/plain res/cardsfolder/c/crovax_ascendant_hero.txt svneol=native#text/plain res/cardsfolder/c/crowd_favorites.txt svneol=native#text/plain res/cardsfolder/c/crowd_of_cinders.txt svneol=native#text/plain +res/cardsfolder/c/crown_of_empires.txt -text res/cardsfolder/c/crown_of_flames.txt svneol=native#text/plain res/cardsfolder/c/crucible_of_fire.txt svneol=native#text/plain res/cardsfolder/c/crucible_of_worlds.txt svneol=native#text/plain @@ -6806,6 +6807,7 @@ res/cardsfolder/s/scavenger_folk.txt svneol=native#text/plain res/cardsfolder/s/scavenging_ghoul.txt svneol=native#text/plain res/cardsfolder/s/scavenging_scarab.txt svneol=native#text/plain res/cardsfolder/s/scepter_of_dominance.txt svneol=native#text/plain +res/cardsfolder/s/scepter_of_empires.txt -text res/cardsfolder/s/scepter_of_fugue.txt svneol=native#text/plain res/cardsfolder/s/scepter_of_insight.txt svneol=native#text/plain res/cardsfolder/s/schismotivate.txt -text @@ -8245,6 +8247,7 @@ res/cardsfolder/t/thriss_nantuko_primus.txt svneol=native#text/plain res/cardsfolder/t/thrive.txt svneol=native#text/plain res/cardsfolder/t/throat_slitter.txt svneol=native#text/plain res/cardsfolder/t/throne_of_bone.txt svneol=native#text/plain +res/cardsfolder/t/throne_of_empires.txt -text res/cardsfolder/t/throne_of_geth.txt svneol=native#text/plain res/cardsfolder/t/thrull_champion.txt svneol=native#text/plain res/cardsfolder/t/thrull_surgeon.txt svneol=native#text/plain diff --git a/res/cardsfolder/c/crown_of_empires.txt b/res/cardsfolder/c/crown_of_empires.txt new file mode 100644 index 00000000000..8523671fbf3 --- /dev/null +++ b/res/cardsfolder/c/crown_of_empires.txt @@ -0,0 +1,10 @@ +Name:Crown of Empires +ManaCost:2 +Types:Artifact +Text:no text +A:AB$ Tap | Cost$ 3 T | ValidTgts$ Creature | TgtPrompt$ Select target creature | ConditionNotAllM12Empires$ True | SubAbility$ DBControl | SpellDescription$ Tap target creature. Gain control of that creature instead if you control artifacts named Scepter of Empires and Throne of Empires. +SVar:DBControl:DB$ GainControl | Defined$ Targeted | ConditionAllM12Empires$ True +SVar:RemAIDeck:True +SVar:Rarity:Uncommon +SVar:Picture:http://www.wizards.com/global/images/magic/general/crown_of_empires.jpg +End \ No newline at end of file diff --git a/res/cardsfolder/s/scepter_of_empires.txt b/res/cardsfolder/s/scepter_of_empires.txt new file mode 100644 index 00000000000..cd9d8ddcb32 --- /dev/null +++ b/res/cardsfolder/s/scepter_of_empires.txt @@ -0,0 +1,10 @@ +Name:Scepter of Empires +ManaCost:3 +Types:Artifact +Text:no text +A:AB$ DealDamage | Cost$ T | Tgt$ TgtP | NumDmg$ X | SpellDescription$ CARDNAME deals 1 damage to target player. It deals 3 damage to that player instead if you control artifacts named Crown of Empires and Throne of Empires. +SVar:X:Count$AllM12Empires.3.1 +SVar:RemAIDeck:True +SVar:Rarity:Uncommon +SVar:Picture:http://www.wizards.com/global/images/magic/general/scepter_of_empires.jpg +End \ No newline at end of file diff --git a/res/cardsfolder/t/throne_of_empires.txt b/res/cardsfolder/t/throne_of_empires.txt new file mode 100644 index 00000000000..0691396cb36 --- /dev/null +++ b/res/cardsfolder/t/throne_of_empires.txt @@ -0,0 +1,10 @@ +Name:Throne of Empires +ManaCost:4 +Types:Artifact +Text:no text +A:AB$ Token | Cost$ 1 T | TokenAmount$ X | TokenName$ Soldier | TokenTypes$ Creature,Soldier | TokenOwner$ You | TokenColors$ White | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put a 1/1 white Soldier creature token onto the battlefield. Put five of those tokens onto the battlefield instead if you control artifacts named Crown of Empires and Scepter of Empires. +SVar:X:Count$AllM12Empires.5.1 +SVar:RemAIDeck:True +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/throne_of_empires.jpg +End \ No newline at end of file diff --git a/src/main/java/forge/card/cardFactory/CardFactoryUtil.java b/src/main/java/forge/card/cardFactory/CardFactoryUtil.java index 6d9c297e9d1..893c6740a5c 100644 --- a/src/main/java/forge/card/cardFactory/CardFactoryUtil.java +++ b/src/main/java/forge/card/cardFactory/CardFactoryUtil.java @@ -3167,6 +3167,17 @@ public class CardFactoryUtil { return doXMath(Integer.parseInt(sq[2]), m, c); // not Main Phase } } + + //Count$M12Empires.. + if (sq[0].contains("AllM12Empires")) { + boolean has = AllZoneUtil.isCardInPlay("Crown of Empires", c.getController()); + has &= AllZoneUtil.isCardInPlay("Scepter of Empires", c.getController()); + has &= AllZoneUtil.isCardInPlay("Throne of Empires", c.getController()); + if (has) + return doXMath(Integer.parseInt(sq[1]), m, c); + else + return doXMath(Integer.parseInt(sq[2]), m, c); + } // Count$ThisTurnEntered // or diff --git a/src/main/java/forge/card/spellability/SpellAbility_Condition.java b/src/main/java/forge/card/spellability/SpellAbility_Condition.java index 48f6280f2ce..6a017021d74 100644 --- a/src/main/java/forge/card/spellability/SpellAbility_Condition.java +++ b/src/main/java/forge/card/spellability/SpellAbility_Condition.java @@ -82,6 +82,11 @@ public class SpellAbility_Condition extends SpellAbility_Variables { setPhases(phases); } + + if(params.containsKey("ConditionAllM12Empires")) + setAllM12Empires(true); + if(params.containsKey("ConditionNotAllM12Empires")) + setNotAllM12Empires(true); if (params.containsKey("ConditionCardsInHand")) { setActivateCardsInHand(Integer.parseInt(params.get("ConditionCardsInHand"))); @@ -187,6 +192,21 @@ public class SpellAbility_Condition extends SpellAbility_Variables { return false; } } + + if(allM12Empires) { + Player p = sa.getSourceCard().getController(); + boolean has = AllZoneUtil.isCardInPlay("Crown of Empires", p); + has &= AllZoneUtil.isCardInPlay("Scepter of Empires", p); + has &= AllZoneUtil.isCardInPlay("Throne of Empires", p); + if(!has) return false; + } + if(notAllM12Empires) { + Player p = sa.getSourceCard().getController(); + boolean has = AllZoneUtil.isCardInPlay("Crown of Empires", p); + has &= AllZoneUtil.isCardInPlay("Scepter of Empires", p); + has &= AllZoneUtil.isCardInPlay("Throne of Empires", p); + if(has) return false; + } if (nCardsInHand != -1) { // Can handle Library of Alexandria, or Hellbent diff --git a/src/main/java/forge/card/spellability/SpellAbility_Variables.java b/src/main/java/forge/card/spellability/SpellAbility_Variables.java index 3b17c05f482..d28ea9c5b27 100644 --- a/src/main/java/forge/card/spellability/SpellAbility_Variables.java +++ b/src/main/java/forge/card/spellability/SpellAbility_Variables.java @@ -58,6 +58,45 @@ public class SpellAbility_Variables { protected boolean pwAbility = false; + protected boolean allM12Empires = false; + protected boolean notAllM12Empires = false; + + /** + *

Setter for the field notAllM12Empires.

+ * + * @param b a boolean + */ + public void setNotAllM12Empires(boolean b) { + notAllM12Empires = b; + } + + /** + *

Getter for the field notAllM12Empires.

+ * + * @return a boolean + */ + public boolean getNotAllM12Empires() { + return notAllM12Empires; + } + + /** + *

Setter for the field allM12Empires.

+ * + * @param b a boolean + */ + public void setAllM12Empires(boolean b) { + allM12Empires = b; + } + + /** + *

Getter for the field allM12Empires.

+ * + * @return a boolean + */ + public boolean getAllM12Empires() { + return allM12Empires; + } + /** *

Setter for the field manaSpent.

*