Class: GameData::Pokemon

Inherits:
Base show all
Extended by:
DataSource2D
Defined in:
scripts/00800 GameData/00100 Serializable/00200 Pokemon.rb

Overview

Pokemon 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 DataSource2D

[], db_symbol, load

Methods included from DataSource

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

Constructor Details

#initializePokemon

Create a new GameData::Pokemon object

Instance Attribute Details

#abilitiesArray(Integer, Integer, Integer)

List of ability id the Pokemon can have [common, rare, ultra rare]

Returns:

#babyInteger

ID of the baby the Pokemon can have while breeding

Returns:

#base_atkInteger

ATK statistic of the Pokemon

Returns:

#base_atsInteger

ATS statistic of the Pokemon

Returns:

#base_dfeInteger

DFE statistic of the Pokemon

Returns:

#base_dfsInteger

DFS statistic of the Pokemon

Returns:

#base_expInteger

Base experience the Pokemon give when defeated (used in the exp caculation)

Returns:

#base_hpInteger

HP statistic of the Pokemon

Returns:

#base_loyaltyInteger

Loyalty the Pokemon has at the begining

Returns:

#base_spdInteger

SPD statistic of the Pokemon

Returns:

#breed_groupesArray(Integer, Integer)

The two groupes of compatibility for breeding. If it includes 15, there's no compatibility.

Returns:

#breed_movesArray<Integer>

List of move ID the Pokemon can have after hatching if one of its parent has the move

Returns:

#ev_atkInteger

ATK EVs givent by the Pokemon when defeated

Returns:

#ev_atsInteger

ATS EVs givent by the Pokemon when defeated

Returns:

#ev_dfeInteger

DFE EVs givent by the Pokemon when defeated

Returns:

#ev_dfsInteger

DFS EVs givent by the Pokemon when defeated

Returns:

#ev_hpInteger

HP EVs givent by the Pokemon when defeated

Returns:

#ev_spdInteger

SPD EVs givent by the Pokemon when defeated

Returns:

#evolution_idInteger

ID of the Pokemon after its evolution

Returns:

#evolution_levelInteger?

Level when the Pokemon can naturally evolve

Returns:

#exp_typeInteger

Index of the Pokemon exp curve (GameData::EXP_TABLE)

Returns:

#female_rateInteger

Chance in % the Pokemon has to be a female, if -1 it'll have no gender.

Returns:

#formInteger

Current form of the Pokemon

Returns:

#front_offset_yInteger

Front offset y of the Pokemon for Summary & Dex UI

Returns:

#hatch_stepInteger

Number of step before the egg hatch

Returns:

#heightNumeric

Height of the Pokemon in metter

Returns:

  • (Numeric)

#id_bisInteger

Regional id of the Pokemon

Returns:

#itemsArray<Integer, Integer>

List of items with change (in percent) the Pokemon can have when generated

List formated like this : [id item1, chance item1, id item2, chance item2, ...]

Returns:

#master_movesArray<Integer>

List of moves the Pokemon can learn from a NPC

Returns:

#move_setArray<Integer, Integer>

List of moves the Pokemon can learn by level.

List formated like this : level_move1, id_move1, level_move2, id_move2, ...

Returns:

#rarenessInteger

Factor used during the catch_rate calculation

Returns:

  • (Integer)

    0 = Uncatchable (even with Master Ball)

#special_evolutionArray<Hash>?

Special evolution informations

Returns:

  • (Array<Hash>, nil)

#tech_setArray<Integer>

List of moves (id in the database) the Pokemon can learn by using HM and TM

Returns:

#type1Integer

First type of the Pokemon

Returns:

#type2Integer

Second type of the Pokemon

Returns:

#weightNumeric

Weight of the Pokemon in Kg

Returns:

  • (Numeric)

Class Method Details

.data_filename

Name of the file containing the data

.get_forms(id) ⇒ Array<GameData::Pokemon>

Safely return the list of Form of the Pokemon including the regular form (index = 0)

Parameters:

  • id (Intger, Symbol)

    id of the Pokemon in the database

Returns:

.spawn_zones(id) ⇒ Array<Integer>

Return the list of the zone id where the pokemon spawn

Parameters:

  • id (Integer)

    the id of pokemon

Returns:

Instance Method Details

#descrString

Description of the Pokemon

Returns:

#nameString

Name of the Pokemon

Returns:

#speciesString

Species of the Pokemon

Returns: