Commit Graph

146 Commits

Author SHA1 Message Date
nhmall
2fa996eb19 comment update/clarification 2024-01-11 14:19:28 -05:00
nhmall
25a8c258e6 replace x >= LOW_PM with ismnum(x) shorthand macro 2024-01-11 14:01:10 -05:00
PatR
83bdf71932 pull request #1175 - obj->corpsenm fixes
Pull request by mkuoppal:  some objects which use the corpsenm field
to access the mons[] array can have a corpsenm value of NON_PM (-1)
and weren't avoiding array access in those cases.

In addition to a fixes entry for it, this makes some revisions to the
commited code, handling a few of the cases differently.

Closes #1175
2024-01-06 15:13:31 -08:00
Mika Kuoppala
5cfa4cd9f6 src/dog: Fix TIN or EGG based corpsenm
TIN or EGG can have the corpsenm not assigned into a
proper monster and instead have an value of -1.

Take this into account in assigning the monster (fptr)
pointer to only point into >= LOW_PM monste entries.
2024-01-06 12:06:54 -08:00
nhmall
c5a5b55c15 nonnull for some static functions during recent analysis 2023-12-16 10:51:59 -05:00
Michael Meyer
fe8710532e Fix: latent bug with finish_meating on catchup
Some players of 3.6 recently noticed that sometimes, mimics in shops
seemed to have moved around even before the player had entered the shop
or done anything to uncloak them.  I found that this was because
finish_meating was being called for all non-eating monsters when
restoring a level (monsters that weren't eating anything would have
meating == 0 so always pass the 'imv > meating' check).  This would
uncloak mimics -- but not all the time, because the 'mappearance != 0'
test meant mimics disguised as strange objects weren't uncloaked.  I
think that was meant to be an additional check to confirm the monster
really did have a disguise, but in reality it meant that M_AP_OBJECT
"strange object", M_AP_MONSTER "giant ant", etc disguises wouldn't be
removed by finish_meating.

As it turns out, this was mostly fixed by coincidence in 221e4a7, which
fixed the "exclude actual mimics" check in finish_meating.  So at this
point in 3.7 it's largely a latent bug, but it still had the potential
to improperly uncloak non-mimics who can disguise themselves (like the
Wizard of Yendor, maybe?), and could cause other problems if
finish_meating were updated to have additional effects, or if some
monster types were made to disguise themselves as a strange object when
eating a mimic.
2023-11-30 18:05:34 -08:00
Pasi Kallinen
94d44e433b Fix sanity error when pet ate a mimic corpse
When a pet ate a mimic corpse and started mimicking a monster,
and the user then used #wizmakemap, the sanity checker complained
about "non-mimic posing as foo" - the code was clearing the
pet eating counter, but didn't clear the appearance.
2023-11-29 12:15:08 +02:00
PatR
d748dbaa12 more menu headings
Simplify suppression of highlighting for menu header lines during end
of game disclosure.  Didn't actually affect as many things as I was
expecting.

Plus a bit left out of the optfn_dogname() parsing commit.
2023-11-14 17:51:27 -08:00
PatR
bc93ee5d04 pet petrified by eating Medusa's corpse
From a reddit thread:  a tame mind flayer ate Medusa's corpse and was
turned to stone.  Pets won't eat cockatrice corpses unless stoning
resistant but would eat Medusa's corpse if merely poison resistant.
Mind flayers aren't normally poison resistant but could be if wearing
green dragon scales/mail.

Augment the touch_petrifies() test when classifying food for pets.
2023-08-30 13:38:08 -07:00
PatR
ab0de251cd fix #K3938 - sleeping monster tamed by thrown food
Player reported that a cat which was asleep in a treasure zoo would
catch and eat thrown food, becoming tamed in the process, without
waking up.

