STAIRS ------ Found as down staircases, up staircases, and spiral staircases (up and down). "You have found a circular stairway" "Do you want to go (U)p, go (D)own, or stay on the (S)ame level:" Trying to descend past level 20 results in "You find the way is blocked by an iron gate.." On invalid input, "Do you have a hearing problem?" EXCELSIOR TRANSPORTER --------------------- "You have found the Excelsior Transporter" If carrying the orb, "But, the controls just went dead!" (abort) If Time Stop spell is active, "But the controls seem frozen!" (abort) "What level do you want to go to?" "( to stay here)?" Formula for cost to use transporter is: (ABS(current_level-new_level)+1) * ((new_level+current_level)/2) * 25 If player doesn't have enough gold: "You need gold for that trip" (abort) If 3d7 > average of Int and Wis, then the transporter malfunctions. "The transporter malfunctioned!" Player is damaged for a number of points equal to: ( ABS(current_level-new_level) + (current_level+new_level)/2 ) * (RND^3)/2 Of nothing bad happens, player is transported to given level. "It cost gold, you have left" Position is set to X,Y of the EXC on the new level. If there is no EXC on the new level, a random X,Y is chosen. On invalid input, "Try again bird brain" PIT --- If levitate spell is active, "You are hovering over a pit" Otherwise if 3d6+3 > Dex and SQRT(CloakPlus/25)*25 < d20 "You fell in a pit!" Damage player = to current level (before moving) If level >= 20 "It's bottomless!!! IIIEEEEEEEEEEEEE!!!!!!... . ." (die) If didn't fall in, "You are on the brink of a pit" if level >= 20, "It's bottomless, watch out!" Player given choices "climb down", "walk around" If "walk around", abort If levitate spell is active or 3d6+1 < Dex, "You made it" Otherwise, "You slipped down the side!" (apply damage as if fallen in as above) TELEPORT -------- This function is really bizarre. I guess the idea is to have the teleport destination somewhat predictable, rather than making it totally random. "ZZAP! You've been teleported!" If location x+y is even, then level--, otherwise level++ (capped 1 to 20) x = ( x + level*7 + y*13 ) % 20 y = ( y + level*6 + x*17 ) % 20 If d10 > 8 then do it over again. FOUNTAIN -------- Pick a random integer between 1 and 5. This determines the color of the water, in order: white, green, blue, red, black "You see a Fountain with water" Options: "take a drink", "walk by" On invalid input: "Sluggard! Follow directions" If player walks by, abort. switch(d10) { case 1..: "It's just water" case +1..+4: "Poison! Gurgle.. .. .. ." Damage for number of points equal to dungeon level. "You have only hit points left" case +5..10: "It tastes good!" Heal for 1d(d*dungeon_level). "You now have hit points" } ALTARS ------ "You have found a Holy Altar" 1-in-20 chance to get: "Do you wish to (W)orship, (D)esicrate[sic], or (I)gnore it? " Otherwise: "Do you wish to (W)orship, or (I)gnore it? " On invalid selection: "Ignorant pagan! " (Note: Even when Desecrate option is not shown, player can still press D and do it.) Desecrate: "Desecrate" "You do vile and unspeakable things to the altar." If d4 != 2: "Nothing happens here." & "{Hope that made you feel better.}" if d10 = 7 abort, otherwise fall through. if d20 <= 3 'A Voice booms out "I shall be avenged."' Summon special monster #8. [C(63)=8] and jump into combat. (aborting this) ----- Special monster #8 (newcbt.bas 4105): 4105 IF (C(63) = 8) THEN & M=18+FNR(1,2) & \ M$="Demon Prince" & \ M1=INT(C(15)+5+FNR(1,20)) & \ M.STR=FNR(1,M(M))+5 & \ M.ARM=FNR(1,M1) & \ GOTO 4550 & ----- Fallthrough: "The sound of thunder shatters the air." "The altar crumbles to dust before your eyes." if d10 <= 2 then I(5)=5, otherwise I(5)=0. [What is this??? Creating a pit?] if d4 != 4 abort, or abort and do pit if we made one here. Fallthrough: "Something seems to be left behind." [C(63)=C(15)+10] ??? [I(7)=1] ??? if d10 == 3 then [I(8)=1] ??? do treasure. Worship: "Worship" Options to "give money" or "just pray" Give money: { "How much of your";C(12);"gold" On out of range input: "You don't have that much!" Go back to asking how much. If amount < 50: "How dare you insult us, you Dirty Pagen[sic] Trash!" Summon a monster and start combat. (Note that at this point the amount donated was never subtracted, which is probably a bug.) Subtract amount donated from player gold. If d10 == 10: Call gain/lose exp subroutine (GOSUB 21000) and break. If d10 == 10: Call gain/lose stat subroutine (GOSUB 21100) and break. If d10 >= 6: "Thank you for your donation" and break. Choose a random status effect C(41) through C(47) (Light, Prot, Shield, etc). This seems to be weighted exponentially, so that the lower values of C() are more likely to be chosen: I2=INT((RND^2)*11+1) Choose a duration for that effect based on the fraction of gold donated above vs the total amount left: I1= INT( RND * (amt_donated/total_gold+1))*20 ) + INT(RND*20+1) Note that if total_gold is zero, this will probably cause a divide by zero error. "(amt_donated/(total_gold+1)))" is probably what was intended. If the value of the chosen effect above is <0, set it to 0. Add the chosen duration above to the value of the chosen effect above. "You've been heard" and break. } Just pray: { If d10 >= 5: break. (I guess this means the immortals weren't insulted?) "Ignore" If d10 >= 8: break. (This is very strange; I assume this code was poorly written and isn't what Dan actually meant to happen???) "Dirty Pagen[sic] Trash!" Summon a monster and start combat. (This whole block seems hinky.) } DRAGON IN LAIR (S=9) -------------------- I(5)=0 (???) (This apparently sets the spc in the current position?) I(7)=1 (???) "You have encountered a Dragon in it's lair!" Start combat??? C(63)=9 & C(64)=1 & GOTO 4070 ----- Special monster #9 & #10 (newcbt.bas 4120): 4110 IF C(63)<>9 AND C(63)<>10 THEN & PRINT "Interr-01" & \ STOP & 4120 M=20 & \ M$="Dragon Lord" & \ M1=INT(C(15)+FNR(1,20)) & \ M.STR=FNR(1,M(M)) & \ M.ARM=FNR(1,M1) -1 & \ GOTO 4550 & ----- DRAGON WITH ORB (S=10) (MIRROR in PCDND) ---------------------------------------- I(5)=11 (???) (This apparently sets the spc in the current position?) I(7)=1 (???) "You have encountered a dragon in it's lair!" Start combat??? C(63)=10 & C(64)=1 & GOTO 4070 ----- Special monster #9 & #10 (newcbt.bas 4120): 4110 IF C(63)<>9 AND C(63)<>10 THEN & PRINT "Interr-01" & \ STOP & 4120 M=20 & \ M$="Dragon Lord" & \ M1=INT(C(15)+FNR(1,20)) & \ M.STR=FNR(1,M(M)) & \ M.ARM=FNR(1,M1) -1 & \ GOTO 4550 & ----- ORB --- I(5)=0 (???) (This apparently sets the spc in the current position?) "You have found the Orb!!!!" Options to "pick it up" or "leave it" Pick it up: { C(50)=1 "You've got it!" break. } Leave it: { "Lost your chance, Mister!" break. (Note that the ORB has already been removed from the location, so you can't come back and pick it up again. Although presumably leaving the level and coming back, or quitting and then returning, will restore the map?) } Invalid input: "?What?" and rechoose option. ELEVATOR -------- "You feel heavy for a moment, but the sensation disappears" If dungeon level == 1: exit dungeon / break. dungeon level -- break. 9100 REM *THRONE*(S=13) & 9105 PRINT "You see a massive throne covered with jewels and" & 9110 PRINT "mysterious runes...." & 9115 PRINT "Do you want to (S)it on it, (P)ry out some jewels," & 9120 PRINT "(R)ead the runes, or totaly (I)gnore it:"; & \ A$=FNC$ & 9125 I=INSTR(1,"SPRI",A$) & \ IF I=0 THEN & PRINT "Come now!" & \ GOTO 9115 & 9130 IF I=4 THEN & PRINT "Ignore" & \ C(64)=2 & \ GOTO 3000 & 9135 ON I GOTO 9140,9165,9195 & 9140 PRINT "Sit down" & \ SLEEP 2 & \ IF RND>.05 THEN & GO TO 9150 & 9145 C(9)=FNE(C(8)+1) & \ PRINT "A loud gong sounds" & \ GOSUB 20600 & \ C(64)=2 & \ GOTO 3000 & 9150 IF RND>.9 THEN & GO TO 8400 & 9155 IF RND>.1 THEN & PRINT "Nothing happens..." & \ C(64)=2 & \ GOTO 3000 & 9160 PRINT "The Dwarven King returns...." & \ C(63)=13 & \ C(64)=1 & \ GOTO 4070 & ----- Special monster #13 (newcbt.bas 4100): 4100 IF C(63)=13 THEN & M=11 & \ M$="Dwarf Lord" & \ M1=INT(C(15)+10)+FNR(1,6) & \ M.STR=FNR(1,M(M))+5 & \ M.ARM=FNR(1,M1) & \ GOTO 4550 & ----- 9165 PRINT "Pry" & \ SLEEP 2 & \ IF RND<.1 THEN & GO TO 9160 & 9170 IF RND>.3 THEN & PRINT "They won't come off!" & \ C(64)=2 & \ GOTO 3000 & 9175 PRINT "They pop into your greedy hands!" & 9180 T=INT(6000*(RND^2)*C(15)+500) & \ PRINT "They're worth";T;"gold!" & 9185 C(12)=C(12)+T & \ I1=C(15)/C(8) & \ IF I1>1 THEN & I1=1 & 9190 C(21)=C(21)+INT(T*I1) & \ C(64)=2 & \ GOTO 3000 & 9195 PRINT "Read" & \ IF RND > .10 THEN & PRINT "You don't understand them!" & \ C(64)=2 & \ GOTO 3000 & 9197 GOTO 9160 IF RND > .5 & \ PRINT "The letters blur before your eyes." & \ PRINT "You feel giddy as power surges in you." & \ SLEEP 2 & \ PRINT "You seem to have changed." & \ SPELL=31.+(RND * RND * 4.) & \ C(SPELL)=C(SPELL)+1 & \ C(SPELL-6)=C(SPELL-6)+1 IF RND > (2./3.) & \ C(64)=2 & \ GOTO 3000 & 9200 REM *TREASURE TROVE*(S=14) & 9205 IF C(60)=0 THEN & C(60)=(FNR(1,4)-1)*4+FNR(1,4)-1 & 9210 C1=INT(C(60)/4)+1 & \ C2%=C(60) & \ C2=(C2% AND 3%)+1 & 9215 PRINT "You see a small door with four colored lights in a row" & 9220 PRINT "They are red, green, blue, and orange" & 9225 PRINT FNO$("try a combination","avoid it"); & \ A$=FNC$ & 9230 IF A$=CHR$(10) THEN & PRINT & \ C(64)=2 & \ GOTO 3000 & 9235 IF A$<>CHR$(13) THEN & PRINT "Trying to be cute?" & \ GOTO 9225 & 9240 PRINT "Press two colors:"; & \ GOSUB 9290 & \ IF C4=0 THEN & GO TO 9250 & ELSE & C3=C4 & 9245 GOSUB 9290 & \ IF C4<>0 THEN & GO TO 9260 & 9250 PRINT & \ PRINT "That's not a legal color!" & 9255 PRINT "Try red, green, blue or orange!" & \ GOTO 9240 & 9260 PRINT & \ IF C1=C3 AND C2=C4 THEN & PRINT "You got it!" & \ GOTO 9275 & 9265 PRINT "An electric shock jolts your body!" & 9270 IF FND(C(15)*2)=-1 THEN & GO TO 13000 & ELSE & GO TO 9225 & 9275 C(60)=0 & \ T=INT(5000*RND*C(15)+1000) & \ C(12)=C(12)+T & \ I1=C(15)/C(7) & 9280 PRINT T;"gold worth in gems and jewels pour out!" & \ IF I1>1 THEN & I1=1 & 9285 C(21)=C(21)+INT(T*I1) & \ C(64)=1 & \ GOTO 3000 & 9290 A$=FNC$ & \ C4=INSTR(1,"RGBO",A$) & \ IF C4=0 THEN & PRINT A$+" "; & \ RETURN & 9295 PRINT MID("Red Green Blue Orange ",C4*7-6,7); & \ RETURN & 9300 REM *SOLID ROCK*(S=15) & 9305 PRINT "You're in solid rock!!!!!!!!" & \ PRINT "You die of course..." & 9310 SLEEP 2 & \ GOTO 13000 &