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

PRE_X_STATUS_APPLY & POST_X_STATUS_APPLY #549

Closed
Syntax-Sculptor opened this issue Sep 24, 2024 · 2 comments · Fixed by #571
Closed

PRE_X_STATUS_APPLY & POST_X_STATUS_APPLY #549

Syntax-Sculptor opened this issue Sep 24, 2024 · 2 comments · Fixed by #571

Comments

@Syntax-Sculptor
Copy link
Collaborator

Syntax-Sculptor commented Sep 24, 2024

This would be a set of callbacks tied to status conditions. PRE_X_STATUS_APPLY would fire before a status condition is applied, allowing the user to either cancel the status effect from being applied or overriding the duration. POST_X_STATUS_APPLY fires after a status condition is applied.

The parameters tied to each status condition would correspond to the AddX method (i.e: A callback tied to knockback would pass the source, push direction, duration, and whether the entity takes impact damage).

@drpandacat
Copy link

just an idea but maybe there could be a status enum and one shared callback with an optional param. though im not sure if it would work with there being attributes exclusive to certain status effects such as poison and fire's damage that could be passed to their respective callbacks

it would be nice if you could return a table that could modify other things in addition to the duration (color, damage, slowvalue). maybe even control over boss status effect duration?

@Syntax-Sculptor
Copy link
Collaborator Author

just an idea but maybe there could be a status enum and one shared callback with an optional param. though im not sure if it would work with there being attributes exclusive to certain status effects such as poison and fire's damage that could be passed to their respective callbacks

Yeah the different parameters correlating to each status effect method wouldn't make it ideal to consolidate all of it into a single callback.

it would be nice if you could return a table that could modify other things in addition to the duration (color, damage, slowvalue)

That can be done and would be useful.

maybe even control over boss status effect duration?

Would be worth investigating as a separate issue down the road.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants