-+-+-+-+-+-+-+-+ START OF PART 48 -+-+-+-+-+-+-+-+ X status := uand(%X'FFFFFFBF',status); X msg_print('You feel yourself slow down.'); X change_speed(+1); X if (find_flag) then X BEGIN X find_flag := false; X move_char(5); X END; X END; X END; X`7B Slow `7D if (slow > 0) then X BEGIN X if (uand(%X'00000080',status) = 0) then X BEGIN X status := uor(%X'00000080',status); X msg_print('You feel yourself moving slower.'); X change_speed(+1); X if (find_flag) then X BEGIN X find_flag := false; X move_char(5); X END; X END; X slow := slow - 1; X if (slow = 0) then X BEGIN X status := uand(%X'FFFFFF7F',status); X msg_print('You feel yourself speed up.'); X change_speed(-1); X if (find_flag) then X BEGIN X find_flag := false; X move_char(5); X END; X END; X END; X`7B Resting is over? `7D X if (rest > 0) then X BEGIN X`7B Hibernate every 20 iterations so that process does not eat up system. X NOTE: Remove comments for VMS version 4.0 or greater X INKEY_DELAY takes care of hibernation for VMS 3.7 or less `7D X if ((rest mod 20) = 1) then sleep(1); X rest := rest - 1; X`7B Test for any key being hit to abort rest. Also, X this will do a PUT_QIO which updates the screen. X One more side benifit; since inkey_delay hibernates X small amount before executing, this makes resting less CPU intensive. `7D X inkey_delay(command,0); X if (rest = 0) then `7B Resting over `7D X rest_off X else if (command <> null) then `7B Resting aborted `7D X rest_off; X END; X`7B Hallucinating? (Random characters appear!)`7D X if (image > 0) then X BEGIN X image := image - 1; X if (image = 0) then X draw_cave; X END; X`7B Paralysis `7D X if (paralysis > 0) then X BEGIN X paralysis := paralysis - 1; X if (rest > 0) then X rest_off; X if (search_flag) then X search_off; X END; X`7B Protection from evil counter`7D X if (protevil > 0) then protevil := protevil - 1; X`7B Inulnerability `7D X if (invuln > 0) then X BEGIN X if (uand(%X'00001000',status) = 0) then X BEGIN X status := uor(%X'00001000',status); X if (find_flag) then X BEGIN X find_flag := false; X move_char(5); X END; X msg_print('Your skin turns into steel!'); X py.misc.pac := py.misc.pac + 100; X py.misc.dis_ac := py.misc.dis_ac + 100; X prt_pac; X END; X invuln := invuln - 1; X if (invuln = 0) then X BEGIN X status := uand(%X'FFFFEFFF',status); X if (find_flag) then X BEGIN X find_flag := false; X move_char(5); X END; X msg_print('Your skin returns to normal...'); X py.misc.pac := py.misc.pac - 100; X py.misc.dis_ac := py.misc.dis_ac - 100; X prt_pac; X END; X END; X`7B Heroism `7D X if (hero > 0) then X BEGIN `20 X if (uand(%X'00002000',status) = 0) then X BEGIN X status := uor(%X'00002000',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 chp := chp + 10; X bth := bth + 12; X bthb:= bthb+ 12; X END; X msg_print('You feel like a HERO!'); X prt_mhp; `20 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`20 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; `20 X END; 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 X if (scumuser) then X`09`09if (randint(71) = 13) then bomb; X X print_stat := 0; X reset_flag := false; X`7B Random teleportation`7D X if (py.flags.teleport) then X if (randint(100) = 1) then X BEGIN X find_flag := false; X teleport(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? (Y/N)',command)) then X CASE command of X 'y','Y': BEGIN X if (total_winner) then`20 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; `20 X no_controly; X END X else X if (valid_user) then X BEGIN X msg_print('Wizard mode on.'); X controly; X`09`09`09 wizard := true; X reset_flag := true X END +-+-+-+-+-+-+-+- END OF PART 48 +-+-+-+-+-+-+-+-