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

[Magiclysm] Attunements - Rock Blast spell #44682

Merged
merged 3 commits into from
Oct 8, 2020

Conversation

KorGgenT
Copy link
Member

@KorGgenT KorGgenT commented Oct 7, 2020

Summary

SUMMARY: Mods "[Magiclysm] Attunements - Rock Blast spell"

Purpose of change

Adds a new spell effect called directed_push in order ot be used by several attunement spells introduces the rock blast attunement spell.

Describe the solution

new spell effect: directed push
first, use a schwartzian transform (thanks kevin) to organize the area by distance from the caster. then, depending on if the spell's damage is negative or positive, multiply by 1 or -1 to make sure the range based for loop iterates over the multimap in the right order. then we have a couple static funcitons i pulled out of area_expander in order to easily share the code for moving fields, items, and monsters.

Describe alternatives you've considered

try to reuse area_expander somehow. now that i know about this transform it's likely way over-engineered anyway.

Testing

Spawn in a couple monsters/items in an area and use the two debug spells to make sure the push is working properly. rock blast will very likely do too much damage to most monsters in order to get the pushback effect, but there should be a number of them that work.

Additional context

I'm considering adding some kind of "resistance" to the pushback based on something, but i'm not sure what at this time.

requires #44481

@KorGgenT KorGgenT added [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Mods: Magiclysm Anything to do with the Magiclysm mod labels Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Mods: Magiclysm Anything to do with the Magiclysm mod
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants