Data class for enemy [Actions].
Type of action.
When set to a [Basic] action, defines it further.
When set to a [Skill], the ID of that skill.
The type of condition.
A condition parameter. Shared by all types.
For example, if the condition is [HP], then condition_param1 will be the minimum value and condition_param2 will be the maximum value.
The action's rating (1..10).
Determines if kind is skill or not. Returns true if kind is 1.
module RPG class Enemy class Action def initialize @kind = 0 @basic = 0 @skill_id = 1 @condition_type = 0 @condition_param1 = 0 @condition_param2 = 0 @rating = 5 end def skill? return @kind == 1 end attr_accessor :kind attr_accessor :basic attr_accessor :skill_id attr_accessor :condition_type attr_accessor :condition_param1 attr_accessor :condition_param2 attr_accessor :rating end end end
Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |