Class: Battle::Logic::ExpHandler
- Includes:
- Hooks
- Defined in:
- docs/01600_Alpha_25_Battle_Engine_00200_Battle_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
2102 2103 |
# File 'docs/01600_Alpha_25_Battle_Engine_00200_Battle_Logic.rb', line 2102 def initialize(logic) end |
Instance Attribute Details
#logic ⇒ Battle::Logic (readonly)
Get the logic object
2099 2100 2101 |
# File 'docs/01600_Alpha_25_Battle_Engine_00200_Battle_Logic.rb', line 2099 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
2187 2188 |
# File 'docs/01600_Alpha_25_Battle_Engine_00200_Battle_Logic.rb', line 2187 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
2112 2113 |
# File 'docs/01600_Alpha_25_Battle_Engine_00200_Battle_Logic.rb', line 2112 def distribute_exp_for(enemy) end |
#distribute_exp_grouped(enemies) ⇒ Hash{ PFM::PokemonBattler => Integer }
Distribute the experience for several pokemon and merge them
2107 2108 |
# File 'docs/01600_Alpha_25_Battle_Engine_00200_Battle_Logic.rb', line 2107 def distribute_exp_grouped(enemies) end |