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 df32df55445..d61264302d0 100644 --- a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java +++ b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java @@ -2365,6 +2365,20 @@ public class AbilityUtils { return doXMath(getCardTypesFromList(oppCards), expr, c, ctb); } + //Count$TypesSharedWith [defined] + if (sq[0].startsWith("TypesSharedWith")) { + Set thisTypes = Sets.newHashSet(c.getType().getCoreTypes()); + Set matches = new HashSet<>(); + for (Card c1 : AbilityUtils.getDefinedCards(ctb.getHostCard(), l[0].split(" ")[1], ctb)) { + for (CardType.CoreType type : Sets.newHashSet(c1.getType().getCoreTypes())) { + if (thisTypes.contains(type)) { + matches.add(type); + } + } + } + return matches.size(); + } + // Count$TopOfLibraryCMC if (sq[0].equals("TopOfLibraryCMC")) { int cmc = player.getCardsIn(ZoneType.Library).isEmpty() ? 0 : diff --git a/forge-gui/res/cardsfolder/upcoming/cemetery_prowler.txt b/forge-gui/res/cardsfolder/upcoming/cemetery_prowler.txt new file mode 100644 index 00000000000..ec20d5b23e1 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/cemetery_prowler.txt @@ -0,0 +1,14 @@ +Name:Cemetery Prowler +ManaCost:1 G G +Types:Creature Wolf +PT:3/4 +K:Vigilance +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield or attacks, exile a card from a graveyard. +T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigExile | Secondary$ True | TriggerDescription$ Whenever CARDNAME enters the battlefield or attacks, exile a card from a graveyard. +SVar:TrigExile:DB$ ChangeZone | Origin$ Graveyard | Destination$ Exile | ChangeType$ Card | ChangeNum$ 1 | SelectPrompt$ Select a card from a graveyard | Mandatory$ True | Hidden$ True | Imprint$ True +S:Mode$ ReduceCost | ValidCard$ Card | Type$ Spell | Amount$ AffectedX | Activator$ You | Description$ Spells you cast cost {1} less to cast for each card type they share with cards exiled with CARDNAME. +SVar:AffectedX:Count$TypesSharedWith Imprinted.ExiledWithSource +T:Mode$ ChangesZone | Origin$ Battlefield | ValidCard$ Card.Self | Destination$ Any | Execute$ DBCleanup | Static$ True +SVar:DBCleanup:DB$ Cleanup | ClearImprinted$ True +DeckHints:Ability$Graveyard & Ability$Discard +Oracle:Vigilance\nWhenever Cemetery Prowler enters the battlefield or attacks, exile a card from a graveyard.\nSpells you cast cost {1} less to cast for each card type they share with cards exiled with Cemetery Prowler.