Class: Battle::Logic::TransformHandler

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

Overview

Handler responsive of answering properly transform requests

Instance Attribute Summary

Attributes inherited from ChangeHandlerBase

#logic, #pre_checked_effects, #scene

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Hooks

#exec_hooks, #force_return, included, register, remove, remove_without_name

Methods inherited from ChangeHandlerBase

#initialize, #prevent_change, #process_prevention_reason, #reset_prevention_reason

Constructor Details

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

Class Method Details

.register_on_initialize_transform(reason) {|handler, target| ... }

Function that registers a on_initialize_transform hook

Parameters:

  • reason (String)

    reason of the on_initialize_transform registration

Yield Parameters:

Yield Returns:

  • (nil)


2095
2096
# File 'docs/5_Battle_04_Logic.rb', line 2095

def register_on_initialize_transform(reason)
end

Instance Method Details

#can_copy?(copied) ⇒ Boolean

Function that tells if the pokemon can copy another pokemon

Parameters:

Returns:

  • (Boolean)


2087
2088
# File 'docs/5_Battle_04_Logic.rb', line 2087

def can_copy?(copied)
end

#can_transform?(target) ⇒ Boolean

Function that tells if the Pokemon can transform or not

Parameters:

Returns:

  • (Boolean)


2082
2083
# File 'docs/5_Battle_04_Logic.rb', line 2082

def can_transform?(target)
end

#initialize_transform_attempt(target)

Function responsive of transforming a Pokemon when initialized

Parameters:



2077
2078
# File 'docs/5_Battle_04_Logic.rb', line 2077

def initialize_transform_attempt(target)
end