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
42 43 44 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 42 def move @move end |
#targets ⇒ Array<PFM::PokemonBattler> (readonly)
Get the targets of the move
45 46 47 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 45 def targets @targets end |
Instance Method Details
#action_class ⇒ Class<Actions::Attack>
Get the class of the action
80 81 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 80 def action_class end |
#force_next_move? ⇒ Boolean
Tell if the effect forces the next move
55 56 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 55 def force_next_move? end |
#force_next_turn_action? ⇒ Boolean
Tell if the effect forces the next turn action into a Attack action
59 60 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 59 def force_next_turn_action? end |
#interrupted?(user) ⇒ Boolean
Function that tells us if we should interrupt the move or not
72 73 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 72 def interrupted?(user) end |
#make_action ⇒ Actions::Attack
Make the Attack action that is forced by this effect
76 77 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 76 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)
51 52 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 51 def on_move_prevention_user(user, targets, move) end |
#paused?(user) ⇒ Boolean
Function that tells us if we should pause the move or not
68 69 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 68 def paused?(user) end |
#update_counter
Function that updates the counter of the effect
62 63 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 62 def update_counter end |