Temporary sleep was handled (via checking for !mon->mcanmove) but
indefinite sleep wasn't.  Make a monster hit by taming effect (either
magic or thrown food) wake up from indefinite sleep.  For temporary
sleep, the remaining duration is cut in half.  The timeout isn't
dropped all the way to 0 because a monster with mon->mfrozen set
isn't necessarily asleep.  That timeout is shared by timed sleep,
timed paralysis, and busy time when donning armor.
2023-06-27 08:51:29 -07:00
Pasi Kallinen
8b32ae98e9 Add petless conduct
Breaks saves.
2023-04-11 14:21:06 +03:00
Pasi Kallinen
5ca4e166b1 More fuzzer branch teleporting 2023-03-18 10:46:10 +02:00
Pasi Kallinen
e37428d5cd Fix fuzzer teleporting out of Fort Ludios 2023-03-18 08:51:37 +02:00
nhmall
de79240dea some comment spelling fixes 2023-03-16 22:27:01 -04:00
PatR
3d24607494 fix #K3860 - figurine of an Angel
If asked to create an Angel when MM_EMIN isn't specified, makemon()
will either create an ordinary monster of type Angel without any
emin extension or add emin and create a minion affiliated with the
god for randomly chosen alignment.  Figurines didn't specify emin
so could result in either type, but wishing for them offered no
opportunity to specify alignment for the second type.

Change figurine activation to force the first type:  an ordinary
monster of type Angel, not affiliated with any particular deity.
2023-03-16 02:24:52 -07:00
PatR
a9dc8dcd1a pacify static analyzer - dog.c
This is similar to the earlier potential fix that I didn't like,
but I think think one is better.

The analyzer claimed that 'fptr' might be Null inside the switch
case for
|struct permonst *fptr = NULL;
|if (obj->otyp == CORPSE || ...) fptr = &mons[obj->corpsenm];
|switch (obj->otyp) { case CORPSE: ... /* dereference 'fptr' */ }
even though it will always have a non-Null value for otyp==CORPSE.

Make the assignment of 'fptr' unconditional.  mons[NUMMONS] is
valid and won't match any actual monster.  In this case it will
only be used when initializing fptr, never when fptr gets used.
2023-01-17 10:42:00 -08:00
nhmall
02a48aa8cf split g into multiple structures
The consolidation of global variables from scattered source
files into decl.c and declared in decl.h was begun in 3.7.0.
Their placement in common files was done for centralized
initialization and potential re-initialization during a
"play again" scenario.

It wasn't really necessary for all of them to be housed in a
single huge structure to meet the "play again" requirement,
and the single huge structure has been a little unwieldy when
it comes to maintenance.

Following this commit, instead of one single extremely large structure
named 'g' to house all of the relocated global variables, they
are distributed into several ga through gz.

To make things easy for the developer, each variable is placed
into the struct corresponding to the starting letter of the variable.
That way, no lookup is required in order to know which struct houses
a particular variable, it is a simple match to the starting letter
for all the centralized global variables.

A global variable named 'amulets', would be found in ga.
    ga.amulets
     ^ ^
A global varable named 'move', would be found in gm.
    gm.moves
     ^ ^
A global variable named 'val_for_n_or_more' would be found in gv.
    gv.val_for_n_or_more
     ^ ^
A global variable named 'youmonst' would be found in gy.
    gy.youmonst
     ^ ^
2022-11-29 21:53:21 -05:00
nhmall
ad23b4e8e1 grammar: "foo based" to "foo-based"
There seems to be a need to locate these in the distribution every decade or so.
2022-10-30 16:08:14 -04:00
PatR
8509951291 rename "huge chunk of meat" to "enormous meatball"
Pull request #607 by Vivit-R proposed renaming "huge chunk of meat"
to "giant meatball" to better reflect the similarity to meatball.
But an object name that contains a monster name prefix requires extra
work in the wishing code.  I considered "huge meatball" which retains
more of the original name but decided to go with "enormous meatball"
becaues it seems more evocative.

Supersedes #607
Closes #607
2022-09-27 13:32:51 -07:00
Michael Meyer
951a99f5e6 Fix: starving herbivore pet vs polymorphing corpse
The special handling of polymorphing corpses included an "is acceptable
food if starving" rule which ignored the pet's other food preferences,
so a starving herbivorous pet would become willing to eat a
non-vegetarian corpse iff the corpse would polymorph it when eaten.
Along the same lines but latent: if there were a vegan polymorphing
corpse, a carnivorous pet would eat it not only if starving, but also if
maltreated and on the verge of becoming feral.

Instead of trying to fix this by reimplementing all the herbi vs carni
rules specifically for polymorphing corpses, just have a "don't eat
polymorphing corpses if neither starving nor almost untame" rule, and
fall back to the normal palatable corpses tests once it's been
determined that the pet is willing to eat even a polymorphing corpse.

