Module: GameData::Abilities

Defined in:
scripts/00800 GameData/00200 Helpers/00200 Abilities.rb

Overview

Module that helps you to retrieve safely texts related to Pokemon's Ability

Author:

  • Nuri Yuri

Class Method Summary collapse

Class Method Details

.convert_to_symbols(collection, keys: false, values: false) ⇒ Enumerable

Convert a collection to symbolized collection

Parameters:

  • collection (Enumerable)
  • keys (Boolean) (defaults to: false)

    if hash keys are converted

  • values (Boolean) (defaults to: false)

    if hash values are converted

Returns:

  • (Enumerable)

    the collection

.db_symbol(id) ⇒ Symbol

Returns the symbol of an ability

Parameters:

  • id (Integer)

    id of the ability in the database

Returns:

  • (Symbol)

    the db_symbol of the ability

.descr(id) ⇒ String

Note:

The description is fetched from the 5th text file.

Returns the description of an ability

Parameters:

  • id (Integer, Symbol)

    id of the ability in the database.

Returns:

  • (String)

    the description of the ability or the description of the first ability.

.find_using_symbol(symbol) ⇒ Integer? Also known as: get_id

Find an ability id using symbol

Parameters:

  • symbol (Symbol)

Returns:

  • (Integer, nil)

    nil = not found

.id_valid?(id) ⇒ Boolean

Tell if the id is valid

Parameters:

Returns:

  • (Boolean)

.load

Load the abilities

.load_ability_db_symbolArray<Symbol>

Load the ability db_symbol

Returns:

  • (Array<Symbol>)

.name(id = Class) ⇒ String

Note:

The description is fetched from the 5th text file.

Returns the name of an ability

Parameters:

  • id (Integer, Symbol) (defaults to: Class)

    id of the ability in the database.

Returns:

  • (String)

    the name of the ability or the name of the first ability.

.psdk_id_to_gf_idArray<Integer>

Return the psdk_id_to_gf_id array

Returns: