Class: PFM::Pokemon

Inherits:
Object show all
Includes:
Hooks
Defined in:
docs/4_Systems_901_GTS.rb,
docs/4_Systems_000_General_1_PFM.rb

Overview

The InGame Pokemon management

Author:

  • Nuri Yuri

Direct Known Subclasses

PokemonBattler

Defined Under Namespace

Classes: ExpList

Constant Summary collapse

ABILITY_CHANCES =

List of chance to get a specific ability on Pokemon generation

[49, 98, 100]
FLAG_UNKOWN_USE =

Unknown flag (should always be up in Pokemon)

0x0080_0000
FLAG_FROM_THIS_GAME =

Flag telling the Pokemon comes from this game (this fangame)

0x0040_0000
FLAG_CAUGHT_BY_PLAYER =

Flag telling the Pokemon has been caught by the player

0x0020_0000
FLAG_PRESENT_TIME =

Flag telling the Pokemon comes from present time (used to distinguish pokemon imported from previous games)

0x0010_0000
Shiny_IV =

Flag that tells the Pokemon object to generate Shiny with IV starting at 15

false
EGG_FILENAMES =
TODO:

Change this later

All possible attempt of finding an egg (for legacy)

['egg_%<id>03d_%<form>02d', 'egg_%<id>03d', 'egg_%<name>s_%<form>02d', 'egg_%<name>s', 'egg']
BATTLER_SIZE =

Size of a battler

96
ICON_SIZE =

Size of an icon

32
FOOT_SIZE =

Size of a footprint

16
SPECIAL_EVOLUTION_ID =

List of key in evolution Hash that corresponds to the expected ID when evolution is valid

Returns:

  • (Array<Symbol>)
%i[trade id]
FORM_CALIBRATE =

List of form calibration hook for Creatures that needs form calibration (when switching items, being place in computer or when team changes)

{}
FORM_GENERATION =

List of form generation hook for Creatures that needs an initial form when the PFM::Pokemon object is generated.

{}
ArceusItem =

List of items (in the form index order) that change the form of Arceus

%i[__undef__ flame_plate splash_plate zap_plate meadow_plate icicle_plate fist_plate toxic_plate earth_plate sky_plate mind_plate insect_plate stone_plate spooky_plate draco_plate iron_plate dread_plate pixie_plate]
GenesectModules =

List of items (in the form index order) that change the form of Genesect

%i[__undef__ burn_drive chill_drive douse_drive shock_drive]
SilvallyROM =

List of item (in the form index oreder) that change the form of Silvally

%i[__undef__ fighting_memory flying_memory poison_memory ground_memory rock_memory bug_memory ghost_memory steel_memory __undef__ fire_memory water_memory grass_memory electric_memory psychic_memory ice_memory dragon_memory dark_memory fairy_memory]
OGERPONMASK =

List of items (in the form index order) that change the form of Ogerpon

%i[__undef__ wellspring_mask hearthflame_mask cornerstone_mask]
G_ID =

PSP 0.7 ID Hash key

'ID'
G_NV =

PSP 0.7 level Hash key

'NV'
G_OBJ =

PSP 0.7 item hash key

'OBJ'
G_STAT =

PSP 0.7 stat hash key

'STAT'
G_MOVE =

PSP 0.7 move hash key

'MOVE'
G_GR =

PSP 0.7 gender hash key

'GR'
G_FORM =

PSP 0.7 form hash key

'FORM'
G_SHINY =

PSP 0.7 shiny hash key

'SHINY'

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Hooks

#exec_hooks, #force_return, included, register, remove, remove_without_name

Constructor Details

#initialize(id, level, force_shiny = false, no_shiny = false, form = -1,, opts = {}) ⇒ Pokemon

Create a new Pokemon with specific parameters

Parameters:

  • id (Integer, Symbol)

    ID of the Pokemon in the database

  • level (Integer)

    level of the Pokemon

  • force_shiny (Boolean) (defaults to: false)

    if the Pokemon have 100% chance to be shiny

  • no_shiny (Boolean) (defaults to: false)

    if the Pokemon have 0% chance to be shiny (override force_shiny)

  • form (Integer) (defaults to: -1,)

    Form index of the Pokemon (-1 = automatic generation)

  • opts (Hash) (defaults to: {})

    Hash describing optional value you want to assign to the Pokemon

Options Hash (opts):

  • :given_name (String)

    Nickname of the Pokemon

  • :captured_with (Integer, Symbol)

    ID of the ball used to catch the Pokemon

  • :captured_in (Integer)

    ID of the zone where the Pokemon was caught

  • :captured_at (Integer, Time)

    Time when the Pokemon was caught

  • :captured_level (Integer)

    Level of the Pokemon when it was caught

  • :egg_in (Integer)

    ID of the zone where the egg was layed/found

  • :egg_at (Integer, Time)

    Time when the egg was layed/found

  • :gender (Integer, String)

    Forced gender of the Pokemon

  • :nature (Integer)

    Nature of the Pokemon

  • :stats (Array<Integer>)

    IV array ([hp, atk, dfe, spd, ats, dfs])

  • :bonus (Array<Integer>)

    EV array ([hp, atk, dfe, spd, ats, dfs])

  • :item (Integer, Symbol)

    ID of the item the Pokemon is holding

  • :ability (Integer, Symbol)

    ID of the ability the Pokemon has

  • :rareness (Integer)

    Rareness of the Pokemon (0 = not catchable, 255 = always catchable)

  • :loyalty (Integer)

    Happiness of the Pokemon

  • :moves (Array<Integer, Symbol>)

    Current Moves of the Pokemon (0 = default)

  • :memo_text (Array(Integer, Integer))

    Text used for the memo ([file_id, text_id])

  • :trainer_name (String)

    Name of the trainer that caught / got the Pokemon

  • :trainer_id (Integer)

    ID of the trainer that caught / got the Pokemon



332
333
# File 'docs/4_Systems_000_General_1_PFM.rb', line 332

def initialize(id, level, force_shiny = false, no_shiny = false, form = -1, opts = {})
end

Class Attribute Details

.evolution_criteriaHash{ Symbol => Proc } (readonly)

List of evolution criteria

Returns:

  • (Hash{ Symbol => Proc })


922
923
924
# File 'docs/4_Systems_000_General_1_PFM.rb', line 922

def evolution_criteria
  @evolution_criteria
end

.evolution_reason_required_criteriaHash{ Symbol => Array<Symbol> } (readonly)

List of evolution criteria required for specific reason

Returns:

  • (Hash{ Symbol => Array<Symbol> })


925
926
927
# File 'docs/4_Systems_000_General_1_PFM.rb', line 925

def evolution_reason_required_criteria
  @evolution_reason_required_criteria
end

Instance Attribute Details

#abilityInteger

Return the current ability of the Pokemon

Returns:

  • (Integer)


708
709
# File 'docs/4_Systems_000_General_1_PFM.rb', line 708

def ability
end

#ability_indexInteger?

Index of the ability in the Pokemon data

Returns:

  • (Integer, nil)


529
530
531
# File 'docs/4_Systems_000_General_1_PFM.rb', line 529

def ability_index
  @ability_index
end

#ability_usedBoolean

Check whether the ability has been already used in battle

Returns:

  • (Boolean)


523
524
525
# File 'docs/4_Systems_000_General_1_PFM.rb', line 523

def ability_used
  @ability_used
end

#attack_orderInteger

Attack order value tells when the Pokemon attacks (used to test if attack before another pokemon)

Returns:

  • (Integer)


558
559
560
# File 'docs/4_Systems_000_General_1_PFM.rb', line 558

def attack_order
  @attack_order
end

#battle_itemInteger?

ID of the item the Pokemon is holding in battle

Returns:

  • (Integer, nil)


573
574
575
# File 'docs/4_Systems_000_General_1_PFM.rb', line 573

def battle_item
  @battle_item
end

#battle_item_dataArray?

Various data information of the item during battle

Returns:

  • (Array, nil)


576
577
578
# File 'docs/4_Systems_000_General_1_PFM.rb', line 576

def battle_item_data
  @battle_item_data
end

#battle_stageArray(Integer, Integer, Integer, Integer, Integer, Integer, Integer)

The battle Stage of the Pokemon [atk, dfe, spd, ats, dfs, eva, acc]

Returns:

  • (Array(Integer, Integer, Integer, Integer, Integer, Integer, Integer))


541
542
543
# File 'docs/4_Systems_000_General_1_PFM.rb', line 541

def battle_stage
  @battle_stage
end

#battle_turnsInteger

Number of turn the Pokemon has fought

Returns:

  • (Integer)


555
556
557
# File 'docs/4_Systems_000_General_1_PFM.rb', line 555

def battle_turns
  @battle_turns
end

#captured_atInteger

Time when the Pokemon was captured (in seconds from jan 1970)

Returns:

  • (Integer)


418
419
420
# File 'docs/4_Systems_000_General_1_PFM.rb', line 418

def captured_at
  @captured_at
end

#captured_inInteger

Zone (id) where the Pokemon was captured mixed with the Gemme 4.0 Flag

Returns:

  • (Integer)


