guard casting work

This commit is contained in:
2023-08-06 17:07:25 -05:00
parent 345a866f50
commit dde98c7c58
2 changed files with 9 additions and 3 deletions
+8 -2
View File
@@ -483,8 +483,14 @@ public class MobAI {
if (powerTokens.isEmpty()) if (powerTokens.isEmpty())
return false; return false;
int powerToken = 0;
int powerToken = powerTokens.get(ThreadLocalRandom.current().nextInt(powerTokens.size())); if(ThreadLocalRandom.current().nextInt(1,100) < 65){
//use direct damage spell
powerToken = mob.mobPowers.get(3);
} else{
//use other random spell
powerToken = powerTokens.get(ThreadLocalRandom.current().nextInt(powerTokens.size() - 1));
}
int powerRank = mob.mobPowers.get(powerToken); int powerRank = mob.mobPowers.get(powerToken);
PowersBase mobPower = PowersManager.getPowerByToken(powerToken); PowersBase mobPower = PowersManager.getPowerByToken(powerToken);
+1 -1
View File
@@ -11,7 +11,7 @@ public class MobAIThread implements Runnable{
public static int AI_DROP_AGGRO_RANGE = 60; public static int AI_DROP_AGGRO_RANGE = 60;
public static int AI_PULSE_MOB_THRESHOLD = 200; public static int AI_PULSE_MOB_THRESHOLD = 200;
public static int AI_PATROL_DIVISOR = 15; public static int AI_PATROL_DIVISOR = 15;
public static int AI_POWER_DIVISOR = 20; public static int AI_POWER_DIVISOR = 10;
// Thread constructor // Thread constructor
public MobAIThread() { public MobAIThread() {