Class: Battle::Logic::FleeHandler
- Inherits:
-
ChangeHandlerBase
- Object
- ChangeHandlerBase
- Battle::Logic::FleeHandler
- Includes:
- Hooks
- Defined in:
- docs/5_Battle_04_Logic.rb
Overview
Handler responsive of processing flee attempt
Instance Attribute Summary
Attributes inherited from ChangeHandlerBase
#logic, #pre_checked_effects, #scene
Class Method Summary collapse
-
.register_flee_block_hook(reason) {|handler| ... }
Function that registers a flee_block hook.
-
.register_flee_passthrough_hook(reason) {|handler, pokemon| ... }
Function that registers a flee_passthrough hook.
Instance Method Summary collapse
-
#attempt(index) ⇒ Symbol
Try to flee.
Methods included from Hooks
#exec_hooks, #force_return, included, register, remove, remove_without_name
Methods inherited from ChangeHandlerBase
#initialize, #prevent_change, #process_prevention_reason, #reset_prevention_reason
Constructor Details
This class inherits a constructor from Battle::Logic::ChangeHandlerBase
Class Method Details
.register_flee_block_hook(reason) {|handler| ... }
Function that registers a flee_block hook
1509 1510 |
# File 'docs/5_Battle_04_Logic.rb', line 1509 def register_flee_block_hook(reason) end |
.register_flee_passthrough_hook(reason) {|handler, pokemon| ... }
Function that registers a flee_passthrough hook
1516 1517 |
# File 'docs/5_Battle_04_Logic.rb', line 1516 def register_flee_passthrough_hook(reason) end |
Instance Method Details
#attempt(index) ⇒ Symbol
Note:
flee_block hooks are called to test if the flee is blocked for other reason than switch blocked
Try to flee
1495 1496 |
# File 'docs/5_Battle_04_Logic.rb', line 1495 def attempt(index) end |