Advertisement
roninator2

Cozziekuns Earthbound Addon - Freeze Fix

Dec 17th, 2024
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.44 KB | None | 0 0
  1. # https://forums.rpgmakerweb.com/index.php?threads/vx-ace-need-help-with-cozziekuns-earthbound-scripts.138226/#post-1200040
  2.  
  3. class Scene_Battle
  4.   def create_actor_command_window
  5.     @actor_command_window = Window_ActorCommand.new
  6.     @actor_command_window.set_handler(:attack, method(:command_attack))
  7.     @actor_command_window.set_handler(:skill,  method(:command_skill))
  8.     @actor_command_window.set_handler(:guard,  method(:command_guard))
  9.     @actor_command_window.set_handler(:item,   method(:command_item))
  10.     @actor_command_window.set_handler(:escape, method(:command_escape))
  11.     @actor_command_window.set_handler(:cancel, method(:prior_command))
  12.     @actor_command_window.help_window = @actor_help_window = Window_ActorHelp.new
  13.   end
  14.  
  15.   alias r2_sprite_effect_update_basic   update_basic
  16.   def update_basic(*args)
  17.     @old_enemy.sprite_effect_type = nil if !@old_enemy.nil? && !@enemy_window.active
  18.     @old_enemy = @enemy_window.active ? @enemy_window.enemy : nil
  19.     r2_sprite_effect_update_basic(*args)
  20.   end
  21.  
  22.   def update_enemy_whiten(old_enemy)
  23.     if @old_enemy.nil?
  24.       @enemy_window.enemy.sprite_effect_type = :whiten if @enemy_window.active
  25.     elsif @enemy_window.active
  26.       @old_enemy.sprite_effect_type = nil if @old_enemy != @enemy_window.enemy
  27.       @enemy_window.enemy.sprite_effect_type = :whiten
  28.     elsif !@enemy_window.active
  29.       @old_enemy.sprite_effect_type = nil if !@old_enemy.dead?
  30.     end
  31.   end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement