[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)
.map(MageObject::getPower)
.mapToInt(MageInt::getValue)
.max().orElse(0);
.max()
.orElse(0);
if (maxPower > 0) {
player.gainLife(maxPower, game, source);
return true;

View file

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