Class: Battle::Effects::Bind

Inherits:
PokemonTiedEffectBase show all
Defined in:
docs/01600_Alpha_25_Battle_Engine_04000_Effects_00500_Move_Effects.rb

Overview

Class that describe the bind effect

Direct Known Subclasses

Octolock

Constant Summary collapse

MESSAGE_INFO =

Hash giving the message info based on the db_symbol of the move

{bind: [19, 806, true], wrap: [19, 813, true], fire_spin: [19, 830, false], clamp: [19, 820, true], whirlpool: [19, 827, false], sand_tomb: [19, 836, false], magma_storm: [19, 833, false], infestation: [19, 1234, true], octolock: [59, 1978, false], snap_trap: [59, 1974, false], thunder_cage: [59, 2052, true]}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from PokemonTiedEffectBase

#on_baton_pass_switch

Methods inherited from EffectBase

#atk_modifier, #ats_modifier, #base_power_multiplier, #can_attack_hit_out_of_reach?, #chance_of_hit_multiplier, #counter=, #dfe_modifier, #dfs_modifier, #effect_chance_modifier, #force_next_move?, #force_next_turn_action?, #ignore_target_redirection?, #kill, #mod1_multiplier, #mod2_multiplier, #mod3_multiplier, #on_damage_prevention, #on_fterrain_prevention, #on_held_item_use_prevention, #on_move_ability_immunity, #on_move_disabled_check, #on_move_prevention_target, #on_move_prevention_user, #on_move_priority_change, #on_move_type_change, #on_post_accuracy_check, #on_post_action_event, #on_post_damage, #on_post_damage_death, #on_post_fterrain_change, #on_post_item_change, #on_post_status_change, #on_post_weather_change, #on_pre_accuracy_check, #on_pre_item_change, #on_single_type_multiplier_overwrite, #on_stat_change, #on_stat_change_post, #on_stat_decrease_prevention, #on_stat_increase_prevention, #on_status_prevention, #on_switch_passthrough, #on_transform_event, #on_two_turn_shortcut, #on_weather_prevention, #out_of_reach?, #sp_atk_multiplier, #sp_def_multiplier, #spd_modifier, #specific_proceed_internal, #target_redirection, #targetted?, #update_counter

Constructor Details

#initialize(logic, pokemon, origin, turn_count, move) ⇒ Bind

Create a new Pokemon tied effect

Parameters:



187
188
# File 'docs/01600_Alpha_25_Battle_Engine_04000_Effects_00500_Move_Effects.rb', line 187

def initialize(logic, pokemon, origin, turn_count, move)
end

Instance Attribute Details

#originPFM::PokemonBattler (readonly)

The Pokemon that launched the attack

Returns:



180
181
182
# File 'docs/01600_Alpha_25_Battle_Engine_04000_Effects_00500_Move_Effects.rb', line 180

def origin
  @origin
end

Instance Method Details

#dead?Boolean

Tell if the effect is dead or must be cleared

Returns:

  • (Boolean)


211
212
# File 'docs/01600_Alpha_25_Battle_Engine_04000_Effects_00500_Move_Effects.rb', line 211

def dead?
end

#nameSymbol

Get the name of the effect

Returns:

  • (Symbol)


219
220
# File 'docs/01600_Alpha_25_Battle_Engine_04000_Effects_00500_Move_Effects.rb', line 219

def name
end

#on_delete

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



222
223
# File 'docs/01600_Alpha_25_Battle_Engine_04000_Effects_00500_Move_Effects.rb', line 222

def on_delete
end

#on_end_turn_event(logic, scene, battlers)

Function called at the end of a turn

Parameters:



193
194
# File 'docs/01600_Alpha_25_Battle_Engine_04000_Effects_00500_Move_Effects.rb', line 193

def on_end_turn_event(logic, scene, battlers)
end

#on_switch_event(_handler, who, _with)

Function called when a Pokemon has actually switched with another one

Parameters:



207
208
# File 'docs/01600_Alpha_25_Battle_Engine_04000_Effects_00500_Move_Effects.rb', line 207

def on_switch_event(_handler, who, _with)
end

#on_switch_prevention(handler, pokemon, skill, reason) ⇒ :prevent?

Function called when testing if pokemon can switch (when he couldn’t passthrough)

Parameters:

Returns:

  • (:prevent, nil)

    if :prevent, can_switch? will return false



201
202
# File 'docs/01600_Alpha_25_Battle_Engine_04000_Effects_00500_Move_Effects.rb', line 201

def on_switch_prevention(handler, pokemon, skill, reason)
end

#rapid_spin_affected?Boolean

Function that tells if the move is affected by Rapid Spin

Returns:

  • (Boolean)


215
216
# File 'docs/01600_Alpha_25_Battle_Engine_04000_Effects_00500_Move_Effects.rb', line 215

def rapid_spin_affected?
end