-+-+-+-+-+-+-+-+ START OF PART 51 -+-+-+-+-+-+-+-+ X move_char(5); X END; X with py.misc do X BEGIN X mhp := mhp + 10; X chp := chp + 10; X bth := bth + 12; X bthb:= bthb+ 12; X END; X msg_print('You feel like a HERO!'); X prt_mhp; X END; X hero := hero - 1; X if (hero = 0) then X BEGIN X status := uand(%X'FFFFDFFF',status); X if (find_flag) then X BEGIN X find_flag := false; X move_char(5); X END; X with py.misc do X BEGIN X mhp := mhp - 10; X if (chp > mhp) then chp := mhp; X bth := bth - 12; X bthb:= bthb- 12; X END; X msg_print('The heroism wears off.'); X prt_mhp; X END; X END; X`7B Super Heroism `7D X if (shero > 0) then X BEGIN X if (uand(%X'00004000',status) = 0) then X BEGIN X status := uor(%X'00004000',status); X if (find_flag) then X BEGIN X find_flag := false; X move_char(5); X END; X with py.misc do X BEGIN X mhp := mhp + 20; X chp := chp + 20; X bth := bth + 24; X bthb:= bthb+ 24; X END; X msg_print('You feel like a SUPER HERO!'); X prt_mhp; X END; X shero := shero - 1; X if (shero = 0) then X BEGIN X status := uand(%X'FFFFBFFF',status); X if (find_flag) then X BEGIN X find_flag := false; X move_char(5); X END; X with py.misc do X BEGIN X mhp := mhp - 20; X if (chp > mhp) then chp := mhp; X bth := bth - 24; X bthb:= bthb- 24; X END; X msg_print('The super heroism wears off.'); X prt_mhp; X END; X END; X`7B Blessed `7D X if (blessed > 0) then X BEGIN X if (uand(%X'00008000',status) = 0) then X BEGIN X status := uor(%X'00008000',status); X if (find_flag) then X BEGIN X find_flag := false; X move_char(5); X END; X with py.misc do X BEGIN X bth := bth + 5; X bthb:= bthb+ 5; X pac := pac + 2; X dis_ac := dis_ac + 2; X END; X msg_print('You feel righteous!'); X prt_mhp; X prt_pac; X END; X blessed := blessed - 1; X if (blessed = 0) then X BEGIN X status := uand(%X'FFFF7FFF',status); X if (find_flag) then X BEGIN X find_flag := false; X move_char(5); X END; X with py.misc do X BEGIN X bth := bth - 5; X bthb:= bthb- 5; X pac := pac - 2; X dis_ac := dis_ac - 2; X END; X msg_print('The prayer has expired.'); X prt_mhp; X prt_pac; X END; X END; X`7B Resist Heat `7D X if (resist_heat > 0) then resist_heat := resist_heat - 1; X`7B Resist Cold `7D X if (resist_cold > 0) then resist_cold := resist_cold - 1; X`7B Detect Invisible `7D X if (detect_inv > 0) then X BEGIN X if (uand(%X'00010000',status) = 0) then X BEGIN X status := uor(%X'00010000',status); X see_inv := true; X END; X detect_inv := detect_inv - 1; X if (detect_inv = 0) then X BEGIN X status := uand(%X'FFFEFFFF',status); X see_inv := false; X py_bonuses(blank_treasure,0); X END; X END; X`7B Timed infra-vision `7D X if (tim_infra > 0) then X BEGIN X if (uand(%X'00020000',status) = 0) then X BEGIN X status := uor(%X'00020000',status); X see_infra := see_infra + 1; X END; X tim_infra := tim_infra - 1; X if (tim_infra = 0) then X BEGIN X status := uand(%X'FFFDFFFF',status); X see_infra := see_infra - 1; X END; X END; X`7B Word-of-Recall Note: Word-of-Recall is a delayed action `7D X if (word_recall > 0) then X if (word_recall = 1) then X BEGIN X if (dun_level > 0) then X BEGIN X msg_print('You feel yourself yanked upwards!'); X dun_level := 0; X END X else if (py.misc.max_lev > 0) then X BEGIN X msg_print('You feel yourself yanked downwards!'); X dun_level := py.misc.max_lev; X END; X moria_flag := true; X paralysis := paralysis + 1; X word_recall := 0; X END X else X word_recall := word_recall - 1; X X`09 if (ring_blast > 0) then X`09 begin X`09 if (odd(ring_blast)) then`20 X`09`09 explosion(5,char_row,char_col, X`09`09 `09damroll('6d8'),2,false,'Ring of Fire') X`09`09else`09 X`09`09 explosion(4,char_row,char_col, X`09`09 `09damroll('4d8'),2,false,'Ring of Frost'); X`09`09ring_blast := ring_blast - 2;`09`09 X`09`09if (ring_blast < 0) then X`09`09 ring_blast := 0; X`09 end; X X`7B Check hit points for adjusting.`7D X with py.misc do X if (not(find_flag)) then X if (py.flags.rest < 1) then X BEGIN X if (old_chp <> trunc(chp)) then X BEGIN X if (chp > mhp) then chp := mhp; X prt_chp; X old_chp := trunc(chp); X END; X if (old_cmana <> trunc(cmana)) then X BEGIN X if (cmana > mana) then cmana := mana; X prt_mana; X old_cmana := trunc(cmana); X END X END; X`09 If (unleashed_doom) then X`09 begin X`09 if (doomy = -1) then X`09`09 new_spot(doomy,doomx); X`09`09if (move(randint(9),doomy,doomx)) then`20 X`09`09 with cave`5Bdoomy,doomx`5D do X`09`09 begin X`09`09 if (cptr = 1) then `7Bplayer get's hit`7D X`09`09 begin X`09`09`09 msg_print(''); X`09`09`09 msg_print('You have been hit by the DOOM!'); X`09`09`09 py.misc.chp := -1;`09`09`09 `20 X`09`09`09 death := true; X`09`09`09 died_from := 'DOOM'; X`09`09`09end; X`09`09 if (cptr > 1) then X`09`09 begin X`09`09`09 msg_print( X 'The ' + c_list`5Bm_list`5Bcptr`5D.mptr`5D.name + 'is hit by the DOO VM!'); X`09`09`09 delete_monster(cptr); X`09`09`09end; X`09`09 if (tptr > 0) then X`09`09 delete_object(doomy,doomx); X`09`09 fval := rock_wall1.ftval; X`09`09 fopen := rock_wall1.ftopen; X`09`09 i1 := doomy-panel_row_prt; X`09`09 i2 := doomx-panel_col_prt; X`09`09 if ((i1 in `5B2..23`5D) and (i2 in `5B15..80`5D)) then`20 X`09`09 begin X`09`09 loc_symbol(doomy,doomx,temp_char); X`09`09`09 used_line`5Bi1`5D := true; X`09`09`09 put_buffer(temp_char,i1,i2); X`09`09 end; X`09`09 end; X`09`09end; `20 X END; X X X X`20 X X if ((py.flags.paralysis < 1) and `7B Accept a command? `7D X (py.flags.rest < 1) and X (not(death))) then X`7B Accept a command and execute it `7D X repeat X print_stat := 0; X reset_flag := false; X`7B Random teleportation`7D X if (py.flags.teleport) then X if (randint(80) = 1) then X BEGIN X find_flag := false; X teleport(randint(40)); X END; X if (not (find_flag)) then X BEGIN X print('',char_row,char_col); X save_msg_flag := msg_flag; X inkey(command); X if (save_msg_flag) then erase_line(msg_line,msg_line); X com_val := ord(command); X END; X`7B Commands are executed in following CASE statement `7D X CASE com_val of X`20 X 0,25 :BEGIN `7B`5EY = exit`7D X if (get_com('Quit without saving? (Y/N)',command)) V then X CASE command of X 'y','Y': BEGIN X if (total_winner_num > 0) then X BEGIN X moria_flag := true; X death:= true; X END X else X BEGIN X clear(1,1); X exit; X END; X END; X otherwise ; X END; X reset_flag := true; X END; X 13 : BEGIN `7B`5EM = repeat`7D X msg_print(old_msg); X reset_flag := true; X END; X 16 : if (wizard) then `7B`5EP = password`7D X BEGIN X msg_print('Wizard mode off.'); X wizard := false; X reset_flag := true; X no_controly; X END X else X if (validuser) then X BEGIN X msg_print('Wizard mode on.'); X controly; X wizard := true; X reset_flag := true X END X else X`09`09`09 Begin X`09`09`09 wizard := check_pswd; X`09`09`09 if (wizard) then X`09`09`09 begin X`09`09 msg_print('Don''t do the tan van plan, man.'); X`09`09`09`09 controly; X`09`09`09`09 reset_flag := true; X`09`09`09 end X`09`09`09 else X begin `7Bpoor sap`7D X aggravate_monster(30); X prt('Type ''?'' for help...',1,1) X`09`09`09 end; X End; X 18 : BEGIN `7B`5ER = redraw`7D X draw_cave; X reset_flag := true; X END; X 26 : BEGIN `7B`5EZ = save`7D X if (total_winner_num > 0) then X BEGIN X msg_print('You are a Total Winner, your character must be retired... V'); X msg_print('Use -Y to when you are ready to quit.'); X END X else X BEGIN X if (search_flag) then search_off; X save_char; X END; X END; X 32 : BEGIN X prt('Type ''?'' for help...',1,1); X reset_flag := true; X END; X 36 : BEGIN `7B$ = Shell `7D X clear(1,1); X writeln('`5BEntering DCL shell, type "EOJ" to resu Vme your game`5D'); X writeln; X controly; X shell_out; X no_controly; X clear(1,1); X draw_cave; X reset_flag := true; X END; X 46 : BEGIN `7B. = find `7D X y := char_row; X x := char_col; X if (get_dir('Which direction?',dir_val, X com_val,y,x)) then X BEGIN X find_flag := true; X move_char(dir_val); X END X END; X 47 : BEGIN `7B/ = identify `7D X ident_char; X reset_flag := true; X END; X 49 : move_char(com_val - 48); `7B Move dir 1 `7D X 50 : move_char(com_val - 48); `7B Move dir 2 `7D X 51 : move_char(com_val - 48); `7B Move dir 3 `7D +-+-+-+-+-+-+-+- END OF PART 51 +-+-+-+-+-+-+-+-