Class: PFM::PokemonBattler::MoveHistory

Inherits:
Object
  • Object
show all
Defined in:
docs/01600_Alpha_25_Battle_Engine_00100_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:



733
734
# File 'docs/01600_Alpha_25_Battle_Engine_00100_PokemonBattler.rb', line 733

def initialize(move, targets, attack_order)
end

Instance Attribute Details

#attack_orderInteger (readonly)

Get the attack order of the Pokemon

Returns:

  • (Integer)


728
729
730
# File 'docs/01600_Alpha_25_Battle_Engine_00100_PokemonBattler.rb', line 728

def attack_order
  @attack_order
end

#moveBattle::Move (readonly)

Get the move that was used

Returns:



719
720
721
# File 'docs/01600_Alpha_25_Battle_Engine_00100_PokemonBattler.rb', line 719

def move
  @move
end

#original_moveBattle::Move (readonly)

Get the actual move object that was used

Returns:



725
726
727
# File 'docs/01600_Alpha_25_Battle_Engine_00100_PokemonBattler.rb', line 725

def original_move
  @original_move
end

#targetsArray<PFM::PokemonBattler> (readonly)

Get the target that were affected by the move

Returns:



722
723
724
# File 'docs/01600_Alpha_25_Battle_Engine_00100_PokemonBattler.rb', line 722

def targets
  @targets
end

#turnInteger (readonly)

Get the turn when it was used

Returns:

  • (Integer)


716
717
718
# File 'docs/01600_Alpha_25_Battle_Engine_00100_PokemonBattler.rb', line 716

def turn
  @turn
end

Instance Method Details

#current_turn?Boolean

Tell if the move was used during the current turn

Returns:

  • (Boolean)


741
742
# File 'docs/01600_Alpha_25_Battle_Engine_00100_PokemonBattler.rb', line 741

def current_turn?
end

#db_symbolSymbol

Get the db_symbol of the move

Returns:

  • (Symbol)


745
746
# File 'docs/01600_Alpha_25_Battle_Engine_00100_PokemonBattler.rb', line 745

def db_symbol
end

#last_turn?Boolean

Tell if the move was used during last turn

Returns:

  • (Boolean)


737
738
# File 'docs/01600_Alpha_25_Battle_Engine_00100_PokemonBattler.rb', line 737

def last_turn?
end