Advertisement
roninator2

Alistair Engine Thorn Effect - Contact Damage

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