📜
RGSS Reference Manual
  • RGSS Reference Manual
  • RGSS Specifications
  • Ruby Syntax
    • Syntax and Expressions
    • Variables and Constants
    • Literals
    • Operator Expressions
    • Control Structures
    • Method Calls
    • Class and Method Definitions
  • Standard Library
    • Built-in Functions
    • Built-in Variables
    • Built-in Classes
      • Object
        • Array
        • Exception
        • FalseClass
        • Hash
        • IO
          • File
        • MatchData
        • Module
          • Class
        • NilClass
        • Numeric
          • Integer
            • Bignum
            • Fixnum
          • Float
        • Range
        • Proc
        • Regexp
        • String
        • Symbol
        • Time
        • TrueClass
    • Built-in Modules
      • Comparable
      • Enumerable
      • Errno
      • FileTest
      • GC
      • Kernel
      • Marshal
      • Math
    • Built-in Exception Classes
  • Game Library
    • RGSS Built-in Functions
    • RGSS Built-in Classes
      • Bitmap
      • Color
      • Font
      • Plane
      • Rect
      • Sprite
      • Table
      • Tilemap
      • Tone
      • Viewport
      • Window
      • RGSSError
      • RPG::Sprite
      • RPG::Weather
    • RGSS Built-in Modules
      • Audio
      • Graphics
      • Input
      • RPG
      • RPG::Cache
    • RPGXP Data Structures
      • RPG::Map
      • RPG::MapInfo
      • RPG::Event
      • RPG::Event::Page
      • RPG::Event::Page::Condition
      • RPG::Event::Page::Graphic
      • RPG::EventCommand
      • RPG::MoveRoute
      • RPG::MoveCommand
      • RPG::Actor
      • RPG::Class
      • RPG::Class::Learning
      • RPG::Skill
      • RPG::Item
      • RPG::Weapon
      • RPG::Armor
      • RPG::Enemy
      • RPG::Enemy::Action
      • RPG::Troop
      • RPG::Troop::Member
      • RPG::Troop::Page
      • RPG::Troop::Page::Condition
      • RPG::State
      • RPG::Animation
      • RPG::Animation::Frame
      • RPG::Animation::Timing
      • RPG::Tileset
      • RPG::CommonEvent
      • RPG::System
      • RPG::System::Words
      • RPG::System::TestBattler
      • RPG::AudioFile
  • Appendix
    • Regular Expression
    • sprintf Format
Powered by GitBook
On this page
  • Superclass
  • Attributes
  • id
  • name
  • animation_id
  • restriction
  • nonresistance
  • zero_hp
  • cant_get_exp
  • cant_evade
  • slip_damage
  • rating
  • hit_rate
  • maxhp_rate
  • maxsp_rate
  • str_rate
  • dex_rate
  • agi_rate
  • int_rate
  • atk_rate
  • pdef_rate
  • mdef_rate
  • eva
  • battle_only
  • hold_turnauto_release_prob
  • shock_release_prob
  • guard_element_set
  • plus_state_set
  • minus_state_set
  • Definition
  1. Game Library
  2. RPGXP Data Structures

RPG::State

Data class for state.

PreviousRPG::Troop::Page::ConditionNextRPG::Animation

Last updated 1 year ago

Superclass

Attributes

id

State ID.

name

State name.

animation_id

The state's animation ID.

restriction

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

nonresistance

Truth value of the [Nonresistance] option.

zero_hp

Truth value of the [Regard as HP 0] option.

cant_get_exp

Truth value of the [Can't Get EXP] option.

cant_evade

Truth value of the [Can't Evade] option.

slip_damage

Truth value of the [Slip Damage] option.

rating

State rating (0..10).

hit_rate

Hit percentage.

maxhp_rate

Maximum HP percentage.

maxsp_rate

Maximum SP percentage.

str_rate

Strength percentage.

dex_rate

Dexterity percentage.

agi_rate

Agility percentage.

int_rate

Intelligence percentage.

atk_rate

Attack percentage.

pdef_rate

Physical defense percentage.

mdef_rate

Magic defense percentage.

eva

Evasion correction.

battle_only

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

hold_turnauto_release_prob

Percent probability of wearing off after the number of turns in hold_turn have passed.

shock_release_prob

Percent probability of wearing off after receiving physical damage.

guard_element_set

Elemental defense. An Elemental ID array.

plus_state_set

States to add. A State ID array.

minus_state_set

States to cancel. A State ID array.

Definition

module RPG
  class State
    def initialize
      @id = 0
      @name = ""
      @animation_id = 0
      @restriction = 0
      @nonresistance = false
      @zero_hp = false
      @cant_get_exp = false
      @cant_evade = false
      @slip_damage = false
      @rating = 5
      @hit_rate = 100
      @maxhp_rate = 100
      @maxsp_rate = 100
      @str_rate = 100
      @dex_rate = 100
      @agi_rate = 100
      @int_rate = 100
      @atk_rate = 100
      @pdef_rate = 100
      @mdef_rate = 100
      @eva = 0
      @battle_only = true
      @hold_turn = 0
      @auto_release_prob = 0
      @shock_release_prob = 0
      @guard_element_set = []
      @plus_state_set = []
      @minus_state_set = []
    end
    attr_accessor :id
    attr_accessor :name
    attr_accessor :animation_id
    attr_accessor :restriction
    attr_accessor :nonresistance
    attr_accessor :zero_hp
    attr_accessor :cant_get_exp
    attr_accessor :cant_evade
    attr_accessor :slip_damage
    attr_accessor :rating
    attr_accessor :hit_rate
    attr_accessor :maxhp_rate
    attr_accessor :maxsp_rate
    attr_accessor :str_rate
    attr_accessor :dex_rate
    attr_accessor :agi_rate
    attr_accessor :int_rate
    attr_accessor :atk_rate
    attr_accessor :pdef_rate
    attr_accessor :mdef_rate
    attr_accessor :eva
    attr_accessor :battle_only
    attr_accessor :hold_turn
    attr_accessor :auto_release_prob
    attr_accessor :shock_release_prob
    attr_accessor :guard_element_set
    attr_accessor :plus_state_set
    attr_accessor :minus_state_set
  end
end
Object