-+-+-+-+-+-+-+-+ START OF PART 28 -+-+-+-+-+-+-+-+ X`09`09 prt(tmp_str + ' random objects being produced...',1,1); X`09`09 put_qio; X`09`09 rewrite(file1,error:=continue); X`09writeln(file1,'*** Random Object Sampling:',error:=continue); X`09writeln(file1,'*** ',nobj:1,' objects',error:=continue); X`09writeln(file1,'*** For Level ',level:1,error:=continue); X`09writeln(file1,'',error:=continue); X`09writeln(file1,'',error:=continue); X`09`09 popt(i2); X`09`09 for i1 := 1 to nobj do X`09`09 begin X`09`09 t_list`5Bi2`5D := object_list`5Bget_obj_num(level)`5D; X`09`09 magic_treasure(i2,level); X`09`09 inven_temp`5E.data := t_list`5Bi2`5D; X`09`09 with inven_temp`5E.data do X`09`09`09begin X`09`09`09 unquote(name); X`09`09`09 known1(name); X`09`09`09 known2(name); X`09`09`09end; X`09`09 objdes(tmp_str,inven_temp,true); X`09`09 writeln(file1,tmp_str,error:=continue); X`09`09 end; X`09`09 pusht(i2); X`09`09 close(file1,error:=continue); X`09`09 prt('Completed.',1,1); X`09`09end X`09 else X`09`09prt('File could not be opened.',1,1); X`09 end; X`09end; X end; X X X`09`7B Prints a listing of monsters`09`09`09`09-RAK-`09`7D X`5Bglobal,psect(wizard$code)`5D procedure print_monsters; X var X`09i1,i2,xpos,atype,adesc,acount,i5: integer; X`09file1 : text; X`09out_val,filename1 : vtype; X`09attstr,attx : vtype; X`09damstr : etype; X X begin X prt('File name: ',1,1); X if (get_string(filename1,1,12,64)) then X`09begin X`09 if (length(filename1) = 0) then filename1 := 'MORIAMON.DAT'; X`09 open(file1,filename1,error:=continue); X`09 if (status(file1) = 0) then X`09 begin X`09 prt('Writing Monster Dictionary...',1,1); X`09 put_qio; X`09 rewrite(file1,error:=continue); X`09 for i1 := 1 to max_creatures do X`09`09with c_list`5Bi1`5D do X`09`09 begin X`09`7B Begin writing to file `7D Xwriteln(file1,'--------------------------------------------',error:=continue V); Xout_val := name + ' '; Xwriteln(file1,i1:3,' ',out_val:30,' (',cchar:1,')',error:=continue); Xwriteln(file1,' Speed =',speed:2,' Level =',level:2,' Exp =',mexp: V5, X`09`09error:=continue); Xwriteln(file1,' AC =',ac:2, ' Eye-sight =',aaf:2,' HD =',hd:5, X`09`09`09`09`09`09`09error:=continue); Xif (uand(%X'80000000',cmove) <> 0) then X writeln(file1,' Creature is a ***Win Creature***',error:=continue); Xif (uand(%X'00080000',cmove) <> 0) then X writeln(file1,' Creature Eats/kills other creatures.',error:=continue) V; Xif (uand(%X'00004000',cmove) <> 0) then X writeln(file1,' Creature is good (negative experience)',error:=continu Ve); Xif (uand(%X'00008000',cmove) <> 0) then X writeln(file1,' Creature will not normally appear.',error:=continue); Xif (uand(%X'0001',cdefense) <> 0) then X writeln(file1,' Creature is a dragon.',error:=continue); Xif (uand(%X'0002',cdefense) <> 0) then X writeln(file1,' Creature is a monster.',error:=continue); Xif (uand(%X'0400',cdefense) <> 0) then X writeln(file1,' Creature is a demon.',error:=continue); Xif (uand(%X'0004',cdefense) <> 0) then X writeln(file1,' Creature is evil.',error:=continue); Xif (uand(%X'0008',cdefense) <> 0) then X writeln(file1,' Creature is undead.',error:=continue); Xif (uand(%X'0010',cdefense) <> 0) then X writeln(file1,' Creature harmed by cold.',error:=continue); Xif (uand(%X'0020',cdefense) <> 0) then X writeln(file1,' Creature harmed by fire.',error:=continue); Xif (uand(%X'0040',cdefense) <> 0) then X writeln(file1,' Creature harmed by poison.',error:=continue); Xif (uand(%X'0080',cdefense) <> 0) then X writeln(file1,' Creature harmed by acid.',error:=continue); Xif (uand(%X'0100',cdefense) <> 0) then X writeln(file1,' Creature harmed by blue light.',error:=continue); Xif (uand(%X'0200',cdefense) <> 0) then X writeln(file1,' Creature harmed by Stone-to-Mud.',error:=continue); Xif (uand(%X'1000',cdefense) <> 0) then X writeln(file1,' Creature cannot be charmed or slept.',error:=continue) V; Xif (uand(%X'2000',cdefense) <> 0) then X writeln(file1,' Creature seen with Infra-Vision.',error:=continue); Xif (uand(%X'4000',cdefense) <> 0) then X writeln(file1,' Creature has MAX hit points.',error:=continue); Xif (uand(%X'8000',cdefense) <> 0) then X writeln(file1,' Creature regenerates.',error:=continue); Xif (uand(%X'00010000',cmove) <> 0) then X writeln(file1,' Creature is invisible.',error:=continue); Xif (uand(%X'00100000',cmove) <> 0) then X writeln(file1,' Creature picks up objects.',error:=continue); Xif (uand(%X'00200000',cmove) <> 0) then X writeln(file1,' Creature multiplies.',error:=continue); Xif (uand(%X'01000000',cmove) <> 0) then X writeln(file1,' Carries object(s).',error:=continue); Xif (uand(%X'02000000',cmove) <> 0) then X writeln(file1,' Carries gold, gems, ect.',error:=continue); Xif (uand(%X'04000000',cmove) <> 0) then X writeln(file1,' Has object/gold 60% of time.',error:=continue); Xif (uand(%X'08000000',cmove) <> 0) then X writeln(file1,' Has object/gold 90% of time.',error:=continue); Xif (uand(%X'10000000',cmove) <> 0) then X writeln(file1,' Has 1d2 object(s)/gold.',error:=continue); Xif (uand(%X'20000000',cmove) <> 0) then X writeln(file1,' Has 2d2 object(s)/gold.',error:=continue); Xif (uand(%X'40000000',cmove) <> 0) then X writeln(file1,' Has 4d2 object(s)/gold.',error:=continue); X`09`7B Creature casts spells / Breaths Dragon breath... `7D Xif (spells > 0) then X begin X writeln(file1,' --Spells/Dragon Breath =',error:=continue); X if (uand(spells,%X'80000000') <> 0) then X writeln(file1,' Doesn''t cast spells 1 out of ',uand(%X'F',spell Vs):1, X`09`09' turns.',error:=continue) X else X writeln(file1,' Casts spells 1 out of ',uand(%X'F',spells):1, X`09`09' turns.',error:=continue); X if (uand(%X'00000010',spells) <> 0) then X writeln(file1,' Can teleport short.',error:=continue); X if (uand(%X'00000020',spells) <> 0) then X writeln(file1,' Can teleport long.',error:=continue); X if (uand(%X'00000040',spells) <> 0) then X writeln(file1,' Teleport player to itself.',error:=continue); X if (uand(%X'00000080',spells) <> 0) then X writeln(file1,' Cause light wounds.',error:=continue); X if (uand(%X'00000100',spells) <> 0) then X writeln(file1,' Cause serious wounds.',error:=continue); X if (uand(%X'00000200',spells) <> 0) then X writeln(file1,' Hold person.',error:=continue); X if (uand(%X'00000400',spells) <> 0) then X writeln(file1,' Cause blindness.',error:=continue); X if (uand(%X'00000800',spells) <> 0) then X writeln(file1,' Cause confusion.',error:=continue); X if (uand(%X'00001000',spells) <> 0) then X writeln(file1,' Cause fear.',error:=continue); X if (uand(%X'00002000',spells) <> 0) then X writeln(file1,' Summon a monster.',error:=continue); X if (uand(%X'00004000',spells) <> 0) then X writeln(file1,' Summon an undead.',error:=continue); X if (uand(%X'00008000',spells) <> 0) then X writeln(file1,' Slow person.',error:=continue); X if (uand(%X'00010000',spells) <> 0) then X writeln(file1,' Drains mana for healing.',error:=continue); X if (uand(%X'00020000',spells) <> 0) then X writeln(file1,' Shadow Breath/Orb of draining.',error:=continue) V; X if (uand(%X'00040000',spells) <> 0) then X writeln(file1,' **Unknown spell value**',error:=continue); X if (uand(%X'00080000',spells) <> 0) then X writeln(file1,' Breaths Lightning Dragon Breath.',error:=continu Ve); X if (uand(%X'00100000',spells) <> 0) then X writeln(file1,' Breaths Gas Dragon Breath.',error:=continue); X if (uand(%X'00200000',spells) <> 0) then X writeln(file1,' Breaths Acid Dragon Breath.',error:=continue); X if (uand(%X'00400000',spells) <> 0) then X writeln(file1,' Breaths Frost Dragon Breath.',error:=continue); X if (uand(%X'00800000',spells) <> 0) then X writeln(file1,' Breaths Fire Dragon Breath.',error:=continue); X if (uand(%X'01000000',spells) <> 0) then X writeln(file1,' Casts Illusion.',error:=continue); X if (uand(%X'02000000',spells) <> 0) then X writeln(file1,' Summon a demon.',error:=continue); X if (uand(%X'04000000',spells) <> 0) then X writeln(file1,' Summon multiplying monster.',error:=continue); X if (uand(%X'08000000',spells) <> 0) then X writeln(file1,' Gaze for petrification.',error:=continue); X end; X`09`7B Movement for creature `7D Xwriteln(file1,' --Movement =',error:=continue); Xif (uand(%X'00000001',cmove) <> 0) then X writeln(file1,' Move only to attack.',error:=continue); Xif (uand(%X'00000002',cmove) <> 0) then X writeln(file1,' 20% random movement.',error:=continue); Xif (uand(%X'00000004',cmove) <> 0) then X writeln(file1,' 40% random movement.',error:=continue); Xif (uand(%X'00000008',cmove) <> 0) then X writeln(file1,' 75% random movement.',error:=continue); Xif (uand(%X'00400000',cmove) <> 0) then X writeln(file1,' Creature can anchor in water.',error:=continue); Xif (uand(%X'00800000',cmove) <> 0) then X writeln(file1,' Creature flies.',error:=continue); Xif (uand(%X'00000010',cmove) <> 0) then X writeln(file1,' Creature is water based.',error:=continue); Xif (uand(%X'00000040',cmove) = 0) then X writeln(file1,' Survives in land and water.',error := continue); Xif (uand(%X'00020000',cmove) <> 0) then X writeln(file1,' Can open doors.',error:=continue); Xif (uand(%X'00040000',cmove) <> 0) then X writeln(file1,' Can phase through walls.',error:=continue); Xwriteln(file1,' --Creature attacks =',error:=continue); Xattstr := damage; Xwhile (length(attstr) > 0) do X begin X xpos := index(attstr,'`7C'); X if (xpos > 0) then X begin X`09attx := substr(attstr,1,xpos-1); X`09attstr := substr(attstr,xpos+1,length(attstr)-xpos); X end X else X begin X`09attx := attstr; X`09attstr := ''; X end; X readv(attx,atype,adesc,damstr,error:=continue); X out_val := ''; X if (index(damstr,'-')) > 0 then X begin X`09insert_str(damstr,'-',' '); X`09readv(damstr,acount,damstr,error:=continue); X end X else X acount := 1; X for i5 := 1 to acount do begin X case adesc of X`091 : out_val := ' Hits for '; X`092 : out_val := ' Bites for '; X`093 : out_val := ' Claws for '; X`094 : out_val := ' Stings for '; X`095 : out_val := ' Touches for '; X`096 : out_val := ' Kicks for '; X`097 : out_val := ' Gazes for '; X`098 : out_val := ' Breathes for '; X`099 : out_val := ' Spits for '; X`0910: out_val := ' Wails for '; X`0911: out_val := ' Embraces for '; X`0912: out_val := ' Crawls on you for '; X`0913: out_val := ' Shoots spores for '; X`0914: out_val := ' Begs for money for '; X`0915: out_val := ' Slimes you for '; X`0916: out_val := ' Crushes you for '; X`0917: out_val := ' Tramples you for '; X`0918: out_val := ' Drools on you for '; X`0919: out_val := ' Insults you for '; X`0920: out_val := ' UW''s you for '; X`0921: out_val := '`09DMF''s you for '; X`0922: out_val := ' Cultivates you for '; X`0923: out_val := ' Charms you for '; X`0924: out_val := ' Kisses you for '; X`0925: out_val := ' Gores you for '; X`0926: out_val := ' Moo''s you for '; X`0927: out_val := ' Electrocutes you for '; X`0928: out_val := ' Inks you for '; X`0929: out_val := ' Bleeds you for '; X`0930: out_val := ' Bites you for '; X`0999: out_val := ' Is repelled...'; X`09otherwise out_val := ' **Unknown value** '; X end; X case atype of X`7BNormal attack `7D 1 : out_val := out_val + 'normal damage.'; X`7BPoison Strength`7D 2 : out_val := out_val + 'lowering strength.'; X`7BConfusion attack`7D 3 : out_val := out_val + 'confusion.'; X`7BFear attack `7D 4 : out_val := out_val + 'fear.'; X`7BFire attack `7D 5 : out_val := out_val + 'fire damage.'; X`7BAcid attack `7D 6 : out_val := out_val + 'acid damage.'; X`7BCold attack `7D 7 : out_val := out_val + 'cold damage.'; X`7BLightning attack`7D 8 : out_val := out_val + 'lightning damage.'; X`7BCorrosion attack`7D 9 : out_val := out_val + 'corrosion damage.'; X`7BBlindness attack`7D 10 : out_val := out_val + 'blindness.'; X`7BParalysis attack`7D 11 : out_val := out_val + 'paralyzation.'; X`7BSteal Money `7D 12 : out_val := out_val + 'stealing money.'; X`7BSteal Object `7D 13 : out_val := out_val + 'stealing object.'; X`7BPoison `7D 14 : out_val := out_val + 'poison damage.'; X`7BLose Dex `7D 15 : out_val := out_val + 'lose dexterity.'; X`7BLose Con `7D 16 : out_val := out_val + 'lose constitution.'; X`7BLose Int `7D 17 : out_val := out_val + 'lose intelligence.'; X`7BLose Wis `7D 18 : out_val := out_val + 'lose wisdom.'; X`7BLose Exp `7D 19 : out_val := out_val + 'lose experience.'; X`7BAggravation `7D 20 : out_val := out_val + 'aggravates monsters.'; X`7BDisenchant `7D 21 : out_val := out_val + 'disenchants objects.'; X`7BEats food `7D 22 : out_val := out_val + 'eating food.'; X`7BEats light `7D 23 : out_val := out_val + 'eating light source.'; X`7BEats charges `7D 24 : out_val := out_val + 'absorbing charges.'; X`7BLose Chr`09`7D 25 : out_val := out_val + 'lose charisma.'; X`7BPetrification`09`7D 26 : out_val := out_val + 'petrification.'; X`7B Special `7D 99 : out_val := out_val + 'blank message.'; X`09`09 otherwise out_val := out_val + '**Unknown value**'; X end; X out_val := out_val + ' (' + damstr + ')'; X writeln(file1,out_val,error:=continue); X end; X end; X write(file1,' --Magic Resistance : '); X if (c_list`5Bi1`5D.mr=0) X then writeln(file1,'None') X else if (c_list`5Bi1`5D.mr < 20) X`09 then writeln(file1,'Very Low') X else if (c_list`5Bi1`5D.mr < 50) X`09 then writeln(file1,'Low') X else if (c_list`5Bi1`5D.mr < 80) +-+-+-+-+-+-+-+- END OF PART 28 +-+-+-+-+-+-+-+-