From 8310a2c28f1a4bc87b0b02b40d73ccc79a99dc99 Mon Sep 17 00:00:00 2001 From: swordshine Date: Sun, 3 Jan 2016 12:40:11 +0000 Subject: [PATCH] - C15: added Seal of the Guilds --- .gitattributes | 1 + .../src/main/java/forge/game/ability/AbilityUtils.java | 8 ++++++++ forge-game/src/main/java/forge/game/card/Card.java | 4 ---- forge-gui/res/cardsfolder/s/seal_of_the_guildpact.txt | 10 ++++++++++ forge-gui/res/cardsfolder/t/tablet_of_the_guilds.txt | 7 +++---- 5 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 forge-gui/res/cardsfolder/s/seal_of_the_guildpact.txt diff --git a/.gitattributes b/.gitattributes index 25d1f8f09a5..2a67b0e9df2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -12649,6 +12649,7 @@ forge-gui/res/cardsfolder/s/seal_of_fire.txt svneol=native#text/plain forge-gui/res/cardsfolder/s/seal_of_primordium.txt svneol=native#text/plain forge-gui/res/cardsfolder/s/seal_of_removal.txt svneol=native#text/plain forge-gui/res/cardsfolder/s/seal_of_strength.txt svneol=native#text/plain +forge-gui/res/cardsfolder/s/seal_of_the_guildpact.txt -text forge-gui/res/cardsfolder/s/sealed_fate.txt svneol=native#text/plain forge-gui/res/cardsfolder/s/sealock_monster.txt -text forge-gui/res/cardsfolder/s/seance.txt -text diff --git a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java index 9014b0fc51b..9499f92751a 100644 --- a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java +++ b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java @@ -1459,6 +1459,14 @@ public class AbilityUtils { return sum; } + //Count$HasNumChosenColors. + if (sq[0].contains("HasNumChosenColors")) { + int sum = 0; + for (Card card : AbilityUtils.getDefinedCards(sa.getHostCard(), sq[1], sa)) { + sum += CardUtil.getColors(card).getSharedColors(ColorSet.fromNames(c.getChosenColors())).countColors(); + } + return sum; + } if (sq[0].startsWith("TriggerRememberAmount")) { final SpellAbility root = sa.getRootAbility(); int count = 0; diff --git a/forge-game/src/main/java/forge/game/card/Card.java b/forge-game/src/main/java/forge/game/card/Card.java index 30aaa58b45c..813d123f12c 100644 --- a/forge-game/src/main/java/forge/game/card/Card.java +++ b/forge-game/src/main/java/forge/game/card/Card.java @@ -3649,10 +3649,6 @@ public class Card extends GameEntity implements Comparable { if (!source.hasChosenColor() || !CardUtil.getColors(this).hasAnyColor(MagicColor.fromName(source.getChosenColor()))) return false; - } else if (property.equals("AllChosenColors")) { - if (!source.hasChosenColor() || !CardUtil.getColors(this).hasAllColors(ColorSet.fromNames(source.getChosenColors()).getColor())) - return false; - } else if (property.equals("AnyChosenColor")) { if (!source.hasChosenColor() || !CardUtil.getColors(this).hasAnyColor(ColorSet.fromNames(source.getChosenColors()).getColor())) return false; diff --git a/forge-gui/res/cardsfolder/s/seal_of_the_guildpact.txt b/forge-gui/res/cardsfolder/s/seal_of_the_guildpact.txt new file mode 100644 index 00000000000..7a94ea3c1e3 --- /dev/null +++ b/forge-gui/res/cardsfolder/s/seal_of_the_guildpact.txt @@ -0,0 +1,10 @@ +Name:Seal of the Guildpact +ManaCost:5 +Types:Artifact +K:ETBReplacement:Other:ChooseColors +SVar:ChooseColors:DB$ ChooseColor | Defined$ You | TwoColors$ True | AILogic$ MostProminentDualInComputerDeck | SpellDescription$ As CARDNAME enters the battlefield, choose two colors. +S:Mode$ ReduceCost | ValidCard$ Card | Type$ Spell | Activator$ You | Amount$ Col | Description$ Spells you cast cost {1} less to cast for each card with the same name as that spell in your graveyard. +SVar:Col:Count$HasNumChosenColors.Self +SVar:RemRandomDeck:True +SVar:Picture:http://www.wizards.com/global/images/magic/general/seal_of_the_guildpact.jpg +Oracle:As Seal of the Guildpact enters the battlefield, choose two colors.\nEach spell you cast costs {1} less to cast for each of the chosen colors it is. diff --git a/forge-gui/res/cardsfolder/t/tablet_of_the_guilds.txt b/forge-gui/res/cardsfolder/t/tablet_of_the_guilds.txt index 2ea531f7be9..824c02862fc 100644 --- a/forge-gui/res/cardsfolder/t/tablet_of_the_guilds.txt +++ b/forge-gui/res/cardsfolder/t/tablet_of_the_guilds.txt @@ -3,9 +3,8 @@ ManaCost:2 Types:Artifact K:ETBReplacement:Other:ChooseColors SVar:ChooseColors:DB$ ChooseColor | Defined$ You | TwoColors$ True | AILogic$ MostProminentDualInComputerDeck | SpellDescription$ As CARDNAME enters the battlefield, choose two colors. -T:Mode$ SpellCast | ValidCard$ Card.AnyChosenColor | ValidActivatingPlayer$ You | Execute$ TrigGainFirstLife | TriggerDescription$ Whenever you cast a spell, if it's at least one of the chosen colors, you gain 1 life for each of the chosen colors it is. -SVar:TrigGainFirstLife:DB$ GainLife | LifeAmount$ 1 | SubAbility$ GainSecondLife -SVar:GainSecondLife:DB$ GainLife | LifeAmount$ 1 | ConditionCheckSVar$ AllCols -SVar:AllCols:TriggeredCard$Valid Card.AllChosenColors +T:Mode$ SpellCast | ValidCard$ Card.AnyChosenColor | ValidActivatingPlayer$ You | Execute$ TrigGainLife | TriggerDescription$ Whenever you cast a spell, if it's at least one of the chosen colors, you gain 1 life for each of the chosen colors it is. +SVar:TrigGainLife:DB$ GainLife | LifeAmount$ X | References$ X +SVar:X:Count$HasNumChosenColors.TriggeredCard SVar:Picture:http://www.wizards.com/global/images/magic/general/tablet_of_the_guilds.jpg Oracle:As Tablet of the Guilds enters the battlefield, choose two colors.\nWhenever you cast a spell, if it's at least one of the chosen colors, you gain 1 life for each of the chosen colors it is.