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
137 138 139 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 137 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?
162 163 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 162 def can_hit_while_out_of_reach?(move) end |
#initialize_out_of_reach(pokemon, move, exceptions, counter = 2)
Init the mechanic
143 144 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 143 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
157 158 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 157 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
170 171 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 170 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
147 148 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 147 def out_of_reach? end |
#update_counter
Function that updates the counter of the effect
151 152 |
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 151 def update_counter end |