kts.SetPoisonTrap

Name

kts.SetPoisonTrap – add a poison trap to a door or chest tile

Synopsis

kts.SetPoisonTrap(position, trap_item)

Description

This adds a poison trap to a door or chest tile. When the door or chest is opened, the trap will trigger, poisoning the creature that opened it.

position gives the position of the tile to be trapped.

trap_item is an ItemType that represents the trap itself; this item will be put back into the dungeon if a knight safely disarms the trap.

Return Value

No value is returned.

Errors

Errors will be raised if the inputs are not valid positions, item types or directions.

If there is no trappable door or chest at the given position, then no error is generated; instead, the function just does nothing.

Notes

Door/chest tiles can only contain one trap at a time. If a trap already exists when this function is called, then the existing trap will be triggered, and then the new trap will replace it.

See Also

kts.SetBladeTrap