Add Plague of Vermin

This commit is contained in:
Lyu Zong-Hong
2021-04-29 16:10:58 +09:00
parent cec5ec0a78
commit 7608f02c21
2 changed files with 26 additions and 0 deletions

View File

@@ -1884,6 +1884,8 @@ public class AiController {
return MyRandom.getRandom().nextInt(3);
} else if (source.hasSVar("EnergyToPay")) {
return AbilityUtils.calculateAmount(source, source.getSVar("EnergyToPay"), sa);
} else if ("Vermin".equals(logic)) {
return MyRandom.getRandom().nextInt(Math.max(player.getLife() - 5, 0));
}
return max;
}