Class: Battle::Logic::BattleEndHandler
- Inherits:
-
ChangeHandlerBase
- Object
- ChangeHandlerBase
- Battle::Logic::BattleEndHandler
- Includes:
- Hooks
- Defined in:
- docs/5_Battle_04_Logic.rb
Overview
Handler responsive of handling the end of the battle
Constant Summary collapse
- GrassItem =
List of Items (ID) got with Pickup on Grass
[[155, 151, 158, 150, 152, 149, 4, 79, 154, 92], [151, 158, 150, 152, 149, 4, 79, 154, 92, 85], [158, 26, 28, 27, 3, 76, 154, 92, 85, 25], [26, 28, 27, 3, 76, 154, 92, 85, 25, 38], [28, 27, 2, 76, 154, 92, 85, 25, 38, 278], [27, 2, 76, 154, 28, 85, 24, 38, 278, 537], [2, 76, 154, 28, 85, 24, 93, 278, 537, 40], [77, 154, 28, 85, 24, 93, 50, 80, 40, 537], [154, 28, 2, 24, 93, 50, 80, 40, 537, 234], [28, 2, 23, 93, 50, 80, 40, 51, 234, 537], [2, 23, 93, 50, 80, 40, 51, 234, 53, 537]]
- CaveItem =
List of Items (ID) got with Pickup in Cave
[[17, 18, 26, 78, 28, 27, 3, 79, 78, 92], [18, 4, 26, 28, 27, 3, 79, 78, 92, 82], [4, 26, 28, 27, 3, 76, 78, 92, 82, 25], [26, 28, 27, 3, 77, 78, 92, 82, 25, 38], [28, 27, 2, 77, 78, 92, 82, 25, 38, 278], [27, 2, 77, 78, 28, 82, 24, 38, 278, 537], [2, 77, 78, 28, 82, 24, 93, 278, 537, 40], [77, 78, 28, 82, 24, 93, 50, 80, 40, 537], [78, 28, 2, 24, 93, 50, 80, 40, 537, 234], [28, 2, 23, 93, 50, 80, 40, 51, 234, 537], [2, 23, 93, 50, 80, 40, 51, 234, 53, 537]]
- WaterItem =
List of Items (ID) got with Pickup on Water
[[17, 18, 26, 78, 28, 27, 3, 79, 78, 92], [18, 4, 26, 28, 27, 3, 79, 78, 92, 84], [4, 26, 28, 27, 3, 76, 78, 92, 84, 25], [26, 28, 27, 3, 77, 78, 92, 84, 25, 38], [28, 27, 2, 77, 78, 92, 84, 25, 38, 278], [27, 2, 77, 78, 28, 84, 24, 38, 278, 537], [2, 77, 78, 28, 84, 24, 93, 278, 537, 40], [77, 78, 28, 84, 24, 93, 50, 80, 40, 537], [78, 28, 2, 24, 93, 50, 80, 40, 537, 234], [28, 2, 23, 93, 50, 80, 40, 51, 234, 537], [2, 23, 93, 50, 80, 40, 51, 234, 53, 537]]
- CommonItem =
List of Items (ID) got with Pickup on common tiles
[[17, 18, 26, 78, 28, 27, 3, 79, 78, 92], [18, 4, 26, 28, 27, 3, 79, 78, 92, 83], [4, 26, 28, 27, 3, 76, 78, 92, 83, 25], [26, 28, 27, 3, 77, 78, 92, 83, 25, 38], [28, 27, 2, 77, 78, 92, 83, 25, 38, 278], [27, 2, 77, 78, 28, 83, 24, 38, 278, 537], [2, 77, 78, 28, 83, 24, 93, 278, 537, 40], [77, 78, 28, 83, 24, 93, 50, 80, 40, 537], [78, 28, 2, 24, 93, 50, 80, 40, 537, 234], [28, 2, 23, 93, 50, 80, 40, 51, 234, 537], [2, 23, 93, 50, 80, 40, 51, 234, 53, 537]]
Instance Attribute Summary
Attributes inherited from ChangeHandlerBase
#logic, #pre_checked_effects, #scene
Class Method Summary collapse
-
.register(reason) {|handler, players_pokemon| ... }
Function that registers a battle end procedure.
-
.register_no_defeat(reason) {|handler, players_pokemon| ... }
Function that registers a battle end procedure when it’s not a defeat.
-
.register_nuzlocke(reason) {|handler, players_pokemon| ... }
Function that registers a battle end procedure when nuzlocke mode is enabled.
Instance Method Summary collapse
-
#pickup_item(pokemon) ⇒ Integer
Get the item to pick up.
-
#player_loose_sequence
Process the loose sequence when the battle doesn’t allow defeat.
-
#process
Process the battle end.
Methods included from Hooks
#exec_hooks, #force_return, included, 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(reason) {|handler, players_pokemon| ... }
Function that registers a battle end procedure
1815 1816 |
# File 'docs/5_Battle_04_Logic.rb', line 1815 def register(reason) end |
.register_no_defeat(reason) {|handler, players_pokemon| ... }
Function that registers a battle end procedure when it’s not a defeat
1821 1822 |
# File 'docs/5_Battle_04_Logic.rb', line 1821 def register_no_defeat(reason) end |
.register_nuzlocke(reason) {|handler, players_pokemon| ... }
Function that registers a battle end procedure when nuzlocke mode is enabled
1827 1828 |
# File 'docs/5_Battle_04_Logic.rb', line 1827 def register_nuzlocke(reason) end |
Instance Method Details
#pickup_item(pokemon) ⇒ Integer
Get the item to pick up
1791 1792 |
# File 'docs/5_Battle_04_Logic.rb', line 1791 def pickup_item(pokemon) end |
#player_loose_sequence
Process the loose sequence when the battle doesn’t allow defeat
1794 1795 |
# File 'docs/5_Battle_04_Logic.rb', line 1794 def player_loose_sequence end |
#process
Process the battle end
1786 1787 |
# File 'docs/5_Battle_04_Logic.rb', line 1786 def process end |