Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # DSI Hide Enemy States
- # -- Last Updated: 2017.07.27
- # -- Author: dsiver144
- # -- Level: Easy
- # -- Requires: n/a
- #==============================================================================
- $imported = {} if $imported.nil?
- $imported["DSI-HideEnemyState"] = true
- #==============================================================================
- # + Updates
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # 2017.07.27 - Finish first version.
- #==============================================================================
- # + Instructions
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # To install this script, open up your script editor and copy/paste this script
- # to an open slot below ▼Materials but above ▼Main. Remember to save.
- # * You should put this script below all script relate to drawing enemy state
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # Enemy's Notetags:
- # + <hide state icon>
- # + <hide state popup>
- # + <hide all>
- #==============================================================================
- class Sprite_Battler < Sprite_Base
- #----------------------------------------------------------------------------
- # * overwrite method: create_states_icons
- #----------------------------------------------------------------------------
- def create_states_icons
- if !@battler.note.include?("<hide state icon>") && !@battler.note.include?("<hide all>")
- @states_icons = LeStates_Icons.new(@battler,self)
- end
- end
- #----------------------------------------------------------------------------
- # * overwrite method: dispose_states_icons
- #----------------------------------------------------------------------------
- def dispose_states_icons
- @states_icons.dispose_icons if @states_icons
- end
- #----------------------------------------------------------------------------
- # * overwrite method: update_states_icons
- #----------------------------------------------------------------------------
- def update_states_icons
- @states_icons.update if @states_icons
- end
- end # Sprite_Battler
- class Game_Enemy < Game_Battler
- #----------------------------------------------------------------------------
- # * new method: note
- #----------------------------------------------------------------------------
- def note
- $data_enemies[@enemy_id].note
- end
- #--------------------------------------------------------------------------
- # ● Execute Popup Add New State
- #--------------------------------------------------------------------------
- def execute_popup_add_new_state(state_id)
- st = $data_states[state_id]
- return if self.note.include?("<hide state popup>") || self.note.include?("<hide all>")
- if self.hp > 0
- unless (SceneManager.scene_is?(Scene_Battle) and !STATES_POPUP_BATTLE) or
- (SceneManager.scene_is?(Scene_Map) and !STATES_POPUP_MAP)
- self.damage.push([st.name.to_s,"States Plus",false,st.icon_index])
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● Execute Popup Remove State
- #--------------------------------------------------------------------------
- def execute_popup_remove_state(state_id)
- return if self.note.include?("<hide state popup>") || self.note.include?("<hide all>")
- if state?(state_id) and self.hp > 0
- st = $data_states[state_id]
- unless (SceneManager.scene_is?(Scene_Battle) and !STATES_POPUP_BATTLE) or
- (SceneManager.scene_is?(Scene_Map) and !STATES_POPUP_MAP)
- self.damage.push([st.name.to_s,"States Minus",false,st.icon_index]) unless BattleManager.escape?
- end
- end
- end
- end # Game_Enemy
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement