Module: Battle::Effects::Mechanics::ForceNextMove
- Included in:
- Bide, Commanding, Encore, ForceNextMoveBase, Rollout, UpRoar
- Defined in:
- docs/5_Battle_06_Effects_01_Mechanics.rb
Overview
Give functions to manage a move that force the next one. Must be used in a EffectBase child class.
Constant Summary collapse
- MOVES_PAUSED =
List of move that must be paused when user is asleep/frozen/flinched
%i[freeze_shock geomancy ice_burn razor_wind skull_bash sky_attack solar_beam electro_shot]
Instance Attribute Summary collapse
-
#move ⇒ Battle::Move
readonly
Get the move the Pokemon has to use.
-
#targets ⇒ Array<PFM::PokemonBattler>
readonly
Get the targets of the move.
Instance Method Summary collapse
-
#action_class ⇒ Class<Actions::Attack>
Get the class of the action.
-
#force_next_move? ⇒ Boolean
Tell if the effect forces the next move.
-
#force_next_turn_action? ⇒ Boolean
Tell if the effect forces the next turn action into a Attack action.
-
#interrupted?(user) ⇒ Boolean
Function that tells us if we should interrupt the move or not.
-
#make_action ⇒ Actions::Attack
Make the Attack action that is forced by this effect.
-
#on_move_prevention_user(user, targets, move) ⇒ :prevent?
Function called when we try to use a move as the user (returns :prevent if user fails).
-
#paused?(user) ⇒ Boolean
Function that tells us if we should pause the move or not.
-
#update_counter
Function that updates the counter of the effect.
Instance Attribute Details
#move ⇒ Battle::Move (readonly)
Get the move the Pokemon has to use
43 44 45 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 43 def move @move end |
#targets ⇒ Array<PFM::PokemonBattler> (readonly)
Get the targets of the move
46 47 48 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 46 def targets @targets end |
Instance Method Details
#action_class ⇒ Class<Actions::Attack>
Get the class of the action
81 82 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 81 def action_class end |
#force_next_move? ⇒ Boolean
Tell if the effect forces the next move
56 57 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 56 def force_next_move? end |
#force_next_turn_action? ⇒ Boolean
Tell if the effect forces the next turn action into a Attack action
60 61 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 60 def force_next_turn_action? end |
#interrupted?(user) ⇒ Boolean
Function that tells us if we should interrupt the move or not
73 74 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 73 def interrupted?(user) end |
#make_action ⇒ Actions::Attack
Make the Attack action that is forced by this effect
77 78 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 77 def make_action end |
#on_move_prevention_user(user, targets, move) ⇒ :prevent?
Function called when we try to use a move as the user (returns :prevent if user fails)
52 53 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 52 def on_move_prevention_user(user, targets, move) end |
#paused?(user) ⇒ Boolean
Function that tells us if we should pause the move or not
69 70 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 69 def paused?(user) end |
#update_counter
Function that updates the counter of the effect
63 64 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 63 def update_counter end |