Class: Oakdex::Pokemon::GrowthEvents::Base
- Inherits:
-
Object
- Object
- Oakdex::Pokemon::GrowthEvents::Base
show all
- Defined in:
- lib/oakdex/pokemon/growth_events/base.rb
Overview
Represents Base GrowthEvent
Direct Known Subclasses
AddHp, DidEvolution, DidNotLearnMove, Evolution, ForgotAndLearnedMove, GainedEv, GainedExp, IncreaseMaxPp, IncreaseMoveMaxPp, IncreaseMovePp, IncreasePp, LearnMove, LevelUp, RemoveStatusCondition, SkippedEvolution
Instance Method Summary
collapse
Constructor Details
#initialize(pokemon, options = {}) ⇒ Base
Returns a new instance of Base.
7
8
9
10
|
# File 'lib/oakdex/pokemon/growth_events/base.rb', line 7
def initialize(pokemon, options = {})
@pokemon = pokemon
@options = options
end
|
Instance Method Details
#execute(_action = nil) ⇒ Object
24
25
26
|
# File 'lib/oakdex/pokemon/growth_events/base.rb', line 24
def execute(_action = nil)
remove_event
end
|
#message ⇒ Object
20
21
22
|
# File 'lib/oakdex/pokemon/growth_events/base.rb', line 20
def message
raise 'implement me'
end
|
#possible_actions ⇒ Object
16
17
18
|
# File 'lib/oakdex/pokemon/growth_events/base.rb', line 16
def possible_actions
[]
end
|
#read_only? ⇒ Boolean
12
13
14
|
# File 'lib/oakdex/pokemon/growth_events/base.rb', line 12
def read_only?
possible_actions.empty?
end
|
#to_h ⇒ Object
28
29
30
31
32
33
|
# File 'lib/oakdex/pokemon/growth_events/base.rb', line 28
def to_h
{
name: self.class.name,
options: @options
}
end
|