Class: Battle::Move::AuraWheel

Inherits:
SelfStat show all
Defined in:
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 AuraWheel.rb

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

Constants inherited from Battle::Move

OneTarget, REGISTERED_MOVES, R_RANGE, TargetNoAsk

Instance Attribute Summary

Attributes inherited from Battle::Move

#consecutive_use_count, #damage_dealt, #effectiveness, #forced_next_move_decrease_pp, #id, #logic, #original, #pp, #ppmax, #scene, #used

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SelfStat

#deal_stats

Methods inherited from Basic

#deal_damage, #effect_working?

Methods inherited from Battle::Move

[], #accuracy, #accuracy_mod, #accuracy_text, #atk_class, #authentic?, #ballistics?, #battle_stage_mod, #battler_targets, #be_method, #bite?, #blocable?, #blocked_by?, #bypass_chance_of_hit?, #calc_stab, #chance_of_hit, #check_specific_procedure, #clone, #critical_hit?, #critical_rate, #damages, #dance?, #data, #db_symbol, #description, #direct?, #disable_reason, #disabled?, #drain_factor, #effect_chance, #efficent_message, #evasion_mod, #force_switch?, #gravity_affected?, #heal?, #initialize, #magic_coat_affected?, #mirror_move_affected?, #move_blocked_by_target?, #multi_hit?, #name, #no_choice_skill?, #not_very_effective?, #ohko?, #one_target?, #physical?, #powder?, #power, #power_text, #pp_text, #pre_attack?, #priority, #proceed, #proceed_internal_parental_bond, #proceed_pre_attack, #pulse?, #punching?, #real_base_power, #recoil?, #recoil_factor, register, register_move_disabled_check_hook, register_move_prevention_target_hook, register_move_prevention_user_hook, register_move_type_change_hook, register_single_type_multiplier_overwrite_hook, #relative_priority, #self_user_switch?, #slicing_attack?, #snatchable?, #sound_attack?, #special?, #status?, #status_effects, #super_effective?, #target, #to_s, #trigger_king_rock?, #type, #type?, #type_dark?, #type_dragon?, #type_electric?, #type_fairy?, #type_fighting?, #type_fire?, #type_flying?, #type_ghost?, #type_grass?, #type_ground?, #type_ice?, #type_insect?, #type_modifier, #type_normal?, #type_poison?, #type_psychic?, #type_rock?, #type_steel?, #type_water?, #typeless?, #unfreeze?, #wind_attack?

Methods included from Hooks

#exec_hooks, #force_return, included, register, remove, remove_without_name

Constructor Details

This class inherits a constructor from Battle::Move

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



36
37
38
39
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 AuraWheel.rb', line 36

def register_valid_user(creature_db_symbol, *forms_and_types, default: nil)
  VALID_USER[creature_db_symbol] = forms_and_types.to_h
  VALID_USER[creature_db_symbol].default = default || forms_and_types.to_h.first[1]
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



24
25
26
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 AuraWheel.rb', line 24

def definitive_types(user, target)
  return [data_type(VALID_USER[user.db_symbol][user.form]).id]
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



13
14
15
16
17
18
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 AuraWheel.rb', line 13

def move_usable_by_user(user, targets)
  return false unless super
  return show_usage_failure(user) && false unless VALID_USER[user.db_symbol]

  return true
end