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, form = false) ⇒ 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, form = false) ⇒ 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_caught(db_symbol) ⇒ Integer
Get the caught forms informations of a Creature.
-
#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, form = 0)
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.
-
#set_form_caught
Create a Hash for form caught.
-
#spawn_zones(db_symbol) ⇒ Array<Symbol>
Return the list of the zone id where the creature spawns.
-
#unmark_captured(db_symbol, form = false)
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/4_Systems_101_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/4_Systems_101_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/4_Systems_101_Dex.rb', line 22 def seen_variants @seen_variants end |
#variant ⇒ Symbol
Get the current dex variant
19 20 21 |
# File 'docs/4_Systems_101_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
154 155 |
# File 'docs/4_Systems_101_Dex.rb', line 154 def best_worldmap_for_creature(db_symbol) end |
#calibrate
Calibrate the Pokedex information (seen/captured)
149 150 |
# File 'docs/4_Systems_101_Dex.rb', line 149 def calibrate end |
#convert_to_dot26
Convert the dex to .26 format
28 29 |
# File 'docs/4_Systems_101_Dex.rb', line 28 def convert_to_dot26 end |
#creature_caught ⇒ Integer Also known as: pokemon_captured
Return the number of caught Creature
63 64 |
# File 'docs/4_Systems_101_Dex.rb', line 63 def creature_caught end |
#creature_caught?(db_symbol, form = false) ⇒ Boolean Also known as: pokemon_caught?, has_captured?
Has the player caught this Creature
128 129 |
# File 'docs/4_Systems_101_Dex.rb', line 128 def creature_caught?(db_symbol, form = false) end |
#creature_caught_count(db_symbol) ⇒ Integer
Return the number of Creature captured by specie
69 70 |
# File 'docs/4_Systems_101_Dex.rb', line 69 def creature_caught_count(db_symbol) end |
#creature_fought(db_symbol) ⇒ Integer
Return the number of Creature fought by specie
84 85 |
# File 'docs/4_Systems_101_Dex.rb', line 84 def creature_fought(db_symbol) end |
#creature_seen ⇒ Integer Also known as: pokemon_seen
Return the number of Creature seen
58 59 |
# File 'docs/4_Systems_101_Dex.rb', line 58 def creature_seen end |
#creature_seen?(db_symbol, form = false) ⇒ Boolean Also known as: pokemon_seen?, has_seen?
Has the player seen a Creature
120 121 |
# File 'docs/4_Systems_101_Dex.rb', line 120 def creature_seen?(db_symbol, form = false) end |
#creature_unlocked?(db_symbol) ⇒ Boolean
Tell if the creature is unlocked in the current dex state
146 147 |
# File 'docs/4_Systems_101_Dex.rb', line 146 def creature_unlocked?(db_symbol) end |
#disable
Disable the Pokedex
41 42 |
# File 'docs/4_Systems_101_Dex.rb', line 41 def disable end |
#enable
Enable the Pokedex
34 35 |
# File 'docs/4_Systems_101_Dex.rb', line 34 def enable end |
#enabled? ⇒ Boolean
Test if the Pokedex is enabled
38 39 |
# File 'docs/4_Systems_101_Dex.rb', line 38 def enabled? end |
#form_caught(db_symbol) ⇒ Integer
Get the caught forms informations of a Creature
141 142 |
# File 'docs/4_Systems_101_Dex.rb', line 141 def form_caught(db_symbol) end |
#form_seen(db_symbol) ⇒ Integer Also known as: get_forms
Get the seen forms informations of a Creature
135 136 |
# File 'docs/4_Systems_101_Dex.rb', line 135 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
78 79 |
# File 'docs/4_Systems_101_Dex.rb', line 78 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
93 94 |
# File 'docs/4_Systems_101_Dex.rb', line 93 def increase_creature_fought(db_symbol) end |
#mark_captured(db_symbol, form = 0)
Mark a Creature as captured
111 112 |
# File 'docs/4_Systems_101_Dex.rb', line 111 def mark_captured(db_symbol, form = 0) end |
#mark_seen(db_symbol, form = 0, forced: false)
Mark a creature as seen
101 102 |
# File 'docs/4_Systems_101_Dex.rb', line 101 def mark_seen(db_symbol, form = 0, forced: false) end |
#national=(mode) Also known as: set_national
Set the national flag of the Pokedex
45 46 |
# File 'docs/4_Systems_101_Dex.rb', line 45 def national=(mode) end |
#national? ⇒ Boolean
Is the Pokedex showing national Creature
54 55 |
# File 'docs/4_Systems_101_Dex.rb', line 54 def national? end |
#set_creature_caught_count(db_symbol, number)
Change the number of Creature captured by specie
74 75 |
# File 'docs/4_Systems_101_Dex.rb', line 74 def set_creature_caught_count(db_symbol, number) end |
#set_creature_fought(db_symbol, number)
Change the number of Creature fought by specie
89 90 |
# File 'docs/4_Systems_101_Dex.rb', line 89 def set_creature_fought(db_symbol, number) end |
#set_form_caught
Create a Hash for form caught
31 32 |
# File 'docs/4_Systems_101_Dex.rb', line 31 def set_form_caught end |
#spawn_zones(db_symbol) ⇒ Array<Symbol>
Return the list of the zone id where the creature spawns
160 161 |
# File 'docs/4_Systems_101_Dex.rb', line 160 def spawn_zones(db_symbol) end |
#unmark_captured(db_symbol, form = false)
Unmark a Creature as captured
115 116 |
# File 'docs/4_Systems_101_Dex.rb', line 115 def unmark_captured(db_symbol, form = false) end |
#unmark_seen(db_symbol, form: false)
Unmark a creature as seen
106 107 |
# File 'docs/4_Systems_101_Dex.rb', line 106 def unmark_seen(db_symbol, form: false) end |