Attached to the bottom of this message is necromancer.g, the game module
I wrote to test the unit control code. While testing it, I have
experienced crashes which I have traced back to the side_controls_unit
function, and I have experienced non-fatal logic errors in which units
become uncontrolled after moving, even if they're still well within
control-range of a unit that can control them (and that is itself
controlled). These logic errors are usually followed very soon by a
segfault.
(table unit-control-chance
(u* u* 0) ;; Most units are unable to control other units.
(places u* 100) ;; Places can control nearby units.
(necromancer u* 100) ;; Necromancers can control *all* of their
minions.
(vampire unintelligent-dead 100) ;; Vampires can control unintelligent
undead.
(lich dead 100) ;; The lich can control any undead.
)
(table unit-control-range
(u* u* 0)
(knight commoner 4) ;; Knights can (try to) aid lost villagers.