Class: PFM::PokemonBattler::DamageHistory

Inherits:
Object
  • Object
show all
Defined in:
docs/5_Battle_03_PokemonBattler.rb

Overview

Class defining an history of damages took

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(damage, launcher, move, ko) ⇒ DamageHistory

Create a new Damage History

Parameters:



785
786
# File 'docs/5_Battle_03_PokemonBattler.rb', line 785

def initialize(damage, launcher, move, ko)
end

Instance Attribute Details

#damageInteger (readonly)

Get the amount of damage took

Returns:

  • (Integer)


770
771
772
# File 'docs/5_Battle_03_PokemonBattler.rb', line 770

def damage
  @damage
end

#koBoolean (readonly)

Get if the Pokemon was knocked out

Returns:

  • (Boolean)


779
780
781
# File 'docs/5_Battle_03_PokemonBattler.rb', line 779

def ko
  @ko
end

#launcherPFM::PokemonBattler? (readonly)

Get the launcher that cause the damages

Returns:



773
774
775
# File 'docs/5_Battle_03_PokemonBattler.rb', line 773

def launcher
  @launcher
end

#moveBattle::Move? (readonly)

Get the move that cause the damages

Returns:



776
777
778
# File 'docs/5_Battle_03_PokemonBattler.rb', line 776

def move
  @move
end

#turnInteger (readonly)

Get the turn when it was used

Returns:

  • (Integer)


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

Returns:

  • (Boolean)


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

Returns:

  • (Boolean)


789
790
# File 'docs/5_Battle_03_PokemonBattler.rb', line 789

def last_turn?
end