Commit Graph

17401 Commits

Author SHA1 Message Date
PatR
bbb4bfa938 fix issue #1337 - 'fireassist' vs 'f'iring aklys
Issue reported by elunna:  if the 'fireassist' option is on and the
quiver contains ammo, 'f' while wielding an aklys switches to the
ammo's launcher instead of throwing the aklys.

Fixes #1337
2024-12-13 12:30:48 -08:00
nhmall
c7739171a2 follow-up: consoletty.c 2024-12-12 22:46:44 -05:00
nhmall
c7276bcf67 more MSYS2 warning clean-up 2024-12-12 22:35:38 -05:00
nhmall
8bb764e624 follow-up: leading tab to spaces 2024-12-12 17:06:12 -05:00
nhmall
1b607d1757 deal with some MSYS2 warnings 2024-12-12 17:02:37 -05:00
Alex Smith
3491535548 More bugfixes for the recent artifact gifting changes 2024-12-12 07:35:50 +00:00
Alex Smith
459c456838 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2024-12-12 07:01:35 +00:00
Alex Smith
3d8081c748 Bugfixes for the recent artifact gifting changes 2024-12-12 06:58:43 +00:00
PatR
9768677f91 comment tweak 2024-12-11 20:53:08 -08:00
Alex Smith
c2c797fa35 Artifact and #offer rebalance, part 2: luck from sacrificing
Luck from sacrificing is now limited by the value of the sacrifice.

This fixes two exploits, both of which rely on getting luck up to
maximum as soon as you have an altar, a luckstone, and a few
rations, via altar-camping until you accumulate enough luck. One of
them is to use the resulting luck to throw off the balance of combat
via using it to make hit chance calculations irrelevant. The other
is to use it to get crowned early in the game; in particular,
getting crowned pre-Sokoban is often viable and, especially for
chaotic characters, solves most of the game's difficulty at that
point (because the intrinisics and weapon are enough to carry a
character to the Castle given even mediocre luck with finding armor).

After this commit, becoming crowned very early in the game is more
difficult (likely requiring unicorns and identified gems), and the
hit chance gain from luck becomes a more gradual gain over the
course of the game rather than all happening immediately upon
finding the altar and luckstone.

In addition to making the game more balanced, this also discourages
grinding by reducing the incentive for altar-camping, so it will
hopefully make it more fun as well.
2024-12-12 03:37:02 +00:00
Alex Smith
d87cadaf73 Artifact and #offer rebalance, part 1: sacrifice gifts
In 3.6, artifact gifts are often either a) entirely useless or
b) gamebreaking, neither of which is really ideal from a balance
perspective.

This commit aims to make artifact gifts more useful in the early
game by greatly increasing the chance for situational artifacts to
generate positively enchanted.  However, the most powerful
artifacts will now only be gifted if you offer a high-value corpse,
meaning that they are only likely to be accessible later in the
game.  The selection of which artifact to gift has become more
complicated in order to a) increase the chance that it fits the
character and b) reduce cheese strategies (e.g. it is no longer
possible for elves to force the gifting of Stormbringer as the
first sacrifice gift).
2024-12-12 03:14:47 +00:00
PatR
aedb24d343 partly fix issue #1336 - pets vs floating eyes
Issue reported by ars3niy:  pets with reflection or ranged attacks
would only attack floating eyes when rolling the 10% random chance
that other pets have even though they could have always safely
attacked.

This fixes the situation for melee attacks by pets who have
reflection.

dog_move() is too complicated for my feeble brain to cope with the
ranged attack aspect.  Pets still won't use ranged attacks against
floating eyes.

With the fix for reflection, I discovered that silver dragons
would be subjected to floating eyes' passive paralysis even when
their breath attack was suppressed.  (It wouldn't impact them, due
to reflection, but the message about the floating eye being hit by
its reflected gaze was being delivered without being preceded by
any message since no attack had taken place yet.)  This fixes that.

\#1336 is still open
2024-12-11 12:38:28 -08:00
nhmall
e08bd9ef8a Windows NetHackW memory leak bit 2024-12-10 14:49:56 -05:00
nhmall
323359ed83 rework a #migratemons change from yesterday 2024-12-10 14:01:10 -05:00
nhmall
175260807b wiz mode teleport starting destination selection
Ensure that the destination selection for intentional
teleport begins at the hero, rather than starting at
a place on the map stored from a prior travel command.
2024-12-10 13:39:55 -05:00
nhmall
548c021049 freedynamicdata() adjustment
The location of the call to dobjsfree() in freedynamicdata()
appears to have been non-ideal.

After getting complaints from a leak-sensing tool after
#quit, the source of the leaks was investigated.

The call to dobjsfree() had been placed immediately following
a call to dmonsfree(), and it did clear out the go.objs_deleted
chain at that point.

Further investigation revealed that the following functions
later on in freedynamicdata() were then adding more deleted
objects to the go.objs_deleted chain:
    free_current_level();
    freeobjchn(gi.invent);
    freeobjchn(gm.migrating_objs);

Move the call to dobjsfree() to a location after those listed
above.
2024-12-10 13:33:42 -05:00
nhmall
ce8cef7906 get rid of spurious warning on Microsoft compiler 2024-12-09 23:29:38 -05:00
nhmall
c897f3a950 a comment for the obj side of discard_migrations() 2024-12-09 22:59:56 -05:00
nhmall
d99a24843b deal with light sources in discard_migrations()
Otherwise, when discard_migrations() purges monsters,
their stale monster pointers can be left inside the light source data
structure.
2024-12-09 21:41:26 -05:00
nhmall
64d41e10de update #migratemons for debugging purposes
For the wizard-mode command #migratemons at the
"How many random monsters to migrate to next level? [0]" prompt,
allow a negative number to cause it to use existing monsters
already on the level for the forced migration, up until the
absolute value of the number, instead of random new monsters
as it does for a positive number.

For example, specify -20 to force-migrate 20 existing monsters
already on the map.
2024-12-09 21:14:14 -05:00
nhmall
1f8b75b8c6 different ls content values, so bump EDITLEVEL 2024-12-09 16:21:31 -05:00
nhmall
b744ad41d9 follow-up correct ordering of impossible() fmt 2024-12-09 16:07:27 -05:00
nhmall
02259dd1d0 light source troubleshooting
I don't think this solves the recent light source reports,
but it changes a couple of things in an attempt to get more
information.

1. Having gy.youmonst.m_id field always be zero makes it tough
to distinguish it from uninitialized memory, or a random memory
value. This changes the m_id for the hero's gy.youmonst.m_id
to always hold the identifier 1, instead of 0.

2. write_ls was taking the stashed pointer in the light source,
and using it to immediately extract the m_id field and search
for that m_id. This changes the approach slightly, to actually
try and locate the stashed pointer itself in one of the monster
chains. Only if the monster pointer is located, do we dereference
it to obtain the m_id field.

3. For the interim, mark the saved ls with another set bit when
there has been a failure to locate the monst. At this time,
no code is acting on that bit, but it can be seen in a debug
session.

Hopefully, the next report will provide enough information to
understand the scenario a little better.
2024-12-09 15:52:29 -05:00
Pasi Kallinen
cbb0f9079d Wand of striking strikes the ground
... if dropped while levitating/flying.
2024-12-09 14:36:14 +02:00
Pasi Kallinen
57abae29e8 Don't switch away from polearm if monster in range
Using 'f', if hero is wielding a polearm, and a monster is in range,
don't switch away even if we do have ammo in quiver and a launcher
in the inventory.
2024-12-08 22:19:36 +02:00
Pasi Kallinen
dafd854993 Gelatinous cubes eat organic objects inside them 2024-12-08 17:57:59 +02:00
Pasi Kallinen
78289a7f83 Archeologists' fedora is lucky 2024-12-08 16:17:35 +02:00
PatR
13b8725ac2 combine taming of already tame monsters
Merge the recent change in the effect of blessed scroll of taming on
already tame monsters with the earlier change of any taming on already
tame monsters.  Non-blessed has a chance of boosting monst->mtame by 1
when it is less than 10, more likely the lower the current value is.
For blessed, boost by 2 after that, so possibly by 3 if it is very low.