415
416
417
# File 'docs/4_Systems_000_General_1_PFM.rb', line 415

def captured_in
  @captured_in
end

#captured_levelInteger

Level of the Pokemon when the Pokemon was caught

Returns:

  • (Integer)


421
422
423
# File 'docs/4_Systems_000_General_1_PFM.rb', line 421

def captured_level
  @captured_level
end

#captured_withInteger

ID of the item used to catch the Pokemon

Returns:

  • (Integer)


412
413
414
# File 'docs/4_Systems_000_General_1_PFM.rb', line 412

def captured_with
  @captured_with
end

#characterString

Character filename of the Pokemon (FollowMe optimizations)

Returns:



508
509
510
# File 'docs/4_Systems_000_General_1_PFM.rb', line 508

def character
  @character
end

#codeInteger

Code of the pokemon

Returns:

  • (Integer)


406
407
408
# File 'docs/4_Systems_000_General_1_PFM.rb', line 406

def code
  @code
end

#confuseBoolean

If the pokemon is confused

Returns:

  • (Boolean)


552
553
554
# File 'docs/4_Systems_000_General_1_PFM.rb', line 552

def confuse
  @confuse
end

#critical_modifier



545
546
# File 'docs/4_Systems_000_General_1_PFM.rb', line 545

def critical_modifier
end

#egg_atInteger

Time when the Egg has been obtained

Returns:

  • (Integer)


427
428
429
# File 'docs/4_Systems_000_General_1_PFM.rb', line 427

def egg_at
  @egg_at
end

#egg_how_obtainedSymbol (readonly)

How the egg was obtained

Returns:

  • (Symbol)


430
431
432
# File 'docs/4_Systems_000_General_1_PFM.rb', line 430

def egg_how_obtained
  @egg_how_obtained
end

#egg_inInteger

Zone (id) where the Egg has been obtained

Returns:

  • (Integer)


424
425
426
# File 'docs/4_Systems_000_General_1_PFM.rb', line 424

def egg_in
  @egg_in
end

#ev_atkInteger

ATK Effort Value

Returns:

  • (Integer)


454
455
456
# File 'docs/4_Systems_000_General_1_PFM.rb', line 454

def ev_atk
  @ev_atk
end

#ev_atsInteger

ATS Effort Value

Returns:

  • (Integer)


463
464
465
# File 'docs/4_Systems_000_General_1_PFM.rb', line 463

def ev_ats
  @ev_ats
end

#ev_dfeInteger

DFE Effort Value

Returns:

  • (Integer)


457
458
459
# File 'docs/4_Systems_000_General_1_PFM.rb', line 457

def ev_dfe
  @ev_dfe
end

#ev_dfsInteger

DFS Effort Value

Returns:

  • (Integer)


466
467
468
# File 'docs/4_Systems_000_General_1_PFM.rb', line 466

def ev_dfs
  @ev_dfs
end

#ev_hpInteger

HP Effort Value

Returns:

  • (Integer)


451
452
453
# File 'docs/4_Systems_000_General_1_PFM.rb', line 451

def ev_hp
  @ev_hp
end

#ev_spdInteger

SPD Effort Value

Returns:

  • (Integer)


460
461
462
# File 'docs/4_Systems_000_General_1_PFM.rb', line 460

def ev_spd
  @ev_spd
end

#evolve_varInteger?

Variable responsible of holding the value used for various evolution methods

Returns:

  • (Integer, nil)


538
539
540
# File 'docs/4_Systems_000_General_1_PFM.rb', line 538

def evolve_var
  @evolve_var
end

#expInteger

The total amount of exp the Pokemon got

Returns:

  • (Integer)


400
401
402
# File 'docs/4_Systems_000_General_1_PFM.rb', line 400

def exp
  @exp
end

#exp_rateFloat

The rate of exp point the Pokemon has in its level

Returns:

  • (Float)


493
494
495
# File 'docs/4_Systems_000_General_1_PFM.rb', line 493

def exp_rate
  @exp_rate
end

#formInteger

Form Index of the Pokemon, ex: Unkown A = 0, Unkown Z = 25

Returns:

  • (Integer)


448
449
450
# File 'docs/4_Systems_000_General_1_PFM.rb', line 448

def form
  @form
end

#game_codeInteger?

Code of the game where the Pokemon comes from (nil if the Pokemon hasn’t been tainted by GTS system)

Returns:

  • (Integer, nil)


311
312
313
# File 'docs/4_Systems_901_GTS.rb', line 311

def game_code
  @game_code
end

#genderInteger

Gender of the Pokemon : 0 = no gender, 1 = male, 2 = female

Returns:

  • (Integer)


442
443
444
# File 'docs/4_Systems_000_General_1_PFM.rb', line 442

def gender
  @gender
end

#given_nameString Also known as: nickname

Return the given name of the Pokemon (Pokedex name if no given name)

Returns:



439
440
441
# File 'docs/4_Systems_000_General_1_PFM.rb', line 439

def given_name
  @given_name
end

#hpInteger

The current HP the Pokemon has

Returns:

  • (Integer)


403
404
405
# File 'docs/4_Systems_000_General_1_PFM.rb', line 403

def hp
  @hp
end

#hp_rateFloat

The rate of HP the Pokemon has

Returns:

  • (Float)


490
491
492
# File 'docs/4_Systems_000_General_1_PFM.rb', line 490

def hp_rate
  @hp_rate
end

#idInteger

ID of the Pokemon in the database

Returns:

  • (Integer)


394
395
396
# File 'docs/4_Systems_000_General_1_PFM.rb', line 394

def id
  @id
end

#item_holdingInteger

ID of the item the Pokemon is holding

Returns:

  • (Integer)


496
497
498
# File 'docs/4_Systems_000_General_1_PFM.rb', line 496

def item_holding
  @item_holding
end

#iv_atkInteger

ATK Individual Value

Returns:

  • (Integer)


472
473
474
# File 'docs/4_Systems_000_General_1_PFM.rb', line 472

def iv_atk
  @iv_atk
end

#iv_atsInteger

ATS Individual Value

Returns:

  • (Integer)


481
482
483
# File 'docs/4_Systems_000_General_1_PFM.rb', line 481

def iv_ats
  @iv_ats
end

#iv_dfeInteger

DFE Individual Value

Returns:

  • (Integer)


475
476
477
# File 'docs/4_Systems_000_General_1_PFM.rb', line 475

def iv_dfe
  @iv_dfe
end

#iv_dfsInteger

DFS Individual Value

Returns:

  • (Integer)


484
485
486
# File 'docs/4_Systems_000_General_1_PFM.rb', line 484

def iv_dfs
  @iv_dfs
end

#iv_hpInteger

HP Individual Value

Returns:

  • (Integer)


469
470
471
# File 'docs/4_Systems_000_General_1_PFM.rb', line 469

def iv_hp
  @iv_hp
end

#iv_spdInteger

SPD Individual Value

Returns:

  • (Integer)


478
479
480
# File 'docs/4_Systems_000_General_1_PFM.rb', line 478

def iv_spd
  @iv_spd
end

#levelInteger

Current Level of the Pokemon

Returns:

  • (Integer)


397
398
399
# File 'docs/4_Systems_000_General_1_PFM.rb', line 397

def level
  @level
end

#loyaltyInteger

Happiness/loyalty of the Pokemon (0 no bonds, 255 full bonds)

Returns:

  • (Integer)


445
446
447
# File 'docs/4_Systems_000_General_1_PFM.rb', line 445

def loyalty
  @loyalty
end

#memo_textArray<Integer>

Memo text [file_id, text_id]

Returns:

  • (Array<Integer>)


511
512
513
# File 'docs/4_Systems_000_General_1_PFM.rb', line 511

def memo_text
  @memo_text
end

#natureArray<Integer>

Return the nature data of the Pokemon

Returns:

  • (Array<Integer>)
    text_id, atk%, dfe%, spd%, ats%, dfs%


660
661
# File 'docs/4_Systems_000_General_1_PFM.rb', line 660

def nature
end

#positionInteger?

The position in the Battle, > 0 = actor, < 0 = enemy (index = -position-1), nil = not fighting

Returns:

  • (Integer, nil)


549
550
551
# File 'docs/4_Systems_000_General_1_PFM.rb', line 549

def position
  @position
end

#prepared_skillInteger

ID of the skill the Pokemon would like to use

Returns:

  • (Integer)


561
562
563
# File 'docs/4_Systems_000_General_1_PFM.rb', line 561

def prepared_skill
  @prepared_skill
end

#ribbonsArray<Integer>

List of Ribbon ID the Pokemon got

Returns:

  • (Array<Integer>)


514
515
516
# File 'docs/4_Systems_000_General_1_PFM.rb', line 514

def ribbons
  @ribbons
end

#skill_learntArray<Integer> (readonly)

List of Skill id the Pokemon learnt during its life

Returns:

  • (Array<Integer>)


517
518
519
# File 'docs/4_Systems_000_General_1_PFM.rb', line 517

def skill_learnt
  @skill_learnt
end

#skills_setArray<PFM::Skill> Also known as: moveset

The current moveset of the Pokemon

Returns:



520
521
522
# File 'docs/4_Systems_000_General_1_PFM.rb', line 520

