RPG::State

Data class for state.

Superclass

Attributes

id

State ID.

name

State name.

icon_index

The state's icon number.

restriction

Sets restrictions (0: none, 1: can't use magic, 2: always attack enemies, 3: always attack allies, 4: can't move, 5: can't move or evade).

priority

State priority (0..10).

atk_rate

Attack percentage.

def_rate

Defense percentage.

spi_rate

Spirit percentage.

agi_rate

Agility percentage.

nonresistance

Truth value of the [Nonresistance] option.

offset_by_opposite

Truth value of the [Offset By Opp.] option.

slip_damage

Truth value of the [Slip Damage] option.

reduce_hit_ratio

Truth value of the [Reduce Hit Ratio] option.

battle_only

Truth value of whether the state wears off at battle end.

release_by_damage

Truth value of whether the state wears after receiving damage.

hold_turn
auto_release_prob

Probability of wearing off is auto_release_prob % after hold_turn turns have passed.

message1
message2
message3
message4

Messages. For an actor, for an enemy, remaining, releasing.

element_set

Elements to guard. An Element ID array.

state_set

States to cancel. A State ID array.

note

The text of the note.

Definition

module RPG
  class State
    def initialize
      @id = 0
      @name = ""
      @icon_index = 0
      @restriction = 0
      @priority = 5
      @atk_rate = 100
      @def_rate = 100
      @spi_rate = 100
      @agi_rate = 100
      @nonresistance = false
      @offset_by_opposite = false
      @slip_damage = false
      @reduce_hit_ratio = false
      @battle_only = true
      @release_by_damage = false
      @hold_turn = 0
      @auto_release_prob = 0
      @message1 = ""
      @message2 = ""
      @message3 = ""
      @message4 = ""
      @element_set = []
      @state_set = []
      @note = ""
    end
    attr_accessor :id
    attr_accessor :name
    attr_accessor :icon_index
    attr_accessor :restriction
    attr_accessor :priority
    attr_accessor :atk_rate
    attr_accessor :def_rate
    attr_accessor :spi_rate
    attr_accessor :agi_rate
    attr_accessor :nonresistance
    attr_accessor :offset_by_opposite
    attr_accessor :slip_damage
    attr_accessor :reduce_hit_ratio
    attr_accessor :battle_only
    attr_accessor :release_by_damage
    attr_accessor :hold_turn
    attr_accessor :auto_release_prob
    attr_accessor :message1
    attr_accessor :message2
    attr_accessor :message3
    attr_accessor :message4
    attr_accessor :element_set
    attr_accessor :state_set
    attr_accessor :note
  end
end
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)