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

Changes related to material hatred/searing #204

Merged
merged 2 commits into from Mar 21, 2024

Conversation

entrez
Copy link
Contributor

@entrez entrez commented Dec 13, 2023

  • Fix: mon_hates_material and player race
  • Assess iron material damage for spiked pits

mon_hates_material(mondata.c) was not evaluating the hero's race
correctly due to upstream changes in 580c5a6, which removed the attempt
to assess the hero's race from is_elf, is_dwarf, etc macros (for reasons
described in that commit message).  However, mon_hates_material was
just passing gy.permonst.data to hates_material and relying on those
macros to include the hero's race in the equation, so it was no longer
working properly for an unpolymorphed hero after those changes.  Make it
explicitly check material hatred of the hero's race if not polymorphed.

I had to remove the 'const' qualifier on raceptr to use it here, because
keeping it would have led to a cascading requirement to add 'const' on
all sorts of other functions (hates_material -> dmgtype ->
dmgtype_fromattack...) -- and those really _should_ have const
parameters, but I think that would have to be an upstream change to
avoid risking a bunch of merge conflicts in subsequent merges.
The spikes in spiked pits are described as iron, so apply the additional
iron damage when the hero or a monster is harmed by them.
@entrez entrez changed the title sear stuff Changes related to material hatred/searing Dec 13, 2023
@copperwater copperwater merged commit 57ec473 into copperwater:master Mar 21, 2024
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.

None yet

2 participants