Class: Battle::Logic::CatchHandler
- Inherits:
-
ChangeHandlerBase
- Object
- ChangeHandlerBase
- Battle::Logic::CatchHandler
- Includes:
- Hooks
- Defined in:
- docs/5_Battle_04_Logic.rb
Overview
Handler responsive of answering properly Pokemon catching requests
Constant Summary collapse
- STATUS_MODIFIER =
Modifier applied to the formula depending of the Status
{poison: 1.5, paralysis: 1.5, burn: 1.5, sleep: 2.5, freeze: 2.5, toxic: 1.5}
- BALL_RATE_CALCULATION =
List all the special ball rate calculation block
{}
- TEXT_CATCH =
ID of the catching text in the text database
[[18, 63], [18, 64], [18, 65], [18, 66], [18, 67], [18, 68]]
- ULTRA_BEAST =
DB_Symbol of each Ultra-Beast
%i[nihilego buzzwole pheromosa xurkitree celesteela kartana guzzlord poipole naganadel stakataka blacephalon]
Instance Attribute Summary
Attributes inherited from ChangeHandlerBase
#logic, #pre_checked_effects, #scene
Class Method Summary collapse
-
.add_ball_rate_calculation(ball_name) {|target, pkm_ally| ... }
Define a new ball rate calculation in BALL_RATE_CALCULATION.
Instance Method Summary collapse
-
#caught? ⇒ Boolean
Tells if the Pokemon is caught.
-
#try_to_catch_pokemon(target, pkm_ally, ball)
Function that try to catch the targeted Pokemon.
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
.add_ball_rate_calculation(ball_name) {|target, pkm_ally| ... }
Define a new ball rate calculation in BALL_RATE_CALCULATION
1556 1557 |
# File 'docs/5_Battle_04_Logic.rb', line 1556 def add_ball_rate_calculation(ball_name, &block) end |
Instance Method Details
#caught? ⇒ Boolean
Tells if the Pokemon is caught
1548 1549 |
# File 'docs/5_Battle_04_Logic.rb', line 1548 def caught? end |
#try_to_catch_pokemon(target, pkm_ally, ball)
Function that try to catch the targeted Pokemon
1544 1545 |
# File 'docs/5_Battle_04_Logic.rb', line 1544 def try_to_catch_pokemon(target, pkm_ally, ball) end |