Advertisement
roninator2

Alistair Engine Thorn Effect - Bleed

Dec 8th, 2024
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.89 KB | None | 0 0
  1. #===============================================================================
  2. # AE - Alistair Engine
  3. #===============================================================================
  4. # Code Snippet: Bleed Effect - reverse from Thorn Aura by Roninator2
  5. # Version: 1.0
  6. #
  7. # Changelog:
  8. # 1.0 - First Version
  9. #===============================================================================
  10. # Instructions:
  11. # Place the code snippet into YEA - Lunatic States above the part where it says
  12. # "Stop editing past this point". That's somewhere around line 188 by default.
  13. #
  14. #===NOTETAGS===================================================================
  15. #---> States <---
  16. #
  17. # <bleed x>
  18. # This will perform x damage to the user when acting
  19. #
  20. # <bleed_percent x%>
  21. # This will damage x% of user mhp when taking action.
  22. #
  23. # Recommended effect: <begin effect> or <while effect>
  24. # e.g. <begin effect: bleed_percent 4%>
  25. #===SCRIPT=CALLS================================================================
  26. #
  27. # | NONE
  28. #
  29. #===============================================================================
  30.  
  31.  
  32. #  You should copy everything that's below this line! Don't copy my header, it will just unneccesarily bloat
  33. #  your script!
  34.  
  35.         when /BLEED_PERCENT[ ](\d+)[%]/i
  36.             bleed = (user.mhp * ($1.to_i * 0.01)).round
  37.             target = user
  38.             target.perform_damage_effect
  39.             text = sprintf(YEA::BATTLE::POPUP_SETTINGS[:hp_dmg], bleed.group)
  40.             target.create_popup(text, "HP_DMG")
  41.             target.hp -= bleed
  42.             target.create_popup(state.name, "WEAK_ELE")
  43.             target.perform_collapse_effect if target.hp <= 0
  44.  
  45.         when /BLEED[ ](\d+)/i
  46.             bleed = $1.to_i
  47.             target = user
  48.             target.perform_damage_effect
  49.             text = sprintf(YEA::BATTLE::POPUP_SETTINGS[:hp_dmg], bleed.group)
  50.             target.create_popup(text, "HP_DMG")
  51.             target.hp -= bleed
  52.             target.create_popup(state.name, "WEAK_ELE")
  53.             target.perform_collapse_effect if target.hp <= 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement