Class: Battle::Logic::ExpHandler
- Includes:
- Hooks
- Defined in:
- docs/5_Battle_04_Logic.rb
Overview
Class responsive of calculating experience & EV of Pokemon when a Pokemon faints
Instance Attribute Summary collapse
-
#logic ⇒ Battle::Logic
readonly
Get the logic object.
Class Method Summary collapse
-
.register_power_ev_bonus(reason) {|receiver, enemy, handler| ... }
Register a hook allowing a pokemon to receive a power_ev bonus.
Instance Method Summary collapse
-
#distribute_exp_for(enemy) ⇒ Hash{ PFM::PokemonBattler => Integer }
Distribute the experience for a single pokemon.
-
#distribute_exp_grouped(enemies) ⇒ Hash{ PFM::PokemonBattler => Integer }
Distribute the experience for several pokemon and merge them.
-
#initialize(logic) ⇒ ExpHandler
constructor
Create the exp handler.
Methods included from Hooks
#exec_hooks, #force_return, included, register, remove, remove_without_name
Constructor Details
#initialize(logic) ⇒ ExpHandler
Create the exp handler
2124 2125 |
# File 'docs/5_Battle_04_Logic.rb', line 2124 def initialize(logic) end |
Instance Attribute Details
#logic ⇒ Battle::Logic (readonly)
Get the logic object
2121 2122 2123 |
# File 'docs/5_Battle_04_Logic.rb', line 2121 def logic @logic end |
Class Method Details
.register_power_ev_bonus(reason) {|receiver, enemy, handler| ... }
Register a hook allowing a pokemon to receive a power_ev bonus
2209 2210 |
# File 'docs/5_Battle_04_Logic.rb', line 2209 def register_power_ev_bonus(reason) end |
Instance Method Details
#distribute_exp_for(enemy) ⇒ Hash{ PFM::PokemonBattler => Integer }
Distribute the experience for a single pokemon
2134 2135 |
# File 'docs/5_Battle_04_Logic.rb', line 2134 def distribute_exp_for(enemy) end |
#distribute_exp_grouped(enemies) ⇒ Hash{ PFM::PokemonBattler => Integer }
Distribute the experience for several pokemon and merge them
2129 2130 |
# File 'docs/5_Battle_04_Logic.rb', line 2129 def distribute_exp_grouped(enemies) end |