All pastes #466477 Raw Edit

Someone

public text v1 · immutable
·published 2007-05-01 00:22 UTC
rendered paste body
#==============================================================================
# ¦ Sprite_Battler
#------------------------------------------------------------------------------
#  ????????????????Game_Battler ???????????????
# ????????????????????
#==============================================================================

class Sprite_Battler < RPG::Sprite
 #--------------------------------------------------------------------------
 # ? ??????????
 #--------------------------------------------------------------------------
 attr_accessor :battler                  # ????
 #--------------------------------------------------------------------------
 # ? ??????
 #--------------------------------------------------------------------------
 def update
   super
   # ????? nil ???
   if @battler == nil
     self.bitmap = nil
     loop_animation(nil)
     return
   end
   # ????????????????????
   if @battler.battler_name != @battler_name or
      @battler.battler_hue != @battler_hue
     # ????????????
     @battler_name = @battler.battler_name
     @battler_hue = @battler.battler_hue
     self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
     @width = bitmap.width
     @height = bitmap.height
     self.ox = @width / 2
     self.oy = @height
     # ?????????????????? 0 ???
     if @battler.dead? or @battler.hidden
       self.opacity = 0
     end
   end
   # ??????? ID ????????????
   if @battler.damage == nil and
      @battler.state_animation_id != @state_animation_id
     @state_animation_id = @battler.state_animation_id
     loop_animation($data_animations[@state_animation_id])
   end
   # ??????????????
   if @battler.is_a?(Game_Actor) and @battler_visible
     # ???????????????????????
     if $game_temp.battle_main_phase
       self.opacity += 3 if self.opacity < 255
     else
       self.opacity -= 3 if self.opacity > 207
     end
     if $game_party.actors.size == 1
       self.x = @battler.screen_x + 240
     elsif $game_party.actors.size == 2
       self.x = @battler.screen_x + 160
     elsif $game_party.actors.size == 3
       self.x = @battler.screen_x + 80
     elsif $game_party.actors.size == 4
       self.x = @battler.screen_x
     end
   elsif @battler.is_a?(Game_Enemy)
     self.x = @battler.screen_x
   end
   # ??
   if @battler.blink
     blink_on
   else
     blink_off
   end
   # ??????
   unless @battler_visible
     # ??
     if not @battler.hidden and not @battler.dead? and
        (@battler.damage == nil or @battler.damage_pop)
       appear
       @battler_visible = true
     end
   end
   # ?????
   if @battler_visible
     # ??
     if @battler.hidden
       $game_system.se_play($data_system.escape_se)
       escape
       @battler_visible = false
     end
     # ??????
     if @battler.white_flash
       whiten
       @battler.white_flash = false
     end
     # ???????
     if @battler.animation_id != 0
       animation = $data_animations[@battler.animation_id]
       animation(animation, @battler.animation_hit)
       @battler.animation_id = 0
     end
     # ????
     if @battler.damage_pop
       damage(@battler.damage, @battler.critical)
       @battler.damage = nil
       @battler.critical = false
       @battler.damage_pop = false
     end
     # ????
     if @battler.damage == nil and @battler.dead?
       if @battler.is_a?(Game_Enemy)
         $game_system.se_play($data_system.enemy_collapse_se)
       else
         $game_system.se_play($data_system.actor_collapse_se)
       end
       collapse
       @battler_visible = false
     end
   end
   # ??????????
   self.y = @battler.screen_y + 10
   self.z = @battler.screen_z
 end
end


#==============================================================================
# ¦ Arrow_Actor
#------------------------------------------------------------------------------
#  ????????????????????????????? Arrow_Base ??
# ????????
#==============================================================================

class Arrow_Actor < Arrow_Base
 #--------------------------------------------------------------------------
 # ? ??????
 #--------------------------------------------------------------------------
 def update
   super
   # ?????
   if Input.repeat?(Input::RIGHT)
     $game_system.se_play($data_system.cursor_se)
     @index += 1
     @index %= $game_party.actors.size
   end
   # ?????
   if Input.repeat?(Input::LEFT)
     $game_system.se_play($data_system.cursor_se)
     @index += $game_party.actors.size - 1
     @index %= $game_party.actors.size
   end
   # ???????????
   if self.actor != nil
     if $game_party.actors.size == 1
       self.x = self.actor.screen_x + 240
     elsif $game_party.actors.size == 2
       self.x = self.actor.screen_x + 160
     elsif $game_party.actors.size == 3
       self.x = self.actor.screen_x + 80
     elsif $game_party.actors.size == 4
       self.x = self.actor.screen_x
     end
     self.y = self.actor.screen_y
   end
 end
end


#==============================================================================
# ¦ Window_BattleStatus
#------------------------------------------------------------------------------
#  ?????????????????????????????????
#==============================================================================

class Window_BattleStatus < Window_Base
 #--------------------------------------------------------------------------
 # ? ?????????
 #--------------------------------------------------------------------------
 def initialize
   super(0, 320, 160 * $game_party.actors.size, 160)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = $fontface  # "Battle Status" window font
   self.contents.font.size = $fontsize
   @level_up_flags = [false, false, false, false]
   if $game_party.actors.size == 3
     self.width = 480
     self.x = 80
   elsif $game_party.actors.size == 2
     self.width = 320
     self.x = 160
   elsif $game_party.actors.size == 1
     self.width = 160
     self.x = 240
   else
     self.width = 640
   end
   refresh
 end
end



#==============================================================================
# ¦ Scene_Battle (???? 3)
#------------------------------------------------------------------------------
#  ?????????????????
#==============================================================================

class Scene_Battle
   def phase3_setup_command_window
   # ?????????????????
   @party_command_window.active = false
   @party_command_window.visible = false
   # ?????????????????
   @actor_command_window.active = true
   @actor_command_window.visible = true
   # ???????????????????
     if $game_party.actors.size == 1
       @actor_command_window.x = (@actor_index * 160) + 240
     elsif $game_party.actors.size == 2
       @actor_command_window.x = (@actor_index * 160) + 160
     elsif $game_party.actors.size == 3
       @actor_command_window.x = (@actor_index * 160) + 80
     elsif $game_party.actors.size == 4
       @actor_command_window.x = @actor_index * 160
     end
   # ??????? 0 ???
   @actor_command_window.index = 0
 end
end