Fix NoSuchElementException when resolving Tectonic Hellion's triggered ability. (#6061)

This commit is contained in:
Tosh94 2019-11-30 22:27:37 +01:00 committed by Jeff Wadsworth
parent fda5ac170a
commit 76da8dd539

View file

@ -70,9 +70,8 @@ class TectonicHellionEffect extends OneShotEffect {
Map<UUID, Integer> landMap = new HashMap<>();
game.getState()
.getPlayersInRange(source.getControllerId(), game)
.stream()
.map(uuid -> landMap.put(uuid, game.getBattlefield().getActivePermanents(
StaticFilters.FILTER_LAND, uuid, source.getSourceId(), game
.forEach(uuid -> landMap.put(uuid, game.getBattlefield().getActivePermanents(
StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND, uuid, source.getSourceId(), game
).size()));
int max = landMap
.values()