Class: PFM::PokemonBattler::MoveHistory

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

Overview

Class defining an history of move use

Direct Known Subclasses

SuccessfulMoveHistory

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(move, targets, attack_order) ⇒ MoveHistory

Create a new Move History

Parameters:



744
745
# File 'docs/5_Battle_03_PokemonBattler.rb', line 744

def initialize(move, targets, attack_order)
end

Instance Attribute Details

#attack_orderInteger (readonly)

Get the attack order of the Pokemon

Returns:

  • (Integer)


739
740
741
# File 'docs/5_Battle_03_PokemonBattler.rb', line 739

def attack_order
  @attack_order
end

#moveBattle::Move (readonly)

Get the move that was used

Returns:



730
731
732
# File 'docs/5_Battle_03_PokemonBattler.rb', line 730

def move
  @move
end

#original_moveBattle::Move (readonly)

Get the actual move object that was used

Returns:



736
737
738
# File 'docs/5_Battle_03_PokemonBattler.rb', line 736

def original_move
  @original_move
end

#targetsArray<PFM::PokemonBattler> (readonly)

Get the target that were affected by the move

Returns:



733
734
735
# File 'docs/5_Battle_03_PokemonBattler.rb', line 733

def targets
  @targets
end

#turnInteger (readonly)

Get the turn when it was used

Returns:

  • (Integer)


727
728
729
# File 'docs/5_Battle_03_PokemonBattler.rb', line 727

def turn
  @turn
end

Instance Method Details

#current_turn?Boolean

Tell if the move was used during the current turn

Returns:

  • (Boolean)


752
753
# File 'docs/5_Battle_03_PokemonBattler.rb', line 752

def current_turn?
end

#db_symbolSymbol

Get the db_symbol of the move

Returns:

  • (Symbol)


756
757
# File 'docs/5_Battle_03_PokemonBattler.rb', line 756

def db_symbol
end

#last_turn?Boolean

Tell if the move was used during last turn

Returns:

  • (Boolean)


748
749
# File 'docs/5_Battle_03_PokemonBattler.rb', line 748

def last_turn?
end