Trapped Items

Works similar to door traps but are a part of an object, and can trigger several different ways. These perfectly complement Ilsie's door traps so we'll have a variety of ways to set traps. Works like this:

In the obj file: After the extra description fields and before the apply fields here's a new field for trapped objects. These fields are optional and work just like the 'E' and 'A' field, although you can have only one 'T' field. Example:

[trigger type] [damage type] [charges] [level] [#die][die damage]

Trigger Type

TRAP_EFF_MOVE 1 /* trigger on movement */
TRAP_EFF_OBJECT 2 /* trigger on get or put */
TRAP_EFF_ROOM 4 /* affect all in room */
TRAP_EFF_NORTH 8 /* movement in this dir */
TRAP_EFF_EAST 16
TRAP_EFF_SOUTH 32
TRAP_EFF_WEST 64
TRAP_EFF_UP 128
TRAP_EFF_DOWN 256
TRAP_EFF_OPEN 512 /* trigger on open */
TRAP_EFF_SEARCH 1024 /* trigger on search */
TRAP_EFF_PICK 2048 /* trigger on pick lock */

Damage Type

TRAP_DAM_BLUNT 1
TRAP_DAM_PIERCE 2
TRAP_DAM_SLASH 3
TRAP_DAM_VENOM_L 4
TRAP_DAM_VENOM_M 5
TRAP_DAM_VENOM_H 6
TRAP_DAM_EXPLODE 7 /* your basic explosion */
TRAP_DAM_SLEEP 11
TRAP_DAM_TELEPORT 12
TRAP_DAM_FIRE 13
TRAP_DAM_COLD 14
TRAP_DAM_ACID 15
TRAP_DAM_LIGHTNING 16
TRAP_DAM_RANDOM_R 30 /* Random REGULAR trap (pierce, slash, venom, explode, etc) */
TRAP_DAM_RANDOM_M 31 /* Random MAGIC trap (lightning,fireball,etc) */

[So the example above is a trigger on open trap of type 11 (sleep), has 5 charges, is level 25, and does 5d7 damage]

The first 6 are non-magical types, with some room left for more. The last 5 are magical traps with spell-like affects.

Trap Charges

Number between 1 and 32768, with -1 being infinite charges.

Trap Level

Number between 1-100, determines damage if top/bottom dice not set as well as difficulty in disarming/detecting

Trap Damage

die number/damage per die: These fields will determine the damage just like on weapons. If they're set to 0, the trap damage will be automatically calculated by the trap level.

Disarm/detect trap work on these types of traps as on doors.