Remove g.monstermoves

It's redundant with g.moves, so there is no more need for it.

Way, way back, it looks like g.moves and g.monstermoves can and did
desync, where g.moves would track the amount of moves the player had
gotten (and would therefore increase faster if the player were hasted)
and g.monstermoves would track the amount of monster move cycles, aka
turns. But this has not been the case for a long time, and they both
increment together in the same location in allmain.c. There are no
longer any cases where they will not be the same value.

This is a save-breaking change because it changes struct
instance_globals, but I have not updated the editlevel in this commit.
This commit is contained in:
copperwater
2021-08-22 09:53:24 -04:00
committed by PatR
parent b76a213caf
commit f855fb5e45
23 changed files with 81 additions and 86 deletions

View File

@@ -252,7 +252,7 @@ struct obj {
/* Eggs and other food */
#define MAX_EGG_HATCH_TIME 200 /* longest an egg can remain unhatched */
#define stale_egg(egg) \
((g.monstermoves - (egg)->age) > (2 * MAX_EGG_HATCH_TIME))
((g.moves - (egg)->age) > (2 * MAX_EGG_HATCH_TIME))
#define ofood(o) ((o)->otyp == CORPSE || (o)->otyp == EGG || (o)->otyp == TIN)
/* note: sometimes eggs and tins have special corpsenm values that
shouldn't be used as an index into mons[] */