Class: RPG::Troop

Inherits:
Object
  • Object
show all
Extended by:
RgssDb::JsonableConstructor
Includes:
RgssDb::Jsonable
Defined in:
lib/rgss_db/model/rpg_maker_data/vx/rpg/troop.rb,
lib/rgss_db/model/rpg_maker_data/xp/rpg/troop.rb,
lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/troop.rb,
lib/rgss_db/model/rpg_maker_data/vx/rpg/troop_page.rb,
lib/rgss_db/model/rpg_maker_data/xp/rpg/troop_page.rb,
lib/rgss_db/model/rpg_maker_data/vx/rpg/troop_member.rb,
lib/rgss_db/model/rpg_maker_data/xp/rpg/troop_member.rb,
lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/troop_page.rb,
lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/troop_member.rb,
lib/rgss_db/model/rpg_maker_data/vx/rpg/troop_page_condition.rb,
lib/rgss_db/model/rpg_maker_data/xp/rpg/troop_page_condition.rb,
lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/troop_page_condition.rb

Overview

The data class for enemy troops.

Defined Under Namespace

Classes: Member, Page

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from RgssDb::JsonableConstructor

json_create, json_new

Methods included from RgssDb::Jsonable

#as_json, #to_json

Constructor Details

#initializeTroop

Returns a new instance of Troop.



11
12
13
14
15
16
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/troop.rb', line 11

def initialize
  @id = 0
  @name = ""
  @members = []
  @pages = [RPG::Troop::Page.new]
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



22
23
24
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/troop.rb', line 22

def id
  @id
end

#membersObject

Returns the value of attribute members.



22
23
24
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/troop.rb', line 22

def members
  @members
end

#nameObject

Returns the value of attribute name.



22
23
24
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/troop.rb', line 22

def name
  @name
end

#pagesObject

Returns the value of attribute pages.



22
23
24
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/troop.rb', line 22

def pages
  @pages
end

Instance Method Details

#to_sObject



18
19
20
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/troop.rb', line 18

def to_s
  @name.to_s
end