Class: Battle::Move::ShellSideArm

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

Constant Summary

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

Instance Method Summary collapse

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, #dance?, #data, #db_symbol, #definitive_types, #description, #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?, #move_usable_by_user, #multi_hit?, #name, #no_choice_skill?, #not_very_effective?, #ohko?, #one_target?, #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?, #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

Instance Method Details

#damages(user, target) ⇒ Integer

Note:

: I used the 4th Gen formula : www.smogon.com/dp/articles/damage_formula

Note:

The formula is the following: (((((((Level * 2 / 5) + 2) * BasePower * [Sp]Atk / 50) / [Sp]Def) * Mod1) + 2) *

CH * Mod2 * R / 100) * STAB * Type1 * Type2 * Mod3)

Method calculating the damages done by the actual move

Parameters:

Returns:

  • (Integer)


12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 ShellSideArm.rb', line 12

def damages(user, target)
  @physical = true
  @special = false
  physical_hp = super

  @physical = false
  @special = true
  special_hp = super

  if physical_hp > special_hp
    @physical = true
    @special = false
    return physical_hp
  else
    return special_hp
  end
end

#direct?Boolean

Is the skill direct ?

Returns:

  • (Boolean)


44
45
46
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 ShellSideArm.rb', line 44

def direct?
  return @physical
end

#physical?Boolean

Is the skill physical ?

Returns:

  • (Boolean)


32
33
34
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 ShellSideArm.rb', line 32

def physical?
  return @physical
end

#special?Boolean

Is the skill special ?

Returns:

  • (Boolean)


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

def special?
  return @special
end