mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Fixed Donate AI crashing if all opponents have hexproof.
This commit is contained in:
@@ -165,6 +165,11 @@ public class SpecialCardAi {
|
||||
oppTarget = oppList;
|
||||
}
|
||||
|
||||
// All opponents have hexproof or something like that
|
||||
if (Iterables.isEmpty(oppList)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// select player with less lands on the field (helpful for Illusions of Grandeur and probably Pacts too)
|
||||
Player opp = Collections.min(Lists.newArrayList(oppTarget),
|
||||
PlayerPredicates.compareByZoneSize(ZoneType.Battlefield, CardPredicates.Presets.LANDS));
|
||||
|
||||
Reference in New Issue
Block a user