Class: Battle::Effects::Ability::EmergencyExit

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

Overview

Class describing the Emergency Exit / Wimp Out ability effect

Instance Method Summary collapse

Constructor Details

#initialize(logic, target, db_symbol) ⇒ EmergencyExit

Create a new Emergency Exit effect

Parameters:



1119
1120
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 1119

def initialize(logic, target, db_symbol)
end

Instance Method Details

#item_prevention?(target) ⇒ Boolean

Check if an item effect prevents the ability from triggering

Parameters:

Returns:

  • (Boolean)


1138
1139
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 1138

def item_prevention?(target)
end

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

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

Parameters:



1127
1128
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 1127

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

#skill_prevention?(hp, skill) ⇒ Boolean

Check if a move will prevents the ability from triggering

Parameters:

  • hp (Integer) —

    number of hp (damage) dealt

  • skill (Battle::Move, nil) —

    Potential move used

Returns:

  • (Boolean)


1133
1134
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 1133

def skill_prevention?(hp, skill)
end