Commit Graph

6708 Commits

Author SHA1 Message Date
nhmall
4e086caceb ensure tty_curs() behaves the same whether DEBUG defined or not
ensure tty_curs() behaves the same whether DEBUG defined or not
when it comes to positioning the cursor.

The return statement, in the debug case only, was preventing
the cursor from being moved following a range check, so the
next output was written whereever the cursor happened to be
previously.

The messaging that detects the failed range check will get
written in the DEBUG defined case hopefully allowing resolution
to the range check failure, but now the cmov will still
be attempted just as it is in the case where DEBUG is not
defined.
2018-03-11 23:29:06 -04:00
PatR
152d9e7705 fix #H6955 - wielded potion 'object lost' panic
Report classified this as 'segfault' but it's actually a controlled
panic().  When hero has lycanthropy and is wielding a potion of unholy
water while in human form, if that potion is boiled then it triggers
a transformation to beast form which in turn causes wielded weapon to
be dropped.  When the code unwinds back up through potionbreathe() to
destroy_item(), the boiled potion won't be found in inventory any more
and useup() -> useupall() -> freeinv() -> extract_nobj() panics.
2018-03-11 12:39:01 -07:00
PatR
f026e37573 last gitinfo bit?
If dat/gitinfo.txt is being created from scratch, say so instead of
saying "updated".
2018-03-10 12:55:28 -08:00
PatR
ddb830911e more Unix gitinfo
When make uses 'makedefs -v' to create date.h, force it to create
gitinfo.txt all the time instead of just when that doesn't already
exist.  Use 'make GITINFO=0' to get the previous behavior.

To skip it entirely, you need to do that and also make sure that
some file by that name already exists.  'touch dat/gitinfo.txt' or
perhaps 'echo "#no git" > dat/gitinfo.txt' would suffice.
2018-03-10 12:32:52 -08:00
Pasi Kallinen
4f459a9532 Fix WINCHAIN compilation 2018-03-10 21:48:22 +02:00
nhmall
6fc324798e H5239 not hypocrisy to speed up your own pet
H5239 1100
2018-03-10 13:17:21 -05:00
nhmall
6586e9204b pluralization special case tweak
mongoose -> mongooses, not mongeese
2018-03-10 11:28:01 -05:00
nhmall
5fece7b175 pluralization bits 2018-03-10 10:43:34 -05:00
PatR
e408c48bb3 mplayer valkyries w/ Mjollnir
If an mplayer Valkyrie on the Astral Plane is given a war hammer,
give her gauntlets of power instead of random gloves since that will
either be Mjollnir or a very wimpy endgame weapon.  (Maybe someday
mplayer Valkyrie's will be able to throw Mjollnir; their chance of
having it on the Astral Plane is moderately high if it hasn't already
been created prior to arriving there.)

I also gave monsters wearing gauntlets of power a 3..6 damage bonus
for hand-to-hand.  While making that change, I noticed that monsters
wielding a scalpel or tsurugi wouldn't split puddings, unlike the
hero (a post-3.6.0 change), so fix that.
2018-03-09 14:11:04 -08:00
PatR
cba6761ee6 Files update
I'm not sure of the status for possibly maintaining 'Files' via
automation, so manually add the new file 'gitinfo.sh' to sys/unix.
There was a sys/unix/hints file that wasn't listed, so add linux-qt4.
The whole win/Qt4 subdirectory is missing though.  I don't even
remember that being added.
2018-03-08 10:26:08 -08:00
PatR
03da0190fb nhversioning update
Update dat/gitinfo.txt if the current branch is different from the
one recorded in the file, not just when the commit hash is different.

Make the usual output less verbose so that it fits within 80 columns.
2018-03-06 17:16:49 -08:00
PatR
a43b2086e4 stuck_in_wall tweak
When divine aid granted temporary Passes_walls ability to stuck hero,
it was giving 4d4 turns (4..16, avg 10).  But the first warning that
it's timing out is given at 4 turns left so wouldn't be seen if the
random amount of time picked was the minimum.  Switch to 4d4+4 (8..20,
avg 14) so that the message at 4 turns left will always happen.
2018-03-05 12:26:44 -08:00
PatR
8279aa4384 removing a monster from current level
I ended up not using this, but it might as well be included for
potential future use.  Extend mlevel_tele_trap() to support forcing
a monster off the current level to make room either for the hero or
some other monster.  goto_level() does something similar when the
hero is arriving on a level.  This is for situations where the hero
is already there (such as divine aid attempting to fix STUCK_IN_WALL).

mlevel_tele_trap(mon, (struct trap *) 0) will usually move 'mon' off
the level, scheduled to migrate back if the hero leaves the level and
subsequently returns.  'Usually' because it doesn't work in endgame
and certain monsters are excluded regardless of dungeon location, so
caller has to be prepared to try to move another monster (or resort
to goto_level()'s unconditional forced migration).
2018-03-05 12:01:31 -08:00
Pasi Kallinen
b416564f39 Fix garbage value warning 2018-03-05 21:09:15 +02:00
PatR
4d35ca86f3 gitinfo.txt on Unix
Hide the scary perl command during 'make all' feedback in src/.
I'm not a shell programmer but this works fine for me when skipping
NHgithook::NHversioning because dat/gitinfo.txt is already present,
when creating dat/gitinfo.txt successfully, and when creation fails
because perl can't find NHgithook.pm.  It hasn't been tested when
perl itself is absent.
2018-03-04 14:17:13 -08:00
nhmall
2317288150 more nmake spotless 2018-03-04 10:37:43 -05:00
nhmall
a120d99005 msc makefiles update timestamp on copied files 2018-03-04 10:30:17 -05:00
nhmall
dee2fea82d msc Makefile 2018-03-04 10:25:11 -05:00
nhmall
12562694a9 update nmake spotless for windows 2018-03-04 10:09:35 -05:00
nhmall
939bd356a4 more msc makefile tweaks 2018-03-04 09:54:29 -05:00
nhmall
777317224b windows cmdline dependency bit 2018-03-04 09:11:01 -05:00
nhmall
eddfcc4422 windows cmdline Makefile 2018-03-04 09:07:16 -05:00
PatR
4328cf49ef fix prayer infinite loop
Reported internally, if a prayer resulted in 'fix all troubles' and
one of those was TROUBLE_STUCK_IN_WALL but safe_teleds() couldn't find
any place to relocate the hero to, nothing was done and STUCK_IN_WALL
would be found again as the next trouble to fix.  Since safe_teleds()
eventually resorts to trying every single spot on the map, there was
no other result possible than failing to find an available spot again,
nothing would be done, and next trouble would be STUCK_IN_WALL, ad
naseum.

I started out with a fix that looked for secret corridors to expose
and doors to open, to make more space available, then try to move a
monster off the level, then try digging out rock and/or walls and
smashing boulders.  None of those guarantee success and I got bogged
down by the digging case.  This was going to be a last resort if all
of those still failed to make somewhere to move the hero, but for now,
at least, I'm skipping all that other stuff and going directly to the
last resort:  give the hero Passes_walls ability for a short time, and
let him or her find own way out of trouble.  The next trouble to fix
won't be STUCK_IN_WALL because Passes_walls makes that a non-issue.

I'm not thrilled with the new messages involved but want to get this
behind me.
2018-03-03 16:46:39 -08:00
PatR
2111abdc29 buried_ball()
Noticed when I was looking at float_up()/float_down() vs being trapped.
(I have a substantial patch for that but it involves infrastructure
changes so will have to go into master instead of the 3.6.0 branch.)
buried_ball() was using nested loops as a very convoluted way to test
  if (otmp->ox >= cc->x - 2 && otmp->ox <= cc->x + 2
   && otmp->oy >= cc->y - 2 && otmp->oy <= cc->y + 2)
I think this revised version is closer to what was intended.

There are issues.  buried_ball() finds the buried iron ball nearest to
the specified location--which is always the hero's current location--
rather than the one which was 'uball' before being buried.  A player
can spot that since iron balls aren't necessarily identical.  Also, it
searches within a radius of two steps but a tethered hero is only
allowed to move one step away from buried ball, so something is off.
2018-03-03 15:26:49 -08:00
PatR
6bd8efe510 aklys tweaks
It turns out that Mjollnir before the recent aklys enhancement and
aklys since then would end up both wielded and quivered if it returned
to thrower's hand while quiver was empty.  Remove it from quiver before
restoring it to hand.

Limit the throwing range of an aklys if it is expected to return (ie,
thrown while wielded as primary) since it is a "thonged club" which is
supposedly attached by a cord to the thrower's wrist or hand.  I have
no idea how long a real cord like that might be.  I set the range limit
to BOLT_LIM/2.  Shorter makes throw-and-return uninteresting for an
item that needs to be wielded to throw--so would probably be swapped
back and forth with a stronger melee weapon or longer range missile
weapon--and longer seems absurd.
2018-03-03 10:54:43 -08:00
nhmall
27a7538e38 enable USE_WIN_IOCTL code unless explicitly avoided
Changes to be committed:
	modified:   doc/fixes36.1
	modified:   include/unixconf.h
	modified:   sys/share/ioctl.c

github pull request #19 made reference to resulting code behaviour
being better when windows were resized when USE_WIN_IOCTL was defined.

The logic for including the necessary enabling code in the build in
sys/share/ioctl.c was an explicit "opt-in" strategy, so anything not
deliberately and explicitly listed was not able to take advantae
of the potentially useful code. The need to add #defines to that
list would have been perpetual as new platforms came online, and
unnecessarily restrictive for everything else.

This switches the logic to include the code by default now,
and thus
unless there is an explicit "opt-out" by uncommenting
AVOID_WIN_IOCTL in include/unixconf.h

Some platforms, and we have no way of knowing which ones, may have
to ensure that AVOID_WIN_IOCTL is #define'd.
2018-03-03 12:58:53 -05:00
nhmall
9ee13bdd22 typo missing word 2018-03-03 10:24:26 -05:00
nhmall
4029e2580a interim dungeoneer, README update 2018-03-03 10:19:47 -05:00
Pasi Kallinen
09554c2b96 Make spotless should remove qt4 specific files 2018-03-03 16:58:07 +02:00
Pasi Kallinen
68523fe88c Add catch-all database entry for the polearms 2018-03-03 16:15:20 +02:00
PatR
36e4d80547 Cleaver update
I worked on this a while back but didn't commit it because I couldn't
figure out the dead monster which wouldn't die.  Pasi beat me to that.

Clean up the Cleaver code some and make the three-target swing alternate
between counter-clockwise and clockwise to simulate normal right-to-left
swing followed by left-to-right backswing.  (Alternation happens on each
swing regardless of whether it is consecutive with the most recent one.
That's suboptimal but easy....)  Also, stop three-target attack early if
hero is life-saved after being killed by a passive counter-attack from
the first or second target.

Prevent rogue backstab and two-hander breaking foes' weapons when using
Cleaver hand-to-hand because getting more than one of either of those
bonuses at a time would be excessive.  I think allowing those for the
primary target but not for the two adjacent ones would be better, but I
just thought of that and am not going back for another round of revising.

This doesn't incorporate the two pull requests:  one to avoid hitting
tame or peaceful adjacent targets unless the primary was also tame or
peaceful, the other to avoid hitting unseen adjacent targets.  I'm not
sure if that includes remembered-unseen 'I' on the spot or no monster
shown at all.  (There's a third one about updating the map but it isn't
needed for the existing Cleaver code either before or after this patch.)
I'm in favor of the first one and am not sure about the second.  My
original concern was that someone could use Cleaver to find/hit three
unknown monsters at a time via 'F' prefix, but forcefight aimed at
thin air doesn't reach the Cleaver code so that can't happen, nor can
attacking two known close monsters at once by targetting an empty spot
between them.
2018-03-02 18:19:23 -08:00
nhmall
d4ea0f6ce6 date bit 2018-03-02 15:35:07 -05:00
Pasi Kallinen
d136ffbba6 fixes typo bit, pt3 2018-03-02 16:56:18 +02:00
Pasi Kallinen
fc74b77c94 fixes typo bit, pt2 2018-03-02 16:38:52 +02:00
Pasi Kallinen
a7df3ce4c7 fixes typo bit 2018-03-02 16:32:29 +02:00
Pasi Kallinen
a9b6b6a4eb Fix Cleaving giving dmonsfree warning
Due to inverted logic, hitting a blue jelly with the Cleaver could cause
a dmonsfree warning - the jelly would die, but then come back to life
via the passive attack.  This is a post-3.6.0 bug
2018-03-02 15:52:27 +02:00
Pasi Kallinen
ee64ef5482 Fix comment typo 2018-02-28 09:17:06 +02:00
PatR
8acc72b53a Mjollnir bit
Ue the same object name formatting for the new "Mjollnir fails to
return" message as is used for most of the other throwing messages.
2018-02-27 09:28:15 -08:00
PatR
b73d45fd66 throw-and-return for aklys
The comment I added to data.base--to explain that despite what the
short description says, an aklys wouldn't return to sender after being
thrown--was bugging me, so I've made aklyses behave like Mjollnir.
If thrown when wielded as primary weapon, it will usually return and
usually be re-wielded.  I also added a new message when either thrown
Mjollnir or thrown aklys is expected to return and fails to do so.

Most of the diff to dothrow.c is a change in indentation level.  The
amount of code needed was quite small.

Autopickup for thrown Mjollnir which had failed to return was putting
it into the quiver slot if that was empty.  Note quite an outright bug,
but it started wielded and can't be thrown if quivered, so exclude it
from the stuff that will auto-fill the quiver slot when added to invent
(post-3.6.0 issue).
2018-02-26 11:18:29 -08:00
PatR
f3aaee792f fix #H4997 - "Congratulations" -> "Well done"
Reported suggested that "congratulations" was too modern for use by
your god during ascension and that the longer phrases which were
shortened to yield it were too modest for the god to use.  Make the
suggested change.
2018-02-26 08:35:33 -08:00
keni
ef0448dd79 Merge githash 2018-02-26 09:03:12 -05:00
nhmall
4126b1e57a final msdos bit un-revert a reversion 2018-02-25 18:15:28 -05:00
nhmall
8db8a14429 fixes36.1 catch-up bit for deaf whistling 2018-02-25 17:52:33 -05:00
nhmall
c475a5f0c6 Bug 734 - #H4611: Whistling while deaf
fixed
2018-02-25 17:42:31 -05:00
nhmall
424ce85e79 msdos Makefile update for posix regex 2018-02-25 16:28:46 -05:00
nhmall
418b5e9034 update msdos header 2018-02-25 15:15:10 -05:00
nhmall
176b85fbb7 update msdos Makefile so at least possible to build 2018-02-25 15:09:56 -05:00
nhmall
5370c0d337 resolve part of H4422 related to .exe versions
I also saw
 that looking at the details of both windows .exes that they indicate file
 version 3.5.0.0. Shouldn't it be 3.6.0.0 for the NH version 3.6.0
2018-02-25 12:20:50 -05:00
nhmall
269363467c another msdos bit 2018-02-24 23:32:54 -05:00
nhmall
9773742e82 fix some msdos build errors 2018-02-24 23:26:25 -05:00