Class: Battle::Move
- Includes:
- Hooks
- Defined in:
- docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb,
docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move_00001_Mechanics.rb,
docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move_00010_Definitions.rb
Overview
Generic class describing a move
Direct Known Subclasses
AbilityChanging, AbilitySwap, Absorb, Acupressure, AddThirdType, AfterYou, AquaRing, Assist, Attract, Autotomize, Basic, BatonPass, BeatUp, BellyDrum, Bestow, Camouflage, Captivate, ChangeType, Charge, ClangorousSoul, CraftyShield, Curse, Defog, DestinyBond, Disable, DoNothing, Electrify, Embargo, Encore, FinalGambit, FlowerShield, FocusEnergy, FollowMe, Foresight, FutureSight, GastroAcid, GearUp, Gravity, Grudge, HappyHour, HealBell, HealBlock, HealMove, HealingSacrifice, HelpingHand, Imprison, Ingrain, IonDeluge, LaserFocus, LeechSeed, LockOn, LuckyChant, MagicCoat, MagicRoom, MagnetRise, MagneticFlux, MeFirst, Memento, Metronome, Mimic, Minimize, MiracleEye, MirrorMove, Mist, MudSport, NaturePower, Nightmare, NoRetreat, PainSplit, PartingShot, PerishSong, Powder, Protect, PsychUp, PsychoShift, Purify, Quash, Recycle, Reflect, ReflectType, Rest, Rototiller, Safeguard, Sketch, SleepTalk, Snatch, Spikes, Spite, Splash, StatAndStageEdit, StatusStat, StealthRock, StickyWeb, Stockpile, StrengthSap, StuffCheeks, Switcheroo, Tailwind, Taunt, Teatime, Telekinesis, Teleport, TerrainMove, TopsyTurvy, Torment, ToxicSpikes, ToxicThread, TrickRoom, UTurn, VenomDrench, WeatherMove, Wish, WonderRoom, Yawn
Defined Under Namespace
Modules: Mechanics Classes: AbilityChanging, AbilitySwap, Absorb, Acrobatics, Acupressure, AddThirdType, AfterYou, AquaRing, Assist, Assurance, Attract, AuraWheel, Autotomize, Avalanche, BaddyBad, Basic, BasicWithSuccessfulEffect, BatonPass, BeakBlast, BeatUp, Belch, BellyDrum, Bestow, Bide, Bind, BodyPress, BrickBreak, Brine, BurnUp, Camouflage, CantSwitch, Captivate, ChangeType, Charge, ClangorousSoul, Conversion, Conversion2, CoreEnforcer, Counter, CounterBase, CraftyShield, Curse, CustomStatsBased, Defog, DestinyBond, Disable, DoNothing, DoubleIronBash, DragonDarts, EchoedVoice, EerieSpell, Electrify, ElectroBall, ElectroShot, Embargo, Encore, Endeavor, Entrainment, Eruption, ExpandingForce, Facade, FakeOut, FalseSwipe, Fangs, Feint, FellStinger, FinalGambit, FishiousRend, FixedDamages, Flail, FlameBurst, Fling, FloralHealing, FlowerShield, FlyingPress, FocusEnergy, FocusPunch, FollowMe, ForceSwitch, Foresight, FoulPlay, FreezyFrost, Frustration, FullCrit, FuryCutter, FusionBolt, FusionFlare, FutureSight, GastroAcid, GearUp, Geomancy, GlitzyGlow, GrassyGlide, GravApple, Gravity, Growth, Grudge, GuardSplit, GuardSwap, GyroBall, HPEqLevel, HappyHour, Haze, HealBell, HealBlock, HealMove, HealWeather, HealingSacrifice, HealingWish, HeartSwap, HeavySlam, HelpingHand, Hex, HiddenPower, HighJumpKick, HitThenCureStatus, IceBall, IceSpinner, Imprison, Incinerate, Ingrain, IonDeluge, JawLock, Judgment, JungleHealing, KnockOff, LaserFocus, LastResort, LeechSeed, LifeDew, LockOn, LowKick, LuckyChant, LunarDance, MagicCoat, MagicPowder, MagicRoom, MagnetRise, MagneticFlux, Magnitude, MakeItRain, MeFirst, Memento, MetalBurst, Metronome, Mimic, MindBlown, Minimize, MiracleEye, MirrorCoat, MirrorMove, Mist, MistyExplosion, MudSport, MultiAttack, MultiHit, NaturalGift, NaturePower, Nightmare, NoRetreat, OHKO, Octolock, PainSplit, PartingShot, PayBack, PayDay, PerishSong, PlasmaFists, Pledge, Pluck, PollenPuff, Poltergeist, Powder, PowerSplit, PowerSwap, PowerTrick, Present, Protect, PsychUp, PsychoShift, Psywave, Purify, Pursuit, Quash, Rage, RageFist, RapidSpin, RecoilMove, Recycle, Reflect, ReflectType, RelicSong, Reload, Rest, Retaliate, Return, RevelationDance, Revenge, RisingVoltage, Rollout, Roost, Rototiller, Round, SacredSword, Safeguard, SappySeed, ScaleShot, SecretPower, SelfDestruct, SelfStat, SelfStatus, ShellSideArm, ShoreUp, SimpleBeam, Sketch, SkyDrop, SleepTalk, SmackDown, SmellingSalts, Snatch, Snore, SolarBeam, SparklingAria, SparklySwirl, SpectralThief, SpeedSwap, Spikes, SpitUp, Spite, Splash, StatAndStageEdit, StatAndStageEditBypassAccuracy, StatusStat, StealthRock, SteelRoller, StickyWeb, Stockpile, Stomp, StoredPower, StrengthSap, Struggle, StuffCheeks, Substitute, SuckerPunch, SuperFang, Swallow, Switcheroo, Synchronoise, Tailwind, TarShot, Taunt, Teatime, TechnoBlast, Telekinesis, Teleport, TerrainMove, TerrainPulse, Thief, Thrash, ThreeHit, ThroatChop, Thunder, TopsyTurvy, Torment, ToxicSpikes, ToxicThread, Transform, TriAttack, TrickRoom, TripleKick, TrumpCard, TwoHit, TwoTurnBase, UTurn, UpRoar, VenomDrench, Venoshock, WakeUpSlap, WaterShuriken, WeatherBall, WeatherMove, Wish, WonderRoom, WorrySeed, WringOut, Yawn
Constant Summary collapse
- REGISTERED_MOVES =
Returns list of the registered moves.
Hash.new(Move)
- R_RANGE =
Range of the R random factor
85..100
- OneTarget =
List of symbol describe a one target aim
%i[any_other_pokemon random_foe adjacent_pokemon adjacent_foe user user_or_adjacent_ally adjacent_ally]
- TargetNoAsk =
List of symbol that doesn’t show any choice of target
%i[adjacent_all_foe all_foe adjacent_all_pokemon all_pokemon user all_ally all_ally_but_user random_foe]
Instance Attribute Summary collapse
-
#consecutive_use_count ⇒ Integer
Number of time the move was used consecutively.
-
#damage_dealt ⇒ Integer
Number of damage dealt last time the move was used (to be used with move history).
-
#effectiveness
readonly
Get the effectiveness.
-
#forced_next_move_decrease_pp ⇒ Boolean
Tell if forced next move decreases PP.
-
#id ⇒ Integer
readonly
ID of the move in the database.
- #logic ⇒ Battle::Logic readonly
- #original ⇒ Battle::Move
-
#original_launcher ⇒ PFM::PokemonBattler
Origine of the move (protected during the battle).
-
#original_target ⇒ Array<PFM::PokemonBattler>
The original target of the move (to be used with Magic Bounce/Coat).
-
#pp ⇒ Integer
Number of pp the move currently has.
-
#ppmax ⇒ Integer
readonly
Maximum number of ppg the move currently has.
- #scene ⇒ Battle::Scene readonly
-
#used ⇒ Boolean
if the move has been used.
Class Method Summary collapse
-
.[](symbol) ⇒ Class<Battle::Move>
Retrieve a registered move.
-
.register(symbol, klass)
Register a move.
-
.register_move_disabled_check_hook(reason) {|user, move| ... }
Function that registers a move_disabled_check hook.
-
.register_move_prevention_target_hook(reason) {|user, target, move| ... }
Function that registers a move_prevention_target hook.
-
.register_move_prevention_user_hook(reason) {|user, targets, move| ... }
Function that registers a move_prevention_user hook.
-
.register_move_type_change_hook(reason) {|user, target, move, type| ... }
Function that registers a move_type_change hook.
-
.register_single_type_multiplier_overwrite_hook(reason) {|target, target_type, type, move| ... }
Function that registers a single_type_multiplier_overwrite hook.
Instance Method Summary collapse
-
#accuracy ⇒ Integer
Return the current accuracy of the move.
-
#accuracy_mod(user) ⇒ Float
Return the accuracy modifier of the user.
-
#accuracy_text ⇒ String
Return the accuracy text of the skill (for the UI).
-
#atk_class ⇒ Integer
Return the class of the skill (used by the UI).
-
#authentic? ⇒ Boolean
Tell if the move is a move that can bypass Substitute.
-
#ballistics? ⇒ Boolean
Tell if the move is a ballistic move.
-
#battle_stage_mod ⇒ Array<Studio::Move::BattleStageMod>
Return the stat stage modifier the skill can apply.
-
#battler_targets(pokemon, logic) ⇒ Array<PFM::PokemonBattler>
List the targets of this move.
-
#be_method ⇒ Symbol
(also: #symbol)
Return the battle engine method of the move.
-
#bite? ⇒ Boolean
Tell if the move is biting move.
-
#blocable? ⇒ Boolean
Is the skill blocable by Protect and skill like that ?.
-
#blocked_by?(target, symbol) ⇒ Boolean
Detect if the move is protected by another move on target.
-
#bypass_chance_of_hit?(user, target) ⇒ Boolean
Check if the move bypass chance of hit and cannot fail.
-
#calc_stab(user, types) ⇒ Numeric
STAB calculation.
-
#chance_of_hit(user, target) ⇒ Float
Return the chance of hit of the move.
-
#check_specific_procedure(user, targets) ⇒ Symbol?
Check if an Effects imposes a specific proceed_internal.
-
#clone
Clone the move and give a reference to the original one.
-
#critical_hit? ⇒ Boolean
Was the move a critical hit.
-
#critical_rate ⇒ Integer
Return the critical rate index of the skill.
-
#damages(user, target) ⇒ Integer
Method calculating the damages done by the actual move.
-
#dance? ⇒ Boolean
Tell if the move is a dance move.
-
#data ⇒ Studio::Move
Return the data of the skill.
-
#db_symbol ⇒ Symbol
Return the symbol of the move in the database.
-
#deal_effect_sheer_force(user, actual_targets)
Function that deals the effect to the pokemon.
-
#definitive_types(user, target) ⇒ Array<Integer>
Get the types of the move with 1st type being affected by effects.
-
#description ⇒ String
Return the skill description.
-
#direct? ⇒ Boolean
Is the skill direct ?.
-
#disable_reason(user) ⇒ #call
Get the reason why the move is disabled.
-
#disabled?(user) ⇒ Boolean
Function that tells if the move is disabled.
-
#drain_factor ⇒ Integer
Returns the drain factor.
-
#effect_chance ⇒ Integer
Return the chance of effect of the skill.
-
#efficent_message(effectiveness, target)
Show the effectiveness message.
-
#evasion_mod(target) ⇒ Float
Return the evasion modifier of the target.
-
#force_switch? ⇒ Boolean
Tell if the move is a move that forces target switch.
-
#gravity_affected? ⇒ Boolean
Is the skill affected by gravity.
-
#heal? ⇒ Boolean
Tell if the move is a heal move.
-
#initialize(db_symbol, pp, ppmax, scene, original_launcher = nil) ⇒ Move
constructor
Create a new move.
-
#magic_coat_affected? ⇒ Boolean
Is the skill affected by magic coat ?.
-
#mental? ⇒ Boolean
Tell if the move is a mental move.
-
#mirror_move_affected? ⇒ Boolean
Is the skill affected by Mirror Move.
-
#move_blocked_by_target?(user, target) ⇒ Boolean
Function that tests if the targets blocks the move.
-
#move_usable_by_user(user, targets) ⇒ Boolean
Function that tests if the user is able to use the move.
-
#multi_hit? ⇒ Boolean
Tells if the move hits multiple times.
-
#name
Return the name of the skill.
-
#no_choice_skill? ⇒ Boolean
(also: #is_no_choice_skill?)
Does the skill doesn’t show a target choice.
-
#not_very_effective? ⇒ Boolean
Was the move not very effective ?.
-
#ohko? ⇒ Boolean
Tell if the move is an OHKO move.
-
#one_target? ⇒ Boolean
(also: #is_one_target?)
Does the skill aim only one Pokemon.
-
#one_target_from_zone_attack(user) ⇒ Boolean
Check if an attack that targets multiple people is targeting only one.
-
#physical? ⇒ Boolean
Is the skill physical ?.
-
#powder? ⇒ Boolean
Tell if the move is a powder move.
-
#power ⇒ Integer
(also: #base_power)
Return the actual base power of the move.
-
#power_text ⇒ String
Return the text of the power of the skill (for the UI).
-
#pp_text ⇒ String
Return the text of the PP of the skill.
-
#pre_attack? ⇒ Boolean
Is the move doing something before any other attack ?.
-
#priority(user = nil) ⇒ Integer
Return the priority of the skill.
-
#proceed(user, target_bank, target_position)
Function starting the move procedure.
-
#proceed_internal_dancer(user, targets)
Internal procedure of the move.
-
#proceed_internal_parental_bond(user, targets)
Internal procedure of the move for Parental Bond Ability.
-
#proceed_internal_sheer_force(user, targets)
Internal procedure of the move for Sheer Force Ability.
-
#proceed_pre_attack(user)
Proceed the procedure before any other attack.
-
#pulse? ⇒ Boolean
Tell if the move is a pulse move.
-
#punching? ⇒ Boolean
Is the skill a punching move ?.
-
#real_base_power(user, target) ⇒ Integer
Get the real base power of the move (taking in account all parameter).
-
#recoil? ⇒ Boolean
Does the skill has recoil ?.
-
#recoil_factor ⇒ Integer
Returns the recoil factor.
-
#relative_priority
Move priority.
-
#self_user_switch? ⇒ Boolean
Tell if the move is a move that switch the user if that hit.
-
#show_usage_failure(user)
Show the usage failure when move is not usable by user.
-
#slicing_attack? ⇒ Boolean
Is the skill a slicing attack ?.
-
#snatchable? ⇒ Boolean
Is the skill snatchable ?.
-
#sound_attack? ⇒ Boolean
Is the skill a sound attack ?.
-
#special? ⇒ Boolean
Is the skill special ?.
-
#status? ⇒ Boolean
Is the skill status ?.
-
#status_effects ⇒ Array<Studio::Move::MoveStatus>
Get all the status effect of a move.
-
#super_effective? ⇒ Boolean
Was the move super effective ?.
-
#target ⇒ Symbol
Return the target symbol the skill can aim.
-
#to_s ⇒ String
(also: #inspect)
Format move for logging purpose.
-
#trigger_king_rock? ⇒ Boolean
Does the skill trigger the king rock.
-
#two_turn? ⇒ Boolean
Tell if the move is a two turn move.
-
#type ⇒ Integer
Return the current type of the move.
-
#type?(type_id) ⇒ Boolean
Is the skill a specific type ?.
-
#type_dark? ⇒ Boolean
(also: #type_tenebre?)
Is the skill type dark ?.
-
#type_dragon? ⇒ Boolean
Is the skill type dragon ?.
-
#type_electric? ⇒ Boolean
(also: #type_electrique?)
Is the skill type electric ?.
-
#type_fairy? ⇒ Boolean
(also: #type_fee?)
Is the skill type fairy ?.
-
#type_fighting? ⇒ Boolean
(also: #type_combat?)
Is the skill type fighting ?.
-
#type_fire? ⇒ Boolean
(also: #type_feu?)
Is the skill type fire ?.
-
#type_flying? ⇒ Boolean
(also: #type_vol?, #type_fly?)
Is the skill type fly ?.
-
#type_ghost? ⇒ Boolean
(also: #type_spectre?)
Is the skill type ghost ?.
-
#type_grass? ⇒ Boolean
(also: #type_plante?)
Is the skill type grass ?.
-
#type_ground? ⇒ Boolean
(also: #type_sol?)
Is the skill type ground ?.
-
#type_ice? ⇒ Boolean
(also: #type_glace?)
Is the skill type ice ?.
-
#type_insect? ⇒ Boolean
(also: #type_bug?)
Is the skill type insect/bug ?.
-
#type_modifier(user, target) ⇒ Float
Function that calculate the type modifier (for specific uses).
-
#type_normal? ⇒ Boolean
Is the skill type normal ?.
-
#type_poison? ⇒ Boolean
Is the skill type poison ?.
-
#type_psychic? ⇒ Boolean
(also: #type_psy?)
Is the skill type psy ?.
-
#type_rock? ⇒ Boolean
(also: #type_roche?)
Is the skill type rock ?.
-
#type_steel? ⇒ Boolean
(also: #type_acier?)
Is the skill type steel ?.
-
#type_water? ⇒ Boolean
(also: #type_eau?)
Is the skill type water ?.
-
#typeless? ⇒ Boolean
Is the skill typeless ?.
-
#unfreeze? ⇒ Boolean
Does the skill unfreeze.
-
#wind_attack? ⇒ Boolean
Is the skill a wind attack ?.
Methods included from Hooks
#exec_hooks, #force_return, included, remove, remove_without_name
Constructor Details
#initialize(db_symbol, pp, ppmax, scene, original_launcher = nil) ⇒ Move
Create a new move
43 44 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 43 def initialize(db_symbol, pp, ppmax, scene, original_launcher = nil) end |
Instance Attribute Details
#consecutive_use_count ⇒ Integer
Number of time the move was used consecutively
21 22 23 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 21 def consecutive_use_count @consecutive_use_count end |
#damage_dealt ⇒ Integer
Number of damage dealt last time the move was used (to be used with move history)
30 31 32 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 30 def damage_dealt @damage_dealt end |
#effectiveness (readonly)
Get the effectiveness
275 276 277 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 275 def effectiveness @effectiveness end |
#forced_next_move_decrease_pp ⇒ Boolean
Tell if forced next move decreases PP
625 626 627 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 625 def forced_next_move_decrease_pp @forced_next_move_decrease_pp end |
#id ⇒ Integer (readonly)
ID of the move in the database
9 10 11 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 9 def id @id end |
#logic ⇒ Battle::Logic (readonly)
23 24 25 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 23 def logic @logic end |
#original ⇒ Battle::Move
27 28 29 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 27 def original @original end |
#original_launcher ⇒ PFM::PokemonBattler
Origine of the move (protected during the battle)
36 37 38 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 36 def original_launcher @original_launcher end |
#original_target ⇒ Array<PFM::PokemonBattler>
The original target of the move (to be used with Magic Bounce/Coat)
33 34 35 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 33 def original_target @original_target end |
#pp ⇒ Integer
Number of pp the move currently has
12 13 14 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 12 def pp @pp end |
#ppmax ⇒ Integer (readonly)
Maximum number of ppg the move currently has
15 16 17 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 15 def ppmax @ppmax end |
#scene ⇒ Battle::Scene (readonly)
25 26 27 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 25 def scene @scene end |
#used ⇒ Boolean
if the move has been used
18 19 20 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 18 def used @used end |
Class Method Details
.[](symbol) ⇒ Class<Battle::Move>
Retrieve a registered move
280 281 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 280 def [](symbol) end |
.register(symbol, klass)
Register a move
285 286 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 285 def register(symbol, klass) end |
.register_move_disabled_check_hook(reason) {|user, move| ... }
Function that registers a move_disabled_check hook
869 870 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 869 def register_move_disabled_check_hook(reason) end |
.register_move_prevention_target_hook(reason) {|user, target, move| ... }
Function that registers a move_prevention_target hook
877 878 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 877 def register_move_prevention_target_hook(reason) end |
.register_move_prevention_user_hook(reason) {|user, targets, move| ... }
Function that registers a move_prevention_user hook
862 863 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 862 def register_move_prevention_user_hook(reason) end |
.register_move_type_change_hook(reason) {|user, target, move, type| ... }
Function that registers a move_type_change hook
530 531 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 530 def register_move_type_change_hook(reason) end |
.register_single_type_multiplier_overwrite_hook(reason) {|target, target_type, type, move| ... }
Function that registers a single_type_multiplier_overwrite hook
539 540 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 539 def register_single_type_multiplier_overwrite_hook(reason) end |
Instance Method Details
#accuracy ⇒ Integer
Return the current accuracy of the move
88 89 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 88 def accuracy end |
#accuracy_mod(user) ⇒ Float
Return the accuracy modifier of the user
587 588 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 587 def accuracy_mod(user) end |
#accuracy_text ⇒ String
Return the accuracy text of the skill (for the UI)
92 93 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 92 def accuracy_text end |
#atk_class ⇒ Integer
Return the class of the skill (used by the UI)
200 201 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 200 def atk_class end |
#authentic? ⇒ Boolean
Tell if the move is a move that can bypass Substitute
252 253 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 252 def authentic? end |
#ballistics? ⇒ Boolean
Tell if the move is a ballistic move
224 225 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 224 def ballistics? end |
#battle_stage_mod ⇒ Array<Studio::Move::BattleStageMod>
Return the stat stage modifier the skill can apply
124 125 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 124 def battle_stage_mod end |
#battler_targets(pokemon, logic) ⇒ Array<PFM::PokemonBattler>
use one_target? to select the target inside the possible result
List the targets of this move
620 621 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 620 def battler_targets(pokemon, logic) end |
#be_method ⇒ Symbol Also known as: symbol
Return the battle engine method of the move
66 67 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 66 def be_method end |
#bite? ⇒ Boolean
Tell if the move is biting move
228 229 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 228 def bite? end |
#blocable? ⇒ Boolean
Is the skill blocable by Protect and skill like that ?
140 141 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 140 def blocable? end |
#blocked_by?(target, symbol) ⇒ Boolean
Detect if the move is protected by another move on target
853 854 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 853 def blocked_by?(target, symbol) end |
#bypass_chance_of_hit?(user, target) ⇒ Boolean
Check if the move bypass chance of hit and cannot fail
582 583 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 582 def bypass_chance_of_hit?(user, target) end |
#calc_stab(user, types) ⇒ Numeric
STAB calculation
499 500 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 499 def calc_stab(user, types) end |
#chance_of_hit(user, target) ⇒ Float
Return the chance of hit of the move
576 577 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 576 def chance_of_hit(user, target) end |
#check_specific_procedure(user, targets) ⇒ Symbol?
Check if an Effects imposes a specific proceed_internal
803 804 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 803 def check_specific_procedure(user, targets) end |
#clone
Clone the move and give a reference to the original one
51 52 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 51 def clone end |
#critical_hit? ⇒ Boolean
Was the move a critical hit
212 213 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 212 def critical_hit? end |
#critical_rate ⇒ Integer
Return the critical rate index of the skill
116 117 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 116 def critical_rate end |
#damages(user, target) ⇒ Integer
: I used the 4th Gen formula : www.smogon.com/dp/articles/damage_formula
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
298 299 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 298 def damages(user, target) end |
#dance? ⇒ Boolean
Tell if the move is a dance move
232 233 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 232 def dance? end |
#data ⇒ Studio::Move
Return the data of the skill
55 56 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 55 def data end |
#db_symbol ⇒ Symbol
Return the symbol of the move in the database
204 205 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 204 def db_symbol end |
#deal_effect_sheer_force(user, actual_targets)
Function that deals the effect to the pokemon
818 819 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 818 def deal_effect_sheer_force(user, actual_targets) end |
#definitive_types(user, target) ⇒ Array<Integer>
Get the types of the move with 1st type being affected by effects
505 506 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 505 def definitive_types(user, target) end |
#description ⇒ String
Return the skill description
62 63 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 62 def description end |
#direct? ⇒ Boolean
Is the skill direct ?
128 129 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 128 def direct? end |
#disable_reason(user) ⇒ #call
Get the reason why the move is disabled
841 842 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 841 def disable_reason(user) end |
#disabled?(user) ⇒ Boolean
Function that tells if the move is disabled
836 837 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 836 def disabled?(user) end |
#drain_factor ⇒ Integer
Returns the drain factor
152 153 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 152 def drain_factor end |
#effect_chance ⇒ Integer
Return the chance of effect of the skill
104 105 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 104 def effect_chance end |
#efficent_message(effectiveness, target)
Show the effectiveness message
629 630 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 629 def (effectiveness, target) end |
#evasion_mod(target) ⇒ Float
Return the evasion modifier of the target
592 593 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 592 def evasion_mod(target) end |
#force_switch? ⇒ Boolean
Tell if the move is a move that forces target switch
264 265 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 264 def force_switch? end |
#gravity_affected? ⇒ Boolean
Is the skill affected by gravity
120 121 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 120 def gravity_affected? end |
#heal? ⇒ Boolean
Tell if the move is a heal move
240 241 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 240 def heal? end |
#magic_coat_affected? ⇒ Boolean
Is the skill affected by magic coat ?
184 185 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 184 def magic_coat_affected? end |
#mental? ⇒ Boolean
Tell if the move is a mental move
132 133 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 132 def mental? end |
#mirror_move_affected? ⇒ Boolean
Is the skill affected by Mirror Move
136 137 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 136 def mirror_move_affected? end |
#move_blocked_by_target?(user, target) ⇒ Boolean
Thing that prevents the move from being used should be defined by :move_prevention_target Hook.
Function that tests if the targets blocks the move
848 849 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 848 def move_blocked_by_target?(user, target) end |
#move_usable_by_user(user, targets) ⇒ Boolean
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
831 832 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 831 def move_usable_by_user(user, targets) end |
#multi_hit? ⇒ Boolean
Tells if the move hits multiple times
272 273 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 272 def multi_hit? end |
#name
Return the name of the skill
58 59 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 58 def name end |
#no_choice_skill? ⇒ Boolean Also known as: is_no_choice_skill?
Does the skill doesn’t show a target choice
611 612 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 611 def no_choice_skill? end |
#not_very_effective? ⇒ Boolean
Was the move not very effective ?
220 221 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 220 def not_very_effective? end |
#ohko? ⇒ Boolean
Tell if the move is an OHKO move
256 257 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 256 def ohko? end |
#one_target? ⇒ Boolean Also known as: is_one_target?
Does the skill aim only one Pokemon
601 602 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 601 def one_target? end |
#one_target_from_zone_attack(user) ⇒ Boolean
Check if an attack that targets multiple people is targeting only one
607 608 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 607 def one_target_from_zone_attack(user) end |
#physical? ⇒ Boolean
Is the skill physical ?
188 189 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 188 def physical? end |
#powder? ⇒ Boolean
Tell if the move is a powder move
248 249 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 248 def powder? end |
#power ⇒ Integer Also known as: base_power
Return the actual base power of the move
75 76 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 75 def power end |
#power_text ⇒ String
Return the text of the power of the skill (for the UI)
80 81 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 80 def power_text end |
#pp_text ⇒ String
Return the text of the PP of the skill
71 72 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 71 def pp_text end |
#pre_attack? ⇒ Boolean
Is the move doing something before any other attack ?
268 269 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 268 def pre_attack? end |
#priority(user = nil) ⇒ Integer
Return the priority of the skill
97 98 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 97 def priority(user = nil) end |
#proceed(user, target_bank, target_position)
Function starting the move procedure
639 640 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 639 def proceed(user, target_bank, target_position) end |
#proceed_internal_dancer(user, targets)
Internal procedure of the move
823 824 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 823 def proceed_internal_dancer(user, targets) end |
#proceed_internal_parental_bond(user, targets)
Internal procedure of the move for Parental Bond Ability
808 809 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 808 def proceed_internal_parental_bond(user, targets) end |
#proceed_internal_sheer_force(user, targets)
Internal procedure of the move for Sheer Force Ability
813 814 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 813 def proceed_internal_sheer_force(user, targets) end |
#proceed_pre_attack(user)
Proceed the procedure before any other attack.
643 644 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 643 def proceed_pre_attack(user) end |
#pulse? ⇒ Boolean
Tell if the move is a pulse move
236 237 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 236 def pulse? end |
#punching? ⇒ Boolean
Is the skill a punching move ?
156 157 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 156 def punching? end |
#real_base_power(user, target) ⇒ Integer
Get the real base power of the move (taking in account all parameter)
304 305 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 304 def real_base_power(user, target) end |
#recoil? ⇒ Boolean
Does the skill has recoil ?
144 145 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 144 def recoil? end |
#recoil_factor ⇒ Integer
Returns the recoil factor
148 149 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 148 def recoil_factor end |
#relative_priority
Move priority
100 101 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 100 def relative_priority end |
#self_user_switch? ⇒ Boolean
Tell if the move is a move that switch the user if that hit
260 261 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 260 def self_user_switch? end |
#show_usage_failure(user)
Show the usage failure when move is not usable by user
633 634 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 633 def show_usage_failure(user) end |
#slicing_attack? ⇒ Boolean
Is the skill a slicing attack ?
164 165 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 164 def slicing_attack? end |
#snatchable? ⇒ Boolean
Is the skill snatchable ?
180 181 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 180 def snatchable? end |
#sound_attack? ⇒ Boolean
Is the skill a sound attack ?
160 161 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 160 def sound_attack? end |
#special? ⇒ Boolean
Is the skill special ?
192 193 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 192 def special? end |
#status? ⇒ Boolean
Is the skill status ?
196 197 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 196 def status? end |
#status_effects ⇒ Array<Studio::Move::MoveStatus>
Get all the status effect of a move
108 109 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 108 def status_effects end |
#super_effective? ⇒ Boolean
Was the move super effective ?
216 217 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 216 def super_effective? end |
#target ⇒ Symbol
Return the target symbol the skill can aim
112 113 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 112 def target end |
#to_s ⇒ String Also known as: inspect
Format move for logging purpose
47 48 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 47 def to_s end |
#trigger_king_rock? ⇒ Boolean
Does the skill trigger the king rock
176 177 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 176 def trigger_king_rock? end |
#two_turn? ⇒ Boolean
Tell if the move is a two turn move
244 245 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 244 def two_turn? end |
#type ⇒ Integer
Return the current type of the move
84 85 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 84 def type end |
#type?(type_id) ⇒ Boolean
Is the skill a specific type ?
394 395 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 394 def type?(type_id) end |
#type_dark? ⇒ Boolean Also known as: type_tenebre?
Is the skill type dark ?
480 481 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 480 def type_dark? end |
#type_dragon? ⇒ Boolean
Is the skill type dragon ?
471 472 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 471 def type_dragon? end |
#type_electric? ⇒ Boolean Also known as: type_electrique?
Is the skill type electric ?
416 417 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 416 def type_electric? end |
#type_fairy? ⇒ Boolean Also known as: type_fee?
Is the skill type fairy ?
485 486 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 485 def type_fairy? end |
#type_fighting? ⇒ Boolean Also known as: type_combat?
Is the skill type fighting ?
431 432 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 431 def type_fighting? end |
#type_fire? ⇒ Boolean Also known as: type_feu?
Is the skill type fire ?
406 407 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 406 def type_fire? end |
#type_flying? ⇒ Boolean Also known as: type_vol?, type_fly?
Is the skill type fly ?
445 446 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 445 def end |
#type_ghost? ⇒ Boolean Also known as: type_spectre?
Is the skill type ghost ?
466 467 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 466 def type_ghost? end |
#type_grass? ⇒ Boolean Also known as: type_plante?
Is the skill type grass ?
421 422 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 421 def type_grass? end |
#type_ground? ⇒ Boolean Also known as: type_sol?
Is the skill type ground ?
440 441 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 440 def type_ground? end |
#type_ice? ⇒ Boolean Also known as: type_glace?
Is the skill type ice ?
426 427 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 426 def type_ice? end |
#type_insect? ⇒ Boolean Also known as: type_bug?
Is the skill type insect/bug ?
456 457 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 456 def type_insect? end |
#type_modifier(user, target) ⇒ Float
Function that calculate the type modifier (for specific uses)
493 494 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 493 def type_modifier(user, target) end |
#type_normal? ⇒ Boolean
Is the skill type normal ?
402 403 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 402 def type_normal? end |
#type_poison? ⇒ Boolean
Is the skill type poison ?
436 437 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 436 def type_poison? end |
#type_psychic? ⇒ Boolean Also known as: type_psy?
Is the skill type psy ?
451 452 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 451 def type_psychic? end |
#type_rock? ⇒ Boolean Also known as: type_roche?
Is the skill type rock ?
461 462 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 461 def type_rock? end |
#type_steel? ⇒ Boolean Also known as: type_acier?
Is the skill type steel ?
475 476 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 475 def type_steel? end |
#type_water? ⇒ Boolean Also known as: type_eau?
Is the skill type water ?
411 412 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 411 def type_water? end |
#typeless? ⇒ Boolean
Is the skill typeless ?
398 399 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 398 def typeless? end |
#unfreeze? ⇒ Boolean
Does the skill unfreeze
168 169 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 168 def unfreeze? end |
#wind_attack? ⇒ Boolean
Is the skill a wind attack ?
172 173 |
# File 'docs/01600_Alpha_25_Battle_Engine_04150_Battle_Move.rb', line 172 def wind_attack? end |