Class: Oakdex::Pokemon::GrowthEvents::IncreasePp
- Defined in:
- lib/oakdex/pokemon/growth_events/increase_pp.rb
Overview
When pokemon increases pp for a move
Instance Method Summary collapse
Methods inherited from Base
#initialize, #read_only?, #to_h
Constructor Details
This class inherits a constructor from Oakdex::Pokemon::GrowthEvents::Base
Instance Method Details
#execute(action) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/oakdex/pokemon/growth_events/increase_pp.rb', line 15 def execute(action) @pokemon.add_growth_event(GrowthEvents::IncreaseMovePp, move_id: action, change_by: [:moves][action]) remove_event end |
#message ⇒ Object
7 8 9 |
# File 'lib/oakdex/pokemon/growth_events/increase_pp.rb', line 7 def "Please choose a move of #{@pokemon.name} that should increase its PP." end |
#possible_actions ⇒ Object
11 12 13 |
# File 'lib/oakdex/pokemon/growth_events/increase_pp.rb', line 11 def possible_actions [:moves].keys end |