Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous bits and bobs #157

Merged
merged 17 commits into from
Oct 17, 2023
Merged

Conversation

saltwaterterrapin
Copy link
Collaborator

Various bugfixes, mostly very minor stuff.

I ran into a strange interaction where I dipped some potions of sleeping in
a potion of polymorph while blind, making the sleeping potions display as
"potions", but was told "Nothing seems to happen." And, indeed, they turned
out to still be sleeping potions.  To be fair I have no idea
how I knew that the potions are potentially different, but I've come to
accept that anything involving dknown will stop making sense if you pry deep
enough. Hopefully you have to pry a little deeper, now.

Also, polymorph potions were formally IDed even if you didn't know the appearance
of the polymorph potion you dipped into; this is no longer the case.
For consistency with other resist messages as well as destruction messages.
1. Don't allow angels to generate with a non-lawful Demonbane.

2. Move the blessing/fixing/enchanting of Medusa's arrows to m_initthrow. The Longbow of Diana enchants and blesses/curses its ammo after its creation, so the Medusa code being in mksobj actually wasn't *that* bad. It did make arrows from the Longbow automatically fixed, though.
…rtifacts

Don't tell the player what type of shield they have when blocking if they don't already know.

Also, I changed all the instakill messages so none use the actual artifact name. This is because if the artifact is !dknown, the message feels very incongruous---e.g. you are told that "The Hammer of the God incinerates foo!", but in your inventory it shows as merely "a heavy war hammer". One could argue that in such a case you should get no instakill message at all, but I think you could tell when you oneshot something even if you didn't know why. Of course, if you get *any* kind of message then informally IDing the artifact is trivial. So, I didn't bother to make any special cases if the weapon wasn't dknown, I just changed them for some "plausible deniability." I suppose another option would be formally setting dknown when an instakill happens, but that implies the in-game character has encyclopedic knowledge of artifacts and their effects, and also may confuse an unspoiled player.
Tortles are allowed to wear them now.

Loggers noticed this in a normal game---tricky to notice in wiztests because #polyself doesn't call break_armor(). Strange.
Re-implement commit 7e27860. It may look redundant, but I swear I know what I'm doing!*

*maybe
I finally remembered that the changelog exists before PRing! What a historic moment.
Now that artifact blasting is back to vanilla behavior, the Sword of Kas cannot be handled by cross-aligned characters, which it is considered a bane to. This is, in fact, also vanilla behavior, but (I think) not intended in the case of the Sword of Kas, so make it a special case.

Also, change death messages a little so that the material of a weapon that blasts you to death is only mentioned if relevant. (It is also not mentioned if the weapon happened also to be a bane, since that seems like the more salient characteristic).
If e.g. an elf got hit by an iron arrow, you got a message about it even if the elf wasn't visible.
If you discover an unseen monster via searching, it is passed over next time you search and you can search the other squares around you. If the monster shows up on warning, however, you rediscover the monster every time you search. Prevent such "discovery" when you are blind and warned of the monster---you don't learn any new information. (If not blind, you may discover a rock piercer or somesuch).
Polymorphing while wearing celestial dragon scales turned you into a celestial dragon. Not only are they M2_NOPOLY, but their scream attack aren't implemented for players. Polymorph into a blue dragon instead. Also, add a check in case other nopoly dragons are ever added.
Pets from the freeze/flame sphere spells only stay around for 100 turns or so, kept track of via msummoned. When it hits 1, the monster vanishes. When returning to a level that had summoned spheres, if you stayed away for longer than they were supposed to survive, then msummoned is set to 1. But, it is decremented in monmove.c, making msummoned 0, before the check for whether it's timed out is made. This makes abandoned spheres become normal pets. Instead, set msummoned to 2, so they wink out of existence properly.

It is a bit weird that the spheres wink out of existence immediately when you return. But, neither mon_catchup_elapsed_time nor its callers are equipped to handle getting rid of monsters, so it would be difficult to make the monsters disappear silently without some significant changes. Another option would be to treat it like withering and totally ignore it---it is still odd, but less obviously so than getting spammed with messages as soon as you arrive on the level. My impression is that no one uses these spells enough to notice either way though (their loss!).
Reported by Loggers. Yet another stun breath--related bug. ad_to_spelltyp returned a number in [-10,0] instead of [-21,-11], and specifically gave 0 in the case of magic missiles. Nonnegative numbers are associated with player actions.
Loggers was surprised when a shambling horror with an "engulf drown" attack worked on a tortle. Turns out gelatinous cubes also display as "engulf drown," which isn't great.

Speaking of "isn't great," my solution was just to add a special case in the moster lookup code. Shambling horrors suffocate, because 1) that's how the current mhitu code works, and 2) they probably aren't made of water.
@saltwaterterrapin
Copy link
Collaborator Author

Note: the changes I'm most uncertain about are "makemon tweaks" and the second half of "Fix: Messaging when blocking with !dknown shield, instakilling with a...." Also the Sword of Kas one is fairly impactful but not, I think, controversial.

@k21971 k21971 merged commit 42728f6 into k21971:master Oct 17, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants