Class: PFM::Daycare
Overview
Daycare management system
The global Daycare manager is stored in $daycare and PFM.game_state.daycare Daycare data Hash format
pokemon: Array # The list of Pokemon in the daycare (PFM::Pokemon or nil)
level: Array # The list of level the Pokemon had when sent to the daycare
layable: Integer # ID of the Pokemon that can be in the egg
rate: Integer # Chance the egg can be layed
egg: Boolean # If an egg has been layed
Defined Under Namespace
Classes: IncenseInfo
Constant Summary collapse
- USE_FIRST_FORM_BREED_GROUPS =
Only use the FIRST FORM for breed groups
false
- SPECIFIC_FORM_HANDLER =
Specific form handler (system that can force a for according to a code)
{myfakepokemon: proc { |_mother, _father| next((rand(10))) }}
- NOT_BREEDING =
List of Pokemon that cannot breed (event if the conditions are valid)
%i[phione manaphy]
- BREEDING_WITH_DITTO =
List of Pokemon that only breed with Ditto
%i[phione manaphy]
- DITTO_GROUP =
ID of the Ditto group
13
- NOT_BREEDING_GROUP =
ID of the breed group that forbid breeding
15
- PRICE_RATE =
List of price rate for all daycare
Hash.new(100)
- EGG_RATE =
Egg rate according to the common group, common OT, oval_charm (dig(common_group?, common_OT?, oval_charm?))
[[[50, 80], [20, 40]], [[70, 88], [50, 80]]]
- BABY_VARIATION =
“Female” breeder that can have different baby (non-incense condition)
{nidoranf: nidoran = %i[nidoranf nidoranm], nidoranm: nidoran, volbeat: volbeat = %i[volbeat illumise], illumise: volbeat, tauros: tauros = %i[tauros miltank], miltank: tauros}
- INCENSE_BABY =
“Female” that can have different baby if the male hold an incense
{marill: azurill = IncenseInfo.new(:sea_incense, :azurill), azumarill: azurill, wobbuffet: IncenseInfo.new(:lax_incense, :wynaut), roselia: budew = IncenseInfo.new(:rose_incense, :budew), roserade: budew, chimecho: IncenseInfo.new(:pure_incense, :chingling), sudowoodo: IncenseInfo.new(:rock_incense, :bonsly), mr_mime: mime_jr = IncenseInfo.new(:odd_incense, :mime_jr), mr_rime: mime_jr, chansey: happiny = IncenseInfo.new(:luck_incense, :happiny), blissey: happiny, snorlax: IncenseInfo.new(:full_incense, :munchlax), mantine: IncenseInfo.new(:wave_incense, :mantyke)}
- NON_INHERITED_BALL =
Non inherite balls
%i[master_ball cherish_ball]
- IV_SET =
IV setter list
%i[iv_hp= iv_dfe= iv_atk= iv_spd= iv_ats= iv_dfs=]
- IV_GET =
IV getter list
%i[iv_hp iv_dfe iv_atk iv_spd iv_ats iv_dfs]
- IV_POWER_ITEM =
List of power item that transmit IV in the same order than IV_GET/IV_SET
%i[power_weight power_belt power_bracer power_anklet power_lens power_band]
Instance Attribute Summary collapse
-
#game_state ⇒ PFM::GameState
Get the game state responsive of the whole game state.
Instance Method Summary collapse
-
#empty?(id) ⇒ Boolean
If a daycare is empty.
-
#full?(id) ⇒ Boolean
If a daycare is full.
-
#get_pokemon(id, index, prop, *args) ⇒ Object
Get a Pokemon information in the daycare.
-
#initialize(game_state = PFM.game_state) ⇒ Daycare
constructor
Create the daycare manager.
-
#layed_egg?(id) ⇒ Boolean
(also: #has_egg?)
If an egg was layed in this daycare.
-
#parse_poke(var_id, index)
Parse the daycare Pokemon text info.
-
#price(id, index) ⇒ Integer
Price to pay in order to withdraw a Pokemon.
-
#retrieve_egg(id) ⇒ PFM::Pokemon
(also: #retreive_egg)
Retrieve the egg layed.
-
#retrieve_egg_rate(id) ⇒ Integer
(also: #retreive_egg_rate)
Get the egg rate of a daycare.
-
#retrieve_pokemon(id, index) ⇒ PFM::Pokemon?
(also: #withdraw_pokemon, #retreive_pokemon)
Withdraw a Pokemon from a daycare.
-
#store(id, pokemon) ⇒ Boolean
Store a Pokemon to a daycare.
-
#update
Update every daycare.
Constructor Details
#initialize(game_state = PFM.game_state) ⇒ Daycare
Create the daycare manager
52 53 |
# File 'docs/4_Systems_201_Daycare.rb', line 52 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
49 50 51 |
# File 'docs/4_Systems_201_Daycare.rb', line 49 def game_state @game_state end |
Instance Method Details
#empty?(id) ⇒ Boolean
If a daycare is empty
111 112 |
# File 'docs/4_Systems_201_Daycare.rb', line 111 def empty?(id) end |
#full?(id) ⇒ Boolean
If a daycare is full
106 107 |
# File 'docs/4_Systems_201_Daycare.rb', line 106 def full?(id) end |
#get_pokemon(id, index, prop, *args) ⇒ Object
Get a Pokemon information in the daycare
75 76 |
# File 'docs/4_Systems_201_Daycare.rb', line 75 def get_pokemon(id, index, prop, *args) end |
#layed_egg?(id) ⇒ Boolean Also known as: has_egg?
If an egg was layed in this daycare
100 101 |
# File 'docs/4_Systems_201_Daycare.rb', line 100 def layed_egg?(id) end |
#parse_poke(var_id, index)
Parse the daycare Pokemon text info
116 117 |
# File 'docs/4_Systems_201_Daycare.rb', line 116 def parse_poke(var_id, index) end |
#price(id, index) ⇒ Integer
Price to pay in order to withdraw a Pokemon
67 68 |
# File 'docs/4_Systems_201_Daycare.rb', line 67 def price(id, index) end |
#retrieve_egg(id) ⇒ PFM::Pokemon Also known as: retreive_egg
Retrieve the egg layed
94 95 |
# File 'docs/4_Systems_201_Daycare.rb', line 94 def retrieve_egg(id) end |
#retrieve_egg_rate(id) ⇒ Integer Also known as: retreive_egg_rate
Get the egg rate of a daycare
88 89 |
# File 'docs/4_Systems_201_Daycare.rb', line 88 def retrieve_egg_rate(id) end |
#retrieve_pokemon(id, index) ⇒ PFM::Pokemon? Also known as: withdraw_pokemon, retreive_pokemon
Withdraw a Pokemon from a daycare
81 82 |
# File 'docs/4_Systems_201_Daycare.rb', line 81 def retrieve_pokemon(id, index) end |
#store(id, pokemon) ⇒ Boolean
Store a Pokemon to a daycare
61 62 |
# File 'docs/4_Systems_201_Daycare.rb', line 61 def store(id, pokemon) end |
#update
Update every daycare
55 56 |
# File 'docs/4_Systems_201_Daycare.rb', line 55 def update end |