-+-+-+-+-+-+-+-+ START OF PART 75 -+-+-+-+-+-+-+-+ X`09`09 else if (uand(Cursed_worn_bit,equipment`5BEquipment_shield`5D.flags) V <> 0) then X`09`09 i3 := Equipment_shield X`09`09 else if (uand(Cursed_worn_bit,equipment`5BEquipment_cloak`5D.flags) V <> 0) then X`09`09 i3 := Equipment_cloak X`09`09 else if (uand(Cursed_worn_bit,equipment`5BEquipment_helm`5D.flags) < V> 0) then X`09`09 i3 := Equipment_helm X`09`09 else if (uand(Cursed_worn_bit,equipment`5BEquipment_gloves`5D.flags) V <> 0) then X`09`09 i3 := Equipment_gloves X`09`09 else if (equipment`5BEquipment_armor`5D.tval > 0) then X`09`09 i3 := Equipment_armor X`09`09 else if (equipment`5BEquipment_shield`5D.tval > 0) then X`09`09 i3 := Equipment_shield X`09`09 else if (equipment`5BEquipment_helm`5D.tval > 0) then X`09`09 i3 := Equipment_helm X`09`09 else if (equipment`5BEquipment_gloves`5D.tval > 0) then X`09`09 i3 := Equipment_gloves X`09`09 else X`09`09 i3 := 0; X`09`09 if (i3 > 0) then X`09`09 with equipment`5Bi3`5D do X`09`09 begin X`09`09`09inven_temp`5E.data := equipment`5Bi3`5D; X`09`09`09objdes(out_val,inven_temp,false); X`09`09`09msg_print('Your ' + out_val + ' glows brightly!'); X`09`09`09flag := false; X`09`09`09for i3 := 1 to randint(2) + 1 do X`09`09`09 if (enchant(toac)) then X`09`09`09 flag := true; X`09`09`09if (flag) then X`09`09`09 begin X`09`09`09 flags := uand(Everything_flag-Cursed_worn_bit,flags); X`09`09`09 py_bonuses(blank_treasure,0); X`09`09`09 end X`09`09`09else X`09`09`09 msg_print('The enchantment fails...'); X`09`09 end; X`09`09 ident := true; X`09`09end; X`09 35 :`09begin X`09`09 if ((equipment`5BEquipment_armor`5D.tval > 0) and (randint(4) = 1)) V then X`09`09 i3 := Equipment_armor X`09`09 else if ((equipment`5BEquipment_shield`5D.tval > 0) and (randint(3) V = 1)) then X`09`09 i3 := Equipment_shield X`09`09 else if ((equipment`5BEquipment_cloak`5D.tval > 0) and (randint(3) = V 1)) then X`09`09 i3 := Equipment_cloak X`09`09 else if ((equipment`5BEquipment_helm`5D.tval > 0) and (randint(3) = V 1)) then X`09`09 i3 := Equipment_helm X`09`09 else if ((equipment`5BEquipment_gloves`5D.tval > 0) and (randint(3) V = 1)) then X`09`09 i3 := Equipment_gloves X`09`09 else if ((equipment`5BEquipment_belt`5D.tval > 0) and (randint(3) = V 1)) then X`09`09 i3 := Equipment_belt X`09`09 else if ((equipment`5BEquipment_bracers`5D.tval > 0) and (randint(3) V = 1)) then X`09`09 i3 := Equipment_bracers X`09`09 else if (equipment`5BEquipment_armor`5D.tval > 0) then X`09`09 i3 := Equipment_armor X`09`09 else if (equipment`5BEquipment_shield`5D.tval > 0) then X`09`09 i3 := Equipment_shield X`09`09 else if (equipment`5BEquipment_cloak`5D.tval > 0) then X`09`09 i3 := Equipment_cloak X`09`09 else if (equipment`5BEquipment_helm`5D.tval > 0) then X`09`09 i3 := Equipment_helm X`09`09 else if (equipment`5BEquipment_gloves`5D.tval > 0) then X`09`09 i3 := Equipment_gloves X`09`09 else if (equipment`5BEquipment_belt`5D.tval > 0) then X`09`09 i3 := Equipment_belt X`09`09 else if (equipment`5BEquipment_bracers`5D.tval > 0) then X`09`09 i3 := Equipment_bracers X`09`09 else X`09`09 i3 := 0; X`09`09 if (i3 > 0) then X`09`09 with equipment`5Bi3`5D do X`09`09 begin X`09`09`09inven_temp`5E.data := equipment`5Bi3`5D; X`09`09`09objdes(out_val,inven_temp,false); X`09`09`09msg_print('Your ' + out_val + X`09`09`09`09' glows black, then fades.'); X`09`09`09flags := Cursed_worn_bit; X`09`09`09toac := -randint(5) - randint(5); X`09`09`09py_bonuses(inven_temp`5E.data,-1); X`09`09`09ident := true; X`09`09 end; X`09`09end; X`7B Summon Undead `7D X`09 36 :`09begin X`09`09 for i3 := 1 to randint(3) do X`09`09 begin X`09`09 y := char_row; X`09`09 x := char_col; X`09`09 summon_undead(y,x); X`09`09 end; X`09`09 ident := true; X`09`09end; X`09 37 :`09ident := bless(randint(12)+6); X`09 38 :`09ident := bless(randint(24)+12); X`09 39 :`09ident := bless(randint(48)+24); X`7B Word Of Recall `7D X`09 40 :`09begin X`09`09 ident := true; X`09`09 py.flags.word_recall := 25 + randint(30); X`09`09 msg_print('The air about you becomes charged...'); X`09`09end; X`09 41 :`09ident := destroy_area(char_row,char_col); X`09 42 :`09begin X`09`09 ident := true; X`09`09 msg_print('This is a scroll of wishing.'); X`09`09 msg_print(' '); X`09`09 prt('What item do you wish to summon?',1,1); X`09`09 if (get_string(str1,1,34,40)) then X`09`09 begin X`09`09 if (str1`5B1`5D>='a') then X`09`09`09str1`5B1`5D := chr(ord(str1`5B1`5D)-32); X`09`09 prt('What abilities should it have?',1,1); X`09`09 if (get_string(str2,1,32,40)) then X`09`09`09begin X`09`09`09if (str1`5B1`5D>='a') then X`09`09`09 str1`5B1`5D := chr(ord(str1`5B1`5D)-32); X`09`09`09if (summon_item(char_row,char_col,str1,str2,10,true)) then X`09`09`09 first := false X`09`09`09end; X`09`09 end X`09`09end; X`09 43 :`09begin X`09`09 msg_print('You feel your life slipping away!'); X`09`09 msg_print(' '); X`09`09 died_from := 'an *EVIL SCROLL*'; X`09`09 make_tomb; X`09`09 write_tomb; X`09`09 print_dead_character; X`09`09 draw_cave; X`09`09 msg_print('Huh? What happened???'); X`09`09 py.flags.confused := py.flags.confused + randint(5) + 3; X`09`09 ident := true; X`09`09end; X`09 44 :`09ident := create_food(-1,-2,-3,-4,0); `7Bmake munchies`7D X`09 45 :`09; X`09 46 :`09; X`09 47 :`09; X`09 48 :`09; X`09 49 :`09; X`09 50 :`09; X`09 51 :`09; X`09 52 :`09; X`09 53 :`09; X`09 54 :`09; X`09 55 :`09; X`09 56 :`09; X`09 57 :`09; X`09 58 :`09; X`09 59 :`09; X`09 60 :`09; X`09 61 :`09; X`09 62 :`09; X`09 otherwise ; X`09end; X`09`7B End of Scrolls...`09`09`09`09`09`7D X`09`09`09 end; X`09`09`09if (not(reset_flag)) then X`09`09`09 begin X`09`09`09 if (ident) then X`09`09`09 identify(item_ptr`5E.data); X`09`09`09 if (not(first)) then X`09`09`09 begin X`09`09`09`09desc_remain(item_ptr); X`09`09`09`09inven_destroy(item_ptr); X`09`09`09`09prt_weight; X`09`09`09`09if (flags <> 0) then X`09`09`09`09 with py.misc do X`09`09`09`09 begin X`09`09`09`09 exp := exp + round(level/lev); X`09`09`09`09 prt_experience; X`09`09`09`09 end; X`09`09`09 end; X`09`09`09 end; X`09`09 end X`09`09 else X`09`09 if (redraw) then draw_cave; X`09`09end X`09 else X`09 msg_print('You are not carrying any scrolls.'); X`09 end X`09else X`09 msg_print('But you are not carrying anything.'); X end; $ CALL UNPACK SCROLLS.INC;1 1528025709 $ create 'f' X X X`09`7B Sing a Bard song`09`09`09`09 -CAPN/DMF- `7D X`5Bpsect(misc2$code)`5D procedure sing; X var X`09`09i2,dir,i3`09`09`09: integer; X`09`09i1,item_ptr`09`09`09: treas_ptr; X`09`09choice,chance`09`09`09: integer; X`09`09dumy,y_dumy,x_dumy`09`09: integer; X`09`09redraw`09`09`09`09: boolean; X`09`09ident`09`09`09`09: boolean; X begin X`09reset_flag := true; X`09if (py.flags.hoarse > 0) then X`09 msg_print('You are too hoarse to sing!') X`09else if (py.flags.afraid > 0) then X`09 msg_print('You are too scared to play music!') X`09else if (py.flags.confused > 0) then X`09 msg_print('You are too confused...') X`09else if (class`5Bpy.misc.pclass`5D.bspell) then X`09 if (inven_ctr > 0) then X`09 begin X`09 if (find_range(`5BSong_book`5D,false,i1,i2)) then X`09`09begin X`09`09 redraw := false; X`09`09 if (get_item(item_ptr,'Use which Instrument?', X`09`09`09`09`09redraw,i2,trash_char,false)) then X`09`09 begin X`09`09 if (cast_spell('Play which song?',item_ptr, X`09`09`09`09`09`09choice,chance,redraw)) then X`09`09`09with magic_spell`5Bpy.misc.pclass,choice`5D do X`09`09`09 begin X`09`09`09 reset_flag := false; X`09`09`09 if (randint(100) < chance) then X`09`09`09 begin X`09`09`09 case randint(5) of X`09`09`09`09 1 : msg_print('*Squak*'); X`09`09`09`09 2 : msg_print('*Gag!*'); X`09`09`09`09 3 : msg_print('*Aaugh!*'); X`09`09`09`09 4 : msg_print('*Yargh!*'); X`09`09`09`09 5 : msg_print('*Cough!*'); X`09`09`09 end; `7B of the bad notes `7D X`09`09`09 case randint(2) of X`09`09`09`09 1 : msg_print('You sing a sour note!'); X`09`09`09`09 2 : msg_print('You sing an awful note!'); X`09`09`09 end X`09`09`09 end X`09`09`09 else X`09`09`09 begin X`09`09`09`09y_dumy := char_row; X`09`09`09`09x_dumy := char_col; X`09`7B Songs....`09`09`09`09`09`7D X`09case choice of X`7B Detect Monster `7D X`09 1 :`09detect_creatures(c_monster); X`7B Battle Song `7D X`09 2 :`09bless(randint(12)+12); X`7B Blink `7D X`09 3 :`09teleport(10); X`7B Light `7D X`09 4 :`09light_area(char_row,char_col); X`7B Detect Doors`09`7D X`09 5 :`09begin X`09`09 detect_sdoor; X`09`09 detect_trap; X`09`09end; X`7B Magical Jig `7D X`09 6 :`09if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X`09`09 zap_monster(dir,char_row,char_col,0,c_confuse); X`7B Detect Magic `7D X`09 7 : detect_magic; X`7B Minor Cure `7D X`09 8 :`09hp_player(damroll('5d3'),'a magic spell.'); X`7B Battle Dance `7D X`09 9 :`09begin X`09`09 py.flags.hero := py.flags.hero + (randint(10) +5); X`09`09 bless(randint(20)+20); X`09`09end; X`7B Charm Monsters `7D X`09 10 :`09sleep_monsters1(char_row,char_col); X`7B Detect Curse `7D X`09 11 :`09detect_curse; X`7B Detect Invisible `7D X`09 12 : detect_creatures(c_invisible); X`7B Cure Poison `7D X`09 13 :`09cure_me(py.flags.poisoned); X`7B Invisibility `7D X`09 14 : py.flags.temp_stealth := py.flags.temp_stealth+randint(15)+10; X`7B Teleport Self `7D X`09 15 : teleport(py.misc.lev*6); X`7B Infravision `7D X 16 : py.flags.tim_infra := py.flags.tim_infra + randint(50) + 50; X`7B Physical Humor `7D X`09 17 :`09if (get_dir('Which diretion?',dir,dumy,y_dumy,x_dumy)) then X`09`09 fire_bolt(c_joke,dir,char_row,char_col,damroll('3d8'), X`09`09`09'punch line'); X`7B Recharge Item `7D X`09 18 :`09recharge(20); X`7B Remove Curse `7D X`09 19 :`09for i2 := Equipment_min to equip_max-1 do X`09`09 with equipment`5Bi2`5D do X`09`09 flags := uand(flags,%X'7FFFFFFF'); X`7B Legend Lore `7D X`09 20 :`09ident_spell; X`7B Mass Charm `7D X`09 21 : zap_area(0,0,c_sleep); X`7B Detect Treasure `7D X`09 22 : detect_item(c_treasure); X`7B Detect Object `7D X`09 23 : detect_item(c_object); X`7B Resist Petrification `7D X`09 24 : py.flags.resist_petri := py.flags.resist_petri + randint(15) + 10; X`7B Create Food and Drink `7D X`09 25 :`09create_food(3,9,1,0,0); X`7B Panic `7D X`09 26 :`09begin X`09`09 msg_print('You scare the creatures!'); X`09`09 zap_area(0,0,c_confuse); X`09`09end; X`7B Word of Recall `7D X`09 27 : py.flags.word_recall := randint(20) + 20; X`7B Protection from Nature `7D X`09 28 :`09with py.flags do X`09`09 begin X`09`09 resist_heat := resist_heat + randint(15) +10; X`09`09 resist_cold := resist_cold + randint(15) +10; X`09`09 resist_lght := resist_lght + randint(15) +10; X`09`09 end; X`7B See Invisible `7D X`09 29 : detect_inv2(randint(24)+24); X`7B Magic Mapping `7D X`09 30 :`09map_area; X`7B Joke of Death `7D X`09 31 :`09if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X`09`09 fire_ball(c_joke,dir,char_row,char_col,30,'terrible joke'); X`7B Battle Frenzy `7D X`09 32 :`09begin X`09`09 bless(randint(30)+30); X`09`09 py.flags.hero := randint(30)+30; X`09`09 py.flags.shero := randint(30)+30; X`09`09end; X`7B Slow Creature `7D X`09 33 :`09if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X`09`09 zap_monster(dir,char_row,char_col,-1,c_speed); X`7B Resist Charm `7D X`09 34 :`09with py.flags do X`09`09begin X`09`09 free_time := free_time + randint(10) + py.misc.lev; X`09`09 magic_prot := magic_prot + randint(10) + py.misc.lev; X`09`09end; X`7B Item Lore `7D X`09 35 :`09lore_spell; X`7B Song of Protection `7D X`09 36 :`09begin X`09`09 py.flags.protmon := (randint(20)+py.misc.lev ); X`09`09 protect_evil; X`09`09 bless(randint(24)+24); X`09`09end; X`7B Last Laugh `7D X`09 37 : zap_area(0,50,c_joke); X`7B Teleport Level `7D X`09 38 :`09begin X`09`09 dun_level := dun_level - 3 + 2*randint(2); X`09`09 if (dun_level < 1) then X`09`09 dun_level := 1; X`09`09 moria_flag := true; X`09`09end; X`7B Clairvoyance `7D X`09 39 :`09begin X`09`09 redraw := true; X`09`09 wizard_light; X`09`09 for i2 := (char_col + 1) to (char_col - 1) do X`09`09 for i3 := (char_row + 1) to (char_row - 1) do X`09`09 if (test_light(i3,i2)) then X`09`09`09redraw := false; X`09`09 if (redraw) then`20 X`09`09 wizard_light; X`09`09end; X`7B Song of Power `7D X`09 40 :`09begin X`09`09 zap_area(%X'0006',4*py.misc.lev,c_hp); X`09`09 cure_me(py.flags.poisoned); X`09`09 hp_player(300, 'a spell'); X`09`09 cure_me(py.flags.blind); X`09`09end; X`09 otherwise ; X`09end; X`09`7B End of songs...`09`09`09 `7D X`09`09`09`09if (not(reset_flag)) then X`09`09`09`09 with py.misc do X`09`09`09`09 begin X`09`09`09`09 exp := exp + sexp; X`09`09`09`09 prt_experience; X`09`09`09`09 sexp := 0; X`09`09`09`09 end X`09`09`09 end; X`09`09`09 with py.misc do X`09`09`09 if (not(reset_flag)) then X`09`09`09`09begin X`09`09`09`09 if (smana > cmana) then X`09`09`09`09 begin Xmsg_print('You lose your voice attempting the song!'); X`09`09`09`09 py.flags.hoarse := X`09`09`09`09`09randint(5*trunc(smana-cmana)); X`09`09`09`09 cmana := 0; X`09`09`09`09 if (randint(3) = 1) then lower_stat(ca,'Your self-esteem is lo Vwered!'); X`09`09`09`09 end X`09`09`09`09 else X`09`09`09`09 cmana := cmana - smana; X`09`09`09`09 prt_mana; X`09`09`09`09end X`09`09`09 end X`09`09 end X`09`09 else X`09`09 if (redraw) then draw_cave; X`09`09end X`09 else X`09`09msg_print('But you are not carrying any Instruments!'); X`09 end X`09 else X`09 msg_print('But you are not carrying any Instruments!') X`09else X`09 case (bard_adj+randint(4)) of X`09 1,2 : msg_print('You utter a gutteral cry.'); X`09 3,4 : msg_print('You mumble a simple tune.'); X`09 5,6 : msg_print('You sing a fair song.'); X`09 7,8 : msg_print('You sing a very nice song.'); X`09 9,10,11 : msg_print('You sing quite beautifully.'); X`09 end; X end; X`20 X`20 $ CALL UNPACK SING.INC;1 1081373380 $ create 'f' Xvar X pos : slot; X`20 X`20 Xprocedure display_slot_options; X`20 Xbegin +-+-+-+-+-+-+-+- END OF PART 75 +-+-+-+-+-+-+-+-