keeperfx icon indicating copy to clipboard operation
keeperfx copied to clipboard

Fleeing units should teleport away

Open Loobinex opened this issue 1 year ago • 8 comments

Creatures, including imps, that flee, will refuse to use their teleport spell and instead will walk. This is not their optimal choice.

I've done some initial investigations, and it is unrelated to the minimum distance to teleport. The creature_combat_flee function calls creature_move_to and that one does not consider teleporting. However, if I do add the option to teleport into creature_combat_flee I get them to teleport, but inconsistently, so further investigation is needed.

Loobinex avatar Dec 11 '23 23:12 Loobinex

It might be a big change and could make lvl 10 imps almost unkillable.

yani avatar Dec 12 '23 01:12 yani

It might be a big change and could make lvl 10 imps almost unkillable.

I disagree. But maybe one could add a rule in rules.cfg something like TeleportFleeBehavior = 0 for the classic and legacy ruleset, but it's set to 1 for the standard ruleset.

walt253 avatar Dec 12 '23 01:12 walt253

Maybe a fun mechanic would be to randomize the chances of them teleporting. It would look like they sometimes forget to teleport because they are too scared to remember that they can.

Putting a delay on the teleport or randomizing their chances would at least make them still able to get targeted.

yani avatar Dec 12 '23 01:12 yani

Maybe a fun mechanic would be to randomize the chances of them teleporting. It would look like they sometimes forget to teleport because they are too scared to remember that they can.

Putting a delay on the teleport or randomizing their chances would at least make them still able to get targeted.

Teleport is not instant. They still take a meteor to the face even when they do.

Loobinex avatar Dec 12 '23 02:12 Loobinex

Teleport is not instant. They still take a meteor to the face even when they do.

As they should.

yani avatar Dec 12 '23 02:12 yani

Teleport to where? How can we ensure they don't teleport straight into another battle?

AdamPlenty avatar Dec 12 '23 18:12 AdamPlenty

Teleport to where? How can we ensure they don't teleport straight into another battle?

To their Lair? That they should already do in case of Mistress with low health, I think?🤔

For the Imps I don't know... Isn't the Dungeon Heart their initial flee point?🤔

walt253 avatar Dec 12 '23 19:12 walt253

Teleport is not instant. They still take a meteor to the face even when they do.

As they should.

Damn straight.

Teleport to where? How can we ensure they don't teleport straight into another battle?

Where they would run to. Either a bit away, or possibly simply the 'flee pos', which is their lair or dungeon hearth. It's just 'why run when you can teleport'.

Loobinex avatar Dec 14 '23 15:12 Loobinex