Class: RPG::Enemy

Inherits:
BaseItem show all
Extended by:
RgssDb::JsonableConstructor
Includes:
RgssDb::Jsonable
Defined in:
lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb,
lib/rgss_db/model/rpg_maker_data/xp/rpg/enemy.rb,
lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/enemy.rb,
lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy_action.rb,
lib/rgss_db/model/rpg_maker_data/xp/rpg/enemy_action.rb,
lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy_drop_item.rb,
lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/enemy_action.rb,
lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/enemy_drop_item.rb

Overview

The data class for enemies.

Defined Under Namespace

Classes: Action, DropItem

Instance Attribute Summary collapse

Attributes inherited from BaseItem

#description, #features, #icon_index

Instance Method Summary collapse

Methods included from RgssDb::JsonableConstructor

json_create, json_new

Methods included from RgssDb::Jsonable

#as_json, #to_json

Constructor Details

#initializeEnemy

Returns a new instance of Enemy.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 11

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

Instance Attribute Details

#actionsObject

Returns the value of attribute actions.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def actions
  @actions
end

#agiObject

Returns the value of attribute agi.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def agi
  @agi
end

#animation1_idObject

Returns the value of attribute animation1_id.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/enemy.rb', line 43

def animation1_id
  @animation1_id
end

#animation2_idObject

Returns the value of attribute animation2_id.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/enemy.rb', line 43

def animation2_id
  @animation2_id
end

#armor_idObject

Returns the value of attribute armor_id.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/enemy.rb', line 43

def armor_id
  @armor_id
end

#atkObject

Returns the value of attribute atk.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def atk
  @atk
end

#battler_hueObject

Returns the value of attribute battler_hue.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def battler_hue
  @battler_hue
end

#battler_nameObject

Returns the value of attribute battler_name.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def battler_name
  @battler_name
end

#defObject

Returns the value of attribute def.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def def
  @def
end

#dexObject

Returns the value of attribute dex.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/enemy.rb', line 43

def dex
  @dex
end

#drop_item1Object

Returns the value of attribute drop_item1.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def drop_item1
  @drop_item1
end

#drop_item2Object

Returns the value of attribute drop_item2.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def drop_item2
  @drop_item2
end

#drop_itemsObject

Returns the value of attribute drop_items.



25
26
27
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/enemy.rb', line 25

def drop_items
  @drop_items
end

#element_ranksObject

Returns the value of attribute element_ranks.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def element_ranks
  @element_ranks
end

#evaObject

Returns the value of attribute eva.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def eva
  @eva
end

#expObject

Returns the value of attribute exp.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def exp
  @exp
end

#goldObject

Returns the value of attribute gold.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def gold
  @gold
end

#has_criticalObject

Returns the value of attribute has_critical.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def has_critical
  @has_critical
end

#hitObject

Returns the value of attribute hit.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def hit
  @hit
end

#idObject

Returns the value of attribute id.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def id
  @id
end

#intObject

Returns the value of attribute int.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/enemy.rb', line 43

def int
  @int
end

#item_idObject

Returns the value of attribute item_id.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/enemy.rb', line 43

def item_id
  @item_id
end

#levitateObject

Returns the value of attribute levitate.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def levitate
  @levitate
end

#maxhpObject

Returns the value of attribute maxhp.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def maxhp
  @maxhp
end

#maxmpObject

Returns the value of attribute maxmp.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def maxmp
  @maxmp
end

#maxspObject

Returns the value of attribute maxsp.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/enemy.rb', line 43

def maxsp
  @maxsp
end

#mdefObject

Returns the value of attribute mdef.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/enemy.rb', line 43

def mdef
  @mdef
end

#nameObject

Returns the value of attribute name.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def name
  @name
end

#noteObject

Returns the value of attribute note.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def note
  @note
end

#paramsObject

Returns the value of attribute params.



25
26
27
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/enemy.rb', line 25

def params
  @params
end

#pdefObject

Returns the value of attribute pdef.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/enemy.rb', line 43

def pdef
  @pdef
end

#spiObject

Returns the value of attribute spi.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def spi
  @spi
end

#state_ranksObject

Returns the value of attribute state_ranks.



40
41
42
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 40

def state_ranks
  @state_ranks
end

#strObject

Returns the value of attribute str.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/enemy.rb', line 43

def str
  @str
end

#treasure_probObject

Returns the value of attribute treasure_prob.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/enemy.rb', line 43

def treasure_prob
  @treasure_prob
end

#weapon_idObject

Returns the value of attribute weapon_id.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/enemy.rb', line 43

def weapon_id
  @weapon_id
end

Instance Method Details

#to_sObject



36
37
38
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/enemy.rb', line 36

def to_s
  @name.to_s
end