Class: Battle::Effects::Ability::BoostingMoveType

Inherits:
Ability
  • Object
show all
Defined in:
docs/5_Battle_06_Effects_04_Ability_Effects.rb

Overview

Class describing the Boosting Move Type ability effect

Direct Known Subclasses

ChangingMoveType

Constant Summary collapse

POWER_INCREASE_CONDITION =

Initial condition to give the power increase

Returns:

  • (Hash{Symbol => Proc})
Hash.new(proc {true })
TYPE_CONDITION =

Type condition to give the power increase

Returns:

  • (Hash{Symbol => Symbol})
Hash.new(:normal)
POWER_INCREASE =

Power increase if all condition are met

Returns:

  • (Hash{Symbol => Float})
Hash.new(1.5)

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

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

Register a BoostingMoveType ability

Parameters:

  • db_symbol (Symbol) —

    db_symbol of the ability

  • type (Symbol) —

    move type getting power increase

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

    multiplier if all condition are meet

  • block (Proc) —

    additional condition

Yield Parameters:

Yield Returns:

  • (Boolean)


63
64
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 63

def register(db_symbol, type, multiplier = nil, &block)
end

Instance Method Details

#base_power_multiplier(user, target, move) ⇒ Float

Get the base power multiplier of this move

Parameters:

Returns:

  • (Float)


51
52
# File 'docs/5_Battle_06_Effects_04_Ability_Effects.rb', line 51

def base_power_multiplier(user, target, move)
end