Class: GameData::Skill

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

Overview

Data structure of Pokemon moves

Author:

  • Nuri Yuri

Constant Summary collapse

SleepingAttack =

List of moves that works when the Pokemon is asleep

%i[snore sleep_talk]
OutOfReach =

Out of reach moves

OutOfReach[sb_symbol] => oor_type
{ dig: 1, fly: 2, dive: 3, bounce: 2, phantom_force: 4, shadow_force: 4, sky_drop: 2 }
OutOfReach_hit =

List of move that can hit a Pokemon when he's out of reach

OutOfReach_hit[oor_type] = [move db_symbol list]
[], # Nothing
%i[earthquake fissure magnitude], # Dig
%i[gust whirlwind thunder swift sky_uppercut twister smack_down hurricane thousand_arrows], # Fly
%i[surf whirlpool], # Dive
[]
Announce_2turns =

List of specific announcement for 2 turn moves

Announce_2turns[db_symbol] = text_id
{ dig: 538, fly: 529, dive: 535, bounce: 544,
phantom_force: 541, shadow_force: 541, solar_beam: 553,
skull_bash: 556, razor_wind: 547, freeze_shock: 866,
ice_burn: 869, geomancy: 1213, sky_attack: 550,
focus_punch: 1213 }
Punching_Moves =

List of Punch moves

%i[dynamic_punch mach_punch hammer_arm focus_punch bullet_punch
power-up_punch comet_punch needle_arm fire_punch meteor_mash
shadow_punch thunder_punch ice_punch sky_uppercut mega_punch
dizzy_punch drain_punch karate_chop]

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

#initializeSkill

Create a new GameData::Skill object

Instance Attribute Details

#accuracyInteger

Accuracy of the move

Returns:

#atk_classInteger

Kind of move 1 = Physical, 2 = Special, 3 = Status

Returns:

#authenticBoolean

If the move ignore the substitute PokeAPI Prose : This move ignores the target's substitute move.

Returns:

  • (Boolean)

#ballisticsBoolean

If the move is a ballistics move PokeAPI Prose : This move is blocked by bulletproof ability.

Returns:

  • (Boolean)

#battle_stage_modArray(Integer, Integer, Integer, Integer, Integer, Integer, Integer)

Stat change effect

#be_methodSymbol?

Symbol of the method to call in the Battle Engine to perform the move

Returns:

  • (Symbol, nil)

#biteBoolean

If the move is bite based PokeAPI Prose : This move has 1.5x its usual power when used by a Pokemon with strong-jaw ability.

Returns:

  • (Boolean)

#blocableBoolean Also known as: protect

If the move is affected by Detect or Protect PokeAPI Prose : This move will not work if the target has used detect move or protect move this turn.

Returns:

  • (Boolean)

#chargeBoolean

If the move is a charging move PokeAPI Prose: This move has a charging turn that can be skipped with a power-herb item.

Returns:

  • (Boolean)

#critical_rateInteger

Critical rate indicator : 0 => 0, 1 => 6.25%, 2 => 12.5%, 3 => 25%, 4 => 33%, 5 => 50%, 6 => 100%

Returns:

#danceBoolean

If the move is a dancing move PokeAPI Prose : This move triggers dancer ability.

Returns:

  • (Boolean)

#directBoolean Also known as: contact

If the move makes conctact. PokeAPI Prose: User touches the target. This triggers some abilities (e.g., static ability) and items (e.g., sticky-barb item).

Returns:

  • (Boolean)

#distanceBoolean

If the move can reach any target of the specied side/bank PokeAPI Prose : In triple battles, this move can be used on either side to target the farthest away foe Pokemon.

Returns:

  • (Boolean)

#effect_chanceInteger

Chance (in percent) the effect (stat/status) triggers

Returns:

#gravityBoolean

If the move is affected by Gravity PokeAPI Prose : This move cannot be used in high gravity move.