I rephrased the comment just to make it negative (about avoiding
polymorph, rather than polymorph being OK under certain circumstances)
to match the new form of the rule.
2022-09-20 17:25:18 -07:00
PatR
82aaa289ef discarding migrating objects when entering endgame
Avoid potential impossible "obfree: deleting worn object" warnings
when entering the endgame.

The code to get rid of items migrating to non-endgame levels passes
those items to obfree().  It needs to clear obj->owornmask first
because that's used for migration flags (undelivered orctown loot
has a non-zero value).
2022-09-03 10:45:24 -07:00
PatR
a84025c36c more abandoned migrations when entering endgame
The earlier commit just removed monsters from migrating_mons and left
them orphaned.  Also it ignored migrating objects.

Actually release the monsters that can no longer arrive at their
migration destinations.  Release their inventories too.

Release objects that can no longer arrive at migration destinations.
2022-08-05 16:55:05 -07:00
PatR
dc381d0560 discard migrating monsters when entering endgame
When the hero enters the planes branch, all the rest of the dungeon
gets discarded since it can no longer be reached.  At the time that
that takes place, throw away any migrating monsters waiting to arrive
on any of those levels.
2022-08-05 14:36:11 -07:00
PatR
393283f05c Wizard of Yendor entering endgame
When entering the Plane of Earth (or level teleporting directly to
another endgame level in wizard mode), if the Wizard came off the
migrating_mons list instead being re-created from scratch, he would
be placed randomly on the level instead of next to the arrival point.
If his mstrategy field still had the STRAT_WAITFORU bit set and you
didn't move to where he could see you, he might never come after you,
at least until some future harassment event chose 'resurrect'.
2022-08-05 14:22:27 -07:00
PatR
f0705526d4 update 'mydogs' comment 2022-07-28 08:16:23 -07:00
PatR
e13e514556 fix broken migrating monster arrival
If the first monster on the migrating_mons list couldn't arrive and
was put back on the list to try again later, 'later' would happen
immediately and the program looped forever trying and failing to
bring that monster to the level.

Defer repeat attempts at migration until losedogs() has been through
the whole migrating_mons list.  mon_arrive() now populates a new
list called failed_arrivals and losedog() moves its contents, if any,
to migrating_mons prior to returning.
2022-07-28 00:51:18 -07:00
PatR
04e8fbf249 finding level's vault guard
Extend findgd() to bring a migrating guard back 'early' if there is
one and an active guard is wanted but none is present on the level.
It the level is full then the found guard is likely to be sent into
limbo (scheduled to migrate back), so one can end up moving back and
forth.  Unlikely to occur during normal play.

Also, when a guard is needed and there's a dead one parked at <0,0>,
revive it.  The dead guard has temporary corridor info in its
mon->mextra->egd that a new one won't have.  (This might introduce
unexpected changes in vault behavior but if so, the old behavior was
probably buggy.)

When the hero is in a vault, don't find a guard unless u.uinvault is
ready to bring it into play.  It was finding one every turn and then
ignoring the result for 29 turns out of 30.

Change guard appearance timing:  the first appearance is still after
30 turns, but if it goes away, bring it back after 15 more turns
rather than another 30 and repeat as needed.
2022-07-22 14:11:16 -07:00
Pasi Kallinen
94c1e94d20 Move mtrack push and clear to separate functions 2022-07-16 18:43:22 +03:00
PatR
231bd75b7f github issue #819 - magic harp vs shopkeeper
Issue reported by youkan700:  for shopkeepers, taming via magic harp
behaved differently than taming via scroll or spell.

