Class: Battle::Logic::ChangeHandlerBase
- Defined in:
- docs/5_Battle_04_Logic.rb
Overview
Class responsive of describing the minimum functionality of change handlers
Direct Known Subclasses
AbilityChangeHandler, BattleEndHandler, CatchHandler, DamageHandler, FTerrainChangeHandler, FleeHandler, ItemChangeHandler, StatChangeHandler, StatusChangeHandler, SwitchHandler, TransformHandler, WeatherChangeHandler
Instance Attribute Summary collapse
-
#logic ⇒ Battle::Logic
readonly
Get the logic.
-
#pre_checked_effects ⇒ Array<Battle::Effects::EffectBase]
Get the list of the pre-checked effects.
-
#scene ⇒ Battle::Scene
readonly
Get the scene.
Instance Method Summary collapse
-
#initialize(logic, scene) ⇒ ChangeHandlerBase
constructor
Create a new ChangeHandler.
-
#pass_change(&reason) ⇒ :passthrough
Function that register a reason why the change is possible.
-
#prevent_change(&reason) ⇒ :prevent
Function that register a reason why the change is not possible.
-
#process_reason
(also: #process_prevention_reason)
Process the reason a change can(not) be done.
-
#reset_reason
(also: #reset_prevention_reason)
Reset the reason a change can(not) be done.
Constructor Details
#initialize(logic, scene) ⇒ ChangeHandlerBase
Create a new ChangeHandler
730 731 |
# File 'docs/5_Battle_04_Logic.rb', line 730 def initialize(logic, scene) end |
Instance Attribute Details
#logic ⇒ Battle::Logic (readonly)
Get the logic
720 721 722 |
# File 'docs/5_Battle_04_Logic.rb', line 720 def logic @logic end |
#pre_checked_effects ⇒ Array<Battle::Effects::EffectBase]
Get the list of the pre-checked effects
726 727 728 |
# File 'docs/5_Battle_04_Logic.rb', line 726 def pre_checked_effects @pre_checked_effects end |
#scene ⇒ Battle::Scene (readonly)
Get the scene
723 724 725 |
# File 'docs/5_Battle_04_Logic.rb', line 723 def scene @scene end |
Instance Method Details
#pass_change(&reason) ⇒ :passthrough
Function that register a reason why the change is possible
748 749 |
# File 'docs/5_Battle_04_Logic.rb', line 748 def pass_change(&reason) end |
#prevent_change(&reason) ⇒ :prevent
Function that register a reason why the change is not possible
743 744 |
# File 'docs/5_Battle_04_Logic.rb', line 743 def prevent_change(&reason) end |
#process_reason Also known as: process_prevention_reason
Process the reason a change can(not) be done
733 734 |
# File 'docs/5_Battle_04_Logic.rb', line 733 def process_reason end |
#reset_reason Also known as: reset_prevention_reason
Reset the reason a change can(not) be done
736 737 |
# File 'docs/5_Battle_04_Logic.rb', line 736 def reset_reason end |