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

"min_dot" and "max_dot" spell fields don't function when negative values #77470

Closed
Daved27hundred opened this issue Oct 31, 2024 · 4 comments · Fixed by #77674
Closed

"min_dot" and "max_dot" spell fields don't function when negative values #77470

Daved27hundred opened this issue Oct 31, 2024 · 4 comments · Fixed by #77674
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility

Comments

@Daved27hundred
Copy link
Contributor

Daved27hundred commented Oct 31, 2024

Describe the bug

While working on #77113 I found that the spell I had set up to heal the player upon eating the sandwich didn't work - it's set to have a dot_min and dot_max value set to a negative integer, so that it would slowly heal the player instead of hurt them. This doesn't work, despite me looking it over, trying numerous fixes and consulting with some people. I was told to make this bug report.

Attach save file

Lola-trimmed.tar.gz
NOTE: this save needs to run on the version from #77113.

Steps to reproduce

  1. take damage
  2. debug spawn in the "cosmic dagwood" inventor item. This item has a spell on consumption which causes a min_dot and max_dot value with a value of -5 (it was set like this for testing purposes. I'll balance it after I've made it work.)
  3. Consume the dagwood. examine your health and note that it doesn't heal.

Expected behavior

a negative value for these fields should give negative damage, healing the player, so I've been told. It seems like they just do nothing.

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.18363.2274 (1909)
  • Game Version: b7cfa5d [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth],
    Xedra Evolved [xedra_evolved]
    ]

Additional context

@Daved27hundred Daved27hundred added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Oct 31, 2024
@Daved27hundred Daved27hundred changed the title "min_dot" and "max_dot" spell fields don't function when negative "min_dot" and "max_dot" spell fields don't function when negative values Oct 31, 2024
@RedMisao
Copy link
Contributor

I can confirm it's not the spell cosmic_dagwood_regeneration. I added the json to a file, debugged lvl 1 to a character, set ALL hp to 1, casted it a few times, and it's not healing. (Note: I did not try adding the whole json (food, recipe, etc.), just the spell endpoint).

Then, I set the values to positive to deal damage, and that's working as intended. Doing this requires adding "damage_type": "pure" to the spell json, else it throws a "unknown "" damage type" error.

I tried with another heal dot spell I've done in the past (third party mod) as reference, and that isn't working either.

@Daved27hundred
Copy link
Contributor Author

I can confirm it's not the spell cosmic_dagwood_regeneration. I added the json to a file, debugged lvl 1 to a character, set ALL hp to 1, casted it a few times, and it's not healing. (Note: I did not try adding the whole json (food, recipe, etc.), just the spell endpoint).

Then, I set the values to positive to deal damage, and that's working as intended. Doing this requires adding "damage_type": "pure" to the spell json, else it throws a "unknown "" damage type" error.

I tried with another heal dot spell I've done in the past (third party mod) as reference, and that isn't working either.

thank god, I was hesitant to make this issue report because I wasn't sure if it was a mistake on my end lmao.

@GuardianDll
Copy link
Member

GuardianDll commented Nov 7, 2024

did you try to use SPLIT_DAMAGE flag? it looks for me that without this field it would pick a random body part to heal, instead of entire body

@GuardianDll
Copy link
Member

Oh yeah, after closer inspection it seems i, for some reason, added if( sp.damage_dot( caster ) > 0 ) check, that simply ignores dots that have zero or negative dot damage
Also found a bug that made dots affect all bodyparts even without SPLIT_DAMAGE or PERCENTAGE_DAMAGE flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants