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

A way to have EOCs applied by effects track which limb the effect is on #73000

Open
Karol1223 opened this issue Apr 13, 2024 · 4 comments
Open
Labels
EOC: Effects On Condition Anything concerning Effects On Condition Limbs Limbs, mutable limbs, and code related to them. (P3 - Medium) Medium (normal) priority <Suggestion / Discussion> Talk it out before implementing

Comments

@Karol1223
Copy link
Contributor

Is your feature request related to a problem? Please describe.

#66358 aims to jsonize dermatik attacks, but I cannot do it properly since damage has to be done with an EOC, and EOCs cannot carry over the information which limb the effect has been applied to.

Solution you would like.

Any way for EOCs to track which limb the effect that activated them is on

Describe alternatives you have considered.

No response

Additional context

@Venera3 I curse thou with this feature request

@Karol1223 Karol1223 added the <Suggestion / Discussion> Talk it out before implementing label Apr 13, 2024
@Karol1223 Karol1223 changed the title A way to have EOCs applied by affects track which limb the effect is on A way to have EOCs applied by effects track which limb the effect is on Apr 13, 2024
@Venera3 Venera3 added (P3 - Medium) Medium (normal) priority Limbs Limbs, mutable limbs, and code related to them. EOC: Effects On Condition Anything concerning Effects On Condition labels Apr 13, 2024
@Venera3 Venera3 moved this to Todo in Limb System Overhaul Apr 13, 2024
@Venera3
Copy link
Member

Venera3 commented Apr 13, 2024

Ideally effect EoCs should carry the bodypart they are attached to as a context var. Alternatively effect flag + bodypart flag filtering would work, but isn't safe for multiple concurrent effects with the same flag.

@GuardianDll
Copy link
Member

GuardianDll commented Apr 13, 2024

yeah, having get_random_body_part() and get_random_body_part_of_type() in format

{
  "store_body_part": <"any"|"arm"|"tail"|"any_another_type"|> //or maybe with flag also
  "target_var": { "context_val": "foo" }
}

Would be enough

@John-Candlebury
Copy link
Member

John-Candlebury commented Apr 14, 2024

Just confirming the solution in #68251 is not effective for this?

An example of it being used:


  {
    "type": "effect_on_condition",
    "id": "EOC_ISO_HYPO_O",
    "eoc_type": "EVENT",
    "required_event": "character_gains_effect",
    "condition": {
      "and": [
        { "u_has_trait": "iso_hypo_o" },
        {
          "or": [
            { "compare_string": [ "bandaged", { "context_val": "effect" } ] },
            { "compare_string": [ "disinfected", { "context_val": "effect" } ] }
          ]
        }
      ]
    },
    "effect": [
      { "set_string_var": { "context_val": "bodypart" }, "target_var": { "u_val": "heal_part" } },
      { "u_add_effect": "iso_heal", "duration": 1, "target_part": { "u_val": "heal_part" } }
    ]
  },

@Venera3
Copy link
Member

Venera3 commented Apr 14, 2024

Oh, I didn't think about going through the gain effect trigger.
If that survives multiple applocations to different limbs without derping out that should work for this use case, yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EOC: Effects On Condition Anything concerning Effects On Condition Limbs Limbs, mutable limbs, and code related to them. (P3 - Medium) Medium (normal) priority <Suggestion / Discussion> Talk it out before implementing
Projects
Status: Todo
Development

No branches or pull requests

4 participants