(SOLVED) Erosion system (like Dofus)

I'm back and could test it, unfortunately it do not work :
Erosion system.png


I tested on a new project with only this plugin ON and this message happens when enemy attack the character.
I also tested this on TBS system and didn't work either but this time even when the hero attacked the enemy.
I am so sorry. I changed the name of the plugin just before sending it to you. However I forgot to change it for the parameters so they didn't get loaded. I have updated the plugin now.
Oh nice, now that's better! It works perfectly! @Magnus0808
Will try to do a lot of tests!

Edit :
Ok, this plugin is really perfect and work as intended!

After few tests for people who wants to use this system :

- Poison does not proc erosion.

- It is possible to have an attack deal more erosion than it actually damages the enemy, in this case the enemy will have more HP than it's maxHP on the HUD until the player turn, but then the correct amount is showed (But I guess this problem is due to the HUD refresh of LeTBS plugin).

- LeTBS directional facing damage reduction will reduce the amount damage taken but not the erosion.

- It is not possible to die by erosion alone, since the enemy will have a minimum of 1MaxHP.
Hi @Misappi,
I have fixed some bugs in the plugin. Actually I had forgotten to make the <baseErosion> tag work for enemies, that is fixed.
For the stuff you mentioned:
- I have made it possible for poison to proc erosion. The way poison works is by giving the target negative hp regen. I have made a parameter to enable erosion damage from total negative hp regen.

- I have mad it so if the hp is more than the max hp after erosion then it is updated at once

- I suppose the reason the damage reduction from directional facing isn't reflected in the erosion dmg is because of where the damage reduction is applyied in the code. I might make look into if I can make this compatibility later 🙂

- I have made a parameter to enable the possibility for dying from erosion.

I have updated my reply with the plugin 🙂
@Magnus0808 Woaw, I was not expecting that much, was already really happy with the old version!
Updated the first post, thank you so much for what you have done! :yhappy:
I just looked into why the directional damage wasn't reflected in the erosion dmg. The reason seems to be because LeTBS changes the damage value in the Game_Action.prototype.executeDamage, which makes it not work with the current erosion since I apply it the Game_Action.prototype.apply which I found to make a bit more sense.
Tbh I think LeTBS should have made their change in the Game_Action.prototype.makeDamageValue, if they had done that there shouldn't have been any problems lol 😛

Well I have made a change now that should make it compatiable, however I haven't actually tested it (I just assume it works 😎).
The plugin reply have been edited.

Original thread: https://forums.rpgmakerweb.com/threads/solved-erosion-system-like-dofus.104267/