Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ■ Help Window+
- # ■ Author: Bigace360
- # ■ Version: 1.0
- # ■ Date: Feb. 1, 2011
- # Help window Plus adds the HP & SP gauge for enemies, it also allows the
- # developer choose which enemies will show ??? to hid the HP instead.
- #==============================================================================
- module ACE
- BACK_OPACITY = 255
- WINDOW_OPACITY = 255
- ENEMIES_IDS = [1]
- NEW_WINDOW = true #false returns the enemy help window back to default
- end
- #==============================================================================
- # ** Window_Base
- #==============================================================================
- class Window_Base < Window
- def draw_battle_hp(actor, x, y, width = 144)
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
- self.contents.font.color = normal_color
- self.contents.draw_text(x+35, y, 120, 32, "????" + " / " + "????", 1)
- end
- def draw_battle_sp(actor, x, y, width = 144)
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
- self.contents.font.color = normal_color
- self.contents.draw_text(x+35, y, 120, 32, "???" + " / " + "???", 1)
- end
- end
- #==============================================================================
- # ** Window_Help
- #==============================================================================
- class Window_Help < Window_Base
- include ACE
- alias ace_initial_window_help initialize
- def initialize
- ace_initial_window_help
- self.z = 4000 if $game_temp.in_battle
- self.back_opacity = BACK_OPACITY if $game_temp.in_battle
- self.opacity = WINDOW_OPACITY if $game_temp.in_battle
- end
- #--------------------------------------------------------------------------
- alias ace_set_enemy set_enemy
- def set_enemy(enemy)
- if NEW_WINDOW
- if enemy != @enemy
- self.contents.clear
- draw_actor_name(enemy, 4, 0)
- draw_actor_state(enemy, 140, 0)
- unless ENEMIES_IDS.include?(enemy.id)
- draw_actor_hp(enemy, 284, 0)
- draw_actor_sp(enemy, 460, 0)
- else
- draw_battle_hp(enemy, 284, 0)
- draw_battle_sp(enemy, 460, 0)
- end
- @enemy, @text = enemy, nil
- self.visible = true
- end
- else
- ace_set_enemy(enemy)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment