Trap Fields

[trap state][type][min damage][max damage][effect][difficulty][activation %]

[trap state]

allowed values are 0 for disabled, 1 for enabled. Set it always to 1 unless you want to permanently disable the trap. Doesn't make much sense now, but will in the future. (quoth our coders)

[trap type]

trap types are: 0 none (DON'T USE IT)
1 blade
2 poison
3 rock
4 fireball
5 lightning
6 magic missile (level 50 magic missile hits single or multipledepending on effect set below. Ignores min/max damage settings, but you'll still need to put something into the field)
10 RANDOM (EVERY time a trap triggers it randomly chooses a trap type from type 1 to type 5) Note that more can be added easily. If you have suggestions, email me.
11 FALLING

[trap minimum damage]

can be any value

[trap maximum damage]

can be any value keep in mind the difficulty of your zone, and the likely hit point range of the players that will be getting zapped.

[trap effect]

allowed values are 0 (player effect: the trap hits just the one who triggered it) or 1 (area effect: the trap hits everyone in the room -- Gods and mobs excluded for now)

[trap difficulty]

this value can shift from -100 to +100: a positive number indicates that a trap is most difficult to detect and disarm, and it also applies to saving throws for the players, a negative number is, of course, the opposite.

[trap activation %]

if 100, this means that this trap has a 100% probability of being activated at boot time. Again something that might be more handy later when more code is added.

Notes: A trap triggers when a player tries to open or pick it. No trapped door can be opened without being disarmed first. Saving throws are calculated by the mud when a trap triggers: for trap types like blade, rock, and falling it's a 1d100 agility check against player's halved agility score. For trap type poison it's a PARA saving throw, and for trap types fireball and lightning it's a SPELL saving throw. Saving throws are modified by the [trap hardness] value. Players who have FIRESHIELD, PROT_FIRE, GLOBE or METAGLOBE are immune from trap type fireball, while those who have PROT_LIGHTNING, GLOBE or METAGLOBE are immune from trap type lightning **UNLESS the trap hardness value is more than 39**. We didn't want players to globe up all the way to avoid traps all the time because it's unrealistic.

For FALLING traps you'll need a room in the down direction from the trapped room into which the player (or group) will fall. Traps of type FALLING flagged as having an area effect won't allow any saving throws and all the objects in the room (including static objects like fountains etc...) will fall into the room below, taking normal falling damage depending on the distance fallen. (Ilsensine 9/98)