Class: Battle::Logic::AbilityChangeHandler
- Inherits:
-
ChangeHandlerBase
- Object
- ChangeHandlerBase
- Battle::Logic::AbilityChangeHandler
- Defined in:
- docs/5_Battle_04_Logic.rb
Overview
Handler responsive of answering properly ability changes requests
Constant Summary collapse
- CANT_OVERWRITE_ABILITIES =
Lists of abilities that cannot be lost
%i[as_one battle_bond comatose commander disguise gulp_missile hadron_engine hunger_switch ice_face imposter multitype orichalcum_pulse power_construct protosynthesis quark_drive rks_system schooling shields_down stance_change zen_mode zero_to_hero]
- RECEIVER_CANT_COPY_ABILITIES =
Lists of abilities that cannot be gained
%i[as_one battle_bond comatose commander disguise flower_gift forecast gulp_missile hadron_engine hunger_switch ice_face illusion imposter multitype neutralizing_gas orichalcum_pulse poison_puppeteer power_construct power_of_alchemy prokosynthesis protosynthesis quark_drive receiver rks_system schooling shields_down stance_change trace wonder_guard zen_mode zero_to_hero]
- SKILL_BLOCKING_ABILITIES =
Lists of abilities that make these moves fail
{entrainment: %i[truant], simple_beam: %i[simple truant], worry_seed: %i[insomnia truant]}
Instance Attribute Summary
Attributes inherited from ChangeHandlerBase
#logic, #pre_checked_effects, #scene
Instance Method Summary collapse
-
#ability_changed?(battler) ⇒ Boolean
Checks if the battler's current ability differs from its original ability before the battle.
-
#apply_ability_change(target, ability_db_symbol, launcher, skill = nil, &message)
Applies the ability change.
-
#apply_ability_swap(user, target, skill = nil)
Applies the ability swap.
-
#can_change_ability?(target, launcher = nil, skill = nil) ⇒ Boolean
Function that tell if this is possible to change the ability of a Pokemon.
-
#change_ability(target, ability_db_symbol, launcher = nil, skill = nil)
Function that change the ability of a Pokemon.
-
#disable_ability(target, origin, launcher = nil, skill = nil)
Function that disable the ability of a 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
#ability_changed?(battler) ⇒ Boolean
Checks if the battler's current ability differs from its original ability before the battle
1577 1578 |
# File 'docs/5_Battle_04_Logic.rb', line 1577 def ability_changed?(battler) end |
#apply_ability_change(target, ability_db_symbol, launcher, skill = nil, &message)
Applies the ability change
1566 1567 |
# File 'docs/5_Battle_04_Logic.rb', line 1566 def apply_ability_change(target, ability_db_symbol, launcher, skill = nil, &) end |
#apply_ability_swap(user, target, skill = nil)
Applies the ability swap
1572 1573 |
# File 'docs/5_Battle_04_Logic.rb', line 1572 def apply_ability_swap(user, target, skill = nil) end |
#can_change_ability?(target, launcher = nil, skill = nil) ⇒ Boolean
Function that tell if this is possible to change the ability of a Pokemon
1558 1559 |
# File 'docs/5_Battle_04_Logic.rb', line 1558 def can_change_ability?(target, launcher = nil, skill = nil) end |
#change_ability(target, ability_db_symbol, launcher = nil, skill = nil)
Function that change the ability of a Pokemon
1545 1546 |
# File 'docs/5_Battle_04_Logic.rb', line 1545 def change_ability(target, ability_db_symbol, launcher = nil, skill = nil) end |
#disable_ability(target, origin, launcher = nil, skill = nil)
Function that disable the ability of a Pokemon
1552 1553 |
# File 'docs/5_Battle_04_Logic.rb', line 1552 def disable_ability(target, origin, launcher = nil, skill = nil) end |