Manual:DIL Manual/exit diff
Jump to navigation
Jump to search
Contents
exit_diff
Field (integer, read/write; units: rooms).
room.exit_diff[dir] : integer
The difficulty of the room's exit in direction dir, set with difficulty on the exit in the zone file (0 to 250). The zones use it as the difficulty of a skill check: climbing an EX_CLIMB exit and searching for a hidden one (basemove.zon), picking its lock (skills.zon); the server uses it when a character swims through the exit.
dir is a direction from vme.h, NORTH (0) to SOUTHWEST (9).
Notes
- It fails when the unit is not a room, when
diris outside 0 toMAX_EXIT, and when the room has no exit that way. - Stored as an unsigned 8-bit number: values outside 0 to 255 wrap around. No access level is needed to assign it.
Example
dilbegin integer climb_roll(room : unitptr, dir : integer);
external
integer skillchecksa@skills(skillidx : integer, abiidx : integer, difficulty : integer);
var
diff : integer;
code
{
if (not isset(room.exit_info[dir], EX_CLIMB))
return (100);
diff := room.exit_diff[dir];
if (self.drunk > 0)
diff := diff + 5 * self.drunk;
return (skillchecksa@skills(SKI_CLIMB, ABIL_DEX, diff));
}
dilend
Rolls the climbing check for an exit, harder when drunk, as climb does in basemove.zon (a result above 0 is a success).