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

[1.10] More event hooks and morph "healing" fix #64

Merged
merged 3 commits into from
Aug 10, 2017

Conversation

asanetargoss
Copy link
Contributor

Adds a new event hook for morph ghost spawns, and separates all cancelable events into a Pre-event which can be canceled and a Post-event which occurs only after the corresponding action occurred successfully.

Included also is a fix for a new bug that occurs with ToughAsNails installed and difficulty set to Hard, which only surfaces with the upcoming Forge build (to succeed 12.18.3.2422). With the upcoming Forge build, morphing into a chicken should no longer kill you, however, morphing back into a mob with higher health would result in your HP being reset to full regardless of how much HP you had before you morphed. The fix I have given records the HP ratio that the player had before they morphed, to prevent using morphs to cheese heal.

I can PR these changes to other branches as needed.

@mchorse
Copy link
Owner

mchorse commented Aug 10, 2017

@asanetargoss thanks for this wonderful PR. There are some nice things you've got there! :)

I'll do the rest, because I'm going to work on Metamorph in few several days once I'll publish Aperture.

@mchorse mchorse merged commit 5a3bd37 into mchorse:master Aug 10, 2017
@mchorse
Copy link
Owner

mchorse commented Aug 10, 2017

I hope you don't mind that I formatted the code to make it look uniform with the rest of repository's code. I also converted event base classes to abstract (specifically AcquireMorpEvent, SpawnMorphEvent and MorphEvent), because there is no sense to create instances of those classes.

@asanetargoss
Copy link
Contributor Author

Perfect! Thank you. :D

No worries about the changes. I expect that from a pull request and am glad you have adjusted them to suit your work. Yea, the base events I wasn't sure about; I was trying to match with Forge's conventions but definitely agree that instantiating those events doesn't make sense.

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

Successfully merging this pull request may close these issues.

None yet

2 participants