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

add perceived pain assigning for math #76996

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

GuardianDll
Copy link
Member

Summary

None

Purpose of change

Prior to this, the only way to add pain to character bypassed all pain sensitivity/insensitivity like mutations, effects etc

Describe the solution

Add proper handling for such cases
Check all (i hope) pain assignments and add where it is necesary

Testing

Spoiler warning
{
"type": "effect_on_condition",
"id": "EOC_TEST_PAIN",
"effect": [
  { "math": [ "_current_pain_perceived", "=", "u_pain('type': 'perceived')" ] },
  { "math": [ "_current_pain_raw", "=", "u_pain('type': 'raw')" ] },
  {
    "u_message": "_current_pain_perceived: <context_val:current_pain_perceived>, _current_pain_raw: <context_val:current_pain_raw>"
  }
]

},

{
"type": "effect_on_condition",
"id": "VERY_TESTY_2",
"effect": [
{ "u_message": "we didn't modify anything" },
{ "run_eocs": [ "EOC_TEST_PAIN" ] },
{ "math": [ "u_pain('type': 'perceived')", "=", "100" ] },
{ "u_message": "We assign 100 perceived pain" },
{ "run_eocs": [ "EOC_TEST_PAIN" ] },
{ "math": [ "u_pain()", "=", "0" ] },
{ "u_message": "we zeroing pain" },
{ "run_eocs": [ "EOC_TEST_PAIN" ] },
{ "math": [ "u_pain('type': 'perceived')", "+=", "100" ] },
{ "u_message": "we add 100 perceived pain" },
{ "run_eocs": [ "EOC_TEST_PAIN" ] }
]
}

image

Additional context

Spend like a week thinking what i did wrong when, in fact, i did nothing wrong, it's just preceived pain works in weird way (also i messed up some variables so it printed utter bullshit)

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. NPC / Factions NPCs, AI, Speech, Factions, Ownership [JSON] Changes (can be) made in JSON Mods Issues related to mods or modding [C++] Changes (can be) made in C++. Previously named `Code` [Markdown] Markdown issues and PRs Mods: Magiclysm Anything to do with the Magiclysm mod EOC: Effects On Condition Anything concerning Effects On Condition Mods: Mind Over Matter json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Oct 12, 2024
@Maleclypse Maleclypse merged commit 470fb53 into CleverRaven:master Oct 24, 2024
28 of 29 checks passed
@GuardianDll GuardianDll deleted the math_pain branch October 24, 2024 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` <Documentation> Design documents, internal info, guides and help. EOC: Effects On Condition Anything concerning Effects On Condition [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs Mods: Magiclysm Anything to do with the Magiclysm mod Mods: Mind Over Matter Mods Issues related to mods or modding NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants