class Oakdex::Pokemon::GrowthEvents::Evolution
When pokemon could learn move
Public Instance Methods
execute(action)
click to toggle source
# File lib/oakdex/pokemon/growth_events/evolution.rb, line 15 def execute(action) if action == 'Skip' @pokemon.add_growth_event(GrowthEvents::SkippedEvolution, after: self) else original = @pokemon.name @pokemon.envolve_to(@options[:evolution]) @pokemon.add_growth_event(GrowthEvents::DidEvolution, original: original, after: self) end remove_event end
message()
click to toggle source
# File lib/oakdex/pokemon/growth_events/evolution.rb, line 7 def message "#{@pokemon.name} wants to envolve to #{@options[:evolution]}." end
possible_actions()
click to toggle source
# File lib/oakdex/pokemon/growth_events/evolution.rb, line 11 def possible_actions %w[Continue Skip] end