RPG::Enemy

Data class for enemies.

Superclass

Attributes

id

The enemy ID.

name

The enemy name.

battler_name

The enemy's battler graphic file name.

battler_hue

The adjustment value for the battler graphic's hue (0..360).

maxhp

The enemy's MaxHP.

maxmp

The enemy's MaxMP.

atk

The enemy's attack power.

def

The enemy's defense power.

spi

The enemy's spirit.

agi

The enemy's agility.

hit

The enemy's hit ratio.

eva

The enemy's evasion rate.

exp

The enemy's experience.

gold

The enemy's gold.

drop_item1

The drop item 1 (RPG::Enemy::DropItem) 。

drop_item2

The drop item 2 (RPG::Enemy::DropItem) 。

levitate

Truth value of the [Levitate] option.

has_critical

Truth value of the [Has Critical] option.

element_ranks

Level of elements efficiency. 1-dimensional array using element IDs as subscripts (Table), with 6 levels (0: A, 1: B, 2: C, 3: D, 4: E, 5: F).

state_ranks

Level of states efficiency. 1-dimensional array using status IDs as subscripts (Table), with 6 levels (0: A, 1: B, 2: C, 3: D, 4: E, 5: F).

actions

Actions petterns. An RPG::Enemy::Action array.

note

The text of the note.

Inner Class

Definition

module RPG
  class Enemy
    def initialize
      @id = 0
      @name = ""
      @battler_name = ""
      @battler_hue = 0
      @maxhp = 10
      @maxmp = 10
      @atk = 10
      @def = 10
      @spi = 10
      @agi = 10
      @hit = 95
      @eva = 5
      @exp = 0
      @gold = 0
      @drop_item1 = RPG::Enemy::DropItem.new
      @drop_item2 = RPG::Enemy::DropItem.new
      @levitate = false
      @has_critical = false
      @element_ranks = Table.new(1)
      @state_ranks = Table.new(1)
      @actions = [RPG::Enemy::Action.new]
      @note = ""
    end
    attr_accessor :id
    attr_accessor :name
    attr_accessor :battler_name
    attr_accessor :battler_hue
    attr_accessor :maxhp
    attr_accessor :maxmp
    attr_accessor :atk
    attr_accessor :def
    attr_accessor :spi
    attr_accessor :agi
    attr_accessor :hit
    attr_accessor :eva
    attr_accessor :exp
    attr_accessor :gold
    attr_accessor :drop_item1
    attr_accessor :drop_item2
    attr_accessor :levitate
    attr_accessor :has_critical
    attr_accessor :element_ranks
    attr_accessor :state_ranks
    attr_accessor :actions
    attr_accessor :note
  end
end
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)