From 5eef103593c0fc649ed3db92fa104b1f7e5906d3 Mon Sep 17 00:00:00 2001 From: Fate Date: Sat, 29 Nov 2008 19:18:22 -0700 Subject: Added SLang commands `map_level', `map_nr', `dir_towards' --- doc/spell-language | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/spell-language b/doc/spell-language index c19b1d7..5b0e5bb 100644 --- a/doc/spell-language +++ b/doc/spell-language @@ -536,6 +536,20 @@ The following functions are available: + sqrt : int -> int Computes the square root of the specified number + + map_level : location -> int + Determines the map level: 0 for outside, 1 for inside, 2ff for + dungeon levels (going down) + + + map_nr : location -> int + Computes the map number. Map number and map level together uniquely + identify a map. + + + dir_towards : location * location * int -> dir + dir_towards(start, end, flag) computes the direction from `start' to + `end'. If flag is zero, directions are limited to N, S, E, W; + otherwise NE, SE, NW, SW will also be used. The two locations must be + on the same map. + Operations: ----------- This section documents the operations API. -- cgit v1.2.3-60-g2f50