Class: PFM::PokemonBattler::MoveHistory
- Defined in:
- scripts/01600 Alpha 25 Battle Engine/00100 PokemonBattler/01000 MoveHistory.rb
Overview
Class defining an history of move use
Instance Attribute Summary collapse
-
#attack_order ⇒ Integer
readonly
Get the attack order of the Pokemon.
-
#move ⇒ Battle::Move
readonly
Get the move that was used.
-
#original_move ⇒ Battle::Move
readonly
Get the actual move object that was used.
-
#targets ⇒ Array<PFM::PokemonBattler>
readonly
Get the target that were affected by the move.
-
#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.
-
#db_symbol ⇒ Symbol
Get the db_symbol of the move.
-
#initialize(move, targets, attack_order) ⇒ MoveHistory
constructor
Create a new Move History.
-
#last_turn? ⇒ Boolean
Tell if the move was used during last turn.
Constructor Details
#initialize(move, targets, attack_order) ⇒ MoveHistory
Create a new Move History
25 26 27 28 29 30 31 |
# File 'scripts/01600 Alpha 25 Battle Engine/00100 PokemonBattler/01000 MoveHistory.rb', line 25 def initialize(move, targets, attack_order) @original_move = move @move = move.dup @turn = $game_temp.battle_turn @targets = targets @attack_order = attack_order end |
Instance Attribute Details
#attack_order ⇒ Integer (readonly)
Get the attack order of the Pokemon
19 20 21 |
# File 'scripts/01600 Alpha 25 Battle Engine/00100 PokemonBattler/01000 MoveHistory.rb', line 19 def attack_order @attack_order end |
#move ⇒ Battle::Move (readonly)
Get the move that was used
10 11 12 |
# File 'scripts/01600 Alpha 25 Battle Engine/00100 PokemonBattler/01000 MoveHistory.rb', line 10 def move @move end |
#original_move ⇒ Battle::Move (readonly)
Get the actual move object that was used
16 17 18 |
# File 'scripts/01600 Alpha 25 Battle Engine/00100 PokemonBattler/01000 MoveHistory.rb', line 16 def original_move @original_move end |
#targets ⇒ Array<PFM::PokemonBattler> (readonly)
Get the target that were affected by the move
13 14 15 |
# File 'scripts/01600 Alpha 25 Battle Engine/00100 PokemonBattler/01000 MoveHistory.rb', line 13 def targets @targets end |
#turn ⇒ Integer (readonly)
Get the turn when it was used
7 8 9 |
# File 'scripts/01600 Alpha 25 Battle Engine/00100 PokemonBattler/01000 MoveHistory.rb', line 7 def turn @turn end |
Instance Method Details
#current_turn? ⇒ Boolean
Tell if the move was used during the current turn
41 42 43 |
# File 'scripts/01600 Alpha 25 Battle Engine/00100 PokemonBattler/01000 MoveHistory.rb', line 41 def current_turn? return @turn == $game_temp.battle_turn end |
#db_symbol ⇒ Symbol
Get the db_symbol of the move
47 48 49 |
# File 'scripts/01600 Alpha 25 Battle Engine/00100 PokemonBattler/01000 MoveHistory.rb', line 47 def db_symbol return @move.db_symbol end |
#last_turn? ⇒ Boolean
Tell if the move was used during last turn
35 36 37 |
# File 'scripts/01600 Alpha 25 Battle Engine/00100 PokemonBattler/01000 MoveHistory.rb', line 35 def last_turn? return @turn == $game_temp.battle_turn - 1 end |