def skills_set
  @skills_set
end

#statusInteger

ID of the status of the Pokemon

Returns:

  • (Integer)


532
533
534
# File 'docs/4_Systems_000_General_1_PFM.rb', line 532

def status
  @status
end

#status_countInteger

Internal status counter that helps some status to terminate or worsen

Returns:

  • (Integer)


535
536
537
# File 'docs/4_Systems_000_General_1_PFM.rb', line 535

def status_count
  @status_count
end

#step_remainingInteger

Number of step before the egg hatch (thus the Pokemon is an egg)

Returns:

  • (Integer)


409
410
411
# File 'docs/4_Systems_000_General_1_PFM.rb', line 409

def step_remaining
  @step_remaining
end

#sub_codeInteger?

Real code of the Pokemon when used transform (needed to test if roaming pokemon is ditto)

Returns:

  • (Integer, nil)


567
568
569
# File 'docs/4_Systems_000_General_1_PFM.rb', line 567

def sub_code
  @sub_code
end

#sub_formInteger?

Real form index of the Pokemon when used transform (needed to test if roaming pokemon is ditto)

Returns:

  • (Integer, nil)


570
571
572
# File 'docs/4_Systems_000_General_1_PFM.rb', line 570

def sub_form
  @sub_form
end

#sub_idInteger?

Real id of the Pokemon when used transform

Returns:

  • (Integer, nil)


564
565
566
# File 'docs/4_Systems_000_General_1_PFM.rb', line 564

def sub_id
  @sub_id
end

#trainer_idInteger

Return the normalized trainer id of the Pokemon

Returns:

  • (Integer)


692
693
# File 'docs/4_Systems_000_General_1_PFM.rb', line 692

def trainer_id
end

#trainer_nameString

Name of the original trainer

Returns:



436
437
438
# File 'docs/4_Systems_000_General_1_PFM.rb', line 436

def trainer_name
  @trainer_name
end

#type1Integer

Return the current first type of the Pokemon

Returns:

  • (Integer)


1665
1666
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1665

def type1
end

#type2Integer

Return the current second type of the Pokemon

Returns:

  • (Integer)


1669
1670
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1669

def type2
end

#type3Integer

Return the current third type of the Pokemon

Returns:

  • (Integer)


1673
1674
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1673

def type3
end

Class Method Details

.add_evolution_criteria(key, reasons = nil, &block)

Add a new evolution criteria

Parameters:

  • key (Symbol)

    hash key expected in special evolution

  • reasons (Array<Symbol>) (defaults to: nil)

    evolution reasons that require this criteria in order to allow evolution

  • block (Proc)

    executed proc for special evolution test, will receive : value, extend_data, reason



930
931
# File 'docs/4_Systems_000_General_1_PFM.rb', line 930

def add_evolution_criteria(key, reasons = nil, &block)
end

.back_filename(id, form, female, shiny, egg) ⇒ String

Return the back battler name

Parameters:

  • id (Integer)

    ID of the Pokemon

  • form (Integer)

    form index of the Pokemon

  • female (Boolean)

    if the Pokemon is a female

  • shiny (Boolean)

    shiny state of the Pokemon

  • egg (Boolean)

    egg state of the Pokemon

Returns:



779
780
# File 'docs/4_Systems_000_General_1_PFM.rb', line 779

def back_filename(id, form, female, shiny, egg)
end

.back_gif_filename(id, form, female, shiny, egg) ⇒ String?

Return the back gif name

Parameters:

  • id (Integer)

    ID of the Pokemon

  • form (Integer)

    form index of the Pokemon

  • female (Boolean)

    if the Pokemon is a female

  • shiny (Boolean)

    shiny state of the Pokemon

  • egg (Boolean)

    egg state of the Pokemon

Returns:



788
789
# File 'docs/4_Systems_000_General_1_PFM.rb', line 788

def back_gif_filename(id, form, female, shiny, egg)
end

.front_filename(id, form, female, shiny, egg) ⇒ String

Return the front battler name

Parameters:

  • id (Integer)

    ID of the Pokemon

  • form (Integer)

    form index of the Pokemon

  • female (Boolean)

    if the Pokemon is a female

  • shiny (Boolean)

    shiny state of the Pokemon

  • egg (Boolean)

    egg state of the Pokemon

Returns:



761
762
# File 'docs/4_Systems_000_General_1_PFM.rb', line 761

def front_filename(id, form, female, shiny, egg)
end

.front_gif_filename(id, form, female, shiny, egg) ⇒ String?

Return the front gif name

Parameters:

  • id (Integer)

    ID of the Pokemon

  • form (Integer)

    form index of the Pokemon

  • female (Boolean)

    if the Pokemon is a female

  • shiny (Boolean)

    shiny state of the Pokemon

  • egg (Boolean)

    egg state of the Pokemon

Returns:



770
771
# File 'docs/4_Systems_000_General_1_PFM.rb', line 770

def front_gif_filename(id, form, female, shiny, egg)
end

.generate_from_hash(hash) ⇒ PFM::Pokemon

Generate a Pokemon from a hash

Parameters:

  • hash (Hash)

    Hash describing optional value you want to assign to the Pokemon

Options Hash (hash):

  • :id (Integer, Symbol)

    ID of the Pokemon

  • :level (Integer)

    level of the Pokemon

  • :shiny (Boolean)

    if the pokemon will be shiny

  • :no_shiny (Boolean)

    if the pokemon will never be shiny

  • :form (Integer)

    form index of the Pokemon

  • :given_name (String)

    Nickname of the Pokemon

  • :captured_with (Integer, Symbol)

    ID of the ball used to catch the Pokemon

  • :captured_in (Integer)

    ID of the zone where the Pokemon was caught

  • :captured_at (Integer, Time)

    Time when the Pokemon was caught

  • :captured_level (Integer)

    Level of the Pokemon when it was caught

  • :egg_in (Integer)

    ID of the zone where the egg was layed/found

  • :egg_at (Integer, Time)

    Time when the egg was layed/found

  • :gender (Integer, String)

    Forced gender of the Pokemon

  • :nature (Integer)

    Nature of the Pokemon

  • :stats (Array<Integer>)

    IV array ([hp, atk, dfe, spd, ats, dfs])

  • :bonus (Array<Integer>)

    EV array ([hp, atk, dfe, spd, ats, dfs])

  • :item (Integer, Symbol)

    ID of the item the Pokemon is holding

  • :ability (Integer, Symbol)

    ID of the ability the Pokemon has

  • :rareness (Integer)

    Rareness of the Pokemon (0 = not catchable, 255 = always catchable)

  • :loyalty (Integer)

    Happiness of the Pokemon

  • :moves (Array<Integer, Symbol>)

    Current Moves of the Pokemon (0 = default)

  • :memo_text (Array(Integer, Integer))

    Text used for the memo ([file_id, text_id]) (file_id = csv - 100000; 103.csv = -99897; etc.)

  • :trainer_name (String)

    Name of the trainer that caught / got the Pokemon

  • :trainer_id (Integer)

    ID of the trainer that caught / got the Pokemon

Returns:



1825
1826
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1825

def generate_from_hash(hash)
end

.icon_filename(id, form, female, shiny, egg) ⇒ String

Icon filename of a Pokemon

Parameters:

  • id (Integer)

    ID of the Pokemon

  • form (Integer)

    form index of the Pokemon

  • female (Boolean)

    if the Pokemon is a female

  • shiny (Boolean)

    shiny state of the Pokemon

  • egg (Boolean)

    egg state of the Pokemon

Returns:



752
753
# File 'docs/4_Systems_000_General_1_PFM.rb', line 752

def icon_filename(id, form, female, shiny, egg)
end

.missing_resources_error(id) ⇒ String

Display an error in case of missing resources and fallback to the default one

Parameters:

  • id (Integer, Symbol)

    ID of the Pokemon

Returns:



793
794
# File 'docs/4_Systems_000_General_1_PFM.rb', line 793

def missing_resources_error(id)
end

Instance Method Details

#ability_db_symbolSymbol

Return the db_symbol of the Pokemon’s Ability

Returns:

  • (Symbol)


712
713
# File 'docs/4_Systems_000_General_1_PFM.rb', line 712

def ability_db_symbol
end

#ability_descrString

Reture the description of the current ability of the Pokemon

Returns:



1876
1877
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1876

def ability_descr
end

#ability_nameString

Return the name of the current ability of the Pokemon

Returns:



1872
1873
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1872

def ability_name
end

#absofusion(pokemon)

Absofusion of the Pokemon (if possible)

Parameters:

  • pokemon

    PFM::Pokemon The Pokemon used in the fusion



1160
1161
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1160

def absofusion(pokemon)
end

#absofusionned?Boolean

If the Pokemon is a absofusion

Returns:

  • (Boolean)


1166
1167
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1166

def absofusionned?
end

#acc_stageInteger

Return the accuracy stage

Returns:

  • (Integer)


1396
1397
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1396

def acc_stage
end

#add_bonus(list) ⇒ Boolean?

Add ev bonus to a Pokemon (with item interaction : x2)

