#define MAXTRS 79
#define MAXPARMS 25
#define INVLIMIT 7
-#define INTRANSITIVE -1 /* illegal object number */
+#define INTRANSITIVE -1 /* illegal object number */
+#define SPECIALBASE 300 /* base umber of special rooms */
typedef struct lcg_state
{
#define GSTONE(OBJ) ((OBJ) == EMRALD || (OBJ) == RUBY || (OBJ) == AMBER || (OBJ) == SAPPH)
#define FOREST(LOC) ((LOC) >= 145 && (LOC) <= 166)
#define VOCWRD(LETTRS,SECT) (VOCAB(MAKEWD(LETTRS),SECT))
+#define SPECIAL(LOC) ((LOC) > SPECIALBASE)
/* The following two functions were added to fix a bug (game.clock1 decremented
* while in forest). They should probably be replaced by using another
if (kk != 0)
do {
game.newloc=MOD(labs(TRAVEL[kk])/1000,1000);
- /* Have we avoided a dwarf enciounter? */
- bool avoided = (game.newloc > 300 ||
+ /* Have we avoided a dwarf encounter? */
+ bool avoided = (SPECIAL(game.newloc) ||
!INDEEP(game.newloc) ||
game.newloc == game.odloc[i] ||
(j > 1 && game.newloc == TK[j-1]) ||
for (;;) {
LL=MOD((labs(TRAVEL[KK])/1000),1000);
if (LL != motion) {
- if (LL <= 300) {
+ if (!SPECIAL(LL)) {
if (FORCED(LL) && MOD((labs(TRAVEL[KEY[LL]])/1000),1000) == motion)
K2=KK;
}
for (;;) {
game.newloc=LL/1000;
motion=MOD(game.newloc,100);
- if (game.newloc <= 300) {
+ if (!SPECIAL(game.newloc)) {
if (game.newloc <= 100) {
if (game.newloc == 0 || PCT(game.newloc))
break;
}
game.newloc=MOD(LL,1000);
- if (game.newloc <= 300)
+ if (!SPECIAL(game.newloc))
return true;
if (game.newloc <= 500) {
- game.newloc=game.newloc-300;
+ game.newloc=game.newloc-SPECIALBASE;
switch (game.newloc)
{
case 1: