Class: PFM::Pokedex
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))
Instance Attribute Summary collapse
-
#game_state ⇒ PFM::GameState
Get the game state responsive of the whole game state.
-
#seen_variants ⇒ Array<Symbol>
readonly
Get the list of seen variants.
-
#variant ⇒ Symbol
Get the current dex variant.
Instance Method Summary collapse
-
#best_worldmap_for_creature(db_symbol) ⇒ Integer
(also: #best_worldmap_pokemon)
Detect the best worldmap to display for the creature.
-
#calibrate
Calibrate the Pokedex information (seen/captured).
-
#convert_to_dot26
Convert the dex to .26 format.
-
#creature_caught ⇒ Integer
(also: #pokemon_captured)
Return the number of caught Creature.
-
#creature_caught?(db_symbol) ⇒ Boolean
(also: #pokemon_caught?, #has_captured?)
Has the player caught this Creature.
-
#creature_caught_count(db_symbol) ⇒ Integer
Return the number of Creature captured by specie.
-
#creature_fought(db_symbol) ⇒ Integer
Return the number of Creature fought by specie.
-
#creature_seen ⇒ Integer
(also: #pokemon_seen)
Return the number of Creature seen.
-
#creature_seen?(db_symbol) ⇒ Boolean
(also: #pokemon_seen?, #has_seen?)
Has the player seen a Creature.
-
#creature_unlocked?(db_symbol) ⇒ Boolean
Tell if the creature is unlocked in the current dex state.
-
#disable
Disable the Pokedex.
-
#enable
Enable the Pokedex.
-
#enabled? ⇒ Boolean
Test if the Pokedex is enabled.
-
#form_seen(db_symbol) ⇒ Integer
(also: #get_forms)
Get the seen forms informations of a Creature.
-
#increase_creature_caught_count(db_symbol)
(also: #pokemon_captured_inc)
Increase the number of Creature captured by specie.
-
#increase_creature_fought(db_symbol)
(also: #pokemon_fought_inc)
Increase the number of Creature fought by specie.
-
#initialize(game_state = PFM.game_state) ⇒ Pokedex
constructor
Create a new Pokedex object.
-
#mark_captured(db_symbol)
Mark a Creature as captured.
-
#mark_seen(db_symbol, form = 0, forced: false)
Mark a creature as seen.
-
#national=(mode)
(also: #set_national)
Set the national flag of the Pokedex.
-
#national? ⇒ Boolean
Is the Pokedex showing national Creature.
-
#set_creature_caught_count(db_symbol, number)
Change the number of Creature captured by specie.
-
#set_creature_fought(db_symbol, number)
Change the number of Creature fought by specie.
-
#spawn_zones(db_symbol) ⇒ Array<Symbol>
Return the list of the zone id where the creature spawns.
-
#unmark_captured(db_symbol)
Unmark a Creature as captured.
-
#unmark_seen(db_symbol, form: false)
Unmark a creature as seen.
Constructor Details
#initialize(game_state = PFM.game_state) ⇒ Pokedex
Create a new Pokedex object
25 26 |
# File 'docs/01450_Systems_00101_Dex.rb', line 25 def initialize(game_state = PFM.game_state) end |
Instance Attribute Details
#game_state ⇒ PFM::GameState
Get the game state responsive of the whole game state
16 17 18 |
# File 'docs/01450_Systems_00101_Dex.rb', line 16 def game_state @game_state end |
#seen_variants ⇒ Array<Symbol> (readonly)
Get the list of seen variants
22 23 24 |
# File 'docs/01450_Systems_00101_Dex.rb', line 22 def seen_variants @seen_variants end |
#variant ⇒ Symbol
Get the current dex variant
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
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_caught ⇒ Integer Also known as: pokemon_captured
Return the number of caught Creature
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
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
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
81 82 |
# File 'docs/01450_Systems_00101_Dex.rb', line 81 def creature_fought(db_symbol) end |
#creature_seen ⇒ Integer Also known as: pokemon_seen
Return the number of Creature seen
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
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
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
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
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
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
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
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
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
42 43 |
# File 'docs/01450_Systems_00101_Dex.rb', line 42 def national=(mode) end |
#national? ⇒ Boolean
Is the Pokedex showing national Creature
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
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
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
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
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
103 104 |
# File 'docs/01450_Systems_00101_Dex.rb', line 103 def unmark_seen(db_symbol, form: false) end |