Class: PFM::Pokedex

Inherits:
Object show all
Defined in:
docs/01450_Systems_00101_Dex.rb

Overview

The Pokedex informations

The main Pokedex object is stored in $pokedex or PFM.game_state.pokedex

All Creature are usually marked as seen or captured in the correct scripts using $pokedex.mark_seen(id) or $pokedex.mark_captured(id).

When the Pokedex is disabled, no Creature can be marked as seen (unless they’re added to the party). All caught Creature are marked as captured so if for scenaristic reason you need the trainer to catch Creature before having the Pokedex. Don’t forget to call $pokedex.unmark_captured(id) (as well $pokedex.unmark_seen(id))

Author:

  • Nuri Yuri

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(game_state = PFM.game_state) ⇒ Pokedex

Create a new Pokedex object

Parameters:

  • game_state (PFM::GameState) (defaults to: PFM.game_state)

    game state storing this instance



25
26
# File 'docs/01450_Systems_00101_Dex.rb', line 25

def initialize(game_state = PFM.game_state)
end

Instance Attribute Details

#game_statePFM::GameState

Get the game state responsive of the whole game state

Returns:



16
17
18
# File 'docs/01450_Systems_00101_Dex.rb', line 16

def game_state
  @game_state
end

#seen_variantsArray<Symbol> (readonly)

Get the list of seen variants

Returns:

  • (Array<Symbol>)


22
23
24
# File 'docs/01450_Systems_00101_Dex.rb', line 22

def seen_variants
  @seen_variants
end

#variantSymbol

Get the current dex variant

Returns:

  • (Symbol)


19
20
21
# File 'docs/01450_Systems_00101_Dex.rb', line 19

def variant
  @variant
end

Instance Method Details

#best_worldmap_for_creature(db_symbol) ⇒ Integer Also known as: best_worldmap_pokemon

Detect the best worldmap to display for the creature

Parameters:

  • db_symbol (Symbol)

    db_symbol of the creature we want the worldmap to display

Returns:

  • (Integer)


144
145
# File 'docs/01450_Systems_00101_Dex.rb', line 144

def best_worldmap_for_creature(db_symbol)
end

#calibrate

Calibrate the Pokedex information (seen/captured)



139
140
# File 'docs/01450_Systems_00101_Dex.rb', line 139

def calibrate
end

#convert_to_dot26

Convert the dex to .26 format



28
29
# File 'docs/01450_Systems_00101_Dex.rb', line 28

def convert_to_dot26
end

#creature_caughtInteger Also known as: pokemon_captured

Return the number of caught Creature

Returns:

  • (Integer)


60
61
# File 'docs/01450_Systems_00101_Dex.rb', line 60

def creature_caught
end

#creature_caught?(db_symbol) ⇒ Boolean Also known as: pokemon_caught?, has_captured?

Has the player caught this Creature

Parameters:

  • db_symbol (Symbol)

    db_symbol of the Creature in the database

Returns:

  • (Boolean)


123
124
# File 'docs/01450_Systems_00101_Dex.rb', line 123

def creature_caught?(db_symbol)
end

#creature_caught_count(db_symbol) ⇒ Integer

Return the number of Creature captured by specie

Parameters:

  • db_symbol (Symbol)

    db_symbol of the Creature in the database

Returns:

  • (Integer)


66
67
# File 'docs/01450_Systems_00101_Dex.rb', line 66

def creature_caught_count(db_symbol)
end

#creature_fought(db_symbol) ⇒ Integer

Return the number of Creature fought by specie

Parameters:

  • db_symbol (Symbol)

    db_symbol of the Creature in the database

Returns:

  • (Integer)


81
82
# File 'docs/01450_Systems_00101_Dex.rb', line 81

def creature_fought(db_symbol)
end

#creature_seenInteger Also known as: pokemon_seen

Return the number of Creature seen

Returns:

  • (Integer)


55
56
# File 'docs/01450_Systems_00101_Dex.rb', line 55

def creature_seen
end

#creature_seen?(db_symbol) ⇒ Boolean Also known as: pokemon_seen?, has_seen?

Has the player seen a Creature

Parameters:

  • db_symbol (Symbol)

    db_symbol of the Creature in the database

Returns:

  • (Boolean)


116
117
# File 'docs/01450_Systems_00101_Dex.rb', line 116

def creature_seen?(db_symbol)
end

#creature_unlocked?(db_symbol) ⇒ Boolean

Tell if the creature is unlocked in the current dex state

Parameters:

  • db_symbol (Symbol)

Returns:

  • (Boolean)


136
137
# File 'docs/01450_Systems_00101_Dex.rb', line 136

def creature_unlocked?(db_symbol)
end

#disable

Disable the Pokedex



38
39
# File 'docs/01450_Systems_00101_Dex.rb', line 38

def disable
end

#enable

Enable the Pokedex



31
32
# File 'docs/01450_Systems_00101_Dex.rb', line 31

def enable
end

#enabled?Boolean

Test if the Pokedex is enabled

Returns:

  • (Boolean)


35
36
# File 'docs/01450_Systems_00101_Dex.rb', line 35

def enabled?
end

#form_seen(db_symbol) ⇒ Integer Also known as: get_forms

Get the seen forms informations of a Creature

Parameters:

  • db_symbol (Symbol)

    db_symbol of the Creature in the database

Returns:

  • (Integer)

    An interger where int == 1 mean the form has been seen



130
131
# File 'docs/01450_Systems_00101_Dex.rb', line 130

def form_seen(db_symbol)
end

#increase_creature_caught_count(db_symbol) Also known as: pokemon_captured_inc

Increase the number of Creature captured by specie

Parameters:

  • db_symbol (Symbol)

    db_symbol of the Creature in the database



75
76
# File 'docs/01450_Systems_00101_Dex.rb', line 75

def increase_creature_caught_count(db_symbol)
end

#increase_creature_fought(db_symbol) Also known as: pokemon_fought_inc

Increase the number of Creature fought by specie

Parameters:

  • db_symbol (Symbol)

    db_symbol of the Creature in the database



90
91
# File 'docs/01450_Systems_00101_Dex.rb', line 90

def increase_creature_fought(db_symbol)
end

#mark_captured(db_symbol)

Mark a Creature as captured

Parameters:

  • db_symbol (Symbol)

    db_symbol of the Creature in the database



107
108
# File 'docs/01450_Systems_00101_Dex.rb', line 107

def mark_captured(db_symbol)
end

#mark_seen(db_symbol, form = 0, forced: false)

Mark a creature as seen

Parameters:

  • db_symbol (Symbol)

    db_symbol of the Creature in the database

  • form (Integer) (defaults to: 0)

    the specific form of the Creature

  • forced (Boolean) (defaults to: false)

    if the Creature is marked seen even if the Pokedex is disabled (Giving Creature before givin the Pokedex).



98
99
# File 'docs/01450_Systems_00101_Dex.rb', line 98

def mark_seen(db_symbol, form = 0, forced: false)
end

#national=(mode) Also known as: set_national

Set the national flag of the Pokedex

Parameters:

  • mode (Boolean)

    the flag



42
43
# File 'docs/01450_Systems_00101_Dex.rb', line 42

def national=(mode)
end

#national?Boolean

Is the Pokedex showing national Creature

Returns:

  • (Boolean)


51
52
# File 'docs/01450_Systems_00101_Dex.rb', line 51

def national?
end

#set_creature_caught_count(db_symbol, number)

Change the number of Creature captured by specie

Parameters:

  • db_symbol (Symbol)

    db_symbol of the Creature in the database

  • number (Integer)

    the new number



71
72
# File 'docs/01450_Systems_00101_Dex.rb', line 71

def set_creature_caught_count(db_symbol, number)
end

#set_creature_fought(db_symbol, number)

Change the number of Creature fought by specie

Parameters:

  • db_symbol (Symbol)

    db_symbol of the Creature in the database

  • number (Integer)

    the number of Creature fought in the specified specie



86
87
# File 'docs/01450_Systems_00101_Dex.rb', line 86

def set_creature_fought(db_symbol, number)
end

#spawn_zones(db_symbol) ⇒ Array<Symbol>

Return the list of the zone id where the creature spawns

Parameters:

  • db_symbol (Symbol)

    db_symbol of the creature we want to know where it spawns

Returns:

  • (Array<Symbol>)


150
151
# File 'docs/01450_Systems_00101_Dex.rb', line 150

def spawn_zones(db_symbol)
end

#unmark_captured(db_symbol)

Unmark a Creature as captured

Parameters:

  • db_symbol (Symbol)

    db_symbol of the Creature in the database



111
112
# File 'docs/01450_Systems_00101_Dex.rb', line 111

def unmark_captured(db_symbol)
end

#unmark_seen(db_symbol, form: false)

Unmark a creature as seen

Parameters:

  • db_symbol (Symbol)

    db_symbol of the Creature in the database

  • form (Integer, false) (defaults to: false)

    if false, all form will be unseen, otherwise the specific form will be unseen



103
104
# File 'docs/01450_Systems_00101_Dex.rb', line 103

def unmark_seen(db_symbol, form: false)
end