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.
-
#prevent_change(&reason) ⇒ :prevent
Function that register a reason why the change is not possible.
-
#process_prevention_reason
Process the reason a change could not be done.
-
#reset_prevention_reason
Reset the reason why change cannot be done.
Constructor Details
#initialize(logic, scene) ⇒ ChangeHandlerBase
Create a new ChangeHandler
711 712 |
# File 'docs/5_Battle_04_Logic.rb', line 711 def initialize(logic, scene) end |
Instance Attribute Details
#logic ⇒ Battle::Logic (readonly)
Get the logic
701 702 703 |
# File 'docs/5_Battle_04_Logic.rb', line 701 def logic @logic end |
#pre_checked_effects ⇒ Array<Battle::Effects::EffectBase]
Get the list of the pre-checked effects
707 708 709 |
# File 'docs/5_Battle_04_Logic.rb', line 707 def pre_checked_effects @pre_checked_effects end |
#scene ⇒ Battle::Scene (readonly)
Get the scene
704 705 706 |
# File 'docs/5_Battle_04_Logic.rb', line 704 def scene @scene end |
Instance Method Details
#prevent_change(&reason) ⇒ :prevent
Function that register a reason why the change is not possible
722 723 |
# File 'docs/5_Battle_04_Logic.rb', line 722 def prevent_change(&reason) end |
#process_prevention_reason
Process the reason a change could not be done
714 715 |
# File 'docs/5_Battle_04_Logic.rb', line 714 def process_prevention_reason end |
#reset_prevention_reason
Reset the reason why change cannot be done
717 718 |
# File 'docs/5_Battle_04_Logic.rb', line 717 def reset_prevention_reason end |