Expected behavior
The script should only create invasion defense forces with lords that were not recruited before, which the create_force can't guarantee.
The script would either have to use the create_force_with_general function or if create_force is used it should track lord cqis and in the case an existing lord is chosen, make them immortal before the battle, recover his wound after battle and remove the effect bundle.
To Reproduce
Steps to reproduce the behavior:
Play reikland
Recruit a bunch of lords, make them immortal via script, disband them to clutter the recruitment pool and then use stop_character_convalescing so they recover from the wounded status
trigger_dilemma_with_targets for wh2_dlc13_emp_electorpolitics[X] (5 and 7 are defense battles if I remember correctly) and autoresolve the resulting battles until one of the immortal lords is chosen
alternatively spam the empire_spawn_human_defender_for_invasion function to create defense forces
Recover the wounded lord and recruit and look for the wh3_main_bundle_character_restrict_experience_gain effect bundle
540
https://trello.com/c/IO2EBGVL/124-empire-interventions-take-an-already-recruited-lord-at-random-from-your-pool-and-kill-it-after-the-battle-is-done Above mentioned bug from wh2 with the added issue that lords, that survive the kill command due to being >rank 20, end up with the wh3_main_bundle_character_restrict_experience_gain effect bundle reducing exp gain by 999%.
Expected behavior The script should only create invasion defense forces with lords that were not recruited before, which the create_force can't guarantee. The script would either have to use the create_force_with_general function or if create_force is used it should track lord cqis and in the case an existing lord is chosen, make them immortal before the battle, recover his wound after battle and remove the effect bundle.
To Reproduce Steps to reproduce the behavior: