Class: PFM::PokemonBattler::DamageHistory
- Defined in:
- docs/5_Battle_03_PokemonBattler.rb
Overview
Class defining an history of damages took
Instance Attribute Summary collapse
-
#damage ⇒ Integer
readonly
Get the amount of damage took.
-
#ko ⇒ Boolean
readonly
Get if the Pokemon was knocked out.
-
#launcher ⇒ PFM::PokemonBattler?
readonly
Get the launcher that cause the damages.
-
#move ⇒ Battle::Move?
readonly
Get the move that cause the damages.
-
#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.
-
#initialize(damage, launcher, move, ko) ⇒ DamageHistory
constructor
Create a new Damage History.
-
#last_turn? ⇒ Boolean
Tell if the move was used during last turn.
Constructor Details
#initialize(damage, launcher, move, ko) ⇒ DamageHistory
Create a new Damage History
785 786 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 785 def initialize(damage, launcher, move, ko) end |
Instance Attribute Details
#damage ⇒ Integer (readonly)
Get the amount of damage took
770 771 772 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 770 def damage @damage end |
#ko ⇒ Boolean (readonly)
Get if the Pokemon was knocked out
779 780 781 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 779 def ko @ko end |
#launcher ⇒ PFM::PokemonBattler? (readonly)
Get the launcher that cause the damages
773 774 775 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 773 def launcher @launcher end |
#move ⇒ Battle::Move? (readonly)
Get the move that cause the damages
776 777 778 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 776 def move @move end |
#turn ⇒ Integer (readonly)
Get the turn when it was used
767 768 769 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 767 def turn @turn end |
Instance Method Details
#current_turn? ⇒ Boolean
Tell if the move was used during the current turn
793 794 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 793 def current_turn? end |
#last_turn? ⇒ Boolean
Tell if the move was used during last turn
789 790 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 789 def last_turn? end |