Class: Battle::Logic::FleeHandler

Inherits:
ChangeHandlerBase show all
Defined in:
docs/5_Battle_04_Logic.rb

Overview

Handler responsible for processing flee attempt

Instance Attribute Summary

Attributes inherited from ChangeHandlerBase

#logic, #pre_checked_effects, #scene

Instance Method Summary collapse

Methods inherited from ChangeHandlerBase

#initialize, #pass_change, #prevent_change, #process_reason, #reset_reason

Constructor Details

This class inherits a constructor from Battle::Logic::ChangeHandlerBase

Instance Method Details

#attempt(index) ⇒ Symbol

Try to flee

Parameters:

  • index (Integer) —

    index of the battler on the trainer bank

Returns:

  • (Symbol) —

    if success :success, if failure :failure, if blocked (trainer battle) :blocked



1327
1328
# File 'docs/5_Battle_04_Logic.rb', line 1327

def attempt(index)
end

#can_flee?(target) ⇒ Boolean

Can you flee?

Parameters:

Returns:

  • (Boolean)


1322
1323
# File 'docs/5_Battle_04_Logic.rb', line 1322

def can_flee?(target)
end