kts.ZombieKill – kill target if it has a particular monster type
result = kts.ZombieKill(monster_type)
If the current target (as given by cxt.victim
) is a monster of the given MonsterType, then they are instantly killed.
This counts as a normal monster death (e.g. a corpse is left behind as normal).
This function returns true if a valid target (of the correct monster type) was found and successfully killed, or false otherwise.
Even though the function is called "ZombieKill", it can actually be used to kill any given type of monster, not just zombies.
Knights cannot be killed by this function (since they are not monsters).
This function is perfect for calling from within the melee_action
of a weapon. For example, this is used by the Wand of Undeath for instantly killing zombies struck by the wand; see items.lua.