Previously, nothing special would happen when a combat loss with a regular enemy NPC was experienced. However now, combat loss is handled properly. When the player loses to a regular enemy NPC, upon spawning back into the main map, their whole inventory is wiped and all their current experience progress in this level (eg they're level 2 with 80 experience points on the way to level 3, but once they lose, they're still level 2 but with no experience points on the way to level 3). However, they are respawned with half of their hunger and health so that they have something to work with after dying.
Fixes / Closes # (issue)
Type of change
[x] Bug fix (non-breaking change which fixes an issue)
[x] This change requires a documentation update
How Has This Been Tested?
Visual Testing through play throughs has been completed to ensure this works to test this there's two ways.
Quick Way:
Walk around and pick-up some items before going into combat (don't need much, literally one or two will do). Go into combat and kill one animal (so that you gain some exp)(You can use insta-kill if you want). Then after this go into combat again and click the insta-lose button. You will see that when returning to the overworld, you lose all your progress experience, your health and hunger are now at 50%, and your inventory is gone (on the sidebar).
Long Way:
Exactly the same as the short way, except you defeat the first enemy manually using attack button. And before going into the second combat, find a monkey that can damage you enough so that when you go into combat with it, you can almost guarantee that if you keep guarding or sleeping that if it attacks, it will kill you (this way is kind of painful because it takes a minute for the monkey to throw enough bananas to damage you enough).
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules
Description
Previously, nothing special would happen when a combat loss with a regular enemy NPC was experienced. However now, combat loss is handled properly. When the player loses to a regular enemy NPC, upon spawning back into the main map, their whole inventory is wiped and all their current experience progress in this level (eg they're level 2 with 80 experience points on the way to level 3, but once they lose, they're still level 2 but with no experience points on the way to level 3). However, they are respawned with half of their hunger and health so that they have something to work with after dying.
Fixes / Closes # (issue)
Type of change
How Has This Been Tested?
Visual Testing through play throughs has been completed to ensure this works to test this there's two ways.
Quick Way: Walk around and pick-up some items before going into combat (don't need much, literally one or two will do). Go into combat and kill one animal (so that you gain some exp)(You can use insta-kill if you want). Then after this go into combat again and click the insta-lose button. You will see that when returning to the overworld, you lose all your progress experience, your health and hunger are now at 50%, and your inventory is gone (on the sidebar).
Long Way: Exactly the same as the short way, except you defeat the first enemy manually using attack button. And before going into the second combat, find a monkey that can damage you enough so that when you go into combat with it, you can almost guarantee that if you keep guarding or sleeping that if it attacks, it will kill you (this way is kind of painful because it takes a minute for the monkey to throw enough bananas to damage you enough).
Checklist: