miscellaneous objects[] macros
Replace FIRST_GEM and LAST_GEM with FIRST_REAL_GEM, LAST_REAL_GEM, FIRST_GLASS_GEM, and LAST_GLASS_GEM and define those along with objects[] rather than separately. Do the latter for FIRST_AMULET and LAST_AMULET too. Also new FIRST_SPELL and LAST_SPELL used to compute MAXSPELLS. (That value looks wrong to me, but this defines it with the same value as before. If it gets fixed, EDITLEVEL will need to be incremented.) This started as just proof of concept that extra information could be collected as objects[] gets initialized at compile time.
This commit is contained in:
@@ -582,7 +582,7 @@ make_corpse(struct monst *mtmp, unsigned int corpseflags)
|
||||
case PM_GLASS_GOLEM:
|
||||
num = d(2, 4); /* very low chance of creating all glass gems */
|
||||
while (num--)
|
||||
obj = mksobj_at((LAST_GEM + rnd(NUM_GLASS_GEMS)),
|
||||
obj = mksobj_at(FIRST_GLASS_GEM + rn2(NUM_GLASS_GEMS),
|
||||
x, y, TRUE, FALSE);
|
||||
free_mgivenname(mtmp);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user