Class: GameData::Trainer

Inherits:
Base show all
Extended by:
DataSource
Defined in:
scripts/00800 GameData/00100 Serializable/00400 Trainer.rb

Overview

Trainer data structure

Author:

  • Nuri Yuri

Constant Summary

Constants included from DataSource

DataSource::SOURCES

Instance Attribute Summary collapse

Attributes inherited from Base

#db_symbol, #id

Class Method Summary collapse

Instance Method Summary collapse

Methods included from DataSource

[], all, convert_to_symbols, db_symbol, get_id, id_valid?, load

Constructor Details

#initializeTrainer

Create a new Trainer

Instance Attribute Details

#base_moneyInteger

The value that is multiplied to the last pokemon level to get the money the trainer gives

Returns:

#battlerString

The name of the battler in Graphics/Battlers

Returns:

#internal_namesArray<String>

List of name of the trainers

Returns:

#special_groupInteger

ID of the group that holds the event variation of the battle

Returns:

  • (Integer)

    0 = no special group

#teamArray<Hash>

List of Pokemon Hash (PFM::Pokemon.generate_from_hash)

Returns:

  • (Array<Hash>)

#vs_typeInteger

The battle type 1v1, 2v2, 3v3…

Returns:

Class Method Details

.class_name(id) ⇒ String

Return the trainer class name

Parameters:

  • id (Integer)

    id of the trainer in the database

Returns:

.data_filename

Name of the file containing the data

.get(id) ⇒ GameData::Trainer

Get a specific trainer

Parameters:

  • id (Integer)

    ID of the trainer

Returns: