RPG::Enemy::Action

Data class for enemy [Actions].

Superclass

Referrer

Attributes

kind

Type of action (0: basic, 1: skill).

basic

When set to a [Basic] action, defines it further (0: attack, 1: defend, 2: escape, 3: do nothing).

skill_id

When set to a [Skill], the ID of that skill.

condition_turn_a
condition_turn_b

a and b values specified in the [Turn] condition. To be input in the form a + bx.

When the turn is not specified as a condition, a = 0 and b = 1.

condition_hp

Percentage specified in the [HP] condition.

When HP is not specified as a condition, this value is set to 100.

condition_level

Standard level specified in the [Level] condition.

When the level is not specified as a condition, this value is set to 1.

condition_switch_id

Switch ID specified in the [Switch] condition.

When the switch ID is not specified as a condition, this value is set to 0. Consequently, it is essential to check whether this value is 0.

rating

The action's rating (1..10).

Definition

module RPG
  class Enemy
    class Action
      def initialize
        @kind = 0
        @basic = 0
        @skill_id = 1
        @condition_turn_a = 0
        @condition_turn_b = 1
        @condition_hp = 100
        @condition_level = 1
        @condition_switch_id = 0
        @rating = 5
      end
      attr_accessor :kind
      attr_accessor :basic
      attr_accessor :skill_id
      attr_accessor :condition_turn_a
      attr_accessor :condition_turn_b
      attr_accessor :condition_hp
      attr_accessor :condition_level
      attr_accessor :condition_switch_id
      attr_accessor :rating
    end
  end
end
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)