Class: Battle::Logic::ExpHandler

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(logic) ⇒ ExpHandler

Create the exp handler

Parameters:



1826
1827
# File 'docs/5_Battle_04_Logic.rb', line 1826

def initialize(logic)
end

Instance Attribute Details

#logic ⇒ Battle::Logic (readonly)

Get the logic object

Returns:



1823
1824
1825
# File 'docs/5_Battle_04_Logic.rb', line 1823

def logic
  @logic
end

Instance Method Details

#distribute_exp_for(enemy) ⇒ Hash{ PFM::PokemonBattler => Integer }

Distribute the experience for a single pokemon

Parameters:

Returns:



1836
1837
# File 'docs/5_Battle_04_Logic.rb', line 1836

def distribute_exp_for(enemy)
end

#distribute_exp_grouped(enemies) ⇒ Hash{ PFM::PokemonBattler => Integer }

Distribute the experience for several pokemon and merge them

Parameters:

Returns:



1831
1832
# File 'docs/5_Battle_04_Logic.rb', line 1831

def distribute_exp_grouped(enemies)
end