[KHM] fixed GreatestSharedCreatureTypeCount's rollback errors;

This commit is contained in:
Oleg Agafonov 2021-01-31 06:19:25 +04:00
parent f3aefffbe8
commit e5863eb99f
2 changed files with 3 additions and 2 deletions

View file

@ -93,7 +93,8 @@ class InscriptionOfAbundanceEffect extends OneShotEffect {
.filter(Objects::nonNull) .filter(Objects::nonNull)
.map(MageObject::getPower) .map(MageObject::getPower)
.mapToInt(MageInt::getValue) .mapToInt(MageInt::getValue)
.max().orElse(0); .max()
.orElse(0);
if (maxPower > 0) { if (maxPower > 0) {
player.gainLife(maxPower, game, source); player.gainLife(maxPower, game, source);
return true; return true;

View file

@ -50,7 +50,7 @@ public enum GreatestSharedCreatureTypeCount implements DynamicValue {
.stream() .stream()
.mapToInt(x -> x) .mapToInt(x -> x)
.max() .max()
.getAsInt(); .orElse(0);
} }
@Override @Override