Class: PFM::PokemonBattler::StatHistory
- Defined in:
- docs/5_Battle_03_PokemonBattler.rb
Overview
Class that describes a stat change history
Instance Attribute Summary collapse
-
#launcher ⇒ PFM::PokemonBattler?
readonly
Get the launcher of the stat change.
-
#move ⇒ Battle::Move?
readonly
Get the move that cause the stat change.
-
#power ⇒ Integer
readonly
Get the power of the stat change.
-
#stat ⇒ Symbol
readonly
:atk, :dfe, :spd, :ats, :dfs, :acc, :eva.
-
#target ⇒ PFM::PokemonBattler
readonly
Get the target of the stat change.
-
#turn ⇒ Integer
readonly
Get the turn when it was used.
Instance Method Summary collapse
-
#current_turn? ⇒ Boolean
Tell if the move was used during the current turn.
-
#db_symbol ⇒ Symbol
Get the db_symbol of the move.
-
#initialize(stat, power, target, launcher, move) ⇒ StatHistory
constructor
Create a new Stat History.
-
#last_turn? ⇒ Boolean
Tell if the move was used during last turn.
Constructor Details
#initialize(stat, power, target, launcher, move) ⇒ StatHistory
Create a new Stat History
837 838 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 837 def initialize(stat, power, target, launcher, move) end |
Instance Attribute Details
#launcher ⇒ PFM::PokemonBattler? (readonly)
Get the launcher of the stat change
827 828 829 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 827 def launcher @launcher end |
#move ⇒ Battle::Move? (readonly)
Get the move that cause the stat change
830 831 832 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 830 def move @move end |
#power ⇒ Integer (readonly)
Get the power of the stat change
821 822 823 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 821 def power @power end |
#stat ⇒ Symbol (readonly)
:atk, :dfe, :spd, :ats, :dfs, :acc, :eva
818 819 820 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 818 def stat @stat end |
#target ⇒ PFM::PokemonBattler (readonly)
Get the target of the stat change
824 825 826 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 824 def target @target end |
#turn ⇒ Integer (readonly)
Get the turn when it was used
815 816 817 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 815 def turn @turn end |
Instance Method Details
#current_turn? ⇒ Boolean
Tell if the move was used during the current turn
845 846 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 845 def current_turn? end |
#db_symbol ⇒ Symbol
Get the db_symbol of the move
849 850 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 849 def db_symbol end |
#last_turn? ⇒ Boolean
Tell if the move was used during last turn
841 842 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 841 def last_turn? end |