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 max HP.

maxsp

The enemy's max SP.

str

The enemy's strength.

dex

The enemy's dexterity.

agi

The enemy's agility.

int

The enemy's intelligence.

atk

The enemy's attack power.

pdef

The enemy's physical defense rating.

mdef

The enemy's magic defense rating.

eva

The enemy's evasion rating.

animation1_id

The battle animation ID.

animation2_id

The target animation ID.

element_ranks

Level of elemental effectiveness. 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 status effectiveness. 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

The enemy's actions. An RPG::Enemy::Action array.

exp

The enemy's experience.

gold

The enemy's gold.

item_id

The ID of the item used as treasure.

weapon_id

The ID of the weapon used as treasure.

armor_id

The ID of the armor used as treasure.

treasure_prob

The probability of treasure being left behind.

Inner Class

Definition

module RPG
  class Enemy
    def initialize
      @id = 0
      @name = ""
      @battler_name = ""
      @battler_hue = 0
      @maxhp = 500
      @maxsp = 500
      @str = 50
      @dex = 50
      @agi = 50
      @int = 50
      @atk = 100
      @pdef = 100
      @mdef = 100
      @eva = 0
      @animation1_id = 0
      @animation2_id = 0
      @element_ranks = Table.new(1)
      @state_ranks = Table.new(1)
      @actions = [RPG::Enemy::Action.new]
      @exp = 0
      @gold = 0
      @item_id = 0
      @weapon_id = 0
      @armor_id = 0
      @treasure_prob = 100
    end
    attr_accessor :id
    attr_accessor :name
    attr_accessor :battler_name
    attr_accessor :battler_hue
    attr_accessor :maxhp
    attr_accessor :maxsp
    attr_accessor :str
    attr_accessor :dex
    attr_accessor :agi
    attr_accessor :int
    attr_accessor :atk
    attr_accessor :pdef
    attr_accessor :mdef
    attr_accessor :eva
    attr_accessor :animation1_id
    attr_accessor :animation2_id
    attr_accessor :element_ranks
    attr_accessor :state_ranks
    attr_accessor :actions
    attr_accessor :exp
    attr_accessor :gold
    attr_accessor :item_id
    attr_accessor :weapon_id
    attr_accessor :armor_id
    attr_accessor :treasure_prob
  end
end
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)