Class: Oakdex::Pokemon::GrowthEvents::AddHp

Inherits:
Base
  • Object
show all
Defined in:
lib/oakdex/pokemon/growth_events/add_hp.rb

Overview

When pokemon received HP

Direct Known Subclasses

Revive

Instance Method Summary collapse

Methods inherited from Base

#initialize, #possible_actions, #read_only?, #to_h

Constructor Details

This class inherits a constructor from Oakdex::Pokemon::GrowthEvents::Base

Instance Method Details

#executeObject



11
12
13
14
# File 'lib/oakdex/pokemon/growth_events/add_hp.rb', line 11

def execute
  @pokemon.change_hp_by(@options[:hp])
  remove_event
end

#messageObject



7
8
9
# File 'lib/oakdex/pokemon/growth_events/add_hp.rb', line 7

def message
  "#{@pokemon.name} heals by #{real_hp}HP."
end