Parameters:

  • list (Array<Integer>)

    an ev list : [hp, atk, dfe, spd, ats, dfs]

Returns:

  • (Boolean, nil)

    if the ev had totally been added or not (nil = couldn’t be added at all)



851
852
# File 'docs/4_Systems_000_General_1_PFM.rb', line 851

def add_bonus(list)
end

#add_ev_atk(n, evs) ⇒ Boolean

Safely add ATK EV

Parameters:

  • n (Integer)

    amount of EV to add

  • evs (Integer)

    total ev

Returns:

  • (Boolean)

    if the ev has successfully been added



886
887
# File 'docs/4_Systems_000_General_1_PFM.rb', line 886

def add_ev_atk(n, evs)
end

#add_ev_ats(n, evs) ⇒ Boolean

Safely add ATS EV

Parameters:

  • n (Integer)

    amount of EV to add

  • evs (Integer)

    total ev

Returns:

  • (Boolean)

    if the ev has successfully been added



904
905
# File 'docs/4_Systems_000_General_1_PFM.rb', line 904

def add_ev_ats(n, evs)
end

#add_ev_dfe(n, evs) ⇒ Boolean

Safely add DFE EV

Parameters:

  • n (Integer)

    amount of EV to add

  • evs (Integer)

    total ev

Returns:

  • (Boolean)

    if the ev has successfully been added



892
893
# File 'docs/4_Systems_000_General_1_PFM.rb', line 892

def add_ev_dfe(n, evs)
end

#add_ev_dfs(n, evs) ⇒ Boolean

Safely add DFS EV

Parameters:

  • n (Integer)

    amount of EV to add

  • evs (Integer)

    total ev

Returns:

  • (Boolean)

    if the ev has successfully been added



910
911
# File 'docs/4_Systems_000_General_1_PFM.rb', line 910

def add_ev_dfs(n, evs)
end

#add_ev_hp(n, evs) ⇒ Boolean

Safely add HP EV

Parameters:

  • n (Integer)

    amount of EV to add

  • evs (Integer)

    total ev

Returns:

  • (Boolean)

    if the ev has successfully been added



880
881
# File 'docs/4_Systems_000_General_1_PFM.rb', line 880

def add_ev_hp(n, evs)
end

#add_ev_spd(n, evs) ⇒ Boolean

Safely add SPD EV

Parameters:

  • n (Integer)

    amount of EV to add

  • evs (Integer)

    total ev

Returns:

  • (Boolean)

    if the ev has successfully been added



898
899
# File 'docs/4_Systems_000_General_1_PFM.rb', line 898

def add_ev_spd(n, evs)
end

#add_ribbon(id)

Add a ribbon to the Pokemon

Parameters:

  • id (Integer)

    ID of the ribbon (in the ribbon text file)



716
717
# File 'docs/4_Systems_000_General_1_PFM.rb', line 716

def add_ribbon(id)
end

#alive?Boolean

Is the Pokemon able to fight

Returns:

  • (Boolean)


1570
1571
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1570

def alive?
end

#asleep?Boolean

Is the Pokemon asleep?

Returns:

  • (Boolean)


1624
1625
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1624

def asleep?
end

#atkInteger

Return the current atk

Returns:

  • (Integer)


1352
1353
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1352

def atk
end

#atk_basisInteger

Return the atk stat without battle modifier

Returns:

  • (Integer)


1476
1477
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1476

def atk_basis
end

#atk_modifierFloat

Return the atk modifier

Returns:

  • (Float)

    the multiplier



1446
1447
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1446

def atk_modifier
end

#atk_stageInteger

Return the atk stage

Returns:

  • (Integer)


1372
1373
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1372

def atk_stage
end

#atsInteger

Return the current ats

Returns:

  • (Integer)


1364
1365
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1364

def ats
end

#ats_basisInteger

Return the ats stat without battle modifier

Returns:

  • (Integer)


1488
1489
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1488

def ats_basis
end

#ats_modifierFloat

Return the ats modifier

Returns:

  • (Float)

    the multiplier



1458
1459
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1458

def ats_modifier
end

#ats_stageInteger

Return the ats stage

Returns:

  • (Integer)


1384
1385
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1384

def ats_stage
end

#ball_colorColor

Return the ball color of the Pokemon (flash)

Returns:



688
689
# File 'docs/4_Systems_000_General_1_PFM.rb', line 688

def ball_color
end

#ball_imageTexture

Return the ball image of the Pokemon

Returns:



742
743
# File 'docs/4_Systems_000_General_1_PFM.rb', line 742

def ball_image
end

#ball_spriteString

Return the ball sprite name of the Pokemon

Returns:

  • (String)

    Sprite to load in Graphics/ball/



684
685
# File 'docs/4_Systems_000_General_1_PFM.rb', line 684

def ball_sprite
end

#base_atkInteger

Return the base ATK

Returns:

  • (Integer)


1328
1329
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1328

def base_atk
end

#base_atsInteger

Return the base ATS

Returns:

  • (Integer)


1340
1341
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1340

def base_ats
end

#base_dfeInteger

Return the base DFE

Returns:

  • (Integer)


1332
1333
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1332

def base_dfe
end

#base_dfsInteger

Return the base DFS

Returns:

  • (Integer)


1344
1345
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1344

def base_dfs
end

#base_expInteger

Return the base experience of the Pokemon

Returns:

  • (Integer)


935
936
# File 'docs/4_Systems_000_General_1_PFM.rb', line 935

def base_exp
end

#base_hpInteger

Return the base HP

Returns:

  • (Integer)


1324
1325
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1324

def base_hp
end

#base_spdInteger

Return the base SPD

Returns:

  • (Integer)


1336
1337
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1336

def base_spd
end

#battle_listArray<Integer>

Return the list of EV the pokemon gives when beaten

Returns:

  • (Array<Integer>)

    ev list (used in bonus functions) : [hp, atk, dfe, spd, ats, dfs]



846
847
# File 'docs/4_Systems_000_General_1_PFM.rb', line 846

def battle_list
end

#battler_backTexture

Return the back battle of the Pokemon

Returns:



821
822
# File 'docs/4_Systems_000_General_1_PFM.rb', line 821

def battler_back
end

#battler_faceTexture Also known as: battler_front

Return the front battler of the Pokemon

Returns:



816
817
# File 'docs/4_Systems_000_General_1_PFM.rb', line 816

def battler_face
end

#burn?Boolean Also known as: burnt?

Is the Pokemon burnt?

Returns:

  • (Boolean)


1610
1611
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1610

def burn?
end

#calyrex_form(reason)

Determine the form of the Calyrex

Parameters:

  • reason (Symbol)

    The db_symbol of the Pokemon used for the fusion



1208
1209
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1208

def calyrex_form(reason)
end

#can_be_asleep?Boolean

Can the Pokemon be asleep?

Returns:

  • (Boolean)


1634
1635
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1634

def can_be_asleep?
end

#can_be_burn?Boolean

Can the Pokemon be burnt?

Returns:

  • (Boolean)


1620
1621
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1620

def can_be_burn?
end

#can_be_frozen?(skill_type = 0) ⇒ Boolean

Can the Pokemon be frozen?

Returns:

  • (Boolean)


1651
1652
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1651

def can_be_frozen?(skill_type = 0)
end

#can_be_paralyzed?Boolean

Can the Pokemon be paralyzed?

Returns:

  • (Boolean)


1606
1607
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1606

def can_be_paralyzed?
end

#can_be_poisoned?Boolean

Can the Pokemon be poisoned ?

Returns:

  • (Boolean)


1593
1594
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1593

def can_be_poisoned?
end

#can_learn?(db_symbol) ⇒ Boolean?

Check if the Pokemon can learn a skill

Parameters:

  • db_symbol (Integer, Symbol)

    id or db_symbol of the move

Returns:

  • (Boolean, nil)

    nil = learnt, false = cannot learn, true = can learn



1306
1307
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1306

def can_learn?(db_symbol)
end

#can_learn_skill_at_this_level?(level = @level) ⇒ Boolean

Can learn skill at this level

Parameters:

  • level (Integer) (defaults to: @level)

Returns:

  • (Boolean)


1301
1302
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1301

def can_learn_skill_at_this_level?(level = @level)
end

#can_mega_evolve?Integer, false

Check if the Pokemon can mega evolve

Returns:

  • (Integer, false)

    form index if the Pokemon can mega evolve, false otherwise



1147
1148
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1147

def can_mega_evolve?
end

#captured_zone_nameString

Return the name of the zone where the Pokemon has been caught

Returns:



1860
1861
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1860

def captured_zone_name
end

#castform_form(reason)

Determine the form of Castform

Parameters:

  • reason (Symbol)


1212
1213
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1212

def castform_form(reason)
end

#caught_by_player?Boolean

Tell if the Pokemon is caught by the trainer

Returns:

  • (Boolean)


631
632
# File 'docs/4_Systems_000_General_1_PFM.rb', line 631

def caught_by_player?
end

#change_acc(amount) ⇒ Integer

Change the acc stage

Parameters:

  • amount (Integer)

    the amount to change on the stat stage

Returns:

  • (Integer)

    the difference between the current and the last stage value



1437
1438
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1437

def change_acc(amount)
end

#change_atk(amount) ⇒ Integer

Change the atk stage

Parameters:

  • amount (Integer)

    the amount to change on the stat stage

Returns:

  • (Integer)

    the difference between the current and the last stage value



1407
1408
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1407

def change_atk(amount)
end

#change_ats(amount) ⇒ Integer

Change the ats stage

Parameters:

  • amount (Integer)

    the amount to change on the stat stage

Returns:

  • (Integer)

    the difference between the current and the last stage value



1422
1423
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1422

def change_ats(amount)
end

#change_dfe(amount) ⇒ Integer

Change the dfe stage

Parameters:

  • amount (Integer)

    the amount to change on the stat stage

Returns:

  • (Integer)

    the difference between the current and the last stage value



1412
1413
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1412

def change_dfe(amount)
end

#change_dfs(amount) ⇒ Integer

Change the dfs stage

Parameters:

  • amount (Integer)

    the amount to change on the stat stage

Returns:

  • (Integer)

    the difference between the current and the last stage value



1427
1428
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1427

def change_dfs(amount)
end

#change_eva(amount) ⇒ Integer

Change the eva stage

Parameters:

  • amount (Integer)

    the amount to change on the stat stage

Returns:

  • (Integer)

    the difference between the current and the last stage value



1432
1433
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1432

def change_eva(amount)
end

#change_spd(amount) ⇒ Integer

Change the spd stage

Parameters:

  • amount (Integer)

    the amount to change on the stat stage

Returns:

  • (Integer)

    the difference between the current and the last stage value



1417
1418
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1417

def change_spd(amount)
end

#change_stat(stat_id, amount) ⇒ Integer

Change a stat stage

Parameters:

  • stat_id (Integer)

    id of the stat : 0 = atk, 1 = dfe, 2 = spd, 3 = ats, 4 = dfs, 5 = eva, 6 = acc

  • amount (Integer)

    the amount to change on the stat stage

Returns:

  • (Integer)

    the difference between the current and the last stage value



1402
1403
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1402

def change_stat(stat_id, amount)
end

#character_nameString

Return the character name of the Pokemon

Returns:



829
830
# File 'docs/4_Systems_000_General_1_PFM.rb', line 829

def character_name
end

#check_skill_and_learn(silent = false, level = @level)

Check if the Pokemon can learn a new skill and make it learn the skill

Parameters:

  • silent (Boolean) (defaults to: false)

    if the skill is automatically learnt or not (false = show skill learn interface & messages)

  • level (Integer) (defaults to: @level)

    The level to check in order to learn the moves (<= 0 = evolution)



1297
1298
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1297

def check_skill_and_learn(silent = false, level = @level)
end

#cramorant_form(reason)

Determine the form of Cramorant

Parameters:

  • reason (Symbol)


1204
1205
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1204

def cramorant_form(reason)
end

#cryString

Return the cry file name of the Pokemon

Returns:



833
834
# File 'docs/4_Systems_000_General_1_PFM.rb', line 833

def cry
end

#cure

Cure the Pokemon from its statues modifications



1577
1578
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1577

def cure
end

#current_deerling_formInteger

Calculate the form of deerling & sawsbuck

Returns:

  • (Integer)

    the right form



1183
1184
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1183

def current_deerling_form
end

#dataStudio::CreatureForm Also known as: get_data

Get the current data of the Pokemon



583
584
# File 'docs/4_Systems_000_General_1_PFM.rb', line 583

def data
end

#db_symbolSymbol

Return the db_symbol of the Pokemon in the database

Returns:

  • (Symbol)


610
611
# File 'docs/4_Systems_000_General_1_PFM.rb', line 610

def db_symbol
end

#dead?Boolean

Is the Pokemon not able to fight

Returns:

  • (Boolean)


1566
1567
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1566

def dead?
end

#dfeInteger

Return the current dfe

Returns:

  • (Integer)


1356
1357
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1356

def dfe
end

#dfe_basisInteger

Return the dfe stat without battle modifier

Returns:

  • (Integer)


1480
1481
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1480

def dfe_basis
end

#dfe_modifierFloat

Return the dfe modifier

Returns:

  • (Float)

    the multiplier



1450
1451
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1450

def dfe_modifier
end

#dfe_stageInteger

Return the dfe stage

Returns:

  • (Integer)


1376
1377
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1376

def dfe_stage
end

#dfsInteger

Return the current dfs

Returns:

  • (Integer)


1368
1369
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1368

def dfs
end

#dfs_basisInteger

Return the dfs stat without battle modifier

Returns:

  • (Integer)


1492
1493
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1492

def dfs_basis
end

#dfs_modifierFloat

Return the dfs modifier

Returns:

  • (Float)

    the multiplier



1462
1463
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1462

def dfs_modifier
end

#dfs_stageInteger

Return the dfs stage

Returns:

  • (Integer)


1388
1389
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1388

def dfs_stage
end

#dv_modifier(list)

Change the IV and update the statistics

Parameters:

  • list (Array<Integer>)

    list of new IV [hp, atk, dfe, spd, ats, dfs]



1466
1467
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1466

def dv_modifier(list)
end

#edit_bonus(list) ⇒ Boolean?

Add ev bonus to a Pokemon (without item interaction)

Parameters:

  • list (Array<Integer>)

    an ev list : [hp, atk, dfe, spd, ats, dfs]

Returns:

  • (Boolean, nil)

    if the ev had totally been added or not (nil = couldn’t be added at all)



856
857
# File 'docs/4_Systems_000_General_1_PFM.rb', line 856

def edit_bonus(list)
end

#egg?Boolean Also known as: egg

Tell if the Pokemon is an egg or not

Returns:

  • (Boolean)


614
615
# File 'docs/4_Systems_000_General_1_PFM.rb', line 614

def egg?
end

#egg_finish

Ends the egg process of the Pokemon



339
340
# File 'docs/4_Systems_000_General_1_PFM.rb', line 339

def egg_finish
end

#egg_init(egg_how_obtained = :received)

Initialize the egg process of the Pokemon

Parameters:

  • egg_how_obtained (Symbol) (defaults to: :received)

    :reveived => When you received the egg (ex: Daycare), :found => When you found the egg (ex: On the map)



336
337
# File 'docs/4_Systems_000_General_1_PFM.rb', line 336

def egg_init(egg_how_obtained = :received)
end

#egg_zone_nameString

Return the name of the zone where the egg has been obtained

Returns:



1864
1865
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1864

def egg_zone_name
end

#elv_1percentBoolean

Check evolve condition for 1% of creatures

Returns:

  • (Boolean)

    if the condition is valid



1082
1083
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1082

def elv_1percent
end

#elv_99percentBoolean

Check evolve condition for 99% of creatures

Returns:

  • (Boolean)

    if the condition is valid



1078
1079
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1078

def elv_99percent
end

#elv_annihilape

Check evolve condition for Primeape into Annihilape



1089
1090
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1089

def elv_annihilape
end

#elv_armulysBoolean

Check evolve condition to evolve in Silcoon (Armulys)

Returns:

  • (Boolean)

    if the condition is valid



1045
1046
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1045

def elv_armulys
end

#elv_blindalysBoolean

Check evolve condition to evolve in Cascoon (Blindalys)

Returns:

  • (Boolean)

    if the condition is valid



1049
1050
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1049

def elv_blindalys
end

#elv_demantaBoolean

Check evolve condition to evolve in Mantine

Returns:

  • (Boolean)

    if the condition is valid



1053
1054
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1053

def elv_demanta
end

#elv_kapoeraBoolean

Check evolve condition to evolve in Hitmontop (Kapoera)

Returns:

  • (Boolean)

    if the condition is valid



1041
1042
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1041

def elv_kapoera
end

#elv_kickleeBoolean

Check evolve condition to evolve in Hitmonlee (kicklee)

Returns:

  • (Boolean)

    if the condition is valid



1033
1034
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1033

def elv_kicklee
end

#elv_nymphaliBoolean

Check evolve condition to evolve in Sylveon (Nymphali)

Returns:

  • (Boolean)

    if the condition is valid



1066
1067
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1066

def elv_nymphali
end

#elv_pandarbareBoolean

Check evolve condition to evolve in Pangoro (Pandarbare)

Returns:

  • (Boolean)

    if the condition is valid



1057
1058
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1057

def elv_pandarbare
end

#elv_sepiatroceBoolean

Note:

uses :DOWN to validate the evolve condition

Check evolve condition to evolve in Malamar (Sepiatroce)

Returns:

  • (Boolean)

    if the condition is valid



1062
1063
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1062

def elv_sepiatroce
end

#elv_sirfetchdBoolean

Check evolve condition to evolve in Farfetch’d-G into Sirftech’d

Returns:

  • (Boolean)

    if the condition is valid



1086
1087
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1086

def elv_sirfetchd
end

#elv_toxtricity_amped

Check evolve condition to evolve in Toxtricity-amped (Salarsen-aigüe)

0, 2, 3, 4, 6, 8, 9, 11, 13, 14, 19, 22, 24

return [Boolean] if the condition is valid



1071
1072
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1071

def elv_toxtricity_amped
end

