Module: Battle::Effects::Mechanics::OutOfReach
- Included in:
- OutOfReachBase
- Defined in:
- docs/5_Battle_06_Effects_01_Mechanics.rb
Overview
Make the pokemon out of reach
Requirement
- Call initialize_out_of_reach
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.
Instance Method Summary collapse
-
#can_hit_while_out_of_reach?(move) ⇒ Boolean
(also: #oor_can_hit_while_out_of_reach?)
Check if the attack can hit the pokemon.
-
#initialize_out_of_reach(pokemon, move, exceptions, counter = 2)
Init the mechanic.
-
#interrupted?(user) ⇒ Boolean
Function that tells us if we should interrupt the move or not.
-
#on_move_prevention_target(user, target, move) ⇒ Boolean
(also: #oor_on_move_prevention_target)
Function called when we try to check if the target evades the move.
-
#out_of_reach? ⇒ Boolean
(also: #oor_out_of_reach?)
Tell if the effect make the pokemon out reach.
-
#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
136 137 138 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 136 def move @move end |
Instance Method Details
#can_hit_while_out_of_reach?(move) ⇒ Boolean Also known as: oor_can_hit_while_out_of_reach?
Check if the attack can hit the pokemon. Should be called after testing out_of_reach?
161 162 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 161 def can_hit_while_out_of_reach?(move) end |
#initialize_out_of_reach(pokemon, move, exceptions, counter = 2)
Init the mechanic
142 143 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 142 def initialize_out_of_reach(pokemon, move, exceptions, counter = 2) end |
#interrupted?(user) ⇒ Boolean
Function that tells us if we should interrupt the move or not
156 157 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 156 def interrupted?(user) end |
#on_move_prevention_target(user, target, move) ⇒ Boolean Also known as: oor_on_move_prevention_target
Function called when we try to check if the target evades the move
169 170 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 169 def on_move_prevention_target(user, target, move) end |
#out_of_reach? ⇒ Boolean Also known as: oor_out_of_reach?
Tell if the effect make the pokemon out reach
146 147 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 146 def out_of_reach? end |
#update_counter
Function that updates the counter of the effect
150 151 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 150 def update_counter end |