-+-+-+-+-+-+-+-+ START OF PART 78 -+-+-+-+-+-+-+-+ X 20 : p1 := randint(3) + 4; X 21 : p1 := randint(10) + 12; X 22,23 : p1 := randint(3) + 4; X 24 : p1 := randint(3) + 1; X 25 : p1 := randint(10) + 6; X otherwise p1 := randint(10) + 2;`20 X end X end; X 32 : begin `7B Cloaks `7D X if (magik(chance)) then X begin X if (magik(special)) then X case randint(2) of X 1 : begin X name := name + ' of Protection'; X toac := toac + m_bonus(2,40,power); X cost := cost + 250; X end; X 2 : begin X toac := toac + m_bonus(1,20,power); X p1 := randint(3); X flags := uor(%X'00000100',flags); X name := name + ' of Stealth (%P1)'; X cost := cost + p1*500; X end; X end X else X toac := toac + m_bonus(1,20,power); X end X else if (magik(cursed)) then X case randint(3) of X 1 : begin X flags := uor(%X'80000200',flags); X name := name + ' of Irritation'; X ac := 0; X toac := -m_bonus(1,10,power); X tohit := -m_bonus(1,10,power); X todam := -m_bonus(1,10,power); X cost := 0; X end; X 2 : begin X flags := uor(%X'80000000',flags); X name := name + ' of Vulnerability'; X ac := 0; X toac := -m_bonus(10,100,power+50); X cost := 0; X end; X 3 : begin X flags := uor(%X'80000000',flags); X name := name + ' of Enveloping'; X toac := -m_bonus(1,10,power); X tohit := -m_bonus(2,40,power+10); X todam := -m_bonus(2,40,power+10); X cost := 0; X end; X end; X end; X 2 : Begin `7B Chests `7D X case (randint(power)+4) of X 1 : begin X name := name + '`5E (Empty)'; X end; X 2 : begin X flags := uor(%X'00000001',flags); X name := name + '`5E (Locked)'; X end; X 3,4 : begin X flags := uor(%X'00000011',flags); X name := name + '`5E (Poison Needle)'; X end; X 5,6 : begin X flags := uor(%X'00000021',flags); X name := name + '`5E (Poison Needle)'; X end; X 7,8,9 : begin X flags := uor(%X'00000041',flags); X name := name + '`5E (Gas Trap)'; X end; X 10,11 : begin X flags := uor(%X'00000081',flags); X name := name + '`5E (Explosion Device)'; X end; X 12,13,14 : begin X flags := uor(%X'00000101',flags); X name := name + '`5E (Summoning Runes)'; X end; X 15,16,17 : begin X flags := uor(%X'00000071',flags); X name := name + '`5E (Multiple Traps)'; X end; X otherwise begin X flags := uor(%X'00000181',flags); X name := name + '`5E (Multiple Traps)'; X end; X end; X end; X 9,10,11,12,13 : Begin `7B Gun ammo and spikes`7D X number := 0; X for i1 := 1 to 7 do`20 X`09`09 number := number + randint(6); X`09`09 if (tval in `5B10,11,12`5D) then `20 X`09`09 if (magik(chance)) then X begin X tohit := tohit + m_bonus(1,35,power); X todam := todam + m_bonus(1,35,power); X if ((magik(special)) and (tval in `5B11,12`5D)) th Ven X`09`09`09 case randint(12) of X`09`09`09 1,2,3 :begin X name := name + '(high density)'; X tohit := tohit + 5; X todam := todam + 5; X cost := cost + 20; X end; X 4,5 :begin X`09`09`09 `7BFlame`7D X flags := uor(flags,%X'00040000'); X tohit := tohit + 2; X todam := todam + 4; X name := name + '(explosive)'; X cost := cost + 25; X end; X 6,7 :begin X flags := uor(flags,%X'00008000'); X tohit := tohit + 3; X todam := todam + 3; X name := name + ' of Scum Killing'; X cost := cost + 25; X end; X 8,9 :begin X flags := uor(flags,%X'00004000'); X tohit := tohit + 2; X todam := todam + 2; X name := name + ' of Creature Killing'; X cost := cost + 30; X end; X 10,11 :begin X flags := uor(flags,%X'00080000'); X tohit := tohit + 5; X todam := todam + 10; X name := name + ' of Robot Slaying'; X cost := cost + 30; X end; X 12 :begin X flags := uor(flags,%X'00002000'); X tohit := tohit + 7; X todam := todam + 7; X name := name + ' of Alien Slaying'; X cost := cost + 35; X end; X end; `7Bcase`7D X`09`09`09end X else if ((tval in `5B10,11,12`5D) and (magik(cursed))) V then X begin X tohit := -m_bonus(5,55,power); X todam := -m_bonus(5,55,power); X flags := uor(%X'80000000',flags); X cost := 0; X end; X End; X`09`7BCoupons`7D `20 X`09 3: Begin X`09`09 case randint(6) of X`09`09 1,2,3: p1 := 20; X`09`09 4,5: p1 := 30; X`09`09 6: p1 := 40; X`09`09 end;`09`09 `20 X`09`09 if (magik(special)) then`20 X`09`09 p1 := p1 + 30; X`09`09End; X`09 otherwise ; X end; `7Bcase`7D X`09`7BMultiple Number Types. Need to adjust subval.`7D X`09with item do X`09 If (tval in `5B9,10,11,12,13,82,84`5D) then X`09 begin X missle_ctr := missle_ctr + 1; X if (missle_ctr > 65534) then X missle_ctr := 1; X subval := missle_ctr + 512; X `09 end; X END; X $ CALL UNPACK [.INC]TREASURE.INC;1 1750450866 $ create 'f' X`7B play a trick `7D X`5Bpsect(misc2$code)`5D procedure use_con_skills; X var X i1,i2,item_val,dir : integer; X choice,chance : integer; X dumy,y_dumy,x_dumy : integer; X redraw : boolean; XBEGIN X reset_flag := true; X if (py.flags.blind > 0) then X msg_print('Help me, I''m blind!') X else if (no_light) then X msg_print('Look buddy, no light, no read, go it?') X else if (py.flags.confused > 0) then X msg_print('Your mind is way too messed up right now...') X else if (py.misc.pskill in `5B5,6`5D) then X if (inven_ctr > 0) then X BEGIN X if (find_range(`5B92`5D,i1,i2)) then X BEGIN X redraw := false; X if (get_item(item_val,'Use which con-manual?', X redraw,i1,i2)) then X BEGIN X if (use_skill('Try which trick?',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 are not very convincing!') X else X BEGIN X y_dumy := char_row; X x_dumy := char_col; X`7BTricks. `7D X CASE choice of X 1 : if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X fire_bolt(0,dir,char_row,char_col, X damroll('2d4')+1,'Spit Ball'); X 2 : detect_monsters; X 3 : teleport(10); X 4 : light_area(char_row,char_col); X 5 : hp_player(damroll('4d4'),'a magic spell.'); X 6 : BEGIN X detect_sdoor; X detect_trap; X END; X 7 : if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X fire_ball(2,dir,char_row,char_col,7,2,false,'Stinking Gas'); X 8 : if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X confuse_monster(dir,char_row,char_col); X 9 : if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X fire_bolt(1,dir,char_row,char_col, X damroll('3d6')+1,'Terrible Insult'); X 10 : td_destroy; X 11 : if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X sleep_monster(dir,char_row,char_col); X 12 : cure_poison; X 13 : teleport(py.misc.lev*4); X 14 : remove_curse; X 15 : if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X fire_bolt(4,dir,char_row,char_col, X damroll('4d6')+1,'Sharp Ice Cube'); X 16 : if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X wall_to_mud(dir,char_row,char_col); X 17 : ident_spell; X 18 : recharge(16); X 19 : sleep_monsters2_3(char_row,char_col,1); X 20 : if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X poly_monster(dir,char_row,char_col); X 21 : create_food; X 22 : sleep_monsters2_3(char_row,char_col,20); X 23 : if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X fire_bolt(5,dir,char_row,char_col, X damroll('6d6')+1,'Roman Candle'); X 24 : if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X speed_monster(dir,char_row,char_col,-2);`09`09 `20 X 25 : if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X fire_ball(4,dir,char_row,char_col, X damroll('6d4')+1,2,false,'Deadly Ice Cubes V'); X 26 : recharge(40); X 27 : if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X teleport_monster(dir,char_row,char_col); X 28 : with py.flags do X fast := fast + randint(20) + py.misc.lev*2; X 29 : if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X fire_ball(5,dir,char_row,char_col, X damroll('7d5')+1,2,false,'Blazing Inferno' V); X 30 : destroy_area(char_row,char_col); X 31 : genocide; X otherwise ; X END; X`7BEnd of tricks.`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 start to stutter!'); X py.flags.paralysis := X randint(5*trunc(smana-cmana)); X cmana := 0; X if (randint(3) = 1) then X`09`09`09`09 begin X`09`09`09 msg_print('You have damaged your reputation!'); X`09`09`09`09 py.stat.cchr := de_statp(py.stat.cchr); X`09`09`09`09 prt_charisma; X`09`09`09`09 end; X END X else X cmana := cmana - smana; X prt_mana; X END; X`09`09 if (randint(10) = 1) then`20 X`09`09 reset_flag := true; `20 X END X END X else X if (redraw) then draw_cave; X END X else +-+-+-+-+-+-+-+- END OF PART 78 +-+-+-+-+-+-+-+-