GrognardsFromHell / TemplePlus

ToEE hooks, extensions and fixes
https://github.com/GrognardsFromHell/DllDocumentation/wiki
MIT License
87 stars 22 forks source link

AI behaviour for charmed casters #772

Open NPC-420 opened 5 months ago

NPC-420 commented 5 months ago

Hi,

If you do Charm Person on a caster (such as Zuggtmoy Priest, Belsornig, Alreem), friendly fire happens way too often. Not just AoE spells but also they do friendly fire by single target spells with negative effects (such as Deafness). Zuggtmoy Priest also attempts Death Knell on friendly conscious characters all the time.

Targeting for healing spells is correct.

If it's possible to fix their choice of targets, that would be great. Please let me know if any additional info is needed.

Thanks a lot!

doug1234 commented 3 months ago

A save game and steps to reproduce would be helpful.

NPC-420 commented 3 months ago

Save_bug-772.zip Attached the zip file with two saves.

Case 1 - Belsornig (charmed NPC)

Save name: "test" Here I placed my PCs, NPCs and Belsornig (charmed) around the target that is to be attacked: Oohlgrist.

Steps to reproduce after loading the save: 1) Attack the troll with a PC 2) Skip turns until Belsornig 3) See how Belsornig decides to pick AoE spell (Sound Burst) that damages all of the surrounding friendly characters including himself - just for a single enemy target

VOD reproducing the steps above: https://youtu.be/rOvovAAbfVg

Case 2: Zuggtmoy Priest (charmed NPC)

Save name: "test2" Here we're just running with the whole party into the nearest encounter that is a few ogres.

Steps to reproduce after loading the save: 1) Select the whole party and run into ogres on the right side 2) Skip turns until Zuggtmoy Priest 3) See how Zuggtmoy Priest decides to cast Deafness on Pishella (this time unsuccessful but he does exactly the same thing almost every time)

VOD reproducing the steps above: https://youtu.be/NQeEMuE4W4g