Advertisement
dsiver144

DSI Hide Enemy States

Jul 28th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.82 KB | None | 0 0
  1. #==============================================================================
  2. # DSI Hide Enemy States
  3. # -- Last Updated: 2017.07.27
  4. # -- Author: dsiver144
  5. # -- Level: Easy
  6. # -- Requires: n/a
  7. #==============================================================================
  8. $imported = {} if $imported.nil?
  9. $imported["DSI-HideEnemyState"] = true
  10. #==============================================================================
  11. # + Updates
  12. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  13. # 2017.07.27 - Finish first version.
  14. #==============================================================================
  15. # + Instructions
  16. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  17. # To install this script, open up your script editor and copy/paste this script
  18. # to an open slot below ▼Materials but above ▼Main. Remember to save.
  19. # * You should put this script below all script relate to drawing enemy state
  20. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  21. # Enemy's Notetags:
  22. # + <hide state icon>
  23. # + <hide state popup>
  24. # + <hide all>
  25. #==============================================================================
  26. class Sprite_Battler < Sprite_Base
  27. #----------------------------------------------------------------------------
  28. # * overwrite method: create_states_icons
  29. #----------------------------------------------------------------------------
  30. def create_states_icons
  31. if !@battler.note.include?("<hide state icon>") && !@battler.note.include?("<hide all>")
  32. @states_icons = LeStates_Icons.new(@battler,self)
  33. end
  34. end
  35. #----------------------------------------------------------------------------
  36. # * overwrite method: dispose_states_icons
  37. #----------------------------------------------------------------------------
  38. def dispose_states_icons
  39. @states_icons.dispose_icons if @states_icons
  40. end
  41. #----------------------------------------------------------------------------
  42. # * overwrite method: update_states_icons
  43. #----------------------------------------------------------------------------
  44. def update_states_icons
  45. @states_icons.update if @states_icons
  46. end
  47. end # Sprite_Battler
  48.  
  49. class Game_Enemy < Game_Battler
  50. #----------------------------------------------------------------------------
  51. # * new method: note
  52. #----------------------------------------------------------------------------
  53. def note
  54. $data_enemies[@enemy_id].note
  55. end
  56. #--------------------------------------------------------------------------
  57. # ● Execute Popup Add New State
  58. #--------------------------------------------------------------------------
  59. def execute_popup_add_new_state(state_id)
  60. st = $data_states[state_id]
  61. return if self.note.include?("<hide state popup>") || self.note.include?("<hide all>")
  62. if self.hp > 0
  63. unless (SceneManager.scene_is?(Scene_Battle) and !STATES_POPUP_BATTLE) or
  64. (SceneManager.scene_is?(Scene_Map) and !STATES_POPUP_MAP)
  65. self.damage.push([st.name.to_s,"States Plus",false,st.icon_index])
  66. end
  67. end
  68. end
  69. #--------------------------------------------------------------------------
  70. # ● Execute Popup Remove State
  71. #--------------------------------------------------------------------------
  72. def execute_popup_remove_state(state_id)
  73. return if self.note.include?("<hide state popup>") || self.note.include?("<hide all>")
  74. if state?(state_id) and self.hp > 0
  75. st = $data_states[state_id]
  76. unless (SceneManager.scene_is?(Scene_Battle) and !STATES_POPUP_BATTLE) or
  77. (SceneManager.scene_is?(Scene_Map) and !STATES_POPUP_MAP)
  78. self.damage.push([st.name.to_s,"States Minus",false,st.icon_index]) unless BattleManager.escape?
  79. end
  80. end
  81. end
  82. end # Game_Enemy
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement