This is a reimplementation of commit ec32748 in TNNT by entrez:
If you use undead turning on a dead hero's corpse from a bones file,
its ghost will get sucked back into its body when it comes back to
life. In such cases, treat the newly revived corpse/recorporealized
ghost as a "former hero" for the purposes of livelogging bones
monster kills.
Part of this change was to remove a bit of weirdness in the game - the
odd situation where you revive a corpse-ghost combo on a bones pile, and
get the messages:
The human corpse glows iridescently.
Foo's ghost is suddenly drawn into its former body!
The human is resurrected!
and subsequently the monster is just a generic human (or elf, etc)
without anything indicating it used to be a player. With this change,
the monster will retain the name that the ghost had, and its struct
ebones prevents the player from renaming it.
This commit also adjusts the "resurrected" message to explicitly use the
monster's name if it has one, and to use YMonnam in the unrelated case
where the monster was a pet (so reviving an unnamed tame kitten will
print as "Your kitten is resurrected!")
Keep only 8 background colours but if curses supports 256 colours and
256*8 colours pairs, create colours pairs for 256 foregrounds rather
than just 16.
It will need another parameter for 256-colour support. To avoid having
too many arguments, put glyph colour, background colour and attributes
into a struct and, since to curses library all of that is attributes
that are handled by same function, call the struct "gryph attributes".
curses_putch was also declared in two different headers, remove one of
those declarations.
The blue background colour for piles was implemented by changing glyph
colour to curses colour pair with the desired background, and then
passed to curses_putch which takes character and background colour and
makes curses colour pair out of them once again.
Pass blue background to curses_putch instead and let it create curses
colour pair just once.
This is an issue that we discovered in TNNT last year when we added a
custom region with effects that trigger upon entry: it was possible to
bypass those effects by entering the region via a thrown iron ball.
This can be demonstrated by creating a poison gas cloud and then
dragging oneself inside the cloud behind a thrown ball: you land in the
cloud and are surrounded by poisonous gas, but are unharmed by it.
This commit fixes the iron ball code to call in_out_region when
appropriate, which handles the side effects of entering and exiting
regions in addition to preventing travel into or out of a hypothetical
region that blocks entry or exit.
The message in question is '[shopkeeper] says "You be careful with my
[item]!"' when you wield a shop-owned item, but it was being printed
even when the hero is deaf.
Following other examples of shopkeeper dialogue, the correct thing to do
here is not to suppress the message if deaf but instead provide some
nonverbal feedback, so that is what I did.
see_monsters() was producing spurious vault guard at 0,0
messages
Reproduce issue by:
1. Entering vault via teleport.
2. Wait for guard to enter.
3. Drop gold (if necessary) and follow guard.
4. Right after the guard disappears, but before
the corridor does, the following can lead to
the messages:
a) control-R to refresh the display.
or
b) save the game and restore.
In both cases, see_monsters() will get called and lead
to the spurious messages for the vault guard that is
parked.
Also, add a macro PARKEDMONSTER(mon) instead of checking the
the isgd bit and the value of mon->mx being zero in multiple
places
Also, adds MON_PARKED bit to mstate.
Currently the PARKEDMONSTER(mon) macro mentioned above,
does not use the new bit.
* makefont.lua generates incorrect PSF fonts. There can be multiple
characters mapped to a single glyph, but the mappings should be
separated by FE bytes.
* font.c should accept only single character mappings -- not combining
sequences. The bundled fonts have no combining sequences, but I am
exploring other options that provide more Unicode coverate.
The old logic used a negative check to emit an extern declaration for
tparm(). This guarded against old platforms whose curses implementations
did not declare their own functions.
If there are still any platforms left that need this declaration, they
can set TPARM_WORKAROUND to get the old behavior back.