includes container contents, not just the cost of the
container itself (a prices in inventory phenomenon).
Along the way I discovered a peculiarity -
contained_cost() was adding up the cost of everything in
a container, even if you had stashed items in it that were your
own and not marked unpaid it seems.
I added a flag to force the code to only add objects
that were marked "unpaid" so I could use it in this new
instance, but I didn't change any of
the existing usages (I left the flag at FALSE which leaves
the consideration of the unpaid status alone just as
before).
Some of this is correction of some messages that were
wrong prior to this when dealing with selling of objects
inside a container when only part of the contents was unpaid.
- avoid several buffer overflows
- move use of access() to files.c in new can_read_file() function
- remove extra newlines in raw_print() calls
- get ready for lint, eg sprintf -> Sprintf
- generally make the code look like core code, not Qt code
Strengthen Death by making his "drains your life force"
result take away some max HPs to augment the ordinary damage
it does. The chance for that effect is reduced from 80% to
75% though. Weaken Famine, Pestilence, and Demogorgon by
preventing them from hitting with both of their disease or
hunger attacks on the same turn. When their first attack
hits, the second now gets treated as a stun attack, but if
the first one misses then the second is unchanged and yields
another chance to deliver the disease or hunger effect.
Generally modify the AD_DGST damage type so that:
- players and pets get no AD_DGST nutrition from G_NOCORPSE monsters
- undead no longer convey any nutrition, to either monsters or you-as-monster
I decided on this based on the age typically assigned to undead corpses.
- digestion conveys 50% or normal nutrition, and takes 25% the time to eat.
- all AD_DGST attacks are now subject to gas spore explosions, including player
Make wands of speed or slow monster known if their effect
on monsters is observed; likewise for speed boots. Also, avoid
giving odd "the bat is moving faster" when seeing a bat created
in gehennom and inaccurate "the monster is moving slower" when
a monster puts on speed boots.
I was asked how a window-port controls which options are
set to SET_IN_FILE, DISP_IN_GAME, or SET_IN_GAME.
This provides a run-time way to change an option's SET_IN_FILE,
DISP_IN_GAME, or SET_IN_GAME status through code, rather
than clog up options.c with a lot of compile-time #ifdefs
for different ports to offer different default option settings.
Update the documentation to reflect this.
to allow common parsing in the core, and direct access to the
results by the window port.
Notes:
o Adds a new field, wincap, to the window_procs
structure for setting bits related to the preference
features that the window port supports. This allows
run-time determination of whether a particular option
setting is applicable to the running window port. A
window-port is free to support as many, or as few,
of the available options as it wants. Ensure that
only the ones supported have their corresponding bit
set in window_proc.wincap. [see chart in
doc/window.doc for help with that.]
o The settings I stuck into wincap for each window
port are almost certainly not accurate, so each port
team should review them. You should only include
the ones that you will actually react to and make
adjustments for if the user changes that option.
Without the setting in wincap, the option won't even
show up in the 'O'ptions menu.
o preference_update() added to the window-port
interface, so that the window-port can be notified
if an option of interest (an option with its
corresponding bit set in wincap field) is
changed.
o provided a genl_preference_update() routine in
windows.c and used it for all the existing
window ports since they don't have a functional
one of their own yet.
o this messes around heavily with iflags and the options
arrays in options.c
o I hope I didn't break any port's existing code. I
tried not to. The Mac however, in particular, should
be looked at because it suffered a namespace collision
with what I was working on around fontname. It had
Mac specific font stuff in options.c. Please test
the Mac.
Make pushing a boulder onto a landmine share code with the trap case,
resulting in pits, waking sleepers, et al.
Don't leave a boulder suspended over the new pit, fill it.
Make sure any remaining boulder is placed on top of the pile.
If player sets off landmine, monsters killed are credited to/blamed on player.
Duuuh. Of course adding objects already changed the editlevel.
Anyway, here's the fix I was working on. It only matters in a very obscure
situation. (Also, the quest leader still speaks no matter what he's
polymorphed into.)
over the place.
Often they would use
"%ld zorkmid%s", amt, plur(amt)
but not consistently, so some of the hard-coded usage
could result in "1 zorkmids"
This adds the function
currency(long)
to return the name of the currency, either plural
or singular depending on the argument passed to it.
That eliminates the need for the extra %s in the
format string and the use of the plur() macro.
If you get interrupted while reading a spellbook and then
the book gets destroyed or you change levels, the object pointer
remembered for the book will be invalid and could accidentally
match one subsequently allocated to some other book. That would
result in "you continue your efforts to memorize the spell" when
starting to read that other book; it would also end up bypassing
the reading difficulty check and reuse the old book's delay counter.
I don't remember who reported this. It was quite some time
ago and I have an abandoned patch dated last March from when I
first started to fix it.
Files patched:
include/extern.h
src/save.c, shk.c, spell.c
This patch, based on code sent to us by <Someone> well over a year ago, addresses
bugs recently resurfaced. Namely, that lava does not generally do anything
to monsters or objects that land in java. Newly renamed minliquid() handles
both water and lava, and new fire_damage() is used similar to water_damage().
This fixes the problem with my monster spell changes which let monsters
summon monsters around you when they don't even know you're around.
The summoned monsters should appear where the monster thinks you are, if
you're invisible or displaced.
I have not prevented them from summoning monsters when you are in a temple,
nor have I prevented them from aggravating monsters several times when you're
out of sight.
Messages should be a little smarter, taking into account number of monsters
and invisibility/displacement.
--Ken A
Players wielding a lance while riding will "joust" monsters
they attack.
Note that monsters don't get pushed into inaccessable tiles such
as walls, doors, iron bars, water, or lava; they stay at the edge.
Further refinements are possible for these cases.
One from <Someone>'s list: there's no particular reason for
the High Priest of Moloch in the temple on the sanctum level in
Gehennom to have his identity concealed when he's detected from
a distance. I also changed the concealment of the Astral Plane
to stop when you're adjacent to the priest, since #chat--among
other things, such as simply entering the temple--provides other
means of identifying which temple it is once you're there.
Files patched:
include/extern.h
src/do_name.c, pager.c
This adds the BUC-patch, except that it includes four separate choices for
blessed/cursed/uncursed/unknown. The patch only applies to full menu styles.
--Ken A
(Incidentally, I have a suggestion: when deciding what's the first line for
purposes of mailing out messages, use the first nonblank line...)
Summary of spell changes:
-- wimpiness of 'default' spell fixed by doing half damage for magic resistance
instead of 1 damage, and using half monster level instead of 1/3. It may
still need tweaking, but is much better than before.
-- 'default' spell for cleric monsters is now the wounds spell, by analogy with
wizard monsters.
-- added clerical lightning strike, flame strike, gush of water
-- all spells should now say the monster is casting a spell, and all spells
should have messages. (Side effect: monsters speeding up by other means
also give a message saying so).
-- casting undirected spells is not affected by whether the monster knows
where you are. Monsters that are attacking your displaced image, that are
several squares away, or that are peaceful can use undirected spells.
-- messages should correctly say whether the spell is undirected (a monster
was always casting at thin air or pointing at you and cursing, without checking
to see if the spell wouldn't require pointing)
-- Monsters which are attacking your displaced image, etc. use up mspec_used.
If they are casting an undirected spell, the spell still works.
-- Monsters which are not attacking can cast spells that don't attack.
-- If a monster didn't have ranged spellcasting ability (which most don't),
it would print a curse message from buzzmu() every round it was at range,
creating a useless stream of constant curse messages
I still haven't made spellcasters "smarter" in the sense of noticing whether
you have reflection, fire resistance, etc. That opens a big can of worms
because it would mean giving monsters a memory.
Known bug: the higher level a monster is, the more spells it has; since it
chooses a noncombat spell by randomly picking a spell and casting if it
happens to be noncombat, the higher level the monster is the greater the
chance of getting nothing.