diff --git a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java index d8dfbfa04bb..674b7144116 100644 --- a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java +++ b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java @@ -421,7 +421,7 @@ public class CardFactoryUtil { /** *
- * getMostProminentCreatureType. + * getMostProminentCreatureTypeSize. *
* * @param list @@ -457,6 +457,49 @@ public class CardFactoryUtil { return max + allCreatureType; } + /** + *+ * getMostProminentCreatureType. + *
+ * + * @param list + * a {@link forge.game.card.CardCollection} object. + * @return a string. + */ + public static String[] getMostProminentCreatureType(final CardCollectionView list) { + if (list.isEmpty()) { + return null; + } + + final Map* sharedKeywords. diff --git a/forge-game/src/main/java/forge/game/card/CardProperty.java b/forge-game/src/main/java/forge/game/card/CardProperty.java index 68d6929a1ae..e71521d81a2 100644 --- a/forge-game/src/main/java/forge/game/card/CardProperty.java +++ b/forge-game/src/main/java/forge/game/card/CardProperty.java @@ -365,7 +365,7 @@ public class CardProperty { return false; } } else if (property.equals("CanBeSacrificedBy") && spellAbility instanceof SpellAbility) { - if (!card.canBeSacrificedBy((SpellAbility)spellAbility)) { + if (!card.canBeSacrificedBy((SpellAbility) spellAbility)) { return false; } } else if (property.startsWith("AttachedBy")) { @@ -720,6 +720,16 @@ public class CardProperty { } } } + } else if (property.startsWith("MostProminentCreatureTypeInLibrary")) { + final CardCollectionView list = sourceController.getCardsIn(ZoneType.Library); + String[] type = CardFactoryUtil.getMostProminentCreatureType(list); + if (type != null); { + for (String s : type) { + if (!card.getType().hasCreatureType(s)) { + return false; + } + } + } } else if (property.startsWith("sharesCreatureTypeWith")) { if (property.equals("sharesCreatureTypeWith")) { if (!card.sharesCreatureTypeWith(source)) { diff --git a/forge-gui/res/cardsfolder/upcoming/faceless_agent.txt b/forge-gui/res/cardsfolder/upcoming/faceless_agent.txt new file mode 100644 index 00000000000..3bdb71b7fe1 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/faceless_agent.txt @@ -0,0 +1,8 @@ +Name:Faceless Agent +ManaCost:3 +Types:Creature Shapeshifter +PT:2/1 +K:Changeling +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigSeek | TriggerDescription$ When CARDNAME enters the battlefield, seek a creature card of the most prevalent creature type in your library. +SVar:TrigSeek:DB$ ChangeZone | Origin$ Library | Destination$ Hand | AtRandom$ True | NoShuffle$ True | Mandatory$ True | NoLooking$ True | NoReveal$ True | ChangeType$ Card.Creature+MostProminentCreatureTypeInLibrary | ChangeNum$ 1 +Oracle:Changeling\nWhen Faceless Agent enters the battlefield, seek a creature card of the most prevalent creature type in your library. diff --git a/forge-gui/res/cardsfolder/upcoming/manor_guardian.txt b/forge-gui/res/cardsfolder/upcoming/manor_guardian.txt new file mode 100644 index 00000000000..551bb20251d --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/manor_guardian.txt @@ -0,0 +1,7 @@ +Name:Manor Guardian +ManaCost:2 B +Types:Creature Demon +PT:4/3 +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigSeek | TriggerDescription$ When CARDNAME dies, each player seeks a nonland card with mana value 2 or less. +SVar:TrigSeek:DB$ ChangeZone | Origin$ Library | Destination$ Hand | AtRandom$ True | NoShuffle$ True | Mandatory$ True | NoLooking$ True | NoReveal$ True | ChangeType$ Card.nonLand+cmcLE2 | ChangeNum$ 1 | DefinedPlayer$ Player +Oracle:When Manor Guardian dies, each player seeks a nonland card with mana value 2 or less.