From bfa15ddee01570b8e65a5a5a7a62a4d74dae6619 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 27 Feb 2023 20:37:11 -0600 Subject: [PATCH] mob will always target self with "self target" flagged spells --- src/engine/ai/MobileFSM.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/ai/MobileFSM.java b/src/engine/ai/MobileFSM.java index 3424fc35..09072a41 100644 --- a/src/engine/ai/MobileFSM.java +++ b/src/engine/ai/MobileFSM.java @@ -1662,7 +1662,7 @@ public class MobileFSM { } } - int random = ThreadLocalRandom.current().nextInt(eligiblePowers.size() + 1); + int random = ThreadLocalRandom.current().nextInt(eligiblePowers.size() *2); int powerToken = 0; int powerRank = 0; Map entries = eligiblePowers; @@ -1676,7 +1676,7 @@ public class MobileFSM { if (CombatUtilities.inRangeToCast2D(mob, mob.getCombatTarget(), mobPower)) { //PowersManager.useMobPower(mob,(AbstractCharacter)mob.getCombatTarget(),mobPower,powerRank); PerformActionMsg msg = new PerformActionMsg(); - if(mobPower.isHarmful() == false){ + if(mobPower.isHarmful() == false || mobPower.targetSelf == true){ msg = PowersManager.createPowerMsg(mobPower, powerRank, mob, mob); } else { msg = PowersManager.createPowerMsg(mobPower, powerRank, mob, target);