[go: up one dir, main page]

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

Improve how spells target character body parts / limbs #76726

Closed
RedMisao opened this issue Sep 29, 2024 · 1 comment · Fixed by #76818
Closed

Improve how spells target character body parts / limbs #76726

RedMisao opened this issue Sep 29, 2024 · 1 comment · Fixed by #76818
Assignees
Labels
<Suggestion / Discussion> Talk it out before implementing

Comments

@RedMisao
Copy link
Contributor

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

Currently, spell attacks target the character's torso by default.

While it's direct approach, I believe it was implemented like this to simplify spell-limb interaction, after limbs were added.

Yet, with the current spell system that can use EoCs (and thus interconnect itself with other systems of the game), and the expanded limb system, it leads to oversimplification.
For example, by default, any attack spell will always land on the torso, which means a) it will never hit the player's limbs and thus b) the torso will always be the most damaged part of the player. Spell damage thus cannot be "spread" over the different body parts.

Spells do support the affected_body_parts field, which allow to specify which body_parts to hit. This is enough if the goal is for a "blind" spell to target the eyes, or a "cripple movement" spell to only hit the lower limbs.
However, for more generic attack spells, there's no simple (or convenient) way to support a spell from landing on random body parts, other than copying the same spell X times for each.

Solution you would like.

I propose to tweak the spell targeting system by:

  1. Making it so spells hit 1 of any of the current body parts at random by default, and
  2. Add a flag that picks any random number of body parts, and
  3. Add another flag that picks all body parts

In the three cases, affected_body_parts is used to whitelist specific body parts.

The probability to hit any body_part can be set to its hit_size.
Case 1. will be the default for most spells: if you're hit by a monster's spell, any of your body parts will have a proportional chance of be hit relative to their size, and just once. Imagine a magic missile hitting you in the left arm only.
Case 2. will be for "small aoe" spells: if you're hit by a monster spell, your torso and left arm can be hit, but not your right arm or legs. A "fire breath", or otherwise "shotgun/cone"-like attack.
Case 3, will be for "large aoe" spells: if you're hit your entire body will be affected. The lovely fireball.

This is not limited to attacks, it will also make it much easier to apply effects on body parts. Currently, if you want effects to target body parts independently, you need to make copies of the spell/effect and specify the body parts there, and do this for every intensity, making the number of lines to grow exponentially according to what you want to cause and where (#76648).

Describe alternatives you have considered.

  1. Do nothing.

  2. Split every "small" spell that is intended to land randomly on the player by the number of standard body_parts. The same but handled a bit different for "small aoe" and "large aoe" spells. Do the same for effects. Put multiple switches and randomizers in EoCs that interact with spells. Use conditions and hidden variables to prevent enchantment-derived stuff from stacking if they're applied in different body parts at the same time. Spend a proportionally large amount of time to maintain the json once changes are required.

  3. Use the melee monster special attacks with relatively simple, single-targetted elemental dmg spells.

Additional context

This is related to #76063, but from the SPELL side of things.

Turning current spells that apply effects into Case 3. may lead to having all of your body parts affected by a very nasty effect that is currently applied only once, like burning or being hurt by acid.

@RedMisao RedMisao added the <Suggestion / Discussion> Talk it out before implementing label Sep 29, 2024
@Psithief
Copy link
Contributor
Psithief commented Oct 1, 2024

This only makes Karma Arms more powerful as sacrificial limbs. 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Suggestion / Discussion> Talk it out before implementing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants