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
799 800 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 799 def initialize(damage, launcher, move, ko) end |
Instance Attribute Details
#damage ⇒ Integer (readonly)
Get the amount of damage took
784 785 786 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 784 def damage @damage end |
#ko ⇒ Boolean (readonly)
Get if the Pokemon was knocked out
793 794 795 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 793 def ko @ko end |
#launcher ⇒ PFM::PokemonBattler? (readonly)
Get the launcher that cause the damages
787 788 789 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 787 def launcher @launcher end |
#move ⇒ Battle::Move? (readonly)
Get the move that cause the damages
790 791 792 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 790 def move @move end |
#turn ⇒ Integer (readonly)
Get the turn when it was used
781 782 783 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 781 def turn @turn end |
Instance Method Details
#current_turn? ⇒ Boolean
Tell if the move was used during the current turn
807 808 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 807 def current_turn? end |
#last_turn? ⇒ Boolean
Tell if the move was used during last turn
803 804 |
# File 'docs/5_Battle_03_PokemonBattler.rb', line 803 def last_turn? end |