Class: Battle::Effects::Ability::ChangingMoveType

Inherits:
BoostingMoveType show all
Defined in:
docs/5_Battle_06_Effects_04_Ability_Effects.rb

Overview

Class describing the Changing Move Type ability effect

Constant Summary collapse

TYPES_OVERWRITES =

List of type overwrite

Hash.new(:normal)

Constants inherited from BoostingMoveType

BoostingMoveType::POWER_INCREASE, BoostingMoveType::POWER_INCREASE_CONDITION, BoostingMoveType::TYPE_CONDITION

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BoostingMoveType

#base_power_multiplier

Class Method Details

.register(db_symbol, type_overwrite, multiplier = 1.3, &block) {|user, target, move| ... }

Register a ChangingMoveType ability

Parameters:

  • db_symbol (Symbol) —

    db_symbol of the ability

  • type_overwrite (Symbol) —

    move type overwrite for weather_ball

  • multiplier (Float) (defaults to: 1.3) —

    multiplier if all condition are meet

  • block (Proc) —

    additional condition

Yield Parameters:

Yield Returns:

  • (Boolean)


377
378
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 377

def register(db_symbol, type_overwrite, multiplier = 1.3, &block)
end

Instance Method Details

#on_move_type_change(user, target, move, type) ⇒ Integer?

Function called when we try to get the definitive type of a move

Parameters:

Returns:

  • (Integer, nil) —

    new type of the move



365
366
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 365

def on_move_type_change(user, target, move, type)
end