Globs never rotted away but did become tainted after a relatively short while, which seemed like a contradiction. Change them to never be tainted but shrink by 1 unit of weight approximately every 25 turns. An ordinary glob (one that hasn't combined with any others) starts out weighing 20 units, so it takes about 500 turns to vanish. That's roughly twice as long as a corpse takes to rot away. Shrinking globs give feedback when in hero's invent or in a container in hero's inventory, but rarely (when going from an exact multiple of 20 weight units; that is, from integral number of N globs to N-1 + 19/20, or if weight reduction triggers an encumbrance change). When a glob goes away completely, there is feedback for those two circumstances and also for seeing the glob vanish from the floor. I haven't touched how much nutrition eating a glob confers. I have changed formatting of glob names to use "small", "medium", "large", "very large" instead of "small", [no adjective], "large", &c. You still need to have at least five globs coalesced together for the adjective to become "medium", same amount as before. I don't think EDITLEVEL needs to be modified but have incremented it anyway to play things safe.
54 lines
1.7 KiB
C
54 lines
1.7 KiB
C
/* NetHack 3.7 timeout.h $NHDT-Date: 1596498564 2020/08/03 23:49:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.13 $ */
|
|
/* Copyright 1994, Dean Luick */
|
|
/* NetHack may be freely redistributed. See license for details. */
|
|
|
|
#ifndef TIMEOUT_H
|
|
#define TIMEOUT_H
|
|
|
|
/* generic timeout function */
|
|
typedef void (*timeout_proc)(ANY_P *, long);
|
|
|
|
/* kind of timer */
|
|
enum timer_type {
|
|
TIMER_LEVEL = 0, /* event specific to level [melting ice] */
|
|
TIMER_GLOBAL = 1, /* event follows current play [not used] */
|
|
TIMER_OBJECT = 2, /* event follows an object [various] */
|
|
TIMER_MONSTER = 3, /* event follows a monster [not used] */
|
|
NUM_TIMER_KINDS /* 4 */
|
|
};
|
|
|
|
/* save/restore timer ranges */
|
|
#define RANGE_LEVEL 0 /* save/restore timers staying on level */
|
|
#define RANGE_GLOBAL 1 /* save/restore timers following global play */
|
|
|
|
/*
|
|
* Timeout functions. Add a define here, then put it in the table
|
|
* in timeout.c. "One more level of indirection will fix everything."
|
|
*/
|
|
enum timeout_types {
|
|
ROT_ORGANIC = 0, /* for buried organics */
|
|
ROT_CORPSE,
|
|
REVIVE_MON,
|
|
ZOMBIFY_MON,
|
|
BURN_OBJECT,
|
|
HATCH_EGG,
|
|
FIG_TRANSFORM,
|
|
MELT_ICE_AWAY,
|
|
SHRINK_GLOB,
|
|
|
|
NUM_TIME_FUNCS
|
|
};
|
|
|
|
/* used in timeout.c */
|
|
typedef struct fe {
|
|
struct fe *next; /* next item in chain */
|
|
long timeout; /* when we time out */
|
|
unsigned long tid; /* timer ID */
|
|
short kind; /* kind of use */
|
|
short func_index; /* what to call when we time out */
|
|
anything arg; /* pointer to timeout argument */
|
|
Bitfield(needs_fixup, 1); /* does arg need to be patched? */
|
|
} timer_element;
|
|
|
|
#endif /* TIMEOUT_H */
|