Class: Battle::Logic::SwitchHandler
- Inherits:
-
ChangeHandlerBase
- Object
- ChangeHandlerBase
- Battle::Logic::SwitchHandler
- Defined in:
- docs/5_Battle_04_Logic.rb
Overview
Handler responsive of processing switch events that happens during switch
Instance Attribute Summary
Attributes inherited from ChangeHandlerBase
#logic, #pre_checked_effects, #scene
Instance Method Summary collapse
-
#can_switch?(pokemon, skill = nil, reason: :switch) ⇒ Boolean
Test if the switch is possible.
-
#execute_pre_switch_events(who, with)
Execute the events before the pokemon switch out.
-
#execute_switch_events(who, with)
Perform the switch between two Pokemon.
Methods inherited from ChangeHandlerBase
#initialize, #pass_change, #prevent_change, #process_reason, #reset_reason
Constructor Details
This class inherits a constructor from Battle::Logic::ChangeHandlerBase
Instance Method Details
#can_switch?(pokemon, skill = nil, reason: :switch) ⇒ Boolean
Test if the switch is possible
1182 1183 |
# File 'docs/5_Battle_04_Logic.rb', line 1182 def can_switch?(pokemon, skill = nil, reason: :switch) end |
#execute_pre_switch_events(who, with)
Note:
In the event we're starting the battle who & with should be identic, this help to process effect like Intimidate
Execute the events before the pokemon switch out
1188 1189 |
# File 'docs/5_Battle_04_Logic.rb', line 1188 def execute_pre_switch_events(who, with) end |
#execute_switch_events(who, with)
Note:
In the event we're starting the battle who & with should be identic, this help to process effect like Intimidate
Perform the switch between two Pokemon
1194 1195 |
# File 'docs/5_Battle_04_Logic.rb', line 1194 def execute_switch_events(who, with) end |