Make magic harp's taming be the same as [non-cursed] scroll of taming
and spell of charm monster:  angry shopkeepers will be pacified (even
though they can't be tamed).

Also, add something I've been sitting on for ages:  when taming magic
hits an already tame monster, give that monster a chance to become
tamer.  Not significant for monsters that eat (unless being starved
for some reason) but matters for ones who don't eat.  For tameness N
(which has a maximum of 20), if N is less than 10, have any taming
yield a 10-N out of 10 chance to increase the tameness by 1.  So the
closer a pet is to becoming feral, the more likely for it to improve
tameness a little.

Closes #819
2022-07-16 05:08:26 -07:00
PatR
6efb8c528e comment typo/thinko 2022-07-14 00:48:10 -07:00
PatR
aba500b482 fix #K3633 - vault guard parked at <0,0> brought \
back into play with bad data

I don't have a test case to verify the fix, and I'm not absolutely
certain that the cause has been correctly diagnosed, but I think the
problem was caused by a guard being sent into limbo because the map
was too full to place it, then while it was on the migrating monsters
list waiting for a chance to come back the fuzzer executed #wizmakemap.
If the hero left the level and subsequently returned, the guard would
arrive back but monst->mextra->egd contained data for the previous
incarnation of the level that's invalid for wizmakemap's replacement.

Treat any shopkeeper, temple priest, or vault guard who is not on his
'home' level like the Wizard has been treated since 3.6.0.  When
leaving the level they're on, put them on the migrating monsters list
scheduled to return to present position instead of stashing them in
the level's data file.  That way they can be accessed from any dungeon
level, so wizmakemap can pull ones for the level it's replacing off
the migrating monsters list when removing the old level's monsters,
handling both migration-pending and already-arrived-on-another-level.

Bonus fix:  put monsters who are on the migrating_mons list solely in
order to be accessible from other levels back first when returning to
the level they're on so that pets and the hero can't hijack their spot
when those arrive.  The Wizard has been vulnerable to that.

Not fixed:  #wizfliplevel command needs to flip parts of shk->mextra->
eshk and priest->mextra->epri for shk or priest on migrating_mons.
Vault guards don't contain anything flippable when migrating, but do
have coordinates that need fixing up while they're maintaining a
temporary corridor to/from the vault.
2022-07-13 15:19:51 -07:00
nhmall
30b557f7d5 change xchar to other typedefs
One of the drivers of this change was that screen coordinates require a
type that can hold values greater than 127. Parameters to the window
port routines require a large type in order to be able to have values
a fair bit larger than COLNO and ROWNO passed to them, particularly for
their use to the right of the map window.

This splits the uses of xchar into 3 different situations, and adjusts
their type and size:

                        xchar
                          |
               -----------------------
               |          |          |
            coordxy     xint16     xint8

coordxy: Actual x or y coordinates for various things (moved to 16-bits).

xint16:  Same data size as coordxy, but for non-coordinate use (16-bits).

xint8:   There are only a few use cases initially, where it was very
         plain to see that the variable could remain as 8-bits, rather
         than be bumped to 16-bits.  There are probably more such cases
         that could be changed after additional review.

Note: This first changed all xchar variables to coordxy. Some were
reviewed and got changed to xint16 or xint8 when it became apparent that
their usage was not for coordinates.

This increments EDITLEVEL in patchlevel.h
2022-06-30 23:48:18 -04:00
PatR
4f781e7850 fix #K3627 - impossible placing long worm at <0,0>
When migrating, a long worm is removed from the map to take off the
tail, then its head is put back to be treated like other monsters.
If that occurred when being forced to re-migrate during failure to
arrive from a prior migration, it wouldn't have valid coordinates
and the place_monster attempt produced an impossible warning.
(Other types of monsters don't get removed and put back so didn't
trigger the problem.)

The routine to format a monster when the data is suspect mistakenly
thought it was dealing with a long worm tail because the monster
didn't match level.monsters[0][0], so the warning inaccurately
reported the problem as "placing long worm tail".
2022-06-26 12:22:09 -07:00
PatR
6af5555215 fix github issue #764 - misplaced corpses
Reported by jeremyhetzler and confirmed by k2:  dead monsters weren't
leaving corpses at the spot they died.

Don't set a monster's mx,my coordinates to 0,0 when taking it off the
map (unless it is migrating to another level; mx==0 is the bit of data
used to indicate that).  Corpse drop happens after that and expects
the dead monster's former map coordinates to be intact.

Fixes #764
2022-05-16 01:30:00 -07:00
PatR
3a0a92764a more wormgone
When wormgone() takes a long worm off the map, clear its stale mx,my
coordinates.  None of its callers need those anymore.

Also a bit of potential long worm clean up that occurred to me when
I looked at object bypass handling.  Expected to be a no-op here.
2022-05-14 18:10:42 -07:00
PatR
ef08773f2b migrating monster fix
The change to zero out a monster's map coordinates when it is taken
off the map yesterday messed up migration between levels inside the
Wizard's tower.  (Didn't apply when accompanying the hero between
levels, so probably unlikely to be noticed.)

