-+-+-+-+-+-+-+-+ START OF PART 61 -+-+-+-+-+-+-+-+ X 40 : ident := restore_level; X 41 : with py.flags do X resist_heat := resist_heat + randint(10) + 10; X 42 : with py.flags do X resist_cold := resist_cold + randint(10) + 10; X 43 : detect_inv2(randint(12)+12); X 44 : ident := slow_poison; X 45 : ident := cure_poison; X 46 : with py.misc do X if (cmana < mana) then X begin X cmana := mana; X ident := true; X msg_print('Power courses through your veins!'); X prt_mana; X end; X 47 : with py.flags do X begin X tim_infra := tim_infra + 100 + randint(100); X ident := true; X msg_print('Your eyes shift into low-frequency mode'); X end; X 48 : with py.misc do X begin X msg_print('You feel able to withstand more damage.'); X msg_print('Now don''t get cocky...'); X nhp := randint(2)*get_hitdie; X mhp := mhp + nhp; X chp := chp + nhp; X prt_mhp; X prt_chp; X end; X 49 : with py.misc do X begin X msg_print('You feel more confident.'); X gain_mana(int_adj); X gain_mana(wis_adj); X prt_mana; X end; X 50 : with py.misc do `7Blongevity`7D X`09 begin `20 X`09`09 if ((prace = 8) and (age>120)) then X`09`09 i7 := 100 X`09`09 else if (age > 20) then X`09`09 i7 := 20 X`09`09 else X`09`09 i7 := 0; X`09`09 if (i7 <> 0) then X`09`09 begin X age := age - randint(i7); X`09`09 age := greater(age,16); X`09`09 msg_print('You feel much younger.'); X`09`09 end X`09`09 else X`09`09 msg_print('You feel nothing happen.'); X end; X`7B 51..64 : msg_print('The bottle was empty.'); `7D X otherwise msg_print('The bottle was empty.'); 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; X X`7B Potions for the mixing!!`7D X`5Bpsect(misc2$code)`5D procedure mix_potions; X X VAR X blegga1,blegga2 : treasure_type; X`09i1,i2,i3,val1,val2 : integer; X`09redraw,redraw2,dummy: boolean; X X `7Bsub-procedures`7D X procedure mixture_blows_up(explode : dtype); X `20 X Begin X msg_print('The mixture blows up!!!'); X dummy := hp_player(-damroll(explode),'an exploding potion'); X msg_print('You are damaged by your feeble attempts at chemistry.'); X End; X X X procedure make_new_potion(result : integer); X X var `20 X power,p1,p2,i1 : integer; X out_val`09 : vtype; X new_potion`09 : treasure_type; X X Begin X msg_print('You successfully mix the two potions together!'); X power := (blegga1.level + blegga2.level)*result; X p1 := power - 10; X if (p1 < 0) then p1 := 0; X if (p1 > max_obj_level) then p1 := max_obj_level-20; X p2 := power + 10; X if (p2 > max_obj_level) then p2 := max_obj_level; X X repeat`20 X repeat X new_potion := object_list`5Brandint(max_objects)`5D; X until (new_potion.tval in `5B75,76`5D); X until (new_potion.level in `5Bp1..p2`5D); X X temporary_slot := new_potion; X inven_carry(i1); X objdes(out_val,i1,true,'i'); X out_val := 'You have created '+out_val+' ('+raoul_label(i1)+cur_char1(i1 V);`20 X msg_print(out_val); X msg_print('Congratulations.'); X End; X X XBEGIN X reset_flag := true; X if (inven_ctr = 0) then X msg_print('You are not carrying anything.') X else`20 X begin X if (not(find_range(`5B75,76`5D,i2,i3))) then X msg_print('You are not carrying any potions.') X else X begin X redraw := false; X if (get_item(val1,'Start with which potion?',redraw,i2,i3)) then X begin X if (get_item(val2,'And mix it with which potion?',redraw2,i2,i3)) then X`09 begin X`09`09 if ((val1 = val2) and (inventory`5Bval1`5D.number = 1)) then X`09`09 begin X`09`09 msg_print('You can''t mix a potion with itself!'); X`09`09 msg_print(''); X`09`09 end X`09`09 else X`09`09 begin X`09`09 if (redraw or redraw2) then draw_cave; X`09`09 redraw := false; X`09`09 redraw2 := false; X`09`09 reset_flag := false; X`09`09 blegga1 := inventory`5Bval1`5D; X`09`09 blegga2 := inventory`5Bval2`5D; X`09`09 if (val1 >= val2) then X`09`09 begin X`09`09 inven_destroy(val1); X`09`09 inven_destroy(val2);`09`09 `20 X`09`09`09end X`09`09 else X`09`09 begin X`09`09 inven_destroy(val2); X`09`09 inven_destroy(val1);`09`09 `20 X`09`09`09end; X`09`09 i1 := randint(20)+int_adj; X`09`09 if (i1 = 1) then X`09`09 mixture_blows_up('2d20') X`09`09 else if (i1 < 6) then X`09`09 mixture_blows_up('1d10') X`09`09 else if (i1 < 16) then X`09`09 msg_print('The mixture dissolves into the air.') X`09`09 else if (i1 < 20) then X`09`09 make_new_potion(1) X`09`09 else X`09`09 make_new_potion(2); `20 X`09`09 end X`09`09end X`09 end; X`09 if (redraw or redraw2) then draw_cave; X`09end X end XEND; $ CALL UNPACK [.INC]POTIONS.INC;1 425776025 $ create 'f' X `7B Prayers ... -RAK- `7D 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 (py.misc.pskill in `5B3,4`5D) 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 (use_skill('Recite which prayer?',item_val, X choice,chance,redraw)) then X with skill_list`5Bchoice`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('4d4')+1,'a prayer.'); X 3 : bless(randint(30)+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('8d4'),'a prayer.'); X 12 : bless(randint(60)+24); X 13 : sleep_monsters2_3(char_row,char_col,2); X 14 : create_food; X 15 : begin X`09 for i1 := 1 to inven_ctr do X with inventory`5Bi1`5D do X flags := uand(flags,%X'7FFFFFFF'); X`09 for i1 := 23 to equip_max do X with equipment`5Bi1`5D do X flags := uand(flags,%X'7FFFFFFF'); X`09`09end; X 16 : with py.flags do X begin X resist_heat := resist_heat + randint(40) + 10; X resist_cold := resist_cold + randint(40) + 10; X end; X 17 : cure_poison; X 18 : if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X fire_ball(6,dir,char_row,char_col, X`09`09 damroll('3d10')+py.misc.lev,3,false,'Black Sphere'); X 19 : hp_player(damroll('12d4'),'a prayer.'); X 20 : detect_inv2(randint(60)+24); X 21 : protect_evil; X 22 : earthquake; X 23 : map_area; X 24 : hp_player(damroll('16d4'),'a prayer.'); X 25 : turn_undead; X 26 : bless(randint(100)+48); X 27 : dispell_creature(%X'0008',3*py.misc.lev); X`09 28 : cure_disease; X 29 : hp_player(200,'a prayer.'); X 30 : dispell_creature(%X'0004',3*py.misc.lev); X 31 : warding_glyph; X 32 : begin X dispell_creature(%X'0004',4*py.misc.lev); X cure_confusion; X remove_fear; X cure_poison; X cure_blindness; X hp_player(1000,'a prayer.'); X end; X otherwise ; X end; X `7B End of prayers... `7D X if (not(reset_flag)) then X with py.misc do X begin X exp := exp + sexp; X prt_experience; X sexp := 0; X end X end; X with py.misc do X if (not(reset_flag)) then X begin X if (smana > cmana) then X begin X msg_print('You faint from fatigue!'); X py.flags.paralysis := X randint(5*trunc(smana-cmana)); X cmana := 0; X if (randint(3) = 1) then X begin X msg_print('You have damaged your health!') V; X py.stat.ccon := de_statp(py.stat.ccon); X prt_constitution; X end; X end X else X cmana := cmana - smana; X prt_mana; X`09`09`09 end; X`09`09`09 if (randint(10)=1) then X`09`09`09 reset_flag := true; X end X end X else X if (redraw) then draw_cave; X end X else X msg_print('But you are not carrying any Holy Books!'); X end X else X msg_print('But you are not carrying any Holy Books!') X else X msg_print('Pray hard enough and your prayers may be answered.'); X end; $ CALL UNPACK [.INC]PRAYER.INC;1 2037014762 $ create 'f' X `7B Wands for the aiming...`7D X`5Bpsect(misc2$code)`5D procedure aim; X var X i1 : unsigned; X i2,i3,i4,chance : integer; X dir,item_val : integer; X dumy,y_dumy,x_dumy : integer; X out_val : vtype; X redraw,ident : boolean; X begin X redraw := false; X reset_flag := true; X if (inven_ctr > 0) then X begin X if (find_range(`5B65`5D,i2,i3)) then X begin X if (get_item(item_val,'Aim which ray gun?',redraw,i2,i3)) the Vn X with inventory`5Bitem_val`5D do X begin X if (redraw) then draw_cave; X reset_flag := false; X redraw := false; X y_dumy := char_row; X x_dumy := char_col; X if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X begin X if (py.flags.confused > 0) then X begin X msg_print('You are confused...'); X repeat X dir := randint(9); X until(dir <> 5); X end; X i1 := flags; X ident := false; X with py.misc do X chance := wierd + 5 + lev + int_adj - level; X if (py.flags.confused > 0) then X chance := trunc(chance/2.0); X if (chance < 0) then chance := 0; X if (randint(chance) < use_device) then X msg_print('You failed to use the ray gun.') +-+-+-+-+-+-+-+- END OF PART 61 +-+-+-+-+-+-+-+-