From: arromdee Date: Sun, 13 Jan 2002 20:37:18 +0000 (+0000) Subject: Fixing a buglist bug. Also changing an unrelated buglist item a bit (it was X-Git-Tag: MOVE2GIT~3483 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b09c3e2e692439aca512f70e9ddc44a8ae00f98e;p=nethack Fixing a buglist bug. Also changing an unrelated buglist item a bit (it was mine to begin with, I thought I had a way to fix it but it turns out I didn't, so I was researching it again). Checked into CVS. --- diff --git a/doc/buglist b/doc/buglist index 82cb1ffd2..860f45a1b 100644 --- a/doc/buglist +++ b/doc/buglist @@ -3,10 +3,6 @@ Buglist: actual bugs that may get fixed someday ----------------------------------------------------------------------------- ============================================================================= -Using the '>' command to end controlled levitation doesn't set the -Heart of Ahriman's invocation timeout, allowing the player to resume -levitating immediately via #invoke. - A funny thing happened at the portal to Rodney's tower. Wearing levitation boots, I floated onto the portal, and was ported to the tower. Then I took off my boots, and got "You activated the magic @@ -250,17 +246,13 @@ small and quick (so the missile whizzed by)? Is the monster flying or on the ground? Is the player levitating? Is the player unusually short or tall (i.e., if the player is polymorphed), etc.... -There is a problem with alignment: if you change alignment, peaceful monsters -all stay the same and killing them is now bad for your new alignment--and thus -good for your old alignment. The "obvious" solution is to change the -peacefulness and relative alignment of the monsters whenever your alignment -changes. This does not work because since monsters only have a percentage -chance of peacefulness due to alignment, you can change and change back, -whereupon the monster peacefulness will be distributed differently than when -you started. This also ignores monsters on other levels, whose peacefulness -distribution would not change--for consistency, if you changed from lawful to -chaotic and back, since peacefulness of monsters on your own level got -redistributed, so would peacefulness on those other levels. +Monsters don't change either peacefulness or malign when the player changes +alignment. This can't be fixed because it would be impossible to ensure that +two alignment switches put the monsters back the way they were. For one thing, +monster peacefulness is based on the player's alignment record as well as his +type (and we don't want to change peacefulness every time the record changes!), +and for another, the monster's peacefulness might have changed from its initial +value and two switches wouldn't bring it back to normal. You can open/close doors diagonally, but cannot enter them diagonally. This seems inconsistent. [Comment: The main reason why this is blocked is diff --git a/doc/fixes33.2 b/doc/fixes33.2 index cb8d44b7d..7c84c90d5 100644 --- a/doc/fixes33.2 +++ b/doc/fixes33.2 @@ -384,6 +384,7 @@ monsters who can cast undirected spells don't need to be in combat with you messages consistent for all monster spells monsters casting spells at your displaced image now set mspec_used monsters without ranged spells don't print curse messages for ranged spells +going down to floor using > should set Heart of Ahriman invocation timeout Platform- and/or Interface-Specific Fixes diff --git a/include/extern.h b/include/extern.h index 6b74dc82c..7e5f7ee03 100644 --- a/include/extern.h +++ b/include/extern.h @@ -77,6 +77,7 @@ E int NDECL(doinvoke); E void FDECL(arti_speak, (struct obj *)); E boolean FDECL(artifact_light, (struct obj *)); E long FDECL(spec_m2, (struct obj *)); +E boolean FDECL(artifact_has_invprop, (struct obj *,UCHAR_P)); /* ### attrib.c ### */ diff --git a/src/artifact.c b/src/artifact.c index 0e043be23..8df5d0184 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -1332,6 +1332,15 @@ void arti_speak(obj) return; } +boolean +artifact_has_invprop(otmp, inv_prop) +struct obj *otmp; +uchar inv_prop; +{ + const struct artifact *arti = get_artifact(otmp); + + return((boolean)(arti && (arti->inv_prop == inv_prop))); +} #endif /* OVLB */ diff --git a/src/do.c b/src/do.c index 1b1449cbe..821560bd6 100644 --- a/src/do.c +++ b/src/do.c @@ -711,8 +711,21 @@ dodown() if (Levitation) { if ((HLevitation & I_SPECIAL) || (ELevitation & W_ARTI)) { /* end controlled levitation */ - if (float_down(I_SPECIAL|TIMEOUT, W_ARTI)) - return (1); /* came down, so moved */ + if (ELevitation & W_ARTI) { + struct obj *obj; + + for(obj = invent; obj; obj = obj->nobj) { + if (obj->oartifact && + artifact_has_invprop(obj,LEVITATION)) { + if (obj->age < monstermoves) + obj->age = monstermoves + rnz(100); + else + obj->age += rnz(100); + } + } + } + if (float_down(I_SPECIAL|TIMEOUT, W_ARTI)) + return (1); /* came down, so moved */ } floating_above(stairs_down ? "stairs" : ladder_down ? "ladder" : surface(u.ux, u.uy));