-
Notifications
You must be signed in to change notification settings - Fork 161
Fix Issue #149 - Amulet of Life Saving does not protect against boulders #167
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
Fix Issue #149 - Amulet of Life Saving does not protect against boulders #167
Conversation
Update to Latest Code
+ 5 blank spellbooks.
lheckemann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I like the way you've done this, although it's symptomatic of a design issue with the original codebase as opposed to any decision on your behalf; killing entities all over the place leads to chaotic edge cases when anything about how death works changes, and the fact that this bug exists in the first place is also a symptom of this issue. It would be nice to fix death as a whole rather than just addressing the corner case. Overall I'm neutral on this — I suppose merging it would make sense since it fixes the issue but it's certainly not a good long-term solution.
|
I am rarely satisfied with my solutions, but have been instructed to not refactor as much as possible until the release of the new update.
There are many refactorings I have in mind, but until the release, duplications (following how the code currently exists) is the method I took.
I will review this further today or tomorrow.
null
|
|
After reviewing, I can say that I agree with your statements. When looking for how life saving amulets worked, it surprised me how it was implemented. I could potentially look into refactoring how death is handled at a later point. For now, I think it's best to simply implement it like this, although it'll have to be re-implemented for the new changes in #159. |
|
Did the changes in 41d55c7 to be merged, closing this PR |
fix off-by-one error in map gen
This is a fix for #149.
The issue was the existing code for being hit by a boulder did not take into account Amulets of Life Saving, and therefore, was useless to protect against them. The new implementation checks to see if the Entity is a Player, and is wearing an Amulet of Life Saving, if so, act as if the Player survived the hit, by destroying the boulder.
Note: This code will have to be duplicated for the additional function added in #159.Note: This code will have to be re-implemented for the newest changes in #159. I will do that after #159 is merged.