Superclass of Skill and Item.
Scope of the effects.
When the item/skill may be used.
The speed correction.
The animation ID.
The Common Event ID.
The base damage.
The degree of variance.
The factor of attack power.
The factor of spirit.
Truth value of the [Physical Attack] option.
Truth value of the [Damage to MP] option.
Truth value of the [Absorb Damage] option.
Truth value of the [Ignore Defense] option.
Elements of the item. An Element ID array.
States to add. A State ID array.
States to cancel. A Stae ID array.
Determines whether or not the area of effect is enemies. Returns true if the value of scope is 1, 2, 3, 4, 5, or 6.
Determines whether or not the area of effect is allies. Returns true if the value of scope is 7, 8, 9, 10, or 11.
Determines whether or not the area of effect is downed allies. Returns true if the value of scope is 9 or 10.
Determines whether or not the area of effect is the user. Returns true if the value of scope is 11.
Determines whether or not the area of effect is one character. Returns true if the value of scope is 1, 3, 4, 7, 9, or 11.
Determines whether or not the area of effect is two characters. Returns true if the value of scope is 5.
Determines whether or not the area of effect is three characters. Returns true if the value of scope is 6.
Determines whether or not the area of effect is random. Returns true if the value of scope is 4, 5, or 6.
Determines whether or not the area of effect is everyone. Returns true if the value of scope is 2, 8, or 10.
Determines whether or not the area of effect is "One Enemy Dual." Returns true if the value of scope is 3.
Determines whether or not selection of the target is required. Returns true if the value of scope is 1, 3, 7, or 9.
Determines if it may be used on the battle screen. Returns true if the value of occasion is 0 or 1.
Determines if it may be used on the menu screen. Returns true if the value of occasion is 0 or 2.
module RPG class UsableItem < BaseItem def initialize super @scope = 0 @occasion = 0 @speed = 0 @animation_id = 0 @common_event_id = 0 @base_damage = 0 @variance = 20 @atk_f = 0 @spi_f = 0 @physical_attack = false @damage_to_mp = false @absorb_damage = false @ignore_defense = false @element_set = [] @plus_state_set = [] @minus_state_set = [] end def for_opponent? return [1, 2, 3, 4, 5, 6].include?(@scope) end def for_friend? return [7, 8, 9, 10, 11].include?(@scope) end def for_dead_friend? return [9, 10].include?(@scope) end def for_user? return [11].include?(@scope) end def for_one? return [1, 3, 4, 7, 9, 11].include?(@scope) end def for_two? return [5].include?(@scope) end def for_three? return [6].include?(@scope) end def for_random? return [4, 5, 6].include?(@scope) end def for_all? return [2, 8, 10].include?(@scope) end def dual? return [3].include?(@scope) end def need_selection? return [1, 3, 7, 9].include?(@scope) end def battle_ok? return [0, 1].include?(@occasion) end def menu_ok? return [0, 2].include?(@occasion) end attr_accessor :scope attr_accessor :occasion attr_accessor :speed attr_accessor :animation_id attr_accessor :common_event_id attr_accessor :base_damage attr_accessor :variance attr_accessor :atk_f attr_accessor :spi_f attr_accessor :physical_attack attr_accessor :damage_to_mp attr_accessor :absorb_damage attr_accessor :ignore_defense attr_accessor :element_set attr_accessor :plus_state_set attr_accessor :minus_state_set end end
Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |