Changeset 887

Show
Ignore:
Timestamp:
05/11/08 20:38:58 (5 months ago)
Author:
takkaria
Message:

Move the tval/sval declarations to a separate file.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/Makefile.inc

    r853 r887  
    1616attack.o: attack.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    1717  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
    18   defines.h option.h types.h ui.h z-type.h object.h externs.h 
     18  defines.h option.h types.h ui.h z-type.h object.h externs.h tvalsval.h 
    1919birth.o: birth.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 
    2020  z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 
    21   option.h types.h ui.h z-type.h object.h externs.h cmds.h game-event.h \ 
    22   game-cmd.h ui-menu.h 
     21  option.h types.h ui.h z-type.h object.h externs.h tvalsval.h cmds.h \ 
     22  game-event.h game-cmd.h ui-menu.h 
    2323button.o: button.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    2424  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
     
    2626cave.o: cave.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 
    2727  z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 
    28   option.h types.h ui.h z-type.h object.h externs.h game-event.h 
     28  option.h types.h ui.h z-type.h object.h externs.h tvalsval.h \ 
     29  game-event.h 
    2930compress.o: compress.c compress.h h-basic.h 
    3031cmd0.o: cmd0.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 
     
    3435cmd1.o: cmd1.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 
    3536  z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 
    36   option.h types.h ui.h z-type.h object.h externs.h cmds.h 
     37  option.h types.h ui.h z-type.h object.h externs.h tvalsval.h cmds.h 
    3738cmd2.o: cmd2.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 
    3839  z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 
    39   option.h types.h ui.h z-type.h object.h externs.h 
     40  option.h types.h ui.h z-type.h object.h externs.h tvalsval.h 
    4041cmd3.o: cmd3.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 
    4142  z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 
    42   option.h types.h ui.h z-type.h object.h externs.h 
     43  option.h types.h ui.h z-type.h object.h externs.h tvalsval.h 
    4344cmd4.o: cmd4.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 
    4445  z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 
    45   option.h types.h ui.h z-type.h object.h externs.h ui-menu.h 
     46  option.h types.h ui.h z-type.h object.h externs.h tvalsval.h ui-menu.h 
    4647cmd5.o: cmd5.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 
    4748  z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 
    48   option.h types.h ui.h z-type.h object.h externs.h 
     49  option.h types.h ui.h z-type.h object.h externs.h tvalsval.h 
    4950cmd6.o: cmd6.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 
    5051  z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 
    51   option.h types.h ui.h z-type.h object.h externs.h cmds.h effects.h \ 
    52   list-effects.h 
     52  option.h types.h ui.h z-type.h object.h externs.h tvalsval.h cmds.h \ 
     53  effects.h list-effects.h 
    5354cmd-obj.o: cmd-obj.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    5455  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
    55   defines.h option.h types.h ui.h z-type.h object.h externs.h cmds.h 
     56  defines.h option.h types.h ui.h z-type.h object.h externs.h tvalsval.h \ 
     57  cmds.h 
    5658death.o: death.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 
    5759  z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 
     
    6264dungeon.o: dungeon.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    6365  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
    64   defines.h option.h types.h ui.h z-type.h object.h externs.h cmds.h \ 
    65   game-event.h 
     66  defines.h option.h types.h ui.h z-type.h object.h externs.h tvalsval.h \ 
     67  cmds.h game-event.h 
    6668effects.o: effects.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    6769  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
     
    7072files.o: files.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 
    7173  z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 
    72   option.h types.h ui.h z-type.h object.h externs.h ui-menu.h cmds.h 
     74  option.h types.h ui.h z-type.h object.h externs.h tvalsval.h ui-menu.h \ 
     75  cmds.h 
    7376game-cmd.o: game-cmd.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    7477  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
     
    8386init1.o: init1.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 
    8487  z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 
    85   option.h types.h ui.h z-type.h object.h externs.h effects.h \ 
     88  option.h types.h ui.h z-type.h object.h externs.h tvalsval.h effects.h \ 
    8689  list-effects.h init.h 
    8790init2.o: init2.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 
     
    9194load.o: load.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 
    9295  z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 
    93   option.h types.h ui.h z-type.h object.h externs.h 
     96  option.h types.h ui.h z-type.h object.h externs.h tvalsval.h 
    9497loadsave.o: loadsave.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    9598  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
     
    98101melee1.o: melee1.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    99102  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
    100   defines.h option.h types.h ui.h z-type.h object.h externs.h 
     103  defines.h option.h types.h ui.h z-type.h object.h externs.h tvalsval.h 
    101104melee2.o: melee2.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    102105  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
    103   defines.h option.h types.h ui.h z-type.h object.h externs.h bitflag.h 
     106  defines.h option.h types.h ui.h z-type.h object.h externs.h bitflag.h \ 
     107  tvalsval.h 
    104108monster1.o: monster1.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    105109  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
     
    110114obj-desc.o: obj-desc.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    111115  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
    112   defines.h option.h types.h ui.h z-type.h object.h externs.h 
     116  defines.h option.h types.h ui.h z-type.h object.h externs.h tvalsval.h 
    113117obj-info.o: obj-info.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    114118  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
    115119  defines.h option.h types.h ui.h z-type.h object.h externs.h effects.h \ 
    116   list-effects.h cmds.h 
     120  list-effects.h cmds.h tvalsval.h 
    117121obj-make.o: obj-make.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    118122  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
    119   defines.h option.h types.h ui.h z-type.h object.h externs.h 
     123  defines.h option.h types.h ui.h z-type.h object.h externs.h tvalsval.h 
    120124obj-ui.o: obj-ui.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    121125  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
    122   defines.h option.h types.h ui.h z-type.h object.h externs.h 
     126  defines.h option.h types.h ui.h z-type.h object.h externs.h tvalsval.h 
    123127obj-util.o: obj-util.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    124128  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
    125   defines.h option.h types.h ui.h z-type.h object.h externs.h randname.h 
     129  defines.h option.h types.h ui.h z-type.h object.h externs.h randname.h \ 
     130  tvalsval.h 
    126131option.o: option.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    127132  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
     
    129134randart.o: randart.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    130135  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
    131   defines.h option.h types.h ui.h z-type.h object.h externs.h init.h \ 
    132   randname.h 
     136  defines.h option.h types.h ui.h z-type.h object.h externs.h tvalsval.h \ 
     137  init.h randname.h 
    133138randname.o: randname.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    134139  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
     
    148153spells1.o: spells1.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    149154  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
    150   defines.h option.h types.h ui.h z-type.h object.h externs.h 
     155  defines.h option.h types.h ui.h z-type.h object.h externs.h tvalsval.h 
    151156spells2.o: spells2.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    152157  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
    153   defines.h option.h types.h ui.h z-type.h object.h externs.h 
     158  defines.h option.h types.h ui.h z-type.h object.h externs.h tvalsval.h 
    154159squelch.o: squelch.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    155160  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
    156161  defines.h option.h types.h ui.h z-type.h object.h externs.h cmds.h \ 
    157   ui-menu.h 
     162  ui-menu.h tvalsval.h 
    158163store.o: store.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 
    159164  z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 
    160165  option.h types.h ui.h z-type.h object.h externs.h cmds.h ui-menu.h \ 
    161   game-event.h 
     166  game-event.h tvalsval.h 
    162167tables.o: tables.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    163168  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
    164   defines.h option.h types.h ui.h z-type.h object.h externs.h 
     169  defines.h option.h types.h ui.h z-type.h object.h externs.h tvalsval.h 
    165170target.o: target.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    166171  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
     
    190195wiz-spoil.o: wiz-spoil.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    191196  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
    192   defines.h option.h types.h ui.h z-type.h object.h externs.h cmds.h 
     197  defines.h option.h types.h ui.h z-type.h object.h externs.h cmds.h \ 
     198  tvalsval.h 
    193199wiz-stats.o: wiz-stats.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    194200  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
     
    197203  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
    198204  defines.h option.h types.h ui.h z-type.h object.h externs.h wizard.h \ 
    199   cmds.h 
     205  cmds.h tvalsval.h 
    200206x-spell.o: x-spell.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 
    201207  z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 
    202   defines.h option.h types.h ui.h z-type.h object.h externs.h 
     208  defines.h option.h types.h ui.h z-type.h object.h externs.h tvalsval.h 
    203209xtra1.o: xtra1.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 
    204210  z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 
    205   option.h types.h ui.h z-type.h object.h externs.h game-event.h 
     211  option.h types.h ui.h z-type.h object.h externs.h game-event.h \ 
     212  tvalsval.h 
    206213xtra2.o: xtra2.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 
    207214  z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 
    208   option.h types.h ui.h z-type.h object.h externs.h cmds.h 
     215  option.h types.h ui.h z-type.h object.h externs.h cmds.h tvalsval.h 
    209216xtra3.o: xtra3.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 
    210217  z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 
    211218  option.h types.h ui.h z-type.h object.h externs.h game-event.h \ 
    212   ui-birth.h 
     219  ui-birth.h tvalsval.h 
    213220z-file.o: z-file.c z-file.h h-basic.h z-virt.h z-util.h z-form.h 
    214221z-form.o: z-form.c z-form.h h-basic.h z-type.h z-util.h z-virt.h 
  • trunk/src/attack.c

    r883 r887  
    1717 */ 
    1818#include "angband.h" 
    19  
     19#include "tvalsval.h" 
    2020 
    2121 
  • trunk/src/birth.c

    r885 r887  
    1717 */ 
    1818#include "angband.h" 
     19#include "tvalsval.h" 
    1920#include "cmds.h" 
    2021#include "game-event.h" 
  • trunk/src/cave.c

    r823 r887  
    1717 */ 
    1818#include "angband.h" 
     19#include "tvalsval.h" 
    1920#include "game-event.h" 
    2021 
  • trunk/src/cmd-obj.c

    r765 r887  
    1818 */ 
    1919#include "angband.h" 
     20#include "tvalsval.h" 
    2021#include "cmds.h" 
    2122 
  • trunk/src/cmd1.c

    r810 r887  
    1818 */ 
    1919#include "angband.h" 
     20#include "tvalsval.h" 
    2021#include "cmds.h" 
    2122 
  • trunk/src/cmd2.c

    r879 r887  
    1717 */ 
    1818#include "angband.h" 
    19  
     19#include "tvalsval.h" 
    2020 
    2121/* 
  • trunk/src/cmd3.c

    r823 r887  
    1717 */ 
    1818#include "angband.h" 
    19  
    20  
    21  
    22  
     19#include "tvalsval.h" 
    2320 
    2421 
  • trunk/src/cmd4.c

    r871 r887  
    1818 */ 
    1919#include "angband.h" 
     20#include "tvalsval.h" 
    2021#include "option.h" 
    2122#include "ui.h" 
  • trunk/src/cmd5.c

    r698 r887  
    1717 */ 
    1818#include "angband.h" 
     19#include "tvalsval.h" 
    1920 
    2021 
  • trunk/src/cmd6.c

    r796 r887  
    1818 */ 
    1919#include "angband.h" 
     20#include "tvalsval.h" 
    2021#include "cmds.h" 
    2122#include "effects.h" 
  • trunk/src/defines.h

    r849 r887  
    851851 
    852852 
    853 /*** Object "tval" and "sval" codes ***/ 
    854  
    855  
    856 /* 
    857  * The values for the "tval" field of various objects. 
    858  * 
    859  * This value is the primary means by which items are sorted in the 
    860  * player inventory, followed by "sval" and "cost". 
    861  * 
    862  * Note that a "BOW" with tval = 19 and sval S = 10*N+P takes a missile 
    863  * weapon with tval = 16+N, and does (xP) damage when so combined.  This 
    864  * fact is not actually used in the source, but it kind of interesting. 
    865  * 
    866  * Note that as of 2.7.8, the "item flags" apply to all items, though 
    867  * only armor and weapons and a few other items use any of these flags. 
    868  */ 
    869  
    870 #define TV_SKELETON      1      /* Skeletons ('s') */ 
    871 #define TV_BOTTLE                2      /* Empty bottles ('!') */ 
    872 #define TV_JUNK          3      /* Sticks, Pottery, etc ('~') */ 
    873 #define TV_SPIKE         5      /* Spikes ('~') */ 
    874 #define TV_CHEST         7      /* Chests ('~') */ 
    875 #define TV_SHOT                 16      /* Ammo for slings */ 
    876 #define TV_ARROW        17      /* Ammo for bows */ 
    877 #define TV_BOLT         18      /* Ammo for x-bows */ 
    878 #define TV_BOW          19      /* Slings/Bows/Xbows */ 
    879 #define TV_DIGGING      20      /* Shovels/Picks */ 
    880 #define TV_HAFTED       21      /* Priest Weapons */ 
    881 #define TV_POLEARM      22      /* Axes and Pikes */ 
    882 #define TV_SWORD        23      /* Edged Weapons */ 
    883 #define TV_BOOTS        30      /* Boots */ 
    884 #define TV_GLOVES       31      /* Gloves */ 
    885 #define TV_HELM         32      /* Helms */ 
    886 #define TV_CROWN        33      /* Crowns */ 
    887 #define TV_SHIELD       34      /* Shields */ 
    888 #define TV_CLOAK        35      /* Cloaks */ 
    889 #define TV_SOFT_ARMOR   36      /* Soft Armor */ 
    890 #define TV_HARD_ARMOR   37      /* Hard Armor */ 
    891 #define TV_DRAG_ARMOR   38      /* Dragon Scale Mail */ 
    892 #define TV_LITE         39      /* Lites (including Specials) */ 
    893 #define TV_AMULET       40      /* Amulets (including Specials) */ 
    894 #define TV_RING         45      /* Rings (including Specials) */ 
    895 #define TV_STAFF        55 
    896 #define TV_WAND         65 
    897 #define TV_ROD          66 
    898 #define TV_SCROLL       70 
    899 #define TV_POTION       75 
    900 #define TV_FLASK        77 
    901 #define TV_FOOD         80 
    902 #define TV_MAGIC_BOOK   90 
    903 #define TV_PRAYER_BOOK  91 
    904 #define TV_GOLD         100     /* Gold can only be picked up by players */ 
    905  
    906  
    907  
    908 /* The "sval" codes for TV_SHOT/TV_ARROW/TV_BOLT */ 
    909 #define SV_AMMO_LIGHT           0       /* pebbles */ 
    910 #define SV_AMMO_NORMAL          1       /* shots, arrows, bolts */ 
    911 #define SV_AMMO_HEAVY           2       /* seeker arrows and bolts */ 
    912 #define SV_AMMO_SILVER          3       /* silver arrows and bolts */ 
    913  
    914 /* The "sval" codes for TV_BOW (note information in "sval") */ 
    915 #define SV_SLING                        2       /* (x2) */ 
    916 #define SV_SHORT_BOW            12      /* (x2) */ 
    917 #define SV_LONG_BOW                     13      /* (x3) */ 
    918 #define SV_LIGHT_XBOW           23      /* (x3) */ 
    919 #define SV_HEAVY_XBOW           24      /* (x4) */ 
    920  
    921 /* The "sval" codes for TV_DIGGING */ 
    922 #define SV_SHOVEL                       1 
    923 #define SV_GNOMISH_SHOVEL       2 
    924 #define SV_DWARVEN_SHOVEL       3 
    925 #define SV_PICK                         4 
    926 #define SV_ORCISH_PICK          5 
    927 #define SV_DWARVEN_PICK         6 
    928 #define SV_MATTOCK                      7 
    929  
    930 /* The "sval" values for TV_HAFTED */ 
    931 #define SV_WHIP                                 2       /* 1d6 */ 
    932 #define SV_QUARTERSTAFF                 3       /* 1d9 */ 
    933 #define SV_MACE                                 5       /* 2d4 */ 
    934 #define SV_BALL_AND_CHAIN               6       /* 2d4 */ 
    935 #define SV_WAR_HAMMER                   8       /* 3d3 */ 
    936 #define SV_LUCERN_HAMMER                10      /* 2d5 */ 
    937 #define SV_MORNING_STAR                 12      /* 2d6 */ 
    938 #define SV_FLAIL                                13      /* 2d6 */ 
    939 #define SV_LEAD_FILLED_MACE             15      /* 3d4 */ 
    940 #define SV_TWO_HANDED_FLAIL             18      /* 3d6 */ 
    941 #define SV_MACE_OF_DISRUPTION   20      /* 5d8 */ 
    942 #define SV_GROND                                50      /* 3d4 */ 
    943  
    944 /* The "sval" values for TV_POLEARM */ 
    945 #define SV_SPEAR                                2       /* 1d6 */ 
    946 #define SV_AWL_PIKE                             4       /* 1d8 */ 
    947 #define SV_TRIDENT                              5       /* 1d9 */ 
    948 #define SV_PIKE                                 8       /* 2d5 */ 
    949 #define SV_BEAKED_AXE                   10      /* 2d6 */ 
    950 #define SV_BROAD_AXE                    11      /* 2d6 */ 
    951 #define SV_GLAIVE                               13      /* 2d6 */ 
    952 #define SV_HALBERD                              15      /* 3d4 */ 
    953 #define SV_SCYTHE                               17      /* 5d3 */ 
    954 #define SV_LANCE                                20      /* 2d8 */ 
    955 #define SV_BATTLE_AXE                   22      /* 2d8 */ 
    956 #define SV_GREAT_AXE                    25      /* 4d4 */ 
    957 #define SV_LOCHABER_AXE                 28      /* 3d8 */ 
    958 #define SV_SCYTHE_OF_SLICING    30      /* 8d4 */ 
    959  
    960 /* The "sval" codes for TV_SWORD */ 
    961 #define SV_BROKEN_DAGGER                1       /* 1d1 */ 
    962 #define SV_BROKEN_SWORD                 2       /* 1d2 */ 
    963 #define SV_DAGGER                               4       /* 1d4 */ 
    964 #define SV_MAIN_GAUCHE                  5       /* 1d5 */ 
    965 #define SV_RAPIER                               7       /* 1d6 */ 
    966 #define SV_SMALL_SWORD                  8       /* 1d6 */ 
    967 #define SV_SHORT_SWORD                  10      /* 1d7 */ 
    968 #define SV_SABRE                                11      /* 1d7 */ 
    969 #define SV_CUTLASS                              12      /* 1d7 */ 
    970 #define SV_TULWAR                               15      /* 2d4 */ 
    971 #define SV_BROAD_SWORD                  16      /* 2d5 */ 
    972 #define SV_LONG_SWORD                   17      /* 2d5 */ 
    973 #define SV_SCIMITAR                             18      /* 2d5 */ 
    974 #define SV_KATANA                               20      /* 3d4 */ 
    975 #define SV_BASTARD_SWORD                21      /* 3d4 */ 
    976 #define SV_TWO_HANDED_SWORD             25      /* 3d6 */ 
    977 #define SV_EXECUTIONERS_SWORD   28      /* 4d5 */ 
    978 #define SV_BLADE_OF_CHAOS               30      /* 6d5 */ 
    979  
    980 /* The "sval" codes for TV_SHIELD */ 
    981 #define SV_SMALL_LEATHER_SHIELD         2 
    982 #define SV_SMALL_METAL_SHIELD           3 
    983 #define SV_LARGE_LEATHER_SHIELD         4 
    984 #define SV_LARGE_METAL_SHIELD           5 
    985 #define SV_SHIELD_OF_DEFLECTION         10 
    986  
    987 /* The "sval" codes for TV_HELM */ 
    988 #define SV_HARD_LEATHER_CAP             2 
    989 #define SV_METAL_CAP                    3 
    990 #define SV_IRON_HELM                    5 
    991 #define SV_STEEL_HELM                   6 
    992 #define SV_IRON_CROWN                   10 
    993 #define SV_GOLDEN_CROWN                 11 
    994 #define SV_JEWELED_CROWN                12 
    995 #define SV_MORGOTH                              50 
    996  
    997 /* The "sval" codes for TV_BOOTS */ 
    998 #define SV_PAIR_OF_SOFT_LEATHER_BOOTS   2 
    999 #define SV_PAIR_OF_HARD_LEATHER_BOOTS   3 
    1000 #define SV_PAIR_OF_METAL_SHOD_BOOTS             6 
    1001  
    1002 /* The "sval" codes for TV_CLOAK */ 
    1003 #define SV_CLOAK                                        1 
    1004 #define SV_SHADOW_CLOAK                         6 
    1005  
    1006 /* The "sval" codes for TV_GLOVES */ 
    1007 #define SV_SET_OF_LEATHER_GLOVES        1 
    1008 #define SV_SET_OF_GAUNTLETS                     2 
    1009 #define SV_SET_OF_CESTI                         5 
    1010  
    1011 /* The "sval" codes for TV_SOFT_ARMOR */ 
    1012 #define SV_FILTHY_RAG                           1 
    1013 #define SV_ROBE                                         2 
    1014 #define SV_SOFT_LEATHER_ARMOR           4 
    1015 #define SV_SOFT_STUDDED_LEATHER         5 
    1016 #define SV_HARD_LEATHER_ARMOR           6 
    1017 #define SV_HARD_STUDDED_LEATHER         7 
    1018 #define SV_LEATHER_SCALE_MAIL           11 
    1019  
    1020 /* The "sval" codes for TV_HARD_ARMOR */ 
    1021 #define SV_RUSTY_CHAIN_MAIL                     1       /* 14- */ 
    1022 #define SV_METAL_SCALE_MAIL                     3       /* 13 */ 
    1023 #define SV_CHAIN_MAIL                           4       /* 14 */ 
    1024 #define SV_AUGMENTED_CHAIN_MAIL         6       /* 16 */ 
    1025 #define SV_DOUBLE_CHAIN_MAIL            7       /* 16 */ 
    1026 #define SV_BAR_CHAIN_MAIL                       8       /* 18 */ 
    1027 #define SV_METAL_BRIGANDINE_ARMOUR      9       /* 19 */ 
    1028 #define SV_PARTIAL_PLATE_ARMOUR         12      /* 22 */ 
    1029 #define SV_METAL_LAMELLAR_ARMOUR        13      /* 23 */ 
    1030 #define SV_FULL_PLATE_ARMOUR            15      /* 25 */ 
    1031 #define SV_RIBBED_PLATE_ARMOUR          18      /* 28 */ 
    1032 #define SV_MITHRIL_CHAIN_MAIL           20      /* 28+ */ 
    1033 #define SV_MITHRIL_PLATE_MAIL           25      /* 35+ */ 
    1034 #define SV_ADAMANTITE_PLATE_MAIL        30      /* 40+ */ 
    1035  
    1036 /* The "sval" codes for TV_DRAG_ARMOR */ 
    1037 #define SV_DRAGON_BLACK                 1 
    1038 #define SV_DRAGON_BLUE                  2 
    1039 #define SV_DRAGON_WHITE                 3 
    1040 #define SV_DRAGON_RED                   4 
    1041 #define SV_DRAGON_GREEN                 5 
    1042 #define SV_DRAGON_MULTIHUED             6 
    1043 #define SV_DRAGON_SHINING               10 
    1044 #define SV_DRAGON_LAW                   12 
    1045 #define SV_DRAGON_BRONZE                14 
    1046 #define SV_DRAGON_GOLD                  16 
    1047 #define SV_DRAGON_CHAOS                 18 
    1048 #define SV_DRAGON_BALANCE               20 
    1049 #define SV_DRAGON_POWER                 30 
    1050  
    1051 /* The sval codes for TV_LITE */ 
    1052 #define SV_LITE_TORCH           0 
    1053 #define SV_LITE_LANTERN         1 
    1054 #define SV_LITE_GALADRIEL       4 
    1055 #define SV_LITE_ELENDIL         5 
    1056 #define SV_LITE_THRAIN          6 
    1057 #define SV_LITE_PALANTIR        7 
    1058  
    1059 /* The "sval" codes for TV_AMULET */ 
    1060 #define SV_AMULET_DOOM                  0 
    1061 #define SV_AMULET_TELEPORT              1 
    1062 #define SV_AMULET_ADORNMENT             2 
    1063 #define SV_AMULET_SLOW_DIGEST   3 
    1064 #define SV_AMULET_RESIST_ACID   4 
    1065 #define SV_AMULET_SEARCHING             5 
    1066 #define SV_AMULET_WISDOM                6 
    1067 #define SV_AMULET_CHARISMA              7 
    1068 #define SV_AMULET_THE_MAGI              8 
    1069 #define SV_AMULET_SUSTENANCE    9 
    1070 #define SV_AMULET_CARLAMMAS             10 
    1071 #define SV_AMULET_INGWE                 11 
    1072 #define SV_AMULET_DWARVES               12 
    1073 #define SV_AMULET_ESP                   13 
    1074 #define SV_AMULET_RESIST                14 
    1075 #define SV_AMULET_REGEN                 15 
    1076 #define SV_AMULET_ELESSAR               16 
    1077 #define SV_AMULET_EVENSTAR              17 
    1078 #define SV_AMULET_DEVOTION              18 
    1079 #define SV_AMULET_WEAPONMASTERY 19 
    1080 #define SV_AMULET_TRICKERY              20 
    1081 #define SV_AMULET_INFRAVISION           21 
    1082 #define SV_AMULET_RESIST_LIGHTNING  22 
    1083  
    1084  
    1085 /* The sval codes for TV_RING */ 
    1086 #define SV_RING_WOE                             0 
    1087 #define SV_RING_AGGRAVATION             1 
    1088 #define SV_RING_WEAKNESS                2 
    1089 #define SV_RING_STUPIDITY               3 
    1090 #define SV_RING_TELEPORTATION   4 
    1091 /* xxx */ 
    1092 #define SV_RING_SLOW_DIGESTION  6 
    1093 #define SV_RING_FEATHER_FALL    7 
    1094 #define SV_RING_RESIST_FIRE             8 
    1095 #define SV_RING_RESIST_COLD             9 
    1096 #define SV_RING_SUSTAIN_STR             10 
    1097 #define SV_RING_SUSTAIN_INT             11 
    1098 #define SV_RING_SUSTAIN_WIS             12 
    1099 #define SV_RING_SUSTAIN_DEX             13 
    1100 #define SV_RING_SUSTAIN_CON             14 
    1101 #define SV_RING_SUSTAIN_CHR             15 
    1102 #define SV_RING_PROTECTION              16 
    1103 #define SV_RING_ACID                    17 
    1104 #define SV_RING_FLAMES                  18 
    1105 #define SV_RING_ICE                             19 
    1106 #define SV_RING_RESIST_POIS             20 
    1107 #define SV_RING_FREE_ACTION             21 
    1108 #define SV_RING_SEE_INVIS               22 
    1109 #define SV_RING_SEARCHING               23 
    1110 #define SV_RING_STR                             24 
    1111 #define SV_RING_INT                             25 
    1112 #define SV_RING_DEX                             26 
    1113 #define SV_RING_CON                             27 
    1114 #define SV_RING_ACCURACY                28 
    1115 #define SV_RING_DAMAGE                  29 
    1116 #define SV_RING_SLAYING                 30 
    1117 #define SV_RING_SPEED                   31 
    1118 #define SV_RING_BARAHIR                 32 
    1119 #define SV_RING_TULKAS                  33 
    1120 #define SV_RING_NARYA                   34 
    1121 #define SV_RING_NENYA                   35 
    1122 #define SV_RING_VILYA                   36 
    1123 #define SV_RING_POWER                   37 
    1124 #define SV_RING_LIGHTNING               38 
    1125  
    1126  
    1127 /* The "sval" codes for TV_STAFF */ 
    1128 #define SV_STAFF_DARKNESS               0 
    1129 #define SV_STAFF_SLOWNESS               1 
    1130 #define SV_STAFF_HASTE_MONSTERS 2 
    1131 #define SV_STAFF_SUMMONING              3 
    1132 #define SV_STAFF_TELEPORTATION  4 
    1133 #define SV_STAFF_IDENTIFY               5 
    1134 #define SV_STAFF_REMOVE_CURSE   6 
    1135 #define SV_STAFF_STARLITE               7 
    1136 #define SV_STAFF_LITE                   8 
    1137 #define SV_STAFF_MAPPING                9 
    1138 #define SV_STAFF_DETECT_GOLD    10 
    1139 #define SV_STAFF_DETECT_ITEM    11 
    1140 #define SV_STAFF_DETECT_TRAP    12 
    1141 #define SV_STAFF_DETECT_DOOR    13 
    1142 #define SV_STAFF_DETECT_INVIS   14 
    1143 #define SV_STAFF_DETECT_EVIL    15 
    1144 #define SV_STAFF_CURE_LIGHT             16 
    1145 #define SV_STAFF_CURING                 17 
    1146 #define SV_STAFF_HEALING                18 
    1147 #define SV_STAFF_THE_MAGI               19 
    1148 #define SV_STAFF_SLEEP_MONSTERS 20 
    1149 #define SV_STAFF_SLOW_MONSTERS  21 
    1150 #define SV_STAFF_SPEED                  22 
    1151 #define SV_STAFF_PROBING                23 
    1152 #define SV_STAFF_DISPEL_EVIL    24 
    1153 #define SV_STAFF_POWER                  25 
    1154 #define SV_STAFF_HOLINESS               26 
    1155 #define SV_STAFF_BANISHMENT             27 
    1156 #define SV_STAFF_EARTHQUAKES    28 
    1157 #define SV_STAFF_DESTRUCTION    29 
    1158  
    1159  
    1160 /* The "sval" codes for TV_WAND */ 
    1161 #define SV_WAND_HEAL_MONSTER    0 
    1162 #define SV_WAND_HASTE_MONSTER   1 
    1163 #define SV_WAND_CLONE_MONSTER   2 
    1164 #define SV_WAND_TELEPORT_AWAY   3 
    1165 #define SV_WAND_DISARMING               4 
    1166 #define SV_WAND_TRAP_DOOR_DEST  5 
    1167 #define SV_WAND_STONE_TO_MUD    6 
    1168 #define SV_WAND_LITE                    7 
    1169 #define SV_WAND_SLEEP_MONSTER   8 
    1170 #define SV_WAND_SLOW_MONSTER    9 
    1171 #define SV_WAND_CONFUSE_MONSTER 10 
    1172 #define SV_WAND_FEAR_MONSTER    11 
    1173 #define SV_WAND_DRAIN_LIFE              12 
    1174 #define SV_WAND_POLYMORPH               13 
    1175 #define SV_WAND_STINKING_CLOUD  14 
    1176 #define SV_WAND_MAGIC_MISSILE   15 
    1177 #define SV_WAND_ACID_BOLT               16 
    1178 #define SV_WAND_ELEC_BOLT               17 
    1179 #define SV_WAND_FIRE_BOLT               18 
    1180 #define SV_WAND_COLD_BOLT               19 
    1181 #define SV_WAND_ACID_BALL               20 
    1182 #define SV_WAND_ELEC_BALL               21 
    1183 #define SV_WAND_FIRE_BALL               22 
    1184 #define SV_WAND_COLD_BALL               23 
    1185 #define SV_WAND_WONDER                  24 
    1186 #define SV_WAND_ANNIHILATION    25 
    1187 #define SV_WAND_DRAGON_FIRE             26 
    1188 #define SV_WAND_DRAGON_COLD             27 
    1189 #define SV_WAND_DRAGON_BREATH   28 
    1190  
    1191 /* The "sval" codes for TV_ROD */ 
    1192 #define SV_ROD_DETECT_TRAP              0 
    1193 #define SV_ROD_DETECT_DOOR              1 
    1194 #define SV_ROD_IDENTIFY                 2 
    1195 #define SV_ROD_RECALL                   3 
    1196 #define SV_ROD_ILLUMINATION             4 
    1197 #define SV_ROD_MAPPING                  5 
    1198 #define SV_ROD_DETECTION                6 
    1199 #define SV_ROD_PROBING                  7 
    1200 #define SV_ROD_CURING                   8 
    1201 #define SV_ROD_HEALING                  9 
    1202 #define SV_ROD_RESTORATION              10 
    1203 #define SV_ROD_SPEED                    11 
    1204 /* xxx (aimed) */ 
    1205 #define SV_ROD_TELEPORT_AWAY    13 
    1206 #define SV_ROD_DISARMING                14 
    1207 #define SV_ROD_LITE                             15 
    1208 #define SV_ROD_SLEEP_MONSTER    16 
    1209 #define SV_ROD_SLOW_MONSTER             17 
    1210 #define SV_ROD_DRAIN_LIFE               18 
    1211 #define SV_ROD_POLYMORPH                19 
    1212 #define SV_ROD_ACID_BOLT                20 
    1213 #define SV_ROD_ELEC_BOLT                21 
    1214 #define SV_ROD_FIRE_BOLT                22 
    1215 #define SV_ROD_COLD_BOLT                23 
    1216 #define SV_ROD_ACID_BALL                24 
    1217 #define SV_ROD_ELEC_BALL                25 
    1218 #define SV_ROD_FIRE_BALL                26 
    1219 #define SV_ROD_COLD_BALL                27 
    1220  
    1221  
    1222 /* The "sval" codes for TV_SCROLL */ 
    1223  
    1224 #define SV_SCROLL_DARKNESS                              0 
    1225 #define SV_SCROLL_AGGRAVATE_MONSTER             1 
    1226 #define SV_SCROLL_CURSE_ARMOR                   2 
    1227 #define SV_SCROLL_CURSE_WEAPON                  3 
    1228 #define SV_SCROLL_SUMMON_MONSTER                4 
    1229 #define SV_SCROLL_SUMMON_UNDEAD                 5 
    1230 /* xxx (summon?) */ 
    1231 #define SV_SCROLL_TRAP_CREATION                 7 
    1232 #define SV_SCROLL_PHASE_DOOR                    8 
    1233 #define SV_SCROLL_TELEPORT                              9 
    1234 #define SV_SCROLL_TELEPORT_LEVEL                10 
    1235 #define SV_SCROLL_WORD_OF_RECALL                11 
    1236 #define SV_SCROLL_IDENTIFY                              12 
    1237 #define SV_SCROLL_STAR_IDENTIFY                 13 
    1238 #define SV_SCROLL_REMOVE_CURSE                  14 
    1239 #define SV_SCROLL_STAR_REMOVE_CURSE             15 
    1240 #define SV_SCROLL_ENCHANT_ARMOR                 16 
    1241 #define SV_SCROLL_ENCHANT_WEAPON_TO_HIT 17 
    1242 #define SV_SCROLL_ENCHANT_WEAPON_TO_DAM 18 
    1243 /* xxx enchant missile? */ 
    1244 #define SV_SCROLL_STAR_ENCHANT_ARMOR    20 
    1245 #define SV_SCROLL_STAR_ENCHANT_WEAPON   21 
    1246 #define SV_SCROLL_RECHARGING                    22 
    1247 /* xxx */ 
    1248 #define SV_SCROLL_LIGHT                                 24 
    1249 #define SV_SCROLL_MAPPING                               25 
    1250 #define SV_SCROLL_DETECT_GOLD                   26 
    1251 #define SV_SCROLL_DETECT_ITEM                   27 
    1252 #define SV_SCROLL_DETECT_TRAP                   28 
    1253 #define SV_SCROLL_DETECT_DOOR                   29 
    1254 #define SV_SCROLL_DETECT_INVIS                  30 
    1255 /* xxx (detect evil?) */ 
    1256 #define SV_SCROLL_SATISFY_HUNGER                32 
    1257 #define SV_SCROLL_BLESSING                              33 
    1258 #define SV_SCROLL_HOLY_CHANT                    34 
    1259 #define SV_SCROLL_HOLY_PRAYER                   35 
    1260 #define SV_SCROLL_MONSTER_CONFUSION             36 
    1261 #define SV_SCROLL_PROTECTION_FROM_EVIL  37 
    1262 #define SV_SCROLL_RUNE_OF_PROTECTION    38 
    1263 #define SV_SCROLL_TRAP_DOOR_DESTRUCTION 39 
    1264 /* xxx */ 
    1265 #define SV_SCROLL_STAR_DESTRUCTION              41 
    1266 #define SV_SCROLL_DISPEL_UNDEAD                 42 
    1267 /* xxx */ 
    1268 #define SV_SCROLL_BANISHMENT                    44 
    1269 #define SV_SCROLL_MASS_BANISHMENT               45 
    1270 #define SV_SCROLL_ACQUIREMENT                   46 
    1271 #define SV_SCROLL_STAR_ACQUIREMENT              47 
    1272  
    1273 /* The "sval" codes for TV_POTION */ 
    1274 #define SV_POTION_WATER                         0 
    1275 #define SV_POTION_APPLE_JUICE           1 
    1276 #define SV_POTION_SLIME_MOLD            2 
    1277 /* xxx (fixed color) */ 
    1278 #define SV_POTION_SLOWNESS                      4 
    1279 #define SV_POTION_SALT_WATER            5 
    1280 #define SV_POTION_POISON                        6 
    1281 #define SV_POTION_BLINDNESS                     7 
    1282 /* xxx */ 
    1283 #define SV_POTION_CONFUSION                     9 
    1284 /* xxx */ 
    1285 #define SV_POTION_SLEEP                         11 
    1286 /* xxx */ 
    1287 #define SV_POTION_LOSE_MEMORIES         13 
    1288 /* xxx */ 
    1289 #define SV_POTION_RUINATION                     15 
    1290 #define SV_POTION_DEC_STR                       16 
    1291 #define SV_POTION_DEC_INT                       17 
    1292 #define SV_POTION_DEC_WIS                       18 
    1293 #define SV_POTION_DEC_DEX                       19 
    1294 #define SV_POTION_DEC_CON                       20 
    1295 #define SV_POTION_DEC_CHR                       21 
    1296 #define SV_POTION_DETONATIONS           22 
    1297 #define SV_POTION_DEATH                         23 
    1298 #define SV_POTION_INFRAVISION           24 
    1299 #define SV_POTION_DETECT_INVIS          25 
    1300 #define SV_POTION_SLOW_POISON           26 
    1301 #define SV_POTION_CURE_POISON           27 
    1302 #define SV_POTION_BOLDNESS                      28 
    1303 #define SV_POTION_SPEED                         29 
    1304 #define SV_POTION_RESIST_HEAT           30 
    1305 #define SV_POTION_RESIST_COLD           31 
    1306 #define SV_POTION_HEROISM                       32 
    1307 #define SV_POTION_BERSERK_STRENGTH      33 
    1308 #define SV_POTION_CURE_LIGHT            34 
    1309 #define SV_POTION_CURE_SERIOUS          35 
    1310 #define SV_POTION_CURE_CRITICAL         36 
    1311 #define SV_POTION_HEALING                       37 
    1312 #define SV_POTION_STAR_HEALING          38 
    1313 #define SV_POTION_LIFE                          39 
    1314 #define SV_POTION_RESTORE_MANA          40 
    1315 #define SV_POTION_RESTORE_EXP           41 
    1316 #define SV_POTION_RES_STR                       42 
    1317 #define SV_POTION_RES_INT                       43 
    1318 #define SV_POTION_RES_WIS                       44 
    1319 #define SV_POTION_RES_DEX                       45 
    1320 #define SV_POTION_RES_CON                       46 
    1321 #define SV_POTION_RES_CHR                       47 
    1322 #define SV_POTION_INC_STR                       48 
    1323 #define SV_POTION_INC_INT                       49 
    1324 #define SV_POTION_INC_WIS                       50 
    1325 #define SV_POTION_INC_DEX                       51 
    1326 #define SV_POTION_INC_CON                       52 
    1327 #define SV_POTION_INC_CHR                       53 
    1328 /* xxx */ 
    1329 #define SV_POTION_AUGMENTATION                  55 
    1330 #define SV_POTION_ENLIGHTENMENT                 56 
    1331 #define SV_POTION_STAR_ENLIGHTENMENT    57 
    1332 #define SV_POTION_SELF_KNOWLEDGE                58 
    1333 #define SV_POTION_EXPERIENCE                    59 
    1334  
    1335 /* The "sval" codes for TV_FOOD */ 
    1336 #define SV_FOOD_POISON                  0 
    1337 #define SV_FOOD_BLINDNESS               1 
    1338 #define SV_FOOD_PARANOIA                2 
    1339 #define SV_FOOD_CONFUSION               3 
    1340 #define SV_FOOD_HALLUCINATION   4 
    1341 #define SV_FOOD_PARALYSIS               5 
    1342 #define SV_FOOD_WEAKNESS                6 
    1343 #define SV_FOOD_SICKNESS                7 
    1344 #define SV_FOOD_STUPIDITY               8 
    1345 #define SV_FOOD_NAIVETY                 9 
    1346 #define SV_FOOD_UNHEALTH                10 
    1347 #define SV_FOOD_DISEASE                 11 
    1348 #define SV_FOOD_CURE_POISON             12 
    1349 #define SV_FOOD_CURE_BLINDNESS  13 
    1350 #define SV_FOOD_CURE_PARANOIA   14 
    1351 #define SV_FOOD_CURE_CONFUSION  15 
    1352 #define SV_FOOD_CURE_SERIOUS    16 
    1353 #define SV_FOOD_RESTORE_STR             17 
    1354 #define SV_FOOD_RESTORE_CON             18 
    1355 #define SV_FOOD_RESTORING               19 
    1356 /* many missing mushrooms */ 
    1357 #define SV_FOOD_RATION