Class: Battle::Effects::Ability::IceFace

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

Overview

Class describing the Ice Face ability effect

Instance Method Summary collapse

Instance Method Details

#on_damage_prevention(handler, hp, target, launcher, skill) ⇒ :prevent, ...

Function called when a damage_prevention is checked

Parameters:

Returns:

  • (:prevent, Integer, nil) —

    :prevent if the damage cannot be applied, Integer if the hp variable should be updated



1731
1732
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 1731

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

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

Function called after damages were applied and when target died (post_damage_death)

Parameters:



1745
1746
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 1745

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

#on_post_weather_change(handler, weather_type, last_weather)

Function called after the weather was changed (on_post_weather_change)

Parameters:

  • handler (Battle::Logic::WeatherChangeHandler)
  • weather_type (Symbol) —

    :none, :rain, :sunny, :sandstorm, :hail, :fog

  • last_weather (Symbol) —

    :none, :rain, :sunny, :sandstorm, :hail, :fog



1737
1738
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 1737

def on_post_weather_change(handler, weather_type, last_weather)
end

#on_switch_event(handler, who, with)

Function called when a Pokemon has actually switched with another one

Parameters:



1722
1723
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 1722

def on_switch_event(handler, who, with)
end