#elv_toxtricity_low_key

Check evolve condition when not in Toxtricity-amped (Salarsen-aigüe)



1074
1075
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1074

def elv_toxtricity_low_key
end

#elv_tygnonBoolean

Check evolve condition to evolve in Hitmonchan (tygnon)

Returns:

  • (Boolean)

    if the condition is valid



1037
1038
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1037

def elv_tygnon
end

#encodeString

Encode the Pokemon to a String in order to send it to the GTS system

Returns:



314
315
# File 'docs/4_Systems_901_GTS.rb', line 314

def encode
end

#ev_atk_textString

Return the EV ATK text

Returns:



1505
1506
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1505

def ev_atk_text
end

#ev_ats_textString

Return the EV ATS text

Returns:



1517
1518
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1517

def ev_ats_text
end

#ev_check(index, apply = false, count = 1) ⇒ Integer, false

Automatic ev adder using an index

Parameters:

  • index (Integer)

    ev index (see GameData::EV), should add 10. If index > 10 take index % 10 and add only 1 EV.

  • apply (Boolean) (defaults to: false)

    if the ev change is applied

  • count (Integer) (defaults to: 1)

    number of EV to add

Returns:

  • (Integer, false)

    if not false, the value of the current EV depending on the index



867
868
# File 'docs/4_Systems_000_General_1_PFM.rb', line 867

def ev_check(index, apply = false, count = 1)
end

#ev_dfe_textString

Return the EV DFE text

Returns:



1509
1510
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1509

def ev_dfe_text
end

#ev_dfs_textString

Return the EV DFS text

Returns:



1521
1522
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1521

def ev_dfs_text
end

#ev_hp_textString

Return the EV HP text

Returns:



1501
1502
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1501

def ev_hp_text
end

#ev_spd_textString

Return the EV SPD text

Returns:



1513
1514
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1513

def ev_spd_text
end

#ev_var(index, evs, value = 0) ⇒ Integer

Get and add EV

Parameters:

  • index (Integer)

    ev index (see GameData::EV)

  • evs (Integer)

    the total ev

  • value (Integer) (defaults to: 0)

    the quantity of EV to add (if 0 no add)

Returns:

  • (Integer)


874
875
# File 'docs/4_Systems_000_General_1_PFM.rb', line 874

def ev_var(index, evs, value = 0)
end

#eva_stageInteger

Return the evasion stage

Returns:

  • (Integer)


1392
1393
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1392

def eva_stage
end

#evolve(id, form)

Method that actually make a Pokemon evolve

Parameters:

  • id (Integer)

    ID of the Pokemon that evolve

  • form (Integer, nil)

    form of the Pokemon that evolve



1014
1015
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1014

def evolve(id, form)
end

#evolve_check(reason = :level_up, extend_data = nil) ⇒ Array<Integer, nil>, false

Check if the Pokemon can evolve and return the evolve id if possible

Parameters:

  • reason (Symbol) (defaults to: :level_up)

    evolve check reason (:level_up, :trade, :stone)

  • extend_data (Hash, nil) (defaults to: nil)

    extend_data generated by an item

Returns:

  • (Array<Integer, nil>, false)

    if the Pokemon can evolve, the evolve id, otherwise false



986
987
# File 'docs/4_Systems_000_General_1_PFM.rb', line 986

def evolve_check(reason = :level_up, extend_data = nil)
end

#exp_listExpList

Return the exp curve

Returns:



943
944
# File 'docs/4_Systems_000_General_1_PFM.rb', line 943

def exp_list
end

#exp_lvlInteger

Return the required total exp (so including old levels) to increase the Pokemon’s level

Returns:

  • (Integer)


947
948
# File 'docs/4_Systems_000_General_1_PFM.rb', line 947

def exp_lvl
end

#exp_remaining_textString

Return the text of the amount of exp the pokemon needs to go to the next level

Returns:



951
952
# File 'docs/4_Systems_000_General_1_PFM.rb', line 951

def exp_remaining_text
end

#exp_textString

Return the text of the current pokemon experience

Returns:



955
956
# File 'docs/4_Systems_000_General_1_PFM.rb', line 955

def exp_text
end

#exp_typeInteger

Return the exp curve type ID

Returns:

  • (Integer)


939
940
# File 'docs/4_Systems_000_General_1_PFM.rb', line 939

def exp_type
end

#female?Boolean

Tell if the Pokemon is a female

Returns:

  • (Boolean)


652
653
# File 'docs/4_Systems_000_General_1_PFM.rb', line 652

def female?
end

#find_skill(db_symbol) ⇒ PFM::Skill, false

Find a skill in the moveset of the Pokemon

Parameters:

  • db_symbol (Symbol)

    db_symbol of the skill in the database

Returns:



1292
1293
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1292

def find_skill(db_symbol)
end

#flagsInteger

Get Pokemon flags

Returns:

  • (Integer)


623
624
# File 'docs/4_Systems_000_General_1_PFM.rb', line 623

def flags
end

#flags=(flag)

Set the captured_in flags (to know from which game the pokemon came from)

Parameters:

  • flag (Integer)

    the new flag



619
620
# File 'docs/4_Systems_000_General_1_PFM.rb', line 619

def flags=(flag)
end

#flavor_disliked?(flavor) ⇒ Boolean

Tell if the Creature dislikes flavor

Parameters:

  • flavor (Symbol)

Returns:

  • (Boolean)


1926
1927
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1926

def flavor_disliked?(flavor)
end

#flavor_liked?(flavor) ⇒ Boolean

Tell if the Creature likes flavor

Parameters:

  • flavor (Symbol)

Returns:

  • (Boolean)


1922
1923
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1922

def flavor_liked?(flavor)
end

#forget_skill(db_symbol, delete_from_learnt: false)

Forget a skill by its id

Parameters:

  • db_symbol (Symbol)

    db_symbol of the move in the database

  • delete_from_learnt (Boolean) (defaults to: false)

    if the skill should be deleted from the skill_learnt attribute of the Pokemon



1270
1271
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1270

def forget_skill(db_symbol, delete_from_learnt: false)
end

#form_calibrate(reason = :menu) ⇒ Boolean

Note:

It calls the block stored in the hash FORM_CALIBRATE where the key is the Pokemon db_symbol & the block parameter is the reason. The block should change @form

Automatically calibrate the form of the Pokemon

Parameters:

  • reason (Symbol) (defaults to: :menu)

    what called form_calibrate (:menu, :evolve, :load, …)

Returns:

  • (Boolean)

    if the Pokemon’s form has changed



1179
1180
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1179

def form_calibrate(reason = :menu)
end

#form_generation(form, old_value = nil) ⇒ Integer

Note:

It calls the block stored in the hash FORM_GENERATION where the key is the Pokemon db_symbol

Automatically generate the form index of the Pokemon

Parameters:

  • form (Integer)

    if form != 0 does not generate the form (protection)

Returns:

  • (Integer)

    the form index



1172
1173
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1172

def form_generation(form, old_value = nil)
end

#from_past?Boolean

Tell if the pokemon is from a past version

Returns:

  • (Boolean)


627
628
# File 'docs/4_Systems_000_General_1_PFM.rb', line 627

def from_past?
end

#from_player?Boolean

Return if the Pokemon is from the player (he caught it)

Returns:

  • (Boolean)


696
697
# File 'docs/4_Systems_000_General_1_PFM.rb', line 696

def from_player?
end

#front_offset_yInteger

Return the front offset y of the Pokemon

Returns:

  • (Integer)


825
826
# File 'docs/4_Systems_000_General_1_PFM.rb', line 825

def front_offset_y
end

#frozen?Boolean

Is the Pokemon frozen?

Returns:

  • (Boolean)


1642
1643
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1642

def frozen?
end

#fully_heal

Heal the pokemon when it is captured with a Heal Ball



1580
1581
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1580

def fully_heal
end

#genderless?Boolean

Tell if the Pokemon is genderless

Returns:

  • (Boolean)


644
645
# File 'docs/4_Systems_000_General_1_PFM.rb', line 644

def genderless?
end

#get_dv_value(value, old) ⇒ Integer

Get the adjusted IV

Parameters:

  • value (Integer)

    the new value

  • old (Integer)

    the old value

Returns:

  • (Integer)

    something between old and 31 (value in most case)



1472
1473
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1472

def get_dv_value(value, old)
end

#gif_back::Yuki::GifReader?

Return the GifReader back of the Pokemon

Returns:



841
842
# File 'docs/4_Systems_000_General_1_PFM.rb', line 841

def gif_back
end

#gif_face::Yuki::GifReader?

Return the GifReader face of the Pokemon

Returns:



837
838
# File 'docs/4_Systems_000_General_1_PFM.rb', line 837

def gif_face
end

#heightNumeric

Return the height of the Pokemon

Returns:

  • (Numeric)


676
677
# File 'docs/4_Systems_000_General_1_PFM.rb', line 676

def height
end

#hp_pokemon_numberString

Returns the HP text (to_pokemon_number)

Returns:



1900
1901
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1900

def hp_pokemon_number
end

#hp_textString

Returns the HP text

Returns:



1896
1897
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1896

def hp_text
end