Noticed while moving some replicated code into its own routine.
2022-05-14 03:30:45 -07:00
PatR
1ce457f801 display former possessions of dead monster
Reported directly to devteam by a hardfought player and also by
entrez.  The recent mon_leaving_level() change resulted in objects
dropped by a dying monster not being displayed immediately.

It justed needed the relobj(mon, 0, FALSE) to relobj(mon, 1, FALSE)
change in m_detach() but this does some related cleanup in
mon_leaving_level()'s callers.  wormgone() takes a long worm off the
map but leaves its stale coordinates set because some code relied on
that.  This takes away the need for that but still doesn't actually
clear them.

This adds redundant 'return' statements at the end of a few void
functions that are longer than fits within a typical screen display.
They make searching for the end of the current routine in an editor
or pager easier without resorting to regular expressions and can
also be used to search for the beginning if/when preceding routine
ends in 'return' too.
2022-05-13 14:46:02 -07:00
Pasi Kallinen
9b1872ba05 Couple more monster iterator uses 2022-04-25 12:53:04 +03:00
PatR
2356690054 mon_leaving_level followup 2022-04-19 12:30:23 -07:00
PatR
6880d37b33 mon_leaving_level
From 6 year old email:  m_detach (monster death or removal from play)
and relmon (monster migrating to another level) both take a monster
off the map but they weren't consistent with each other.  Change them
to use a common routine for that.

I'm not sure whether the inconsistencies resulted in any bugs.  The
email was concerned about handling for monsters that emit light, but
those aren't actually common to the two removal methods and turned
out to be ok.
2022-04-18 12:01:17 -07:00
Pasi Kallinen
39acd095b2 Add helpless monster macro 2022-03-18 10:19:04 +02:00
nhkeni
fc5e991b06 Add typedef mmflags_t to assure enough bits for all MM_* flags. 2022-03-17 17:14:12 -04:00
Pasi Kallinen
2777f45bd5 Get rid of force_mintrap, allow passing flags to mintrap
It uses the same flags as dotrap, so simulate force_mintrap
by passing FORCETRAP flag.
2022-02-24 17:13:23 +02:00
Pasi Kallinen
48bca11d67 Accessibility: give message for created monsters
Always give a message when creating a detected monster
during gameplay (as opposed to during level creation).
To prevent the message, use the MM_NOMSG flag for makemon.

Most places already handled their own messaging, but there
were some, such as bag of tricks, create monster magic
and random monsters created during gameplay that didn't.
2022-01-06 14:06:49 +02:00
Pasi Kallinen
f6b7be49f4 Accessibility: give a message when teleporting a monster
Teleporting a monster only updated the map. Give a message
so blind players can get the same information.
Making a monster invisible gives the same message, if you
cannot detect invisible.
Several other places where monsters teleported themselves
now also give the same message.
2021-12-12 16:50:49 +02:00
copperwater
f855fb5e45 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.
2021-08-28 16:22:38 -07:00
PatR
0b5a112b0c gender for figurines
Use (obj->spe & CORPSTAT_GENDER) for figurines as well as for
statues and corpses.

Support wishing for
 "{female,male,neuter} {corpse,statue,figurine} [of <monster>]".
and
 "{female,male,neuter} <monster> {corpse,statue,figurine}".
Also
 "{corpse,statue,figurine} of {female,male,neuter} <monster>"
where the qualifier might be in the middle instead of a prefix.
2021-06-17 16:03:45 -07:00
nhmall
f963c5aca7 switch source tree from k&r to c99 2021-01-26 21:06:16 -05:00
nhmall
0c3b9642e4 pmnames mons gender naming plus a window port interface change
add MALE, FEMALE, and gender-neutral names for individual monster species
to the mons array. The gender-neutral name (NEUTRAL) is mandatory, the
MALE and FEMALE versions are not.

replace code uses of the mname field of permonst with one of the three
potentially-available gender-specific names.

consolidate some separate mons entries that differed only by species into a
single mons entry (caveman, cavewoman and priest,priestess etc.)

consolidate several "* lord" and "* queen/* king" monst entries into
their single species, and allow both genders on some where it makes some
sense (there is probably more work and cleanup to come out of this at some
point, and the chosen gender-neutral name variations are not cast in stone
if someone has better suggestions).

