$PART50: $ CALL UNPACK [.SOURCE.INCLUDE]MORIA.INC;1 1151429982 $ create 'f' X`7B Potions for the quaffing `7D X`5Bpsect(misc2$code)`5D procedure quaff; X var X i1 : unsigned; X i2,i3,i4,i5,item_val,nhp : integer; X out_val : vtype; X redraw,ident : boolean; X begin X reset_flag := true; X if (inven_ctr > 0) then X begin X if (find_range(`5B75,76`5D,i2,i3)) then X begin X redraw := false; X if (get_item(item_val,'Quaff which potion?',redraw,i2,i3)) t Vhen X with inventory`5Bitem_val`5D do X begin X if (redraw) then draw_cave; X reset_flag := false; X i1 := flags; X ident := false; X while (i1 > 0) do X begin X i2 := bit_pos(i1); X if (tval = 76) then i2 := i2 + 31; X`7B Potions `7D X case (i2) of X 1 : with py.stat do X begin X cstr := in_statp(cstr); X if (cstr > str) then X str := cstr; X msg_print('Wow! What bulging muscles!'); X prt_strength; X prt_max_weight; X ident := true; X end; X 2 : begin X ident := lose_str; X prt_max_weight; X end; X 3 : with py.stat do X begin X cstr := str; X msg_print('You feel warm all over.'); X prt_strength; X prt_max_weight; X ident := true; X end; X 4 : with py.stat do X begin X cint := in_statp(cint); X if (cint > py.stat.int) then X py.stat.int := cint; X msg_print('Aren''t you brilliant!'); X prt_intelligence; X ident := true; X end; X 5 : begin X msg_print('This potion tastes very dull.'); X ident := lose_int; X end; X 6 : with py.stat do X begin X cint := py.stat.int; X msg_print('You have have a warm feeling.'); X prt_intelligence; X ident := true; X end; X 7 : with py.stat do X begin X cwis := in_statp(cwis); X if (cwis > wis) then X wis := cwis; X msg_print('You suddenly have a profound thought!'); X prt_wisdom; X ident := true; X end; X 8 : ident := lose_wis; X 9 : with py.stat do X if (cwis < wis) then X begin X cwis := wis; X msg_print('You feel your wisdom returning.'); X prt_wisdom; X ident := true; X end; X 10 : with py.stat do X begin X cchr := in_statp(cchr); X if (cchr > chr) then X chr := cchr; X msg_print('Gee, ain''t you cute!'); X prt_charisma; X ident := true; X end; X 11 : ident := lose_chr; X 12 : with py.stat do X if (cchr < chr) then X begin X cchr := chr; X msg_print('You feel your looks returning.'); X prt_charisma; X ident := true; X end; X 13 : ident := hp_player(damroll('2d7'),'a potion.'); X 14 : ident := hp_player(damroll('4d7'),'a potion.'); X 15 : ident := hp_player(damroll('6d7'),'a potion.'); X 16 : ident := hp_player(1000,'a potion.'); X 17 : with py.misc do X begin X py.stat.ccon := in_statp(py.stat.ccon); X if (py.stat.ccon > py.stat.con) then X py.stat.con := py.stat.ccon; X mhp := mhp + 1; X chp := chp + mhp; X msg_print('You feel tingly for a moment.'); X prt_mhp; X prt_chp; X prt_constitution; X ident := true; X end; X 18 : with py.misc do X begin X i5 := (exp div 2) + 10; X if (i5 > 100000) then i5 := 100000; X exp := exp + i5; X msg_print('You feel more experienced.'); X prt_experience; X ident := true; X end; X 19 : with py.flags do X if (not (py.flags.free_act)) then X begin X msg_print('You fall asleep.'); X py.flags.paralysis := py.flags.paralysis + randint(4) V + 4; X ident := true; X end; X 20 : with py.flags do X begin X msg_print('You are covered by a veil of darkness.'); X blind := blind + randint(100) + 100; X ident := true; X end; X 21 : with py.flags do X begin X msg_print('Hey! This is good stuff! * Hick! *'); X confused := confused + randint(20) + 12; X ident := true; X end; X 22 : with py.flags do X begin X msg_print('You feel very sick.'); X poisoned := poisoned + randint(15) + 10; X ident := true; X end; X 23 : begin X py.flags.fast := py.flags.fast + randint(25) + 15; X ident := true; X end; X 24 : begin X py.flags.slow := py.flags.slow + randint(25) + 15; X ident := true; X end; X 25 : ident := detect_monsters; X 26 : with py.stat do X begin X cdex := in_statp(cdex); X if (cdex > dex) then X dex := cdex; X msg_print('You feel more limber!'); X prt_dexterity; X ident := true; X end; X 27 : with py.stat do X if (cdex < dex) then X begin X cdex := dex; X msg_print('You feel less clumsy.'); X prt_dexterity; X ident := true; X end; X 28 : with py.stat do X if (ccon < con) then X begin X ccon := con; X msg_print('You feel your health returning!'); X prt_constitution; X ident := true; X end; X 29 : cure_blindness; X 30 : cure_confusion; X 31 : cure_poison; X 32 : with py.misc do X with class`5Bpclass`5D do X if (mspell) then X begin X ident := learn_spell(redraw); X if (redraw) then draw_cave; X end X else if (pspell) then X ident := learn_prayer; X 33 : begin X msg_print('You feel your memories fade...'); X msg_print(''); X i4 := trunc(py.misc.exp/5.0); X lose_exp(randint(i4)+i4); X ident := true; X end; X 34 : with py.flags do X begin X poisoned := 0; X if (food > 150) then food := 150; X paralysis := 4; X msg_print('The potion makes you vomit!'); X ident := true; X end; X 35 : begin X py.flags.invuln := py.flags.invuln + randint(10) + 10; X ident := true; X end; X 36 : begin X py.flags.hero := py.flags.hero + randint(25) + 25; X ident := true; X end; X 37 : begin X py.flags.shero := py.flags.shero + randint(25) + 25; X ident := true; X end; X 38 : ident := remove_fear; X 39 : ident := restore_level; X 40 : with py.flags do X resist_heat := resist_heat + randint(10) + 10; X 41 : with py.flags do X resist_cold := resist_cold + randint(10) + 10; X 42 : detect_inv2(randint(12)+12); X 43 : ident := slow_poison; X 44 : ident := cure_poison; X 45 : with py.misc do X if (cmana < mana) then X begin X cmana := mana; X ident := true; X msg_print('Your feel your head clear...'); X prt_mana; X end; X 46 : with py.flags do X begin X tim_infra := tim_infra + 100 + randint(100); X ident := true; X msg_print('Your eyes begin to tingle.'); X end; X 47 : with py.misc do X begin X msg_print('You have more stamina.'); X nhp := randint(2)*get_hitdie; X mhp := mhp + nhp; X chp := chp + nhp; X prt_mhp; X prt_chp; X end; X 48 : with py.misc do X begin X msg_print('You feel more confident.'); X gain_mana(int_adj); X gain_mana(int_adj); X prt_mana; X end; X 49 : ; X 50 : ; X 51 : ; X 52 : ; X 53 : ; X 54 : ; X 55 : ; X 56 : ; X 57 : ; X 58 : ; X 59 : ; X 60 : ; X 61 : ; X 62 : ; X otherwise ; X end; X`7B End of Potions... `7D end; X if (ident) then X identify(inventory`5Bitem_val`5D); X if (flags <> 0) then X begin X with py.misc do X exp := exp + round(level/lev); X prt_experience; X end; X add_food(p1); X desc_remain(item_val); X inven_destroy(item_val); X end X else X if (redraw) then draw_cave; X end X else X msg_print('You are not carrying any potions.'); X end X else X msg_print('But you are not carrying anything.'); X end; $ CALL UNPACK [.SOURCE.INCLUDE]POTIONS.INC;1 1500981235 $ create 'f' X `7B Pray like HELL... -RAK- `7 VD X`5Bpsect(misc2$code)`5D procedure pray; X var X i1,i2,item_val,dir : integer; X choice,chance : integer; X dumy,y_dumy,x_dumy : integer; X redraw : boolean; X begin X reset_flag := true; X if (py.flags.blind > 0) then X msg_print('You can''t see to read your prayer!') X else if (no_light) then X msg_print('You have no light to read by.') X else if (py.flags.confused > 0) then X msg_print('You are too confused...') X else if (class`5Bpy.misc.pclass`5D.pspell) then X if (inven_ctr > 0) then X begin X if (find_range(`5B91`5D,i1,i2)) then X begin X redraw := false; X if (get_item(item_val,'Use which Holy Book?', X redraw,i1,i2)) then X begin X if (cast_spell('Recite which prayer?',item_val, X choice,chance,redraw)) then X with priest_spell`5Bpy.misc.pclass,choice`5D do X begin X reset_flag := false; X if (randint(100) < chance) then X msg_print('You lost your concentration!') X else X begin X y_dumy := char_row; X x_dumy := char_col; X `7B Prayers... `7D X case choice of X 1 : detect_evil; X 2 : hp_player(damroll('3d3'),'a prayer.'); X 3 : bless(randint(12)+12); X 4 : remove_fear; X 5 : light_area(char_row,char_col); X 6 : detect_trap; X 7 : detect_sdoor; X 8 : slow_poison; X 9 : if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X confuse_monster(dir,char_row,char_col); X 10 : teleport(py.misc.lev*3); X 11 : hp_player(damroll('4d4'),'a prayer.'); X 12 : bless(randint(24)+24); X 13 : sleep_monsters2_3(char_row,char_col,2); X 14 : create_food; X 15 : for i1 := 1 to inven_max-1 do X with inventory`5Bi1`5D do X flags := uand(flags,%X'7FFFFFFF'); X 16 : with py.flags do X begin X resist_heat := resist_heat + randint(10) + 10; X resist_cold := resist_cold + randint(10) + 10; X end; X 17 : cure_poison; +-+-+-+-+-+-+-+- END OF PART 50 +-+-+-+-+-+-+-+-