mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- Added Plunge into Darkness
This commit is contained in:
@@ -916,14 +916,23 @@ public class AiController {
|
||||
|
||||
public int chooseNumber(SpellAbility sa, String title, int min, int max) {
|
||||
//TODO: AILogic
|
||||
if ("GainLife".equals(sa.getParam("AILogic"))) {
|
||||
final String logic = sa.getParam("AILogic");
|
||||
if ("GainLife".equals(logic)) {
|
||||
if (player.getLife() < 5 || player.getCardsIn(ZoneType.Hand).size() >= player.getMaxHandSize()) {
|
||||
return min;
|
||||
}
|
||||
}
|
||||
if ("Min".equals(sa.getParam("AILogic"))) {
|
||||
else if ("Min".equals(logic)) {
|
||||
return min;
|
||||
}
|
||||
else if ("DigACard".equals(logic)) {
|
||||
int random = MyRandom.getRandom().nextInt(Math.min(4, max)) + 1;
|
||||
if (player.getLife() < random + 5) {
|
||||
return min;
|
||||
} else {
|
||||
return random;
|
||||
}
|
||||
}
|
||||
return max;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user