mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Fix plague of vermin crash
This commit is contained in:
@@ -1851,7 +1851,11 @@ public class AiController {
|
|||||||
} else if (sa.hasSVar("EnergyToPay")) {
|
} else if (sa.hasSVar("EnergyToPay")) {
|
||||||
return AbilityUtils.calculateAmount(source, sa.getSVar("EnergyToPay"), sa);
|
return AbilityUtils.calculateAmount(source, sa.getSVar("EnergyToPay"), sa);
|
||||||
} else if ("Vermin".equals(logic)) {
|
} else if ("Vermin".equals(logic)) {
|
||||||
return MyRandom.getRandom().nextInt(Math.max(player.getLife() - 5, 0));
|
if (player.getLife() < 5) {
|
||||||
|
return min;
|
||||||
|
}
|
||||||
|
|
||||||
|
return MyRandom.getRandom().nextInt(Math.max(player.getLife() - 5, 1));
|
||||||
} else if ("SweepCreatures".equals(logic)) {
|
} else if ("SweepCreatures".equals(logic)) {
|
||||||
int minAllowedChoice = AbilityUtils.calculateAmount(source, sa.getParam("Min"), sa);
|
int minAllowedChoice = AbilityUtils.calculateAmount(source, sa.getParam("Min"), sa);
|
||||||
int choiceLimit = AbilityUtils.calculateAmount(source, sa.getParam("Max"), sa);
|
int choiceLimit = AbilityUtils.calculateAmount(source, sa.getParam("Max"), sa);
|
||||||
|
|||||||
Reference in New Issue
Block a user