Class: Battle::Effects::Item::Gems

Inherits:
Item
  • Object
show all
Defined in:
docs/5_Battle_06_Effects_05_Item_Effects.rb

Overview

Class describing Gems item effects

Constant Summary collapse

CONDITIONS =

List of conditions to yield the base power multiplier

{}
MULTIPLIERS =

List of multiplier if conditions are met

Hash.new(1.3)

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

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

Register an item with base power multiplier only

Parameters:

  • db_symbol (Symbol) —

    db_symbol of the item

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

    multiplier if condition met

  • klass (Class<BasePowerMultiplier>) (defaults to: Gems) —

    klass to instanciate

  • block (Proc) —

    condition to verify

Yield Parameters:

Yield Returns:

  • (Boolean)


137
138
# File 'docs/5_Battle_06_Effects_05_Item_Effects.rb', line 137

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

Instance Method Details

#mod3_multiplier(user, target, move) ⇒ Float, Integer

Give the move mod3 mutiplier (after everything)

Parameters:

Returns:

  • (Float, Integer) —

    multiplier



118
119
# File 'docs/5_Battle_06_Effects_05_Item_Effects.rb', line 118

def mod3_multiplier(user, target, move)
end

#on_pre_accuracy_check(logic, scene, targets, launcher, skill)

Function called before the accuracy check of a move is done

Parameters:



111
112
# File 'docs/5_Battle_06_Effects_05_Item_Effects.rb', line 111

def on_pre_accuracy_check(logic, scene, targets, launcher, skill)
end