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:



758
759
# File 'docs/5_Battle_03_PokemonBattler.rb', line 758

def initialize(move, targets, attack_order)
end

Instance Attribute Details

#attack_order ⇒ Integer (readonly)

Get the attack order of the Pokemon

Returns:

  • (Integer)


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

def attack_order
  @attack_order
end

#move ⇒ Battle::Move (readonly)

Get the move that was used

Returns:



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

def move
  @move
end

#original_move ⇒ Battle::Move (readonly)

Get the actual move object that was used

Returns:



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

def original_move
  @original_move
end

#targets ⇒ Array<PFM::PokemonBattler> (readonly)

Get the target that were affected by the move

Returns:



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

def targets
  @targets
end

#turn ⇒ Integer (readonly)

Get the turn when it was used

Returns:

  • (Integer)


741
742
743
# File 'docs/5_Battle_03_PokemonBattler.rb', line 741

def turn
  @turn
end

Instance Method Details

#current_turn? ⇒ Boolean

Tell if the move was used during the current turn

Returns:

  • (Boolean)


766
767
# File 'docs/5_Battle_03_PokemonBattler.rb', line 766

def current_turn?
end

#db_symbol ⇒ Symbol

Get the db_symbol of the move

Returns:

  • (Symbol)


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

def db_symbol
end

#last_turn? ⇒ Boolean

Tell if the move was used during last turn

Returns:

  • (Boolean)


762
763
# File 'docs/5_Battle_03_PokemonBattler.rb', line 762

def last_turn?
end