[ONS] Implemented Graxiplon

This commit is contained in:
Evan Kranzler 2022-03-01 19:02:45 -05:00
parent 7f042a6294
commit 0cc1b152c4
3 changed files with 64 additions and 2 deletions

View file

@ -26,9 +26,12 @@ public enum GreatestSharedCreatureTypeCount implements DynamicValue {
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
return getValue(sourceAbility.getControllerId(), sourceAbility.getSourceId(), game);
}
public static int getValue(UUID playerId, UUID sourceId, Game game) {
List<Permanent> permanentList = game.getBattlefield().getActivePermanents(
StaticFilters.FILTER_CONTROLLED_CREATURE,
sourceAbility.getControllerId(), sourceAbility.getSourceId(), game
StaticFilters.FILTER_CONTROLLED_CREATURE, playerId, sourceId, game
);
permanentList.removeIf(Objects::isNull);
int changelings = permanentList