Make spell of charm monster when skilled or expert in enchantment
spells behave the same as blessed scroll of taming.  [I'm not too sure
about this; it may make the spell too powerful.]
2024-12-07 19:38:01 -08:00
Pasi Kallinen
a3f0b54aea Healers gain experience by healing pets 2024-12-07 12:50:59 +02:00
Pasi Kallinen
9d68d171fb Typofix 2024-12-07 11:37:15 +02:00
Pasi Kallinen
863d455e1d Tourists gain experience by using camera flash on monsters
This counts as seeing the monster up close, so the tourist
doesn't need to get next to the monster
2024-12-07 11:24:30 +02:00
Pasi Kallinen
12228cac49 Tourists gain experience by going to new dungeon levels 2024-12-06 22:10:17 +02:00
Pasi Kallinen
89c4c3a722 Tourists gain experience by seeing new types of creatures up close
Experience equivalent to killing a monster is gained when starting a turn
adjacent to and being able to see the monster.

Breaks saves.

Idea and parts of code via dNetHack
2024-12-06 21:30:23 +02:00
Pasi Kallinen
5eb7566eba Prevent two possible ways to die in the tutorial 2024-12-06 17:36:34 +02:00
Pasi Kallinen
d318d2a489 Code formatting nit 2024-12-06 16:58:01 +02:00
Pasi Kallinen
e23e6ef235 Blessed scroll of destroy armor asks which armor to destroy
via xNetHack with some slight modifications.
2024-12-06 11:09:27 +02:00
Pasi Kallinen
9b4f38eebe Blessed scroll of taming increases tameness of pets 2024-12-05 16:44:05 +02:00
Pasi Kallinen
4b15085bb1 Avoid naming Vlad's entourage if vampires are genocided 2024-12-05 16:16:55 +02:00
Pasi Kallinen
b73581b745 Looking around the map in tutorial 2024-12-05 15:42:15 +02:00
Pasi Kallinen
08be1bafdd Explain ctrl-key combos in tutorial
When tutorializing a command that uses a ^X notation, show Ctrl-X
instead.  Also show an explanation of the ^X nearby.

The only ctrl-key combination that can currently happen in the tutorial,
without rebinding keys, is the kick-command.

Fixes #1327
2024-12-05 15:36:30 +02:00
nhmall
bdeddbe63b update sys/msdos/Install.dos 2024-12-04 15:12:27 -05:00
nhmall
0409ce01a3 cross compile to msdos in CI - fix 3 2024-12-04 15:01:30 -05:00
nhmall
f7cff6c0eb cross compile to msdos in CI - fix 2 2024-12-04 14:55:35 -05:00
nhmall
b33369fc22 cross compile to msdos in CI - fix 1 2024-12-04 14:47:04 -05:00
nhmall
3a044c56a9 more CI cross compile to msdos - compiler bit 2024-12-04 14:31:42 -05:00
nhmall
2d38d05c6b correct bad edit in CI yml file 2024-12-04 14:17:04 -05:00
nhmall
e120abe696 switch msdos cross-compile in CI to Ubuntu 24.04 2024-12-04 14:13:44 -05:00
Pasi Kallinen
b96c59e9b1 Angry god may remove an intrinsic 2024-12-04 20:54:47 +02:00
nhmall
6813e51945 Use newer mingw-w64 UCRT build in CI 2024-12-04 09:51:51 -05:00
Pasi Kallinen
c868119a33 Add missing full stop 2024-12-04 16:46:05 +02:00