#iconTexture

Return the icon of the Pokemon

Returns:



812
813
# File 'docs/4_Systems_000_General_1_PFM.rb', line 812

def icon
end

#id_textString

Return the text of the Pokemon ID

Returns:



1904
1905
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1904

def id_text
end

#id_text2String

Return the text of the Pokemon ID with N°

Returns:



1908
1909
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1908

def id_text2
end

#id_text3String

Return the text of the Pokemon ID to pokemon number

Returns:



1912
1913
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1912

def id_text3
end

#increase_evolve_var(amount = 1)

Method responsible of increasing the evolve_var by a given amount.

Parameters:

  • amount (Integer, nil) (defaults to: 1)

    by how much the evolve_var attribute is increased



724
725
# File 'docs/4_Systems_000_General_1_PFM.rb', line 724

def increase_evolve_var(amount = 1)
end

#item_db_symbolSymbol

Return the db_symbol of the Pokemon’s item held

Returns:

  • (Symbol)


700
701
# File 'docs/4_Systems_000_General_1_PFM.rb', line 700

def item_db_symbol
end

#item_holdInteger

Alias for item_holding

Returns:

  • (Integer)


704
705
# File 'docs/4_Systems_000_General_1_PFM.rb', line 704

def item_hold
end

#item_nameString

Return the name of the item the Pokemon is holding

Returns:



1868
1869
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1868

def item_name
end

#iv_atk_textString

Return the IV ATK text

Returns:



1529
1530
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1529

def iv_atk_text
end

#iv_ats_textString

Return the IV ATS text

Returns:



1541
1542
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1541

def iv_ats_text
end

#iv_dfe_textString

Return the IV DFE text

Returns:



1533
1534
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1533

def iv_dfe_text
end

#iv_dfs_textString

Return the IV DFS text

Returns:



1545
1546
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1545

def iv_dfs_text
end

#iv_hp_textString

Return the IV HP text

Returns:



1525
1526
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1525

def iv_hp_text
end

#iv_spd_textString

Return the IV SPD text

Returns:



1537
1538
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1537

def iv_spd_text
end

#kyurem_form(reason)

Determine the form of the Kyurem

Parameters:

  • reason (Symbol)

    The db_symbol of the Pokemon used for the fusion



1191
1192
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1191

def kyurem_form(reason)
end

#learn_skill(db_symbol) ⇒ Boolean?

Learn a new skill

Parameters:

  • db_symbol (Symbol)

    db_symbol of the move in the database

Returns:

  • (Boolean, nil)

    true = learnt, false = already learnt, nil = couldn’t learn



1265
1266
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1265

def learn_skill(db_symbol)
end

#level_pokemon_numberString

Return the level text (to_pokemon_number)

Returns:



1888
1889
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1888

def level_pokemon_number
end

#level_textString

Returns the level text

Returns:



1884
1885
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1884

def level_text
end

#level_text2String

Return the level text with “Level: ” inside

Returns:



1892
1893
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1892

def level_text2
end

#level_upBoolean

Increase the level of the Pokemon

Returns:

  • (Boolean)

    if the level has successfully been increased



963
964
# File 'docs/4_Systems_000_General_1_PFM.rb', line 963

def level_up
end

#level_up_stat_refreshArray<Array<Integer>>

Generate the level up stat list for the level up window

Returns:

  • (Array<Array<Integer>>)

    list0, list1 : old, new basis value



970
971
# File 'docs/4_Systems_000_General_1_PFM.rb', line 970

def level_up_stat_refresh
end

#level_up_window_call(list0, list1, z_level)

Show the level up window

Parameters:

  • list0 (Array<Integer>)

    old basis stat list

  • list1 (Array<Integer>)

    new basis stat list

  • z_level (Integer)

    z superiority of the Window



976
977
# File 'docs/4_Systems_000_General_1_PFM.rb', line 976

def level_up_window_call(list0, list1, z_level)
end

#load_skill_from_array(skills)

Load the skill from an Array

Parameters:

  • skills (Array)

    the skills array (containing IDs or Symbols)



1318
1319
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1318

def load_skill_from_array(skills)
end

#male?Boolean

Tell if the Pokemon is a male

Returns:

  • (Boolean)


648
649
# File 'docs/4_Systems_000_General_1_PFM.rb', line 648

def male?
end

#max_hpInteger

Return the max HP of the Pokemon

Returns:

  • (Integer)


1348
1349
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1348

def max_hp
end

#max_levelInteger

Give the maximum level of the Pokemon

Returns:

  • (Integer)


588
589
# File 'docs/4_Systems_000_General_1_PFM.rb', line 588

def max_level
end

#max_level=(level)

Set the maximum level of the Pokemon

Parameters:

  • level (Integer, nil)


592
593
# File 'docs/4_Systems_000_General_1_PFM.rb', line 592

def max_level=(level)
end

#mega_evolve

Mega evolve the Pokemon (if possible)



1150
1151
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1150

def mega_evolve
end

#mega_evolved?Boolean

Is the Pokemon mega evolved ?

Returns:

  • (Boolean)


1156
1157
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1156

def mega_evolved?
end

#modifier_stage(stage) ⇒ Float

Return the stage modifier (multiplier)

Parameters:

  • stage (Integer)

    the value of the stage

Returns:

  • (Float)

    the multiplier



1442
1443
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1442

def modifier_stage(stage)
end

#nameString

Return the Pokemon name in the Pokedex

Returns:



1834
1835
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1834

def name
end

#name_upperString

Return the Pokemon name upcase in the Pokedex

Returns:



1838
1839
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1838

def name_upper
end

#nature_idInteger

Return the nature id of the Pokemon

Returns:

  • (Integer)


664
665
# File 'docs/4_Systems_000_General_1_PFM.rb', line 664

def nature_id
end

#nature_textString

Return the text of the nature

Returns:



1856
1857
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1856

def nature_text
end

#necrozma_form(reason)

Determine the form of the Necrozma

Parameters:

  • reason (Symbol)

    The db_symbol of the Pokemon used for the fusion



1195
1196
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1195

def necrozma_form(reason)
end

#no_preferences?Boolean

Check if the Creature has a nature with no preferences

Returns:

  • (Boolean)


1929
1930
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1929

def no_preferences?
end

#paralyzed?Boolean

Is the Pokemon paralyzed?

Returns:

  • (Boolean)


1597
1598
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1597

def paralyzed?
end

#poisoned?Boolean

Is the Pokemon poisoned?

Returns:

  • (Boolean)


1584
1585
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1584

def poisoned?
end

#primary_dataStudio::CreatureForm

Get the primary data of the Pokemon



579
580
# File 'docs/4_Systems_000_General_1_PFM.rb', line 579

def primary_data
end

#rarenessInteger

Return the Pokemon rareness

Returns:

  • (Integer)


668
669
# File 'docs/4_Systems_000_General_1_PFM.rb', line 668

def rareness
end

#rareness=(v)

Change the Pokemon rareness

Parameters:

  • v (Integer, nil)

    the new rareness of the Pokemon



672
673
# File 'docs/4_Systems_000_General_1_PFM.rb', line 672

def rareness=(v)
end

#remindable_skills(mode = 0) ⇒ Array<Symbol>

Get the list of all the skill the Pokemon can learn again

Parameters:

  • mode (Integer) (defaults to: 0)

    Define the moves that can be learnt again : 1 = breed_moves + learnt + potentially_learnt 2 = all moves other = learnt + potentially_learnt

Returns:

  • (Array<Symbol>)


1314
1315
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1314

def remindable_skills(mode = 0)
end

#replace_skill_index(index, db_symbol)

Replace the skill at a specific index

Parameters:

  • index (Integer)

    index of the skill to replace by a new skill

  • db_symbol (Symbol)

    db_symbol of the move in the database



1280
1281
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1280

def replace_skill_index(index, db_symbol)
end

#reset_evolve_var(value = 0)

Method resetting the evolve var to a given value.

Parameters:

  • value (Integer, nil) (defaults to: 0)


728
729
# File 'docs/4_Systems_000_General_1_PFM.rb', line 728

def reset_evolve_var(value = 0)
end

#ribbon_got?(id) ⇒ Boolean

Has the pokemon got a ribbon ?

Returns:

  • (Boolean)


720
721
# File 'docs/4_Systems_000_General_1_PFM.rb', line 720

def ribbon_got?(id)
end

#separate

Separate (if possible) the Pokemon and restore the Pokemon used in the fusion



1163
1164
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1163

def separate
end

#shaymin_form(reason)

Determine the form of Shaymin

Parameters:

  • reason (Symbol)


1187
1188
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1187

def shaymin_form(reason)
end

#shiny=(shiny)

Set the shiny attribut

Parameters:

  • shiny (Boolean)


601
602
# File 'docs/4_Systems_000_General_1_PFM.rb', line 601

def shiny=(shiny)
end

#shiny?Boolean Also known as: shiny

Get the shiny attribute

Returns:

  • (Boolean)


596
597
# File 'docs/4_Systems_000_General_1_PFM.rb', line 596

def shiny?
end

#shiny_rateInteger

