Loobinex / keeperfx-unofficial

KeeperFX - Unofficial release

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ATTACK_ROOMS objective from ADD_TO_PARTY command should not target BRIDGE

Loobinex opened this issue · comments

The ADD_TO_PARTY level script command allows you to give spawning heroes an 'ATTACK_ROOMS' objective, which compels heroes to attack nearby rooms from the player.

However, all rooms except for the Heart and Portal are included, including Bridges. Since bridges are often near to hero gates, they will get attacked. And since Bridges are indestructible and cannot be attacked, heroes will just stand there indefinitely.

Proper behavior would be to also exclude bridges from rooms that are targeted.

In the source code, the 'CHeroTsk_AttackRooms' will call 'good_setup_attack_rooms', which uses a functioned called 'find_nearest_room_for_thing_excluding_two_types' to exclude 'RoK_DUNGHEART, RoK_ENTRANCE'. This should somehow be modified to exclude the BRIDGE as well.

Fixed in a3ef02b