-+-+-+-+-+-+-+-+ START OF PART 47 -+-+-+-+-+-+-+-+ X`09`09`09`09`09`09 slow_digestion_worn_bit); X`09`09`09`09 name := name + ' of Improved Digestion'; X`09`09`09`09 p1 := 2; X`09`09`09`09 cost := cost + 100000; X`09`09`09`09 end; X`09`09`0913 : `09begin X`09`09`09`09 name := name + ' of Dwarvenkind'; X`09`09`09`09 flags := uor(flags,Infra_vision_worn_bit+ X`09`09`09`09`09`09tunneling_worn_bit+ X`09`09`09`09`09`09sustain_stat_worn_bit); X`09`09`09`09 flags2 := uor(flags2,magic_proof_worn_bit);`09`09`09`09`09` V09 X`09`09`09`09 cost := cost + 70000; X`09`09`09`09 p1 := 2; X`09`09`09`09end; X`09`09`09 end; X`09`09`09 end; X`09`09 end X`09`09 else if (magik(cursed)) then X`09`09 begin X`09`09`09toac := -m_bonus(1,45,level); X`09`09`09flags := uor(cursed_worn_bit,flags); X`09`09`09cost := 0; X`09`09`09if (magik(special)) then X`09`09`09 case subval of X`09`09`09 1 : case randint(2) of X`09`09`09`091 : begin X`09`09`09`09 p1 := -2; X`09`09`09`09 flags := uor(charisma_worn_bit,flags); X`09`09`09`09 name := name + ' of Sex Change'; X`09`09`09`09 end; X`09`09`09`092 : begin X`09`09`09`09 p1 := -1; X`09`09`09`09 flags := uor(flags,strength_worn_bit); X`09`09`09`09 name := name + ' of Weakness'; X`09`09`09`09 end; X`09`09`09`09end; X`09`09`09 10,11 : begin X`09`09`09`09 p1 := -1; X`09`09`09`09 flags := uor(flags,cursed_worn_bit+ X`09`09`09`09`09`09timidness_worn_bit); X`09`09`09`09 name := name + ' of Fear' X`09`09`09`09end; X`09`09`09 13 : begin X`09`09`09`09 p1 := -1; X`09`09`09`09 flags2 := uor(flags2,hunger_worn_bit); X`09`09`09`09 flags := uor(flags,cursed_worn_bit); X`09`09`09`09 name := name + ' of Hunger'; X`09`09`09`09end; X`09`09`09 end; X`09`09`09p1 := p1*randint(5); X`09`09 end; X`09`09 end; X`7B Rings `7D X`09 ring : X`09`09 begin X`09`09 case subval of X`09`091,2,3,4,5,6 :`09if (magik(cursed)) then X`09`09`09`09 begin X`09`09`09`09 p1 := -m_bonus(1,20,level); X`09`09`09`09 flags := uor(cursed_worn_bit,flags); X`09`09`09`09 cost := -cost; X`09`09`09`09 end X`09`09`09`09else X`09`09`09`09 begin X`09`09`09`09 p1 := m_bonus(1,10,level); X`09`09`09`09 cost := cost + p1*10000; X`09`09`09`09 end; X`09`09`09 7 :`09if (magik(cursed)) then X`09`09`09`09 begin X`09`09`09`09 p1 := -randint(3); X`09`09`09`09 flags := uor(cursed_worn_bit,flags); X`09`09`09`09 cost := -cost; X`09`09`09`09 end X`09`09`09`09else X`09`09`09`09 p1 := 1; X`09`09`09 8 :`09begin X`09`09`09`09 p1 := 5*m_bonus(1,20,level); X`09`09`09`09 cost := cost + p1*10000; X`09`09`09`09end; X`09`09`09 22 :`09begin`09`7B Increase damage`09`7D X`09`09`09`09 todam := m_bonus(1,20,level); X`09`09`09`09 cost := cost + todam*10000; X`09`09`09`09 if (magik(cursed)) then X`09`09`09`09 begin X`09`09`09`09 todam := -todam; X`09`09`09`09 flags := uor(cursed_worn_bit,flags); X`09`09`09`09 cost := -cost; X`09`09`09`09 end X`09`09`09`09end; X`09`09`09 23 :`09begin`09`7B Increase To-Hit`09`7D X`09`09`09`09 tohit := m_bonus(1,20,level); X`09`09`09`09 cost := cost + todam*10000; X`09`09`09`09 if (magik(cursed)) then X`09`09`09`09 begin X`09`09`09`09 tohit := -tohit; X`09`09`09`09 flags := uor(cursed_worn_bit,flags); X`09`09`09`09 cost := -cost; X`09`09`09`09 end X`09`09`09`09end; X`09`09`09 24 :`09begin`09`7B Protection`09`09`7D X`09`09`09`09 toac := m_bonus(1,20,level); X`09`09`09`09 cost := cost + todam*10000; X`09`09`09`09 if (magik(cursed)) then X`09`09`09`09 begin X`09`09`09`09 toac := -toac; X`09`09`09`09 flags := uor(cursed_worn_bit,flags); X`09`09`09`09 cost := -cost; X`09`09`09`09 end X`09`09`09`09end; X`09`09`09 33 :`09begin`09`7B Slaying`09`7D X`09`09`09`09 todam := m_bonus(1,25,level); X`09`09`09`09 tohit := m_bonus(1,25,level); X`09`09`09`09 cost := cost + (tohit+todam)*10000; X`09`09`09`09 if (magik(cursed)) then X`09`09`09`09 begin X`09`09`09`09 tohit := -tohit; X`09`09`09`09 todam := -todam; X`09`09`09`09 flags := uor(cursed_worn_bit,flags); X`09`09`09`09 cost := -cost; X`09`09`09`09 end X`09`09`09`09end; X`09`09`09 35 : begin `7B Speed -10 or worse `7D X`09`09`09`09 p1 := -(10+randint(10)); X`09`09`09`09 cost := cost + (1000000*p1); X`09`09`09`09 if (uand(%X'80000000',flags)<>0) then X`09`09`09`09 flags := uand(%X'7FFFFFFF',flags); X`09`09`09 end; X`09`09`09 otherwise ; X`09`09`09 end; X X`09`09end; X`7B Amulets `7D X`09 amulet : X`09`09 begin X`09`09 case subval of X`09`091,2,3,4,5,6 :`09if (magik(cursed)) then X`09`09`09`09 begin X`09`09`09`09 p1 := -m_bonus(1,20,level); X`09`09`09`09 flags := uor(cursed_worn_bit,flags); X`09`09`09`09 cost := -cost; X`09`09`09`09 end X`09`09`09`09else X`09`09`09`09 begin X`09`09`09`09 p1 := m_bonus(1,10,level); X`09`09`09`09 cost := cost + p1*10000; X`09`09`09`09 end; X`09`09`09 7 :`09begin X`09`09`09`09 p1 := 5*m_bonus(1,25,level); X`09`09`09`09 if (magik(cursed)) then X`09`09`09`09 begin X`09`09`09`09 p1 := -p1; X`09`09`09`09 cost := -cost; X`09`09`09`09 flags := uor(cursed_worn_bit,flags); X`09`09`09`09 end X`09`09`09`09 else X`09`09`09`09 cost := cost + 10000*p1; X`09`09`09`09end; X`09`09`09 otherwise ; X`09`09`09 end; X`09`09 end; X`09`09`09`7B Subval should be even for store, odd for dungeon`7D X`09`09`09`7B Dungeon found ones will be partially charged`09 `7D X`7B Lamps and torches `7D X`09 lamp_or_torch : X`09`09 begin`20 X`09`09 if ((subval mod 2) = 1) then X`09`09 p1 := randint(p1); X`09`09 end; X`7B Wands `7D X`09 wand : X`09`09begin X`09`09 case subval of X`09`09`091 :`09p1 := randint(10) + 6; X`09`09`092 :`09p1 := randint(8) + 6; X`09`09`093 :`09p1 := randint(5) + 6; X`09`09`094 :`09p1 := randint(8) + 6; X`09`09`095 :`09p1 := randint(4) + 3; X`09`09`096 :`09p1 := randint(8) + 6; X`09`09`097 :`09p1 := randint(20) + 12; X`09`09`098 :`09p1 := randint(20) + 12; X`09`09`099 :`09p1 := randint(10) + 6; X`09`09`0910 :`09p1 := randint(12) + 6; X`09`09`0911 :`09p1 := randint(10) + 12; X`09`09`0912 :`09p1 := randint(3) + 3; X`09`09`0913 :`09p1 := randint(8) + 6; X`09`09`0914 :`09p1 := randint(10) + 6; X`09`09`0915 :`09p1 := randint(5) + 3; X`09`09`0916 :`09p1 := randint(5) + 3; X`09`09`0917 :`09p1 := randint(5) + 6; X`09`09`0918 :`09p1 := randint(5) + 4; X`09`09`0919 :`09p1 := randint(8) + 4; X`09`09`0920 :`09p1 := randint(6) + 2; X`09`09`0921 :`09p1 := randint(4) + 2; X`09`09`0922 :`09p1 := randint(8) + 6; X`09`09`0923 :`09p1 := randint(5) + 2; X`09`09`0924 :`09p1 := randint(12) + 12; X`09`09`0925 : p1 := randint(20) + 10; X`09`09`09otherwise ; X`09`09 end X`09`09 end; X`7B Staffs `7D X`09 staff :`20 X`09`09begin X`09`09 case subval of X`09`09`091 :`09p1 := randint(20) + 12; X`09`09`092 :`09p1 := randint(8) + 6; X`09`09`093 :`09p1 := randint(5) + 6; X`09`09`094 :`09p1 := randint(20) + 12; X`09`09`095 :`09p1 := randint(15) + 6; X`09`09`096 :`09p1 := randint(4) + 5; X`09`09`097 :`09p1 := randint(5) + 3; X`09`09`098 :`09p1 := randint(3) + 1; X`09`09`099 :`09p1 := randint(3) + 1; X`09`09`0910 :`09p1 := randint(3) + 1; X`09`09`0911 :`09p1 := randint(5) + 6; X`09`09`0912 :`09p1 := randint(10) + 12; X`09`09`0913 :`09p1 := randint(5) + 6; X`09`09`0914 :`09p1 := randint(5) + 6; X`09`09`0915 :`09p1 := randint(5) + 6; X`09`09`0916 :`09p1 := randint(10) + 12; X`09`09`0917 :`09p1 := randint(3) + 4; X`09`09`0918 :`09p1 := randint(5) + 6; X`09`09`0919 :`09p1 := randint(5) + 6; X`09`09`0920 :`09p1 := randint(3) + 4; X`09`09`0921 :`09p1 := randint(10) + 12; X`09`09`0922 :`09p1 := randint(3) + 4; X`09`09`0923 :`09p1 := randint(3) + 4; X`09`09`0924 :`09p1 := randint(3) + 1; X`09`09`0925 :`09p1 := randint(10) + 6; X`09`09`0926 :`09p1 := randint(6) + 6; X`09`09`09otherwise ; X`09`09 end X`09`09 end; X`7B Chimes `7D X`09 chime : X`09`09begin X`09`09 case subval of X`09`09`091 : p1 := randint(20) + 12; X`09`09`092 : p1 := randint(8) + 6; X`09`09`093 : p1 := randint(5) + 6; X`09`09`094 : p1 := randint(4) + 5; X`09`09`095 : p1 := randint(5) + 3; X`09`09`096 : p1 := randint(3) + 1; X`09`09`097 : p1 := randint(10) + 10; X`09`09`098 : p1 := randint(10) + 12; X`09`09`099 : p1 := randint(5) + 6; X`09`09`0910 : p1 := randint(5) + 6; X`09`09`0911 : p1 := randint(5) + 6; X`09`09`0912 : p1 := randint(5) + 6; X`09`09`0913 : p1 := randint(3) + 4; X`09`09`0914 : p1 := randint(3) + 4; X`09`09`0915 : p1 := randint(3) + 4; X`09`09`0916 : p1 := randint(10) + 6; X`09`09`09otherwise ; X`09`09 end X`09`09 end; X`7B Horns `7D X`09 horn : X`09`09begin X`09`09 case subval of X`09`09`091 : p1 := randint(10) + 6; X`09`09`092 : p1 := randint(6) + 3; X`09`09`093 : p1 := randint(5) + 6; X`09`09`094 : p1 := randint(3) + 1; X`09`09`095 : p1 := randint(3) + 4; X`09`09`096 : p1 := randint(3) + 4; X`09`09`097 : p1 := randint(3) + 4; X`09`09`098 : p1 := randint(10) + 3; X`09`09`099 : p1 := randint(5) + 1; X`09`09`0910 : p1 := randint(3) + 1; X`09`09`0911 : p1 := randint(3) + 4; X`09`09`0912 : p1 := randint(3) + 4; X`09`09`0913 : p1 := randint(8) + 1; X`09`09`09otherwise ; X`09`09 end X`09`09 end; X`7B Cloaks `7D X`09 cloak : X`09`09begin X`09`09 if magik(chance) then X`09`09 begin X`09`09`09if magik(special) then X`09`09`09 case randint(9) of X`09`091..4`09 : begin X`09`09`09`09 name := name + ' of Protection'; X`09`09`09`09 toac := m_bonus(2,40,level); X`09`09`09`09 cost := cost + 25000 + toac*10000; X`09`09`09`09end; X`09`095..8`09 : begin X`09`09`09`09 toac := m_bonus(1,20,level); X`09`09`09`09 p1 := randint(3); X`09`09`09`09 flags := uor(stealth_worn_bit,flags); X`09`09`09`09 name := name + ' of Stealth (%P1)'; X`09`09`09`09 cost := cost + p1*50000 + toac*10000; X`09`09`09`09end; X`09`099`09: begin X`09`09`09`09 name := name + ' of Elvenkind'; X`09`09`09`09 p1 := 2;`20 X`09`09`09`09 cost := cost + 200000; X`09`09`09`09 flags := uor(flags,see_invisible_worn_bit+ X`09`09`09`09`09`09sustain_stat_worn_bit+ X`09`09`09`09`09`09stealth_worn_bit+ X`09`09`09`09`09`09charisma_worn_bit); X`09`09`09`09`09end X`09`09`09 end X`09`09`09else X`09`09`09 begin X`09`09`09 toac := m_bonus(1,20,level); X`09`09`09 cost := cost + toac+10000; X`09`09`09 end; X`09`09 end X`09`09 else if (magik(cursed)) then X`09`09 case randint(3) of X`09`09`091 : begin X`09`09`09 flags := uor(flags,cursed_worn_bit+ X`09`09`09`09`09`09 aggravation_worn_bit); X`09`09`09 name := name + ' of Irritation'; X`09`09`09 ac := 0; X`09`09`09 toac := -m_bonus(1,10,level); X`09`09`09 tohit := -m_bonus(1,10,level); X`09`09`09 todam := -m_bonus(1,10,level); X`09`09`09 cost := 0; X`09`09`09 end; X`09`09`092 : begin X`09`09`09 flags := uor(cursed_worn_bit,flags); X`09`09`09 name := name + ' of Vulnerability'; X`09`09`09 ac := 0; X`09`09`09 toac := -m_bonus(10,100,level+50); X`09`09`09 cost := 0; X`09`09`09 end; X`09`09`093 : begin X`09`09`09 flags := uor(cursed_worn_bit,flags); X`09`09`09 name := name + ' of Enveloping'; X`09`09`09 toac := -m_bonus(1,10,level); X`09`09`09 tohit := -m_bonus(2,40,level+10); X`09`09`09 todam := -m_bonus(2,40,level+10); X`09`09`09 cost := 0; X`09`09`09 end; X`09`09 end; X`09`09 end; X`7B Chests `7D X`09 chest : X`09`09begin X`09`09 If (subval = 5) then X`09`09 name := name + '`5E (Looted)' X`09`09 else X`09`09 case (randint(level)+4) of X`09`09 1`09`09: begin X`09`09`09`09 name := name + '`5E (Empty)'; X`09`09`09`09 end; X`09`09 2`09`09: begin X`09`09`09`09 flags := uor(%X'00000001',flags); X`09`09`09`09 name := name + '`5E (Locked)'; X`09`09`09`09 end; X`09`09 3,4`09: begin X`09`09`09`09 flags := uor(%X'00000011',flags); X`09`09`09`09 name := name + '`5E (Poison Needle)'; X`09`09`09`09 end; X`09`09 5,6`09: begin X`09`09`09`09 flags := uor(%X'00000021',flags); X`09`09`09`09 name := name + '`5E (Poison Needle)'; X`09`09`09`09 end; X`09`09 7,8,9`09: begin X`09`09`09`09 flags := uor(%X'00000041',flags); X`09`09`09`09 name := name + '`5E (Gas Trap)'; X`09`09`09`09 end; X`09`09 10,11`09: begin X`09`09`09`09 flags := uor(%X'00000081',flags); X`09`09`09`09 name := name + '`5E (Explosion Device)'; X`09`09`09`09 end; X`09`09 12,13,14`09: begin X`09`09`09`09 flags := uor(%X'00000101',flags); X`09`09`09`09 name := name + '`5E (Summoning Runes)'; X`09`09`09`09 end; X`09`09 15,16,17`09: begin X`09`09`09`09 flags := uor(%X'00000071',flags); X`09`09`09`09 name := name + '`5E (Multiple Traps)'; X`09`09`09`09 end; X`09`09 otherwise`09 begin X`09`09`09`09 flags := uor(%X'00000181',flags); X`09`09`09`09 name := name + '`5E (Multiple Traps)'; X`09`09`09`09 end; X`09`09 end; X`09`09 end; X`7B Arrows, bolts, ammo, and spikes `7D X`09sling_ammo, arrow, bolt, spike : X`09`09begin X`09`09 if (tval in `5Bbolt,arrow`5D) then X`09`09 if magik(chance) then X`09`09 begin X`09`09`09tohit := m_bonus(1,35,level); X`09`09`09todam := m_bonus(1,35,level); X`09`09`09if magik(special) then X`09`09`09 case tval of`09`7BCASE 1`7D X`09`09`09 11,12 : case randint(10) of`09`7BCASE 2`7D X`09`09`09 1,2,3 :begin X`09`09`09`09 name := name + ' of Slaying'; X`09`09`09`09 tohit := tohit + 5; X`09`09`09`09 todam := todam + 5; X`09`09`09`09 cost := cost + 2000; X`09`09`09`09 end; X`09`09`09 4,5`09 :begin X`09`09`09`09 flags := uor(flags,flame_brand_worn_bit); X`09`09`09`09 tohit := tohit + 2; X`09`09`09`09 todam := todam + 4; X`09`09`09`09 name := name + ' of Fire'; X`09`09`09`09 cost := cost + 2500; X`09`09`09`09 end; X`09`09`09 6,7`09 :begin X`09`09`09`09 flags := uor(flags,slay_evil_worn_bit); X`09`09`09`09 tohit := tohit + 3; X`09`09`09`09 todam := todam + 3; X`09`09`09`09 name := name + ' of Slay Evil'; X`09`09`09`09 cost := cost + 2500; X`09`09`09`09 end; X`09`09`09 8,9`09 :begin X`09`09`09`09 flags := uor(flags,slay_monster_worn_bit); X`09`09`09`09 tohit := tohit + 2; X`09`09`09`09 todam := todam + 2; +-+-+-+-+-+-+-+- END OF PART 47 +-+-+-+-+-+-+-+-