Class: Battle::Effects::Ability::Symbiosis

Inherits:
Ability
  • Object
show all
Defined in:
docs/5_Battle_06_Effects_04_Ability_Effects.rb

Overview

Class describing the Symbiosis ability

Constant Summary collapse

DEFERRED_MOVES =

List of moves that cause the talent to proceed after the target has taken damage

Returns:

  • (Array<Symbol>)
%i[fling natural_gift]
INVALID_BE_METHOD =

List of methods that make the target invalid

Returns:

  • (Array<Symbol>)
%i[s_knock_off s_thief]

Instance Method Summary collapse

Constructor Details

#initialize(logic, target, db_symbol) ⇒ Symbiosis

Create a new Symbiosis effect

Parameters:



3603
3604
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 3603

def initialize(logic, target, db_symbol)
end

Instance Method Details

#on_post_damage(handler, hp, target, launcher, skill)

Function called after damages were applied (post_damage, when target is still alive)

Parameters:



3628
3629
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 3628

def on_post_damage(handler, hp, target, launcher, skill)
end

#on_post_item_change(handler, db_symbol, target, launcher, skill)

Function called when a post_item_change is checked

Parameters:



3620
3621
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 3620

def on_post_item_change(handler, db_symbol, target, launcher, skill)
end

#on_pre_item_change(handler, db_symbol, target, launcher, skill) ⇒ :prevent?

Function called when a pre_item_change is checked

Parameters:

Returns:

  • (:prevent, nil) —

    :prevent if the item change cannot be applied



3612
3613
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 3612

def on_pre_item_change(handler, db_symbol, target, launcher, skill)
end