Class: Battle::Effects::Item::OranBerry

Inherits:
Berry show all
Defined in:
docs/5_Battle_06_Effects_05_Item_Effects.rb

Overview

Class describing the Oran berry's item effect

Direct Known Subclasses

BerryJuice, ConfusingBerries, SitrusBerry

Constant Summary

Constants inherited from Berry

Berry::FLAVORS

Instance Method Summary collapse

Instance Method Details

#execute_berry_effect(force_heal: false, force_execution: false)

Function that executes the effect of the berry (for Pluck & Bug Bite)

Parameters:

  • force_heal (Boolean) (defaults to: false) —

    tell if a healing berry should force the heal

  • force_execution (Boolean) (defaults to: false) —

    tell if the execution of the berry has to be forced



192
193
# File 'docs/5_Battle_06_Effects_05_Item_Effects.rb', line 192

def execute_berry_effect(force_heal: false, force_execution: false)
end

#hp_healed ⇒ Integer

Give the amount of HP healed

Returns:

  • (Integer)


207
208
# File 'docs/5_Battle_06_Effects_05_Item_Effects.rb', line 207

def hp_healed
end

#hp_rate_trigger ⇒ Float

Give the hp rate that triggers the berry

Returns:

  • (Float)


203
204
# File 'docs/5_Battle_06_Effects_05_Item_Effects.rb', line 203

def hp_rate_trigger
end

#on_end_turn_event(logic, scene, battlers)

Function called at the end of a turn

Parameters:



187
188
# File 'docs/5_Battle_06_Effects_05_Item_Effects.rb', line 187

def on_end_turn_event(logic, scene, battlers)
end

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

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

Parameters:



181
182
# File 'docs/5_Battle_06_Effects_05_Item_Effects.rb', line 181

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

#process_effect(target, launcher, skill, force_execution = false)

Function that process the effect of the berry (if possible)

Parameters:

  • target (PFM::PokemonBattler)
  • launcher (PFM::PokemonBattler, nil) —

    Potential launcher of a move

  • skill (Battle::Move, nil) —

    Potential move used

  • force_execution (Boolean) (defaults to: false) —

    tell if the execution of the berry has to be forced



199
200
# File 'docs/5_Battle_06_Effects_05_Item_Effects.rb', line 199

def process_effect(target, launcher, skill, force_execution = false)
end

#should_confuse ⇒ Boolean

Tell if the berry effect should confuse

Returns:

  • (Boolean)


211
212
# File 'docs/5_Battle_06_Effects_05_Item_Effects.rb', line 211

def should_confuse
end