tposney / midi-qol

Other
5 stars 0 forks source link

Bug with damage reduction applied twice #1067

Closed tposney closed 1 year ago

tposney commented 1 year ago

In GitLab by @pgervais70 on Nov 10, 2022, 06:07

When using an AE with system.traits.dr.all the damage reduction is a quarter instead of half. I think that’s because the reduction for non magical damage is applied as well as the one for the specific damage type. I think this line is the problem, it should probably be changed to add a continue in the if, like there is in most of the other if/else: https://gitlab.com/tposney/midi-qol/-/blob/v10/src/module/utils.ts#L299

tposney commented 1 year ago

Thanks - you're right - fix in 10.0.22

tposney commented 1 year ago

In GitLab by @pietschleonard on Nov 22, 2022, 24:16

FYI: the update 10.0.22 didn't fix it, the DR is still applied twice. Maybe you can have another look at it?

tposney commented 1 year ago

Can you export the actor that is having the damage against it quartered? I just re-tested and it's working as expected. There must be some combination of effects I'm not seeing.

tposney commented 1 year ago

In GitLab by @thatlonelybugbear on Nov 22, 2022, 12:34

There is an optional rule, under Rules tab in Workflow settings, which allows only the highest DR to be applied. Could it be off in your case? @pietschleonard

image

tposney commented 1 year ago

In GitLab by @pietschleonard on Nov 23, 2022, 20:02

@tposney @thatlonelybugbear thanks for your answers. In the meantime, I was able to narrow down the error: when I use add, the DR is multiplied. If I use custom, this is not the case. Could you please check that? From my pov it should work with add as well, for example the goliath's stone's endurance combined with heavy armor master. Besides that: it looks like inline rolls within dae effects don't work. Using [[1d12+@abilities.con.mod]] isn't calculated but the effect still shows the formula.

tposney commented 1 year ago

I'm confused. Can you export the actor with the effects on it? It's not clear to me if it is damage reduction (flags.midi-qol.DR) or damage resistance that is being considered (system.traits.dr).

For the inline rolls not working, how is the effect applied? What is the target field of the effect - the type of the target field affects when the roll is evaluated. Again a sample actor with the problem would help.