Class: Battle::Move::AuraWheel

Inherits:
SelfStat show all
Defined in:
docs/5_Battle_10_Move.rb

Overview

Class describing the Aura Wheel move

Constant Summary collapse

VALID_USER =

Hash containing each valid user and the move's type depending on the form

Returns:

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SelfStat

#deal_stats

Methods inherited from Basic

#deal_damage, #effect_working?

Class Method Details

.register_valid_user(creature_db_symbol, *forms_and_types, default: nil)

Register a valid user for this move This will let Pikachu use the move, its form 0 will make the move Electrik type, form 1 Psychic type, its form 2 Fire type and any other form will have Electrik type by default

Examples:

: register_valid_user(:pikachu, [0, :electrik], [1, :psychic], [2, :fire], default: :electrik)

Parameters:

  • creature_db_symbol (Symbol) —

    db_symbol of the new valid user

  • forms_and_types (Array<Array>) —

    the array containing the informations

  • default (Symbol) (defaults to: nil) —

    db_symbol of the type by default for this user



1888
1889
# File 'docs/5_Battle_10_Move.rb', line 1888

def register_valid_user(creature_db_symbol, *forms_and_types, default: nil)
end

Instance Method Details

#definitive_types(user, target) ⇒ Array<Integer>

Get the types of the move with 1st type being affected by effects

Parameters:

Returns:

  • (Array<Integer>) —

    list of types of the move



1878
1879
# File 'docs/5_Battle_10_Move.rb', line 1878

def definitive_types(user, target)
end

#move_usable_by_user(user, targets) ⇒ Boolean

Note:

Thing that prevents the move from being used should be defined by :move_prevention_user Hook

Function that tests if the user is able to use the move

Parameters:

Returns:

  • (Boolean) —

    if the procedure can continue



1872
1873
# File 'docs/5_Battle_10_Move.rb', line 1872

def move_usable_by_user(user, targets)
end