diff options
| author | Mark Oteiza | 2017-01-17 23:15:25 -0500 |
|---|---|---|
| committer | Mark Oteiza | 2017-02-19 08:28:50 -0500 |
| commit | 7455c2ad80ec0cdf009d9f2396127c58ded2dc3c (patch) | |
| tree | 560dd723029e50431310664025d09240480efd94 | |
| parent | 44931dafa95ed0e00a639168712fbabeb35569f4 (diff) | |
| download | emacs-7455c2ad80ec0cdf009d9f2396127c58ded2dc3c.tar.gz emacs-7455c2ad80ec0cdf009d9f2396127c58ded2dc3c.zip | |
Set up combination and random item location
* lisp/play/dunnet.el (dun-combination): Make defconst.
(tloc, tcomb): Remove. Replace with a top-level form.
| -rw-r--r-- | lisp/play/dunnet.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/play/dunnet.el b/lisp/play/dunnet.el index 95a9e9ce7d0..1c8fab05092 100644 --- a/lisp/play/dunnet.el +++ b/lisp/play/dunnet.el | |||
| @@ -1123,6 +1123,8 @@ treasures for points?" "4" "four") | |||
| 1123 | ("What network protocol is used between pokey and gamma?" | 1123 | ("What network protocol is used between pokey and gamma?" |
| 1124 | "tcp/ip" "ip" "tcp"))) | 1124 | "tcp/ip" "ip" "tcp"))) |
| 1125 | 1125 | ||
| 1126 | (defconst dun-combination (prin1-to-string (+ 100 (random 899)))) | ||
| 1127 | |||
| 1126 | ;;;; Mode definitions for interactive mode | 1128 | ;;;; Mode definitions for interactive mode |
| 1127 | 1129 | ||
| 1128 | (define-derived-mode dun-mode text-mode "Dungeon" | 1130 | (define-derived-mode dun-mode text-mode "Dungeon" |
| @@ -2964,12 +2966,9 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..") | |||
| 2964 | (dun-uexit nil))) | 2966 | (dun-uexit nil))) |
| 2965 | 2967 | ||
| 2966 | 2968 | ||
| 2967 | (setq tloc (+ 60 (random 18))) | 2969 | (let ((tloc (+ 60 (random 18)))) |
| 2968 | (dun-replace dun-room-objects tloc | 2970 | (dun-replace dun-room-objects tloc |
| 2969 | (append (nth tloc dun-room-objects) (list 18))) | 2971 | (append (nth tloc dun-room-objects) (list 18)))) |
| 2970 | |||
| 2971 | (setq tcomb (+ 100 (random 899))) | ||
| 2972 | (setq dun-combination (prin1-to-string tcomb)) | ||
| 2973 | 2972 | ||
| 2974 | ;;;; | 2973 | ;;;; |
| 2975 | ;;;; This section defines the DOS emulation functions for dunnet | 2974 | ;;;; This section defines the DOS emulation functions for dunnet |