kts.ActorIsKnight – return true if the current actor is a Knight
result = kts.ActorIsKnight()
If the current actor (as defined by cxt.actor
) is a Knight, this function returns true
.
If the current actor is not a Knight, or if no current actor is defined (i.e. cxt.actor
is nil), then false
is returned.
If cxt.actor
is defined (non-nil) but is not a valid Creature, the error "Bad userdata" will be generated. (Note that this is not usually possible, unless Lua code has been modifying the value of cxt.actor
directly.)
This function is equivalent to calling kts.IsKnight(cxt.actor)
.