Fixed issue with birth of the imperium (#10253)

* Fixed issue with birth of the imperium

The number of creatures was being counted, rather than the number of opponents

* Update BirthOfTheImperium.java

---------

Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
This commit is contained in:
Alexander Novotny 2023-04-22 11:20:44 -07:00 committed by GitHub
parent 7d44057f93
commit 66e675f5c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,11 +82,11 @@ enum BirthOfTheImperiumValue implements DynamicValue {
.map(Controllable::getControllerId)
.collect(Collectors.toMap(Function.identity(), x -> 1, Integer::sum));
int yourCreatures = map.getOrDefault(sourceAbility.getControllerId(), 0);
return yourCreatures > 0 ? 2 * game
return yourCreatures > 0 ? (int) (2 * game
.getOpponents(sourceAbility.getControllerId())
.stream().mapToInt(uuid -> map.getOrDefault(uuid, 0))
.filter(x -> x < yourCreatures)
.sum() : 0;
.count()) : 0;
}
@Override