Advertisement
roninator2

Pacman Enemy HUD patch

Dec 5th, 2024
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.53 KB | None | 0 0
  1. #===============================================================================
  2. #
  3. # Enemy HUD (1.3)
  4. # 15/4/2012
  5. # By Pacman (ported to VXA from a VX script also by Pacman)
  6. # patch by Roninator2
  7. # Fixes hidden enemies
  8. #===============================================================================
  9.  
  10. class Window_EnemyHUD < Window_BattleStatus
  11.   #--------------------------------------------------------------------------
  12.   # * Get item max
  13.   #--------------------------------------------------------------------------
  14.   def item_max
  15.     @troop_hidden = 0
  16.     $game_troop.members.each do |enemy|
  17.       if enemy.hidden?
  18.         @troop_hidden += 1
  19.       end
  20.     end
  21.     return $game_troop.members.size - @troop_hidden - $game_troop.dead_members.size
  22.   end
  23.   #--------------------------------------------------------------------------
  24.   # * Get enemy
  25.   #--------------------------------------------------------------------------
  26.   def enemy
  27.     $game_troop.alive_members[@index]
  28.   end
  29.   #--------------------------------------------------------------------------
  30.   # * Draw Item
  31.   #     index : item to be drawn
  32.   #--------------------------------------------------------------------------
  33.   def draw_item(index)
  34.     rect = item_rect(index)
  35.     rect.x += 4
  36.     rect.width -= 8
  37.     contents.clear_rect(rect)
  38.     contents.font.color = normal_color
  39.     enemy = $game_troop.alive_members[index]
  40.     return if enemy.hidden?
  41.     draw_basic_area(basic_area_rect(index), enemy)
  42.     draw_gauge_area(gauge_area_rect(index), enemy)
  43.   end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement