From e5863eb99fd7e25da1cc8474cf7a38387c697e6b Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 31 Jan 2021 06:19:25 +0400 Subject: [PATCH] [KHM] fixed GreatestSharedCreatureTypeCount's rollback errors; --- Mage.Sets/src/mage/cards/i/InscriptionOfAbundance.java | 3 ++- .../dynamicvalue/common/GreatestSharedCreatureTypeCount.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/cards/i/InscriptionOfAbundance.java b/Mage.Sets/src/mage/cards/i/InscriptionOfAbundance.java index 9c5afafe80..0d7a0aeadf 100644 --- a/Mage.Sets/src/mage/cards/i/InscriptionOfAbundance.java +++ b/Mage.Sets/src/mage/cards/i/InscriptionOfAbundance.java @@ -93,7 +93,8 @@ class InscriptionOfAbundanceEffect extends OneShotEffect { .filter(Objects::nonNull) .map(MageObject::getPower) .mapToInt(MageInt::getValue) - .max().orElse(0); + .max() + .orElse(0); if (maxPower > 0) { player.gainLife(maxPower, game, source); return true; diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/GreatestSharedCreatureTypeCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/GreatestSharedCreatureTypeCount.java index 220399cb10..3c830fc666 100644 --- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/GreatestSharedCreatureTypeCount.java +++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/GreatestSharedCreatureTypeCount.java @@ -50,7 +50,7 @@ public enum GreatestSharedCreatureTypeCount implements DynamicValue { .stream() .mapToInt(x -> x) .max() - .getAsInt(); + .orElse(0); } @Override