WEAPON_CLASS, prob, 0, \ wt, cost, sdam, ldam, hitbon, 0, wt, color ) #define PROJECTILE(name,app,kn,prob,wt,cost,sdam,ldam,hitbon,metal,prop,color) OBJECT( \ OBJ(name,app), BITS(kn,1,1,0,0,1,0,0,0,0,metal), 0, \ WEAPON_CLASS, prob, 0, \ wt, cost, sdam, ldam, hitbon, prop, wt, color ) #define BOW(name,app,kn,prob,wt,cost,sdam,ldam,hitbon,metal,prop,color) OBJECT( \ OBJ(name,app), BITS(kn,0,1,0,0,1,0,0,0,0,metal), 0, \ WEAPON_CLASS, prob, 0, \ wt, cost, sdam, ldam, hitbon, -(prop), wt, color ) /* Note: for weapons that don't do an even die of damage (ex. 2-7 or 3-18) * the extra damage is added on in weapon.c, not here! */ /* missiles */ PROJECTILE("arrow", NULL, 1, 42, 1, 2, 6, 6, 0, IRON, WP_BOW, HI_METAL), PROJECTILE("elven arrow", "runed arrow", 0, 10, 1, 2, 7, 6, 0, IRON, WP_BOW, HI_METAL), PROJECTILE("orcish arrow", "crude arrow", 0, 11, 1, 2, 5, 6, 0, IRON, WP_BOW, BLACK), PROJECTILE("silver arrow", NULL, 1, 8, 1, 2, 6, 6, 0, SILVER, WP_BOW, HI_SILVER), PROJECTILE("ya", "bamboo arrow", 0, 5, 1, 4, 7, 7, 1, METAL, WP_BOW, HI_METAL), PROJECTILE("crossbow bolt", NULL, 1, 50, 1, 2, 4, 6, 0, IRON, WP_CROSSBOW, HI_METAL), WEAPON("dart", NULL, 1, 1, 0, 60, 1, 2, 3, 2, 0, IRON, HI_METAL), WEAPON("shuriken", "throwing star",0, 1, 0, 35, 1, 5, 8, 6, 2, IRON, HI_METAL), WEAPON("boomerang", NULL, 1, 1, 0, 15, 5, 20, 9, 9, 0, WOOD, HI_WOOD),
#define OBJ(name,desc) name,desc #define BITS(nameknown,merge,usesknown,container,magic,charged,unique,nowish,big,tough,dir,subtype,material) \ nameknown,merge,usesknown,0,magic,charged,unique,nowish,big,tough,dir,material,subtype #define COLOR_FIELD(X) (X) #define HARDGEM(n) (n >= 8) objPrototype g_objectPrototype[] = { /* dummy object[0] -- description [2nd arg] *must* be NULL */ OBJECT(OBJ("strange object",(char *)0), BITS(1,0,0,0,0,0,0,0,0,0,0,P_NONE,0), 0, ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), /* missiles */ PROJECTILE("arrow", (char *)0, 1, 55, 1, 2, 6, 6, 0, IRON, -P_BOW, HI_METAL), PROJECTILE("elven arrow", "runed arrow", 0, 20, 1, 2, 7, 6, 0, WOOD, -P_BOW, HI_WOOD), PROJECTILE("orcish arrow", "crude arrow", 0, 20, 1, 2, 5, 6, 0, IRON, -P_BOW, CLR_BLACK), PROJECTILE("silver arrow", (char *)0, 1, 12, 1, 5, 6, 6, 0, SILVER, -P_BOW, HI_SILVER), PROJECTILE("ya", "bamboo arrow", 0, 15, 1, 4, 7, 7, 1, METAL, -P_BOW, HI_METAL), PROJECTILE("crossbow bolt", (char *)0, 1, 55, 1, 2, 4, 6, 0, IRON, -P_CROSSBOW, HI_METAL), WEAPON("dart", (char *)0, 1, 1, 0, 60, 1, 2, 3, 2, 0, P, -P_DART, IRON, HI_METAL), WEAPON("shuriken", "throwing star", 0, 1, 0, 35, 1, 5, 8, 6, 2, P, -P_SHURIKEN, IRON, HI_METAL),