Returns:

  • (Boolean)

#healBoolean

If the move can be blocked by Heal Block PokeAPI Prose : This move is blocked by heal-block move.

Returns:

  • (Boolean)

#king_rock_utilityBoolean

If the move triggers King's Rock

Returns:

  • (Boolean)

#magic_coat_affectedBoolean Also known as: reflectable

If the move is affected by Magic Coat PokeAPI Prose : This move may be reflected back at the user with magic-coat move or magic-bounce ability.

Returns:

  • (Boolean)

#map_useInteger

ID of the common event called when used on map

Returns:

#mentalBoolean

If the move has mental effect PokeAPI Prose : This move is blocked by aroma-veil ability and cured by mental-herb item.

Returns:

  • (Boolean)

#mirror_moveBoolean

If the move can be used by Mirror Move PokeAPI Prose : A Pokemon targeted by this move can use mirror-move move to copy it.

Returns:

  • (Boolean)

#non_sky_battleBoolean

If the move cannot be used in Fly Battles PokeAPI Prose : This move is unusable during Sky Battles.

Returns:

  • (Boolean)

#powderBoolean

If the move is a powder move PokeAPI Prose : Pokemon with overcoat ability and grass-type Pokemon are immune to this move.

Returns:

  • (Boolean)

#powerInteger

Power of the move

Returns:

#pp_maxInteger

Maximum amount of PP the move has when unused

Returns:

#priorityInteger

Priority of the move

Returns:

#pulseBoolean

If the move is pulse based PokeAPI Prose : This move has 1.5x its usual power when used by a Pokemon with mega-launcher ability.

Returns:

  • (Boolean)

#punchBoolean

If the move is punch based PokeAPI Prose : This move has 1.2x its usual power when used by a Pokemon with iron-fist ability.

Returns:

  • (Boolean)

#rechargeBoolean

If the move requires recharging turn PokeAPI Prose : The turn after this move is used, the Pokemon's action is skipped so it can recharge.

Returns:

  • (Boolean)

#snatchableBoolean

If the move is affected by Snatch PokeAPI Prose : This move will be stolen if another Pokemon has used snatch move this turn.

Returns:

  • (Boolean)

#sound_attackBoolean

If the move is a sound attack PokeAPI Prose : Pokemon with soundproof ability are immune to this move.

Returns:

  • (Boolean)

#statusInteger?

The status effect

Returns:

#targetSymbol

The Pokemon targeted by the move

Returns:

  • (Symbol)

#typeInteger

Type of the move

Returns:

#unfreezeBoolean

If the move unfreeze the opponent Pokemon PokeAPI Prose : This move can be used while frozen to force the Pokemon to defrost.

Returns:

  • (Boolean)

Class Method Details

.can_hit_out_of_reach?(oor, id) ⇒ Boolean

Tell if the move can hit de out of reach Pokemon

Parameters:

  • oor (Integer)

    out of reach type

  • id (Symbol, Integer)

    db_symbol or id of the move in the database

Returns:

  • (Boolean)

.data_filename

Name of the file containing the skill

.get_2turns_announce(id) ⇒ Integer?

Return the id of the 2 turn announce text

Parameters:

  • id (Symbol, Integer)

    db_symbol or id of the move in the database

Returns:

.get_out_of_reach_type(id) ⇒ Integer?

Safely return the out of reach type of a move

Parameters:

  • id (Symbol, Integer)

    db_symbol or id of the move in the database

Returns:

  • (Integer, nil)

    nil if not an oor move

Instance Method Details

#nameString

Return the name of the move

Returns:

#out_of_reach_typeInteger?

Get the out of reach type of the move

Returns:

  • (Integer, nil)

    nil if not an oor move

#punching?Boolean

Is the move a punch move ?

Returns:

  • (Boolean)

#sleeping_attack?Boolean

Is the move a sleeping attack ?

Returns:

  • (Boolean)