|
|
@ -403,15 +403,6 @@ public class MobAI { |
|
|
|
|
|
|
|
|
|
|
|
if (CombatUtilities.triggerDefense(mob, mob.getCombatTarget())) |
|
|
|
if (CombatUtilities.triggerDefense(mob, mob.getCombatTarget())) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
if (CombatUtilities.triggerDodge(mob, mob.getCombatTarget())) |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (CombatUtilities.triggerBlock(mob, mob.getCombatTarget())) |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (CombatUtilities.triggerParry(mob, mob.getCombatTarget())) |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Cast the spell
|
|
|
|
// Cast the spell
|
|
|
@ -484,12 +475,13 @@ public class MobAI { |
|
|
|
if (powerTokens.isEmpty()) |
|
|
|
if (powerTokens.isEmpty()) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
int powerToken = 0; |
|
|
|
int powerToken = 0; |
|
|
|
if(ThreadLocalRandom.current().nextInt(1,100) < 65){ |
|
|
|
int nukeRoll = ThreadLocalRandom.current().nextInt(1,100); |
|
|
|
|
|
|
|
if( nukeRoll < 65){ |
|
|
|
//use direct damage spell
|
|
|
|
//use direct damage spell
|
|
|
|
powerToken = mob.mobPowers.get(3); |
|
|
|
powerToken = powerTokens.get(3); |
|
|
|
} else{ |
|
|
|
} else{ |
|
|
|
//use other random spell
|
|
|
|
//use random spell
|
|
|
|
powerToken = powerTokens.get(ThreadLocalRandom.current().nextInt(powerTokens.size() - 1)); |
|
|
|
powerToken = powerTokens.get(ThreadLocalRandom.current().nextInt(powerTokens.size())); |
|
|
|
} |
|
|
|
} |
|
|
|
int powerRank = mob.mobPowers.get(powerToken); |
|
|
|
int powerRank = mob.mobPowers.get(powerToken); |
|
|
|
PowersBase mobPower = PowersManager.getPowerByToken(powerToken); |
|
|
|
PowersBase mobPower = PowersManager.getPowerByToken(powerToken); |
|
|
@ -500,15 +492,6 @@ public class MobAI { |
|
|
|
|
|
|
|
|
|
|
|
if (CombatUtilities.triggerDefense(mob, mob.getCombatTarget())) |
|
|
|
if (CombatUtilities.triggerDefense(mob, mob.getCombatTarget())) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
if (CombatUtilities.triggerDodge(mob, mob.getCombatTarget())) |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (CombatUtilities.triggerBlock(mob, mob.getCombatTarget())) |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (CombatUtilities.triggerParry(mob, mob.getCombatTarget())) |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Cast the spell
|
|
|
|
// Cast the spell
|
|
|
|