Module: Battle::Effects::Mechanics::ForceFlying

Included in:
Battle::Effects::MagnetRise, Telekinesis
Defined in:
docs/5_Battle_06_Effects_01_Mechanics.rb

Overview

Effect mechanics that make the pokemon flies When including this mechanics :

  • overwrite on_proc_message

  • overwrite on_delete_message

  • call Effects::Mechanics::ForceFlying.register_force_flying_hook in the class

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.register_force_flying_hook(reason, name)

Make to pokemon flying in grounded? test

Parameters:

  • reason (String)

    reason of the hook

  • name (Symbol)

    name of the effect



35
36
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 35

def register_force_flying_hook(reason, name)
end

Instance Method Details

#force_flying_initialize(pokemon, name, duration)

Create a new Pokemon tied effect

Parameters:

  • pokemon (PFM::PokemonBattler)
  • name (Symbol)

    giving the name of the effect

  • duration (Integer)

    duration of the effect (including the current turn)



14
15
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 14

def force_flying_initialize(pokemon, name, duration)
end

#on_delete Also known as: force_flying_on_delete

Function called when the effect has been deleted from the effects handler



17
18
# File 'docs/5_Battle_06_Effects_01_Mechanics.rb', line 17

def on_delete
end