related function or macro additions:
    pmname(pm, gender) to get the gender variation of the permonst name. It
    guards against monsters that haven't got anything except NEUTRAL naming
    and falls back to the NEUTRAL version if FEMALE and MALE versions are
    missing.

    Ugender to obtain the current hero gender.
    Mgender(mtmp) to obtain the gender of a monster

While the code can safely refer directly to pmnames[NEUTRAL] safely in the
code because it always exists, the other two (pmnames[MALE] and
pmnames[FEMALE] may not exist so use:
    pmname(ptr, gidx)
      where -ptr is a permonst *
            -gidx is an index into the pmnames array field of the
             permonst struct
pmname() checks for a valid index and checks for null-pointers for
pmnames[MALE] and pmnames[FEMALE], and will fall back to pmnames[NEUTRAL] if
the pointer requested if the requested variation is unavailable, or if the
gidx is out-of-range.

Allow code to specify makemon flags to request female or male (via MM_MALE
and MM_FEMALE flags respectively)to makedefs, since the species alone doesn't
distinguish male/female anymore. Specifying MM_MALE or MM_FEMALE won't
override the pm M2_MALE and M2_FEMALE flags on a mons[] entry.

male and female tiles have been added to win/share/monsters.txt.
The majority are duplicated placeholders except for those that were
separate mons entries before. Perhaps someone will contribute artwork in the
future to make the male and female variations visually distinguishable.

tilemapping via has the MALE tile indexes in the glyph2tile[]
array produced at build time. If a window port has information that the
FEMALE tile is required, it just has to increment the index returned
from the glyph2tile[] array by 1.

statues already preserved gender of the monster through STATUE_FEMALE
and STATUE_MALE, so ensure that pmnames takes that into consideration.

I expect some refinement will be required after broad play-testing puts it to
the test.

    consolidate caveman,cavewoman and priest,priestess monst.c entries etc

This commit will require a bump of editlevel in patchlevel.h because it alters
the index numbers of the monsters due to the consolidation of some. Those
index numbers are saved in some other structures, even though the mons[] array
itself is not part of the savefile.

Window Port Interface Change

Also add a parameter to print_glyph to convey additional information beyond
the glyph to the window ports. Every single window port was calling back to
mapglyph for the information anyway, so just included it in the interface and
produce the information right in the display core.

The mapglyph() function uses will be eliminated, although there are still some
in the code yet to be dealt with.

win32, tty, x11, Qt, msdos window ports have all had adjustments done to
utilize the new parameter instead of calling mapglyph, but some of those
window ports have not been thoroughly tested since the changes.

Interface change additional info:

    print_glyph(window, x, y, glyph, bkglyph, *glyphmod)
            -- Print the glyph at (x,y) on the given window.  Glyphs are
               integers at the interface, mapped to whatever the window-
               port wants (symbol, font, color, attributes, ...there's
               a 1-1 map between glyphs and distinct things on the map).
            -- bkglyph is a background glyph for potential use by some
               graphical or tiled environments to allow the depiction
               to fall against a background consistent with the grid
               around x,y. If bkglyph is NO_GLYPH, then the parameter
               should be ignored (do nothing with it).
                -- glyphmod provides extended information about the glyph
               that window ports can use to enhance the display in
               various ways.
                    unsigned int glyphmod[NUM_GLYPHMOD]
               where:
                    glyphmod[GM_TTYCHAR]  is the text characters associated
                                          with the original NetHack display.

                    glyphmod[GM_FLAGS]    are the special flags that denote
                                          additional information that window
                                          ports can use.

                    glyphmod[GM_COLOR] is the text character
                                       color associated with the original
                                       NetHack display.

Support for including the glyphmod info in the display glyph buffer
alongside the glyph itself was added and is the default operation.
That can be turned off by defining UNBUFFERED_GLYPHMOD at compile time.
With UNBUFFERED_GLYPHMOD operation, a call will be placed to map_glyphmod()
immediately prior to every print_glyph() call.
2020-12-26 11:23:23 -05:00
Pasi Kallinen
6ec55a3624 Rework stairs structure
Use a linked list to store stair and ladder information, instead
of having fixed up/down stairs/ladders and a single "special" (branch)
stair.

Breaks saves and bones.

Adds information to migrating objects and monsters for the dungeon
and level where they are migrating from.
2020-11-13 20:27:17 +02:00