Class: Battle::Effects::Ability::FlowerGift

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

Overview

Class describing the Flower Gift ability effect

Instance Method Summary collapse

Constructor Details

#initialize(logic, target, db_symbol) ⇒ FlowerGift

Create a new FlowerGift effect

Parameters:



1229
1230
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 1229

def initialize(logic, target, db_symbol)
end

Instance Method Details

#atk_modifier ⇒ Float, Integer

Give the atk modifier over given to the Pokemon with this effect

Returns:

  • (Float, Integer) —

    multiplier



1257
1258
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 1257

def atk_modifier
end

#dfs_modifier ⇒ Float, Integer

Give the dfs modifier over given to the Pokemon with this effect

Returns:

  • (Float, Integer) —

    multiplier



1261
1262
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 1261

def dfs_modifier
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



1241
1242
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 1241

def on_post_weather_change(handler, weather_type, last_weather)
end

#on_pre_ability_change(handler, _db_symbol, target, _launcher, _skill)

Function called when a pre_ability_change is checked

Parameters:



1253
1254
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 1253

def on_pre_ability_change(handler, _db_symbol, target, _launcher, _skill)
end

#on_switch_event(handler, who, with)

Function called when a creature has actually switched with another one

Parameters:



1235
1236
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 1235

def on_switch_event(handler, who, with)
end

#on_weather_effects_disabled_change(handler)

Function called when weather effects are suppressed or restored (e.g. Air Lock / Cloud Nine)

Parameters:



1245
1246
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 1245

def on_weather_effects_disabled_change(handler)
end