-+-+-+-+-+-+-+-+ START OF PART 32 -+-+-+-+-+-+-+-+
X        open (file2,file_name:=boss_mas,
X                access_method:=keyed,organization:=indexed,history:=readonly
V,
X                sharing:=readwrite,error:=continue);
X        if (status(file2) <> 0) then
X          BEGIN
X            priv_switch(0);
X            open (file2,file_name:=boss_mas,
X                access_method:=keyed,organization:=indexed,history:=new,
X                sharing:=readwrite,error:=continue);
X            if (status(file2) = 0) then
X              BEGIN
X                writeln('Created ',BOSS_MAS);
X                close(file2,error:=continue);
X                exit_flag := true;
X              END
X            else
X              BEGIN
X                writeln('Error in creating ',BOSS_MAS);
X                exit;
X              END;
X          END
X        else
X          BEGIN
X            close(file2,error:=continue);
X            priv_switch(0);
X          END;
X`7B Check for TOPTWENTY.DAT `7D
X        priv_switch(1);
X        open (file1,file_name:=boss_top,
X                organization:=sequential,history:=readonly,
X                sharing:=readwrite,error:=continue);
X        if ((status(file1) <> 0) and (status(file1) <> 2)) then
X          BEGIN
X            priv_switch(0);
X            open (file1,file_name:=boss_top,
X                organization:=sequential,history:=new,
X                sharing:=readwrite,error:=continue);
X            if (status(file1) = 0) then
X              BEGIN
X                writeln('Created ',BOSS_TOP);
X                close(file1,error:=continue);
X                exit_flag := true;
X              END
X            else
X              BEGIN
X                writeln('Error in creating ',BOSS_TOP);
X                exit;
X              END;
X          END
X        else
X          BEGIN
X            close(file1,error:=continue);
X            priv_switch(0);
X          END;
X        if (exit_flag) then
X          BEGIN
X            writeln('Notice: System BOSS wizard should set the protection');
X            writeln('        on files just created. See INSTALL.DOC for');
X            writeln('        help on setting protection on the files.');
X            writeln('Notice: File HOURS.DAT may be edited to set operating')
V;
X            writeln('        hours for BOSS.');
X            writeln('Notice: File MESSAGE.DAT may be edited to contain news'
V);
X            writeln('        items, etc...');
X            exit;
X          END;
X      END;
X`20
X`20
X`7B Prints dungeon map to external file `7D
X`5Bpsect(misc2$code)`5D procedure print_map;
X    var
X        i1,i2,i3,i4,i5,i6,i7,i8 : integer;
X        dun_line: varying `5B133`5D of char;
X        filename1       : varying `5B80`5D of char;
X        tmp     : char;
X        file1   : text;
X    BEGIN
X      prt('File name: ',1,1);
X      if (get_string(filename1,1,12,64)) then
X        BEGIN
X          if (length(filename1) = 0) then filename1 := 'BOSSMAP.DAT';
X          open(file1,filename1,error:=continue);
X          if (status(file1) = 0) then
X            BEGIN
X              prt('Writing Boss Dungeon Map...',1,1);
X              put_qio;
X              rewrite(file1,error:=continue);
X              i1 := 1;
X              i7 := 0;
X              repeat
X                i2 := 1;
X                i3 := i1 + outpage_height - 1;
X                if (i3 > cur_height) then
X                  i3 := cur_height;
X                i7 := i7 + 1;
X                i8 := 0;
X                repeat
X                  i4 := i2 + outpage_width - 1;
X                  if (i4 > cur_width) then
X                    i4 := cur_width;
X                  i8 := i8 + 1;
X                  writeln(file1,chr(12),error:=continue);
X                  write(file1,'Section`5B',i7:1,',',i8:1,'`5D;     ',
X                                                        error:=continue);
X                  writeln(file1,'Depth : ',(dun_level*50):1,' (meters)',
X                                                        error:=continue);
X                  writeln(file1,' ',error:=continue);
X                  write(file1,'   ',error:=continue);
X                  for i5 := i2 to i4 do
X                    BEGIN
X                      i6 := trunc(i5/100);
X                      write(file1,i6:1,error:=continue);
X                    END;
X                  writeln(file1,error:=continue);
X                  write(file1,'   ',error:=continue);
X                  for i5 := i2 to i4 do
X                    BEGIN
X                      i6 := trunc(i5/10) - trunc(i5/100)*10;
X                      write(file1,i6:1,error:=continue);
X                    END;
X                  writeln(file1,error:=continue);
X                  write(file1,'   ',error:=continue);
X                  for i5 := i2 to i4 do
X                    BEGIN
X                      i6 := i5 - trunc(i5/10)*10;
X                      write(file1,i6:1,error:=continue);
X                    END;
X                  writeln(file1,error:=continue);
X                  for i5 := i1 to i3 do
X                    BEGIN
X                      writev(dun_line,i5:3);
X                      for i6 := i2 to i4 do
X                        BEGIN
X                          if (test_light(i5,i6)) then
X                            loc_symbol(i5,i6,tmp)
X                          else
X                            tmp := ' ';
X                          dun_line := dun_line + tmp;
X                        END;
X                      writeln(file1,dun_line,error:=continue);
X                    END;
X                  i2 := i2 + outpage_width;
X                until (i2 >= cur_width);
X                i1 := i1 + outpage_height;
X              until (i1 >= cur_height);
X              close(file1,error:=continue);
X              prt('Completed.',1,1);
X            END;
X        END
X    END;
X`20
X`20
X`7B Prints a list of random objects to a file.  Note that the object file
X  is a sampling of objects which be expected to appear on that level. `7D
X`5Bpsect(misc2$code)`5D procedure print_objects;
X    var
X        nobj,i1,i2,level : integer;
X        filename1,tmp_str : varying `5B80`5D of char;
X        file1   : text;
X    BEGIN
X      prt('Produce objects on what level?: ',1,1);
X      get_string(tmp_str,1,33,10);
X      level := 0;
X      readv(tmp_str,level,error:=continue);
X      prt('Produce how many objects?: ',1,1);
X      get_string(tmp_str,1,28,10);
X      nobj := 0;
X      readv(tmp_str,nobj,error:=continue);
X      if ((nobj > 0) and (level > -1) and (level < 1201)) then
X        BEGIN
X          if (nobj > 9999) then nobj := 9999;
X          prt('File name: ',1,1);
X          if (get_string(filename1,1,12,64)) then
X            BEGIN
X              if (length(filename1) = 0) then filename1 := 'BOSSOBJ.DAT';
X              open(file1,filename1,error:=continue);
X              if (status(file1) = 0) then
X                BEGIN
X                  writev(tmp_str,nobj:1);
X                  prt(tmp_str + ' random objects being produced...',1,1);
X                  put_qio;
X                  rewrite(file1,error:=continue);
X        writeln(file1,'*** Random Object Sampling:',error:=continue);
X        writeln(file1,'*** ',nobj:1,' objects',error:=continue);
X        writeln(file1,'*** For Level ',level:1,error:=continue);
X        writeln(file1,'',error:=continue);
X        writeln(file1,'',error:=continue);
X                  popt(i2);
X                  for i1 := 1 to nobj do
X                    BEGIN
X                      t_list`5Bi2`5D := object_list`5Bget_obj_num(level)`5D;
X                      magic_treasure(t_list`5Bi2`5D,level);
X                      temporary_slot := t_list`5Bi2`5D;
X                      with temporary_slot do
X                        BEGIN
X                          unquote(name);
X                          known1(name);
X                          known2(name);
X                        END;
X                      objdes(tmp_str,1,true,'t');
X                      writeln(file1,tmp_str,error:=continue);
X                    END;
X                  pusht(i2);
X                  close(file1,error:=continue);
X                  prt('Completed.',1,1);
X                END
X              else
X                prt('File could not be opened.',1,1);
X            END;
X        END;
X    END;
X`20
X`20
X`7B Prints a listing of monsters `7D
X`5Bpsect(wizard$code)`5D procedure print_monsters;
X    var
X        i1,i2,xpos,atype,adesc  : integer;
X        file1   : text;
X        out_val,new_val,filename1       : vtype;
X        attstr,attx     : vtype;
X        damstr  : dtype;
X`20
X    BEGIN
X      prt('File name: ',1,1);
X      if (get_string(filename1,1,12,64)) then
X        BEGIN
X          if (length(filename1) = 0) then filename1 := 'BOSSMON.DAT';
X          open(file1,filename1,error:=continue);
X          if (status(file1) = 0) then
X            BEGIN
X              prt('Writing Monster Dictionary...',1,1);
X              put_qio;
X              rewrite(file1,error:=continue);
X              for i1 := 1 to max_creatures do
X                with c_list`5Bi1`5D do
X                  BEGIN
X`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                                                        error:=continue);
Xwriteln(file1,'     AC    =',ac:2,   '  Eye-sight =',aaf:2,'  HD  =',hd:5,
X                                                        error:=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'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'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'0400',cdefense) <> 0) then
X  writeln(file1,'     Creature harmed by Kill Robot.',error:=continue);
Xif (uand(%X'0800',cdefense) <> 0) then
X  writeln(file1,'     Negative Experience if Killed.',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'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`7B Creature casts spells / Breathes Dragon breath.`7D
Xif (spells > 0) then
X  BEGIN
X    writeln(file1,'   --Spells/Dragon Breath =',error:=continue);
X    writeln(file1,'       Casts spells 1 out of ',uand(%X'F',spells):1,
X                ' 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,'       **Unknown spell value**',error:=continue);
+-+-+-+-+-+-+-+-  END  OF PART 32 +-+-+-+-+-+-+-+-
