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

Slays/brands with birth_percent_damage add hidden extra damage #5620

Open
tomm opened this issue Feb 11, 2023 · 5 comments
Open

Slays/brands with birth_percent_damage add hidden extra damage #5620

tomm opened this issue Feb 11, 2023 · 5 comments
Milestone

Comments

@tomm
Copy link
Contributor

tomm commented Feb 11, 2023

Looks like this has been the case since commit 40caf65

o_melee_damage() adds a flat +dam for slays, which is 10*slay multipler - 10. Ie a brand with 2.5x multiplier adds a flat 15 damage to the attack.

o_obj_known_damage() doesn't take this flat brand/slay +dam into account.

I don't know what the fix is, since I don't know which function is doing what was actually intended. The flat +dam doesn't seem in keeping with the general oangband damage calculation scheme, though...

@NickMcConnell
Copy link
Member

IIRC the actual damage is correct

@NickMcConnell NickMcConnell added this to the Triage milestone Feb 11, 2023
@backwardsEric
Copy link
Contributor

It does look like o_obj_known_damage() does include the additive term (see lines 1046, 1077, 1082, and 1113 of obj-info.c in the current master branch). The additive term is in OAngband: line 839 of https://github.com/oangband/Oangband/blob/master/src/attack.c .

@backwardsEric
Copy link
Contributor

Though from what I see, the scaling of the added term in the object information calculations is not correct thus #5703 .

@NickMcConnell NickMcConnell modified the milestones: Triage, 4.2 Jul 19, 2023
@NickMcConnell
Copy link
Member

So is this done?

@backwardsEric
Copy link
Contributor

I believe it is. What I see is that the actual calculations and those for the object information agree, and that they match what's in OAngband. tomm may want to look at it and see what he thinks.

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

No branches or pull requests

3 participants