I think you're dramatically over-pricing some things. Also, make objects have an extra field of what they're mainly made of. This is how it'd work (in a nutshell): struct metal_type { char * name; int add_cost; sh_int add_dice; sh_int add_sides; sh_int add_weight; }; const struct metal_type metal_table[MAX_METALS] = { { "Gold" , 500, 2, 4, 10 }, . . . }; #define MAX_METALS number-of-metals Then add in the four values where needed, and add the object metal type where-ever you see fit. Also, a possably quicker and more hard-coded (memory saving?) way to get prices: <dice> * <sides> * 100 + metal_table[obj->metal].add_cost And for every magical point added, add 500. Name: plain dagger (normal metal) [1d6] Cost: 600 + 0 Name: golden dagger (gold) [1d6] Cost: 600 + 500 = 1100 Name: magical golden dagger (gold) [1d6] [+2 HIT] [+2 DAM] Cost: 600 + 500 = 1100 + (500*4) = 1100 + 2000 = 3100 Another thought, more pseudo-pseudo-code, and something else worthy of CircleMUD. -trice "I just might be abnormal enough to survive" - The Tick "Lets cheat death together" - Captain Kirk (Star Trek: Generations) (Crimson Realms @ mud.california.com 1234)
This archive was generated by hypermail 2b30 : 12/18/00 PST