All pastes #229951 Raw Edit

Miscellany

public text v1 · immutable
#229951 ·published 2006-10-31 01:01 UTC
rendered paste body
class Game_Actor < Game_Battler
  attr_accessor :battle_commands  # the battle commands for this actor
  attr_accessor :loop_victory     # whether to loop the battle animation
  attr_accessor :skill_kind       # what kind of skill the actor is using
  attr_accessor :skill_type_hash  # the skill types and what their offset is
  attr_accessor :skill_hash       # individual skills and their offset
  attr_accessor :status_hash      # status animations and their offset
  
  alias old_initialize initialize
  def initialize(actor_id)
    @battle_commands = ["Attack", "Skill", "Defend", "Item"]
    @animated = true
    old_initialize(actor_id)
    @back_row = ($data_classes[@class_id].position == 2)
    @moving = false
    @loop_victory = false
    @animated = true
    @moves = $MOBILE_HEROES
  end
  
  def battle_setup
    @base_x = @actual_x = @target_x = self.screen_x
    @base_y = @actual_y = @target_y = self.screen_y
  end
  
  #--------------------------------------------------------------------------
  # * Get Battle Screen X-Coordinate
  #--------------------------------------------------------------------------
  def screen_x
    if self.index != nil
      if @back_row
        return self.index * 150 + 100
      else
        return self.index * 150 + 80
      end
    else
      return 0
    end
  end
  #--------------------------------------------------------------------------
  # * Get Battle Screen Y-Coordinate
  #--------------------------------------------------------------------------
  def screen_y
    return self.index * 0 + 275
  end
  #--------------------------------------------------------------------------
  # * Get Battle Screen Z-Coordinate
  #--------------------------------------------------------------------------
  def screen_z
    if self.index != nil
      return 0 + self.index
    else
      return 0
    end
  end
end