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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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
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).
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.