Код:
#==============================================================================
# ** RPG::Actor
#------------------------------------------------------------------------------
# Класс с данными актера.
# Примечание: Актеры - это герои, главные действующие лица игры.
#==============================================================================
module RPG
#----------------------------------------------------------------------------
class Actor
#==========================================================================
# Аттрибуты
#==========================================================================
#··········································································
# ID актера
# :integer
#··········································································
attr_accessor :id
#··········································································
# Имя актера
# :string
#··········································································
attr_accessor :name
#··········································································
# ID класса актера
# :integer
#··········································································
attr_accessor :class_id
#··········································································
# Начальный уровень актера
# :integer
#··········································································
attr_accessor :initial_level
#··········································································
# Максимальный уровень актера
# ! Используется в XP
# :integer
#··········································································
attr_accessor :final_level
#··········································································
# Значение, на котором базируется кривая опыта
# :integer
#··········································································
attr_accessor :exp_basis
#··········································································
# Значение, на котором базируется кривая расширения
# :integer
#··········································································
attr_accessor :exp_inflation
#··········································································
# Имя файла чарсета актера
# :string
#··········································································
attr_accessor :character_name
#··········································································
# Порядковый номер чарсета в наборе чарсетов
# ! Используется в VX
# :integer
#··········································································
attr_accessor :character_index
#··········································································
# Оттенок чарсета
# ! Используется в XP
# :integer
#··········································································
attr_accessor :character_hue
#··········································································
# Имя файла изображения актера в бою
# ! Используется в XP
# :string
#··········································································
attr_accessor :battler_name
#··········································································
# Оттенок изображения актера в бою
# ! Используется в XP
# :integer
#··········································································
attr_accessor :battler_hue
#··········································································
# Имя файла изображения лица актера
# ! Используется в VX
# :string
#··········································································
attr_accessor :face_name
#··········································································
# Порядковый номер лица в наборе лиц
# ! Используется в VX
# :integer
#··········································································
attr_accessor :face_index
#··········································································
# Таблица, содержащая основные параметры для каждого уровня
# [kind, level] = value
# :table
#··········································································
attr_accessor :parameters
#··········································································
# ID экипированного оружия
# :integer
#··········································································
attr_accessor :weapon_id
#··········································································
# ID экипированного щита героя
# :integer
#··········································································
attr_accessor :armor1_id
#··········································································
# ID экипированного шлема
# :integer
#··········································································
attr_accessor :armor2_id
#··········································································
# ID экипированного доспеха
# :integer
#··········································································
attr_accessor :armor3_id
#··········································································
# ID экипированного аксессуара
# :integer
#··········································································
attr_accessor :armor4_id
#··········································································
# Флаг, запрещающий менять или убирать оружие
# ! Используется в XP
# :bool
#··········································································
attr_accessor :weapon_fix
#··········································································
# Флаг, запрещающий менять или убирать щит
# ! Используется в XP
# :bool
#··········································································
attr_accessor :armor1_fix
#··········································································
# Флаг, запрещающий менять или убирать шлем
# ! Используется в XP
# :bool
#··········································································
attr_accessor :armor2_fix
#··········································································
# Флаг, запрещающий менять или убирать броню
# ! Используется в XP
# :bool
#··········································································
attr_accessor :armor3_fix
#··········································································
# Флаг, запрещающий менять или убирать аксессуар
# ! Используется в XP
# :bool
#··········································································
attr_accessor :armor4_fix
#··········································································
# Флаг, запрещающий менять любую экипировку
# ! Используется в VX
# :bool
#··········································································
attr_accessor :fix_equipment
#··········································································
# Ture, включает режим [Парное оружие]
# ! Используется в VX
# :bool
#··········································································
attr_accessor :two_swords_style
#··········································································
# Ture, включает режим [Авто-бой]
# ! Используется в VX
# :bool
#··········································································
attr_accessor :auto_battle
#··········································································
# Ture, включает режим [Сверхзащита]
# ! Используется в VX
# :bool
#··········································································
attr_accessor :super_guard
#··········································································
# Ture, включает режим [Фармакология]
# ! Используется в VX
# :bool
#··········································································
attr_accessor :pharmacology
#··········································································
# Ture, включает режим [Критический бонус]
# ! Используется в VX
# :bool
#··········································································
attr_accessor :critical_bonus
#==========================================================================
# Методы
#==========================================================================
#--------------------------------------------------------------------------
# ? Инициализирует переменные класса, присваивает им значения по-умолчанию
# ! Вызывается автоматически при создании нового экземпляра
# класса
# :nil
#--------------------------------------------------------------------------
def initialize
@id = 0
@name = ""
@class_id = 1
@initial_level = 1
@final_level = 99
@exp_basis = 25
@exp_inflation = 35
@character_name = ""
@character_index = 0
@character_hue = 0
@battler_name = ""
@battler_hue = 0
@face_name = ""
@face_index = 0
@parameters = Table.new(6,100)
for i in 1..99
@parameters[0,i] = 400+i*50
@parameters[1,i] = 80+i*10
@parameters[2,i] = 15+i*5/4
@parameters[3,i] = 15+i*5/4
@parameters[4,i] = 20+i*5/2
@parameters[5,i] = 20+i*5/2
end
@weapon_id = 0
@armor1_id = 0
@armor2_id = 0
@armor3_id = 0
@armor4_id = 0
@weapon_fix = false
@armor1_fix = false
@armor2_fix = false
@armor3_fix = false
@armor4_fix = false
@fix_equipment = false
@two_swords_style = false
@auto_battle = false
@super_guard = false
@pharmacology = false
@critical_bonus = false
end
#--------------------------------------------------------------------------
end
#----------------------------------------------------------------------------
end
#==============================================================================
Беру все три RPG::Animation
Социальные закладки