Give the shiny rate for the Pokemon, The number should be between 0 & 0xFFFF. 0 means absolutely no chance to be shiny, 0xFFFF means always shiny

Returns:

  • (Integer)


606
607
# File 'docs/4_Systems_000_General_1_PFM.rb', line 606

def shiny_rate
end

#single_type?Boolean

Is the user single typed ?

Returns:

  • (Boolean)


1774
1775
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1774

def single_type?
end

#skill_learnt?(db_symbol, only_in_move_set: true) ⇒ Boolean Also known as: has_skill?

Has the pokemon already learnt a skill ?

Parameters:

  • db_symbol (Symbol)

    db_symbol of the move

  • only_in_move_set (Boolean) (defaults to: true)

    if the function only check in the current move set

Returns:

  • (Boolean)


1286
1287
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1286

def skill_learnt?(db_symbol, only_in_move_set: true)
end

#sleep_checkBoolean

Check if the Pokemon is still asleep

Returns:

  • (Boolean)

    true = the Pokemon is still asleep



1638
1639
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1638

def sleep_check
end

#spdInteger

Return the current spd

Returns:

  • (Integer)


1360
1361
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1360

def spd
end

#spd_basisInteger

Return the spd stat without battle modifier

Returns:

  • (Integer)


1484
1485
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1484

def spd_basis
end

#spd_modifierFloat

Return the spd modifier

Returns:

  • (Float)

    the multiplier



1454
1455
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1454

def spd_modifier
end

#spd_stageInteger

Return the spd stage

Returns:

  • (Integer)


1380
1381
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1380

def spd_stage
end

#status?Boolean

Is the pokemon affected by a status

Returns:

  • (Boolean)


1574
1575
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1574

def status?
end

#status_burn(forcing = false) ⇒ Boolean

Burn the Pokemon

Parameters:

  • forcing (Boolean) (defaults to: false)

    force the new status

Returns:

  • (Boolean)

    if the pokemon has been burnt



1616
1617
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1616

def status_burn(forcing = false)
end

#status_frozen(forcing = false) ⇒ Boolean

Freeze the Pokemon

Parameters:

  • forcing (Boolean) (defaults to: false)

    force the new status

Returns:

  • (Boolean)

    if the pokemon has been frozen



1647
1648
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1647

def status_frozen(forcing = false)
end

#status_paralyze(forcing = false) ⇒ Boolean

Paralyze the Pokemon

Parameters:

  • forcing (Boolean) (defaults to: false)

    force the new status

Returns:

  • (Boolean)

    if the pokemon has been paralyzed



1602
1603
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1602

def status_paralyze(forcing = false)
end

#status_poison(forcing = false) ⇒ Boolean

Empoison the Pokemon

Parameters:

  • forcing (Boolean) (defaults to: false)

    force the new status

Returns:

  • (Boolean)

    if the pokemon has been empoisoned



1589
1590
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1589

def status_poison(forcing = false)
end

#status_sleep(forcing = false, nb_turn = nil) ⇒ Boolean

Put the Pokemon to sleep

Parameters:

  • forcing (Boolean) (defaults to: false)

    force the new status

  • nb_turn (Integer, nil) (defaults to: nil)

    number of turn the Pokemon will sleep

Returns:

  • (Boolean)

    if the pokemon has been put to sleep



1630
1631
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1630

def status_sleep(forcing = false, nb_turn = nil)
end

#status_toxic(forcing = true) ⇒ Boolean

Intoxicate the Pokemon

Parameters:

  • forcing (Boolean) (defaults to: true)

    force the new status

Returns:

  • (Boolean)

    if the pokemon has been intoxicated



1660
1661
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1660

def status_toxic(forcing = true)
end

#swap_skills_index(index1, index2)

Swap the position of two skills in the skills_set

Parameters:

  • index1 (Integer)

    Index of the first skill to swap

  • index2 (Integer)

    Index of the second skill to swap



1275
1276
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1275

def swap_skills_index(index1, index2)
end

#third_type?Boolean

Has the user a third type ?

Returns:

  • (Boolean)


1778
1779
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1778

def third_type?
end

#to_sString

Convert the Pokemon to a string (battle debug)

Returns:



1852
1853
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1852

def to_s
end

#total_evInteger

Return the total amount of EV

Returns:

  • (Integer)


860
861
# File 'docs/4_Systems_000_General_1_PFM.rb', line 860

def total_ev
end

#toxic?Boolean

Is the Pokemon in toxic state ?

Returns:

  • (Boolean)


1655
1656
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1655

def toxic?
end

#trainer_id_textString

Return the normalized text trainer id of the Pokemon

Returns:



1880
1881
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1880

def trainer_id_text
end

#type?(type) ⇒ Boolean

Check the Pokemon type by the type ID

Parameters:

  • type (Integer)

    ID of the type in the database

Returns:

  • (Boolean)


1766
1767
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1766

def type?(type)
end

#type_bug?Boolean Also known as: type_insect?

Is the Pokemon type insect/bug ?

Returns:

  • (Boolean)


1731
1732
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1731

def type_bug?
end

#type_dark?Boolean Also known as: type_tenebre?

Is the Pokemon type dark ?

Returns:

  • (Boolean)


1755
1756
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1755

def type_dark?
end

#type_dragon?Boolean

Is the Pokemon type dragon ?

Returns:

  • (Boolean)


1746
1747
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1746

def type_dragon?
end

#type_electric?Boolean Also known as: type_electrique?

Is the Pokemon type electric ?

Returns:

  • (Boolean)


1691
1692
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1691

def type_electric?
end

#type_fairy?Boolean Also known as: type_fee?

Is the Pokemon type fairy ?

Returns:

  • (Boolean)


1760
1761
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1760

def type_fairy?
end

#type_fighting?Boolean Also known as: type_combat?

Is the Pokemon type fighting ?

Returns:

  • (Boolean)


1706
1707
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1706

def type_fighting?
end

#type_fire?Boolean Also known as: type_feu?

Is the Pokemon type fire ?

Returns:

  • (Boolean)


1681
1682
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1681

def type_fire?
end

#type_flying?Boolean Also known as: type_vol?, type_fly?

Is the Pokemon type fly ?

Returns:

  • (Boolean)


1720
1721
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1720

def type_flying?
end

#type_ghost?Boolean Also known as: type_spectre?

Is the Pokemon type ghost ?

Returns:

  • (Boolean)


1741
1742
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1741

def type_ghost?
end

#type_grass?Boolean Also known as: type_plante?

Is the Pokemon type grass ?

Returns:

  • (Boolean)


1696
1697
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1696

def type_grass?
end

#type_ground?Boolean Also known as: type_sol?

Is the Pokemon type ground ?

Returns:

  • (Boolean)


1715
1716
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1715

def type_ground?
end

#type_ice?Boolean Also known as: type_glace?

Is the Pokemon type ice ?

Returns:

  • (Boolean)


1701
1702
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1701

def type_ice?
end

#type_normal?Boolean

Is the Pokemon type normal ?

Returns:

  • (Boolean)


1677
1678
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1677

def type_normal?
end

#type_poison?Boolean

Is the Pokemon type poison ?

Returns:

  • (Boolean)


1711
1712
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1711

def type_poison?
end

#type_psychic?Boolean Also known as: type_psy?

Is the Pokemon type psy ?

Returns:

  • (Boolean)


1726
1727
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1726

def type_psychic?
end

#type_rock?Boolean Also known as: type_roche?

Is the Pokemon type rock ?

Returns:

  • (Boolean)


1736
1737
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1736

def type_rock?
end

#type_steel?Boolean Also known as: type_acier?

Is the Pokemon type steel ?

Returns:

  • (Boolean)


1750
1751
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1750

def type_steel?
end

#type_water?Boolean Also known as: type_eau?

Is the Pokemon type water ?

Returns:

  • (Boolean)


1686
1687
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1686

def type_water?
end

#typeless?Boolean

Is the Pokemon typeless ?

Returns:

  • (Boolean)


1770
1771
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1770

def typeless?
end

#unmega_evolve

Reset the Pokemon to its normal form after mega evolution



1153
1154
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1153

def unmega_evolve
end

#update_ability

Update the Pokemon Ability



1029
1030
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1029

def update_ability
end

#update_loyalty

Update the PFM::Pokemon loyalty



966
967
# File 'docs/4_Systems_000_General_1_PFM.rb', line 966

def update_loyalty
end

#weightNumeric

Return the weight of the Pokemon

Returns:

  • (Numeric)


680
681
# File 'docs/4_Systems_000_General_1_PFM.rb', line 680

def weight
end

#zone_id(special_zone = nil)

Get the zone id where the Pokemon has been found

Parameters:

  • special_zone (Integer, nil) (defaults to: nil)

    if you want to use this function for stuff like egg_zone_id



635
636
# File 'docs/4_Systems_000_General_1_PFM.rb', line 635

def zone_id(special_zone = nil)
end

#zygarde_form(reason) ⇒ Integer

Determine the form of the Zygarde

Parameters:

  • reason (Symbol)

Returns:

  • (Integer)

    form of zygarde



1200
1201
# File 'docs/4_Systems_000_General_1_PFM.rb', line 1200

def zygarde_form(reason)
end