Class: Battle::Move

Inherits:
Object show all
Includes:
Hooks
Defined in:
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00110 Target.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00120 Procedure.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00101 Damage_Calc.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00104 Chance of Hit.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00103 Type_Processing.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00121 Move Prevention.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00001 Mechanics/00101 Self.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00001 Mechanics/00105 Heal.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00001 Mechanics/00100 Basic.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Hex.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00001 Mechanics/00130 Pledge.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Bide.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Bind.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Haze.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Mist.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 OHKO.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Rage.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Rest.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Wish.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Yawn.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00001 Mechanics/00050 Counter.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00001 Mechanics/00050 TwoTurn.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Belch.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Brine.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Curse.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Defog.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Fangs.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Feint.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Flail.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Fling.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Mimic.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Pluck.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Quash.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Roost.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Round.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Snore.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Spite.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Stomp.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Taunt.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Thief.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 UTurn.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Absorb.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Assist.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 BeatUp.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Bestow.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Charge.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Encore.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Facade.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Growth.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Grudge.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 LockOn.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Payday.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Powder.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Reload.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Return.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Sketch.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Snatch.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Spikes.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 SpitUp.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Splash.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Thrash.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 UpRoar.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00001 Mechanics/00050 ItemBased.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Attract.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Disable.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Embargo.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 FakeOut.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Gravity.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Ingrain.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 LowKick.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Memento.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 PayBack.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Present.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Protect.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 PsychUp.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Psywave.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Pursuit.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Recycle.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Revenge.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Rollout.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 SkyDrop.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Swallow.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Thunder.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 AquaRing.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Endeavor.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Eruption.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 FollowMe.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 FoulPlay.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 FullCrit.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Geomancy.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 GyroBall.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 HealBell.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Imprison.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Judgment.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 KnockOff.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Me First.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Minimize.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 MudSport.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Tailwind.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Teleport.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 WringOut.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00001 Mechanics/00102 Status Stat.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00001 Mechanics/00110 TwoTurnBase.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 After you.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Avalanche.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 BatonPass.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 BellyDrum.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Captivate.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Electrify.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Foresight.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 HPEqLevel.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 HappyHour.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 HealBlock.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 HeavySlam.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 LeechSeed.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 MagicCoat.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 MagicRoom.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Magnitude.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Metronome.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Nightmare.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 PainSplit.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 RapidSpin.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 RelicSong.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Retaliate.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Safeguard.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 SleepTalk.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 SmackDown.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 SolarBeam.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 StickyWeb.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Stockpile.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 SuperFang.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Transform.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 TriAttack.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 TrickRoom.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 TrumpCard.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Venoshock.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Acrobatics.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Autotomize.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 BrickBreak.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Camouflage.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 CantSwitch.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 ChangeType.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Conversion.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 FalseSwipe.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 FlameBurst.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 FocusPunch.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 FuryCutter.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 GastroAcid.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Incinerate.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Ion Deluge.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 LastResort.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 LuckyChant.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 MagnetRise.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 MiracleEye.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 MirrorMove.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 PerishSong.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 PowerTrick.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 RecoilMove.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Rototiller.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Substitute.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Switcheroo.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 TopsyTurvy.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 WonderRoom.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00001 Mechanics/00050 LocationBased.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Acupressure.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 DestinyBond.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 EchoedVoice.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 ElectroBall.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 FellStinger.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 FinalGambit.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 FlyingPress.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 FocusEnergy.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 ForceSwitch.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Frustration.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 FutureSight.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 HealWeather.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 HelpingHand.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 HiddenPower.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 NaturalGift.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 NaturePower.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 PartingShot.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 PsychoShift.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 ReflectType.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 SacredSword.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 SecretPower.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 StealthRock.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 StoredPower.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 SuckerPunch.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 TechnoBlast.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Telekinesis.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 TerrainMove.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 VenomDrench.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 WeatherBall.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 WeatherMove.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 AddThirdType.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 CraftyShield.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 FixedDamages.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 FlowerShield.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 HighJumpKick.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 MagneticFlux.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 SelfDestruct.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Synchronoise.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Toxic_Spikes.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00001 Mechanics/00103 TwoHit MultiHit.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Counter moves.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00001 Mechanics/00120 StatAndStageEdit.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 AbilityChanging.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 HealingSacrifice.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 HitThenCureStatus.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Stages swap moves.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 Stages split moves.rb,
scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00010 Definitions/00300 LightScreen Reflect.rb

Overview

Generic class describing a move

Defined Under Namespace

Modules: Mechanics Classes: AbilityChanging, AbilitySwap, Absorb, Acrobatics, Acupressure, AddThirdType, AfterYou, AquaRing, Assist, Attract, Autotomize, Avalanche, Basic, BasicWithSuccessfulEffect, BatonPass, BeatUp, Belch, BellyDrum, Bestow, Bide, Bind, BrickBreak, Brine, Camouflage, CantSwitch, Captivate, ChangeType, Charge, Conversion, Conversion2, Counter, CraftyShield, Curse, Defog, DestinyBond, Disable, DoNothing, EchoedVoice, Electrify, ElectroBall, Embargo, Encore, Endeavor, Entrainment, Eruption, Facade, FakeOut, FalseSwipe, Fangs, Feint, FellStinger, FinalGambit, FixedDamages, Flail, FlameBurst, Fling, FlowerShield, FlyingPress, FocusEnergy, FocusPunch, FollowMe, ForceSwitch, Foresight, FoulPlay, Frustration, FullCrit, FuryCutter, FutureSight, GastroAcid, Geomancy, Gravity, Growth, Grudge, GuardSplit, GuardSwap, GyroBall, HPEqLevel, HappyHour, Haze, HealBell, HealBlock, HealMove, HealWeather, HealingSacrifice, HealingWish, HeartSwap, HeavySlam, HelpingHand, Hex, HiddenPower, HighJumpKick, HitThenCureStatus, IceBall, Imprison, Incinerate, Ingrain, IonDeluge, Judgment, KnockOff, LastResort, LeechSeed, LockOn, LowKick, LuckyChant, LunarDance, MagicCoat, MagicRoom, MagnetRise, MagneticFlux, Magnitude, MeFirst, Memento, MetalBurst, Metronome, Mimic, Minimize, MiracleEye, MirrorCoat, MirrorMove, Mist, MudSport, MultiHit, NaturalGift, NaturePower, Nightmare, OHKO, PainSplit, PartingShot, PayBack, PayDay, PerishSong, Pledge, Pluck, Powder, PowerSplit, PowerSwap, PowerTrick, Present, Protect, PsychUp, PsychoShift, Psywave, Pursuit, Quash, Rage, RapidSpin, RecoilMove, Recycle, Reflect, ReflectType, RelicSong, Reload, Rest, Retaliate, Return, Revenge, Rollout, Roost, Rototiller, Round, SacredSword, Safeguard, SecretPower, SelfDestruct, SelfStat, SelfStatus, SimpleBeam, Sketch, SkyDrop, SleepTalk, SmackDown, SmellingSalts, Snatch, Snore, SolarBeam, Spikes, SpitUp, Spite, Splash, StatAndStageEdit, StatAndStageEditBypassAccuracy, StatusStat, StealthRock, StickyWeb, Stockpile, Stomp, StoredPower, Struggle, Substitute, SuckerPunch, SuperFang, Swallow, Switcheroo, Synchronoise, Tailwind, Taunt, TechnoBlast, Telekinesis, Teleport, TerrainMove, Thief, Thrash, Thunder, TopsyTurvy, ToxicSpikes, Transform, TriAttack, TrickRoom, TrumpCard, TwoHit, TwoTurnBase, UTurn, UpRoar, VenomDrench, Venoshock, WakeUpSlap, WeatherBall, WeatherMove, Wish, WonderRoom, WorrySeed, WringOut, Yawn

Constant Summary collapse

REGISTERED_MOVES =

Returns list of the registered moves.

Returns:

  • (Hash{Symbol => Class})

    list of the registered moves

Hash.new(Move)
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 random_foe]
R_RANGE =

Range of the R random factor

85..100

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Hooks

#exec_hooks, #force_return, included, remove, remove_without_name

Constructor Details

#initialize(db_symbol, pp, ppmax, scene) ⇒ Move

Create a new move

Parameters:

  • db_symbol (Symbol)

    db_symbol of the move in the database

  • pp (Integer)

    number of pp the move currently has

  • ppmax (Integer)

    maximum number of pp the move currently has

  • scene (Battle::Scene)

    current battle scene



38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 38

def initialize(db_symbol, pp, ppmax, scene)
  data = data_move(db_symbol)
  @id = data.id
  @db_symbol = data.db_symbol
  @pp = pp
  @ppmax = ppmax
  @used = false
  @consecutive_use_count = 0
  @effectiveness = 1
  @damage_dealt = 0
  @scene = scene
  @logic = scene.logic
end

Instance Attribute Details

#consecutive_use_countInteger

Number of time the move was used consecutively

Returns:



22
23
24
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 22

def consecutive_use_count
  @consecutive_use_count
end

#damage_dealtInteger

Number of damage dealt last time the move was used (to be used with move history)

Returns:



31
32
33
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 31

def damage_dealt
  @damage_dealt
end

#effectiveness (readonly)

Get the effectiveness



377
378
379
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 377

def effectiveness
  @effectiveness
end

#forced_next_move_decrease_ppBoolean

Tell if forced next move decreases PP

Returns:

  • (Boolean)


5
6
7
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00120 Procedure.rb', line 5

def forced_next_move_decrease_pp
  @forced_next_move_decrease_pp
end

#idInteger (readonly)

ID of the move in the database

Returns:



10
11
12
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 10

def id
  @id
end

#logicBattle::Logic (readonly)

Returns:



24
25
26
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 24

def logic
  @logic
end

#originalBattle::Move

Returns:



28
29
30
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 28

def original
  @original
end

#ppInteger

Number of pp the move currently has

Returns:



13
14
15
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 13

def pp
  @pp
end

#ppmaxInteger (readonly)

Maximum number of ppg the move currently has

Returns:



16
17
18
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 16

def ppmax
  @ppmax
end

#sceneBattle::Scene (readonly)

Returns:



26
27
28
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 26

def scene
  @scene
end

#usedBoolean

if the move has been used

Returns:

  • (Boolean)


19
20
21
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 19

def used
  @used
end

Class Method Details

.[](symbol) ⇒ Class<Battle::Move>

Retrieve a registered move

Parameters:

  • symbol (Symbol)

    be_method of the move

Returns:



383
384
385
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 383

def [](symbol)
  REGISTERED_MOVES[symbol]
end

.register(symbol, klass)

Register a move

Parameters:

  • symbol (Symbol)

    be_method of the move

  • klass (Class)

    class of the move



390
391
392
393
394
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 390

def register(symbol, klass)
  raise format('%<klass>s is not a "Move" and cannot be registered', klass: klass) unless klass.ancestors.include?(Move)

  REGISTERED_MOVES[symbol] = klass
end

.register_move_disabled_check_hook(reason) {|user, move| ... }

Function that registers a move_disabled_check hook

Parameters:

  • reason (String)

    reason of the move_disabled_check registration

Yield Parameters:

Yield Returns:

  • (Proc, nil)

    the code to execute if the move is disabled



81
82
83
84
85
86
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00121 Move Prevention.rb', line 81

def register_move_disabled_check_hook(reason)
  Hooks.register(Move, :move_disabled_check, reason) do |hook_binding|
    result = yield(hook_binding.local_variable_get(:user), self)
    force_return(result) if result.respond_to?(:call)
  end
end

.register_move_prevention_target_hook(reason) {|user, target, move| ... }

Function that registers a move_prevention_target hook

Parameters:

  • reason (String)

    reason of the move_prevention_target registration

Yield Parameters:

Yield Returns:

  • (Boolean)

    if the target is evading the move



94
95
96
97
98
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00121 Move Prevention.rb', line 94

def register_move_prevention_target_hook(reason)
  Hooks.register(Move, :move_prevention_target, reason) do |hook_binding|
    force_return(true) if yield(hook_binding.local_variable_get(:user), hook_binding.local_variable_get(:target), self)
  end
end

.register_move_prevention_user_hook(reason) {|user, targets, move| ... }

Function that registers a move_prevention_user hook

Parameters:

  • reason (String)

    reason of the move_prevention_user registration

Yield Parameters:

Yield Returns:

  • (:prevent, nil)

    :prevent if the move cannot continue



70
71
72
73
74
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00121 Move Prevention.rb', line 70

def register_move_prevention_user_hook(reason)
  Hooks.register(Move, :move_prevention_user, reason) do |hook_binding|
    force_return(false) if yield(hook_binding.local_variable_get(:user), hook_binding.local_variable_get(:targets), self) == :prevent
  end
end

.register_move_type_change_hook(reason) {|user, target, move, type| ... }

Function that registers a move_type_change hook

Parameters:

  • reason (String)

    reason of the move_type_change registration

Yield Parameters:

Yield Returns:



79
80
81
82
83
84
85
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00103 Type_Processing.rb', line 79

def register_move_type_change_hook(reason)
  Hooks.register(Move, :move_type_change, reason) do |hook_binding|
    result = yield(hook_binding.local_variable_get(:user), hook_binding.local_variable_get(:target), self,
                   hook_binding.local_variable_get(:type))
    hook_binding.local_variable_set(:type, result) if result.is_a?(Integer)
  end
end

.register_single_type_multiplier_overwrite_hook(reason) {|target, target_type, type, move| ... }

Function that registers a single_type_multiplier_overwrite hook

Parameters:

  • reason (String)

    reason of the single_type_multiplier_overwrite registration

Yield Parameters:

Yield Returns:

  • (Float, nil)

    overwritten



94
95
96
97
98
99
100
101
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00103 Type_Processing.rb', line 94

def register_single_type_multiplier_overwrite_hook(reason)
  Hooks.register(Move, :single_type_multiplier_overwrite, reason) do |hook_binding|
    result = yield(hook_binding.local_variable_get(:target),
                   hook_binding.local_variable_get(:target_type),
                   hook_binding.local_variable_get(:type), self)
    force_return(result) if result
  end
end

Instance Method Details

#accuracyInteger

Return the current accuracy of the move

Returns:



118
119
120
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 118

def accuracy
  data.accuracy
end

#accuracy_mod(user) ⇒ Float

Return the accuracy modifier of the user

Parameters:

Returns:

  • (Float)


37
38
39
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00104 Chance of Hit.rb', line 37

def accuracy_mod(user)
  return user.stat_multiplier_acceva(user.acc_stage)
end

#accuracy_textString

Return the accuracy text of the skill (for the UI)

Returns:



124
125
126
127
128
129
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 124

def accuracy_text
  acc = data.accuracy
  return text_get(11, 12) if acc == 0

  return acc.to_s
end

#atk_classInteger

Return the class of the skill (used by the UI)

Returns:



273
274
275
276
277
278
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 273

def atk_class
  return 2 if special?
  return 3 if status?

  return 1 if physical?
end

#authentic?Boolean

Tell if the move is a move that can bypass Substitute

Returns:

  • (Boolean)


372
373
374
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 372

def authentic?
  return data.is_authentic
end

#ballistics?Boolean

Tell if the move is a ballistic move

Returns:

  • (Boolean)


312
313
314
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 312

def ballistics?
  return data.is_ballistics
end

#battle_stage_modArray<Studio::Move::BattleStageMod>

Return the stat tage modifier the skill can apply

Returns:



183
184
185
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 183

def battle_stage_mod
  return data.battle_stage_mod
end

#battler_targets(pokemon, logic) ⇒ Array<PFM::PokemonBattler>

Note:

use one_target? to select the target inside the possible result

List the targets of this move

Parameters:

Returns:



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00110 Target.rb', line 31

def battler_targets(pokemon, logic)
  case target
  #  eo eo ex / ux ao ax || e! e! ex / ux a! ax
  when :adjacent_pokemon, :adjacent_all_pokemon
    return logic.adjacent_foes_of(pokemon).concat(logic.adjacent_allies_of(pokemon))
  #  eo eo ex / ux ax ax || e! e! ex / ux ax ax
  when :adjacent_foe, :adjacent_all_foe
    return logic.adjacent_foes_of(pokemon)
  #  e! e! e! / ux ax ax || e? e? e? / ux ax ax
  when :all_foe, :random_foe
    return logic.foes_of(pokemon)
  #  e! e! e! / u! a! a!
  when :all_pokemon
    return logic.foes_of(pokemon).concat(logic.allies_of(pokemon)) << pokemon
  #  ex ex ex / u! ax ax
  when :user
    return [pokemon]
  #  ex ex ex / uo ao ax
  when :user_or_adjacent_ally
    return [pokemon].concat(logic.adjacent_allies_of(pokemon))
  #  ex ex ex / ux ao ax
  when :adjacent_ally
    return logic.allies_of(pokemon)
  #  ex ex ex / u! a! a!
  when :all_ally
    return [pokemon].concat(logic.allies_of(pokemon))
  # eo eo eo / ux ao ao
  when :any_other_pokemon
    return logic.foes_of(pokemon).concat(logic.allies_of(pokemon))
  end
  return [pokemon]
end

#be_methodSymbol Also known as: symbol

Return the battle engine method of the move

Returns:

  • (Symbol)


83
84
85
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 83

def be_method
  return data.be_method
end

#bite?Boolean

Tell if the move is biting move

Returns:

  • (Boolean)


318
319
320
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 318

def bite?
  return data.is_bite
end

#blocable?Boolean

Is the skill blocable by Protect and skill like that ?

Returns:

  • (Boolean)


201
202
203
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 201

def blocable?
  return data.is_blocable
end

#blocked_by?(target, symbol) ⇒ Boolean

Detect if the move is protected by another move on target

Parameters:

Returns:

  • (Boolean)


59
60
61
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00121 Move Prevention.rb', line 59

def blocked_by?(target, symbol)
  return blocable? && target.effects.has?(:protect) && target.last_successfull_move_is?(symbol)
end

#bypass_chance_of_hit?(user, target) ⇒ Boolean

Check if the move bypass chance of hit and cannot fail

Parameters:

Returns:

  • (Boolean)


25
26
27
28
29
30
31
32
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00104 Chance of Hit.rb', line 25

def bypass_chance_of_hit?(user, target)
  return true if user.effects.get(:lock_on)&.target == target
  return true if user.has_ability?(:no_guard) || target.has_ability?(:no_guard)
  return true if db_symbol == :blizzard && $env.hail?
  return true if (status? && target == user) || accuracy <= 0

  return false
end

#calc_stab(user, types) ⇒ Numeric

STAB calculation

Parameters:

Returns:

  • (Numeric)


19
20
21
22
23
24
25
26
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00103 Type_Processing.rb', line 19

def calc_stab(user, types)
  if types.any? { |type| user.type1 == type || user.type2 == type || user.type3 == type }
    return 2 if user.has_ability?(:adaptability)

    return 1.5
  end
  return 1
end

#chance_of_hit(user, target) ⇒ Float

Return the chance of hit of the move

Parameters:

Returns:

  • (Float)


7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00104 Chance of Hit.rb', line 7

def chance_of_hit(user, target)
  log_data("# chance_of_hit(#{user}, #{target}) for #{db_symbol}")
  if bypass_chance_of_hit?(user, target)
    log_data('# chance_of_hit: bypassed')
    return 100
  end

  factor = logic.each_effects(user, target).reduce(1) { |product, e| product * e.chance_of_hit_multiplier(user, target, self) }
  factor *= accuracy_mod(user)
  factor *= evasion_mod(target)
  log_data("result = #{factor * 100}")
  return factor * 100
end

#clone

Clone the move and give a reference to the original one



58
59
60
61
62
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 58

def clone
  clone = super
  clone.original ||= self
  raise 'This function looks badly implement, just want to know where it is called'
end

#critical_hit?Boolean

Was the move a critical hit

Returns:

  • (Boolean)


294
295
296
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 294

def critical_hit?
  @critical
end

#critical_rateInteger

Return the critical rate index of the skill

Returns:



171
172
173
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 171

def critical_rate
  return data.critical_rate
end

#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:



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00101 Damage_Calc.rb', line 14

def damages(user, target)
  # rubocop:disable Layout/ExtraSpacing
  # rubocop:disable Style/Semicolon
  # rubocop:disable Style/SpaceBeforeSemicolon
  log_data("# damages(#{user}, #{target}) for #{db_symbol}")
  # Reset the effectiveness
  @effectiveness = 1
  @critical = logic.calc_critical_hit(user, target, critical_rate)        ; log_data("@critical = #{@critical} # critical_rate = #{critical_rate}")
  damage = user.level * 2 / 5 + 2                                         ; log_data("damage = #{damage} # #{user.level} * 2 / 5 + 2")
  damage = (damage * calc_base_power(user, target)).floor                 ; log_data("damage = #{damage} # after calc_base_power")
  damage = (damage * calc_sp_atk(user, target)).floor / 50                ; log_data("damage = #{damage} # after calc_sp_atk / 50")
  damage = (damage / calc_sp_def(user, target)).floor                     ; log_data("damage = #{damage} # after calc_sp_def")
  damage = (damage * calc_mod1(user, target)).floor + 2                   ; log_data("damage = #{damage} # after calc_mod1 + 2")
  damage = (damage * calc_ch(user, target)).floor                         ; log_data("damage = #{damage} # after calc_ch")
  damage = (damage * calc_mod2(user, target)).floor                       ; log_data("damage = #{damage} # after calc_mod2")
  damage *= logic.move_damage_rng.rand(calc_r_range)
  damage /= 100                                                           ; log_data("damage = #{damage} # after rng")
  types = definitive_types(user, target)
  damage = (damage * calc_stab(user, types)).floor                        ; log_data("damage = #{damage} # after stab")
  damage = (damage * calc_type_n_multiplier(target, :type1, types)).floor ; log_data("damage = #{damage} # after type1")
  damage = (damage * calc_type_n_multiplier(target, :type2, types)).floor ; log_data("damage = #{damage} # after type2")
  damage = (damage * calc_type_n_multiplier(target, :type3, types)).floor ; log_data("damage = #{damage} # after type3")
  damage = (damage * calc_mod3(user, target)).floor                       ; log_data("damage = #{damage} # after mod3")
  damage = damage.clamp(1, target.hp)                                     ; log_data("damage = #{damage} # after clamp")
  return damage
  # rubocop:enable Layout/ExtraSpacing
  # rubocop:enable Style/Semicolon
  # rubocop:enable Style/SpaceBeforeSemicolon
end

#dance?Boolean

Tell if the move is a dance move

Returns:

  • (Boolean)


324
325
326
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 324

def dance?
  return data.is_dance
end

#dataStudio::Move

Return the data of the skill

Returns:



66
67
68
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 66

def data
  return data_move(@db_symbol || @id)
end

#db_symbolSymbol

Return the symbol of the move in the database

Returns:

  • (Symbol)


282
283
284
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 282

def db_symbol
  return @db_symbol
end

#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



32
33
34
35
36
37
38
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00103 Type_Processing.rb', line 32

def definitive_types(user, target)
  type = self.type
  exec_hooks(Move, :move_type_change, binding)
  return [*type]
ensure
  log_data(format('types = %<types>s # ie: %<ie>s', types: type.to_s, ie: [*type].map { |t| data_type(t).name }.join(', ')))
end

#descriptionString

Return the skill description

Returns:



77
78
79
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 77

def description
  return data.description
end

#direct?Boolean

Is the skill direct ?

Returns:

  • (Boolean)


189
190
191
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 189

def direct?
  return data.is_direct
end

#disable_reason(user) ⇒ #call

Get the reason why the move is disabled

Parameters:

Returns:

  • (#call)

    Block that should be called when the move is disabled



31
32
33
34
35
36
37
38
39
40
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00121 Move Prevention.rb', line 31

def disable_reason(user)
  return proc {} if pp == 0

  exec_hooks(Move, :move_disabled_check, binding)
  return nil
rescue Hooks::ForceReturn => e
  log_data("# disable_reason(#{user})")
  log_data("# FR: disable_reason #{e.data} from #{e.hook_name} (#{e.reason})")
  return e.data
end

#disabled?(user) ⇒ Boolean

Function that tells if the move is disabled

Parameters:

Returns:

  • (Boolean)


24
25
26
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00121 Move Prevention.rb', line 24

def disabled?(user)
  disable_reason(user) ? true : false
end

#effect_chanceInteger

Return the chance of effect of the skill

Returns:



153
154
155
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 153

def effect_chance
  return data.is_effect_chance ? 100 : data.move_status.reduce(0) { |prev, curr| prev + curr.luck_rate }
end

#evasion_mod(target) ⇒ Float

Return the evasion modifier of the target

Parameters:

Returns:

  • (Float)


44
45
46
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00104 Chance of Hit.rb', line 44

def evasion_mod(target)
  return target.stat_multiplier_acceva(-target.eva_stage) # <=> 1 / ...
end

#force_switch?Boolean

Tell if the move is a move that forces target switch

Returns:

  • (Boolean)


354
355
356
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 354

def force_switch?
  return false
end

#gravity_affected?Boolean

Is the skill affected by gravity

Returns:

  • (Boolean)


177
178
179
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 177

def gravity_affected?
  return data.is_gravity
end

#heal?Boolean

Tell if the move is a heal move

Returns:

  • (Boolean)


336
337
338
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 336

def heal?
  return data.is_heal
end

#magic_coat_affected?Boolean

Is the skill affected by magic coat ?

Returns:

  • (Boolean)


249
250
251
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 249

def magic_coat_affected?
  return data.is_magic_coat_affected
end

#mirror_move_affected?Boolean

Is the skill affected by Mirror Move

Returns:

  • (Boolean)


195
196
197
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 195

def mirror_move_affected?
  return data.is_mirror_move
end

#move_blocked_by_target?(user, target) ⇒ Boolean

Note:

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

Parameters:

Returns:

  • (Boolean)

    if the target evade the move (and is not selected)



47
48
49
50
51
52
53
54
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00121 Move Prevention.rb', line 47

def move_blocked_by_target?(user, target)
  log_data("# move_blocked_by_target?(#{user}, #{target})")
  exec_hooks(Move, :move_prevention_target, binding) if user != target
  return false
rescue Hooks::ForceReturn => e
  log_data("# FR: move_blocked_by_target? #{e.data} from #{e.hook_name} (#{e.reason})")
  return e.data
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



8
9
10
11
12
13
14
15
16
17
18
19
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00121 Move Prevention.rb', line 8

def move_usable_by_user(user, targets)
  log_data("# move_usable_by_user(#{user}, #{targets})")
  PFM::Text.set_variable(PFM::Text::PKNICK[0], user.given_name)
  PFM::Text.set_variable(PFM::Text::MOVE[1], name)
  exec_hooks(Move, :move_prevention_user, binding)
  return true
rescue Hooks::ForceReturn => e
  log_data("# FR: move_usable_by_user #{e.data} from #{e.hook_name} (#{e.reason})")
  return e.data
ensure
  PFM::Text.reset_variables
end

#name

Return the name of the skill



71
72
73
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 71

def name
  return data.name
end

#no_choice_skill?Boolean Also known as: is_no_choice_skill?

Does the skill doesn't show a target choice

Returns:

  • (Boolean)


17
18
19
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00110 Target.rb', line 17

def no_choice_skill?
  return TargetNoAsk.include?(target)
end

#not_very_effective?Boolean

Was the move not very effective ?

Returns:

  • (Boolean)


306
307
308
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 306

def not_very_effective?
  @effectiveness > 0 && @effectiveness < 1
end

#ohko?Boolean

Tell if the move is an OHKO move

Returns:

  • (Boolean)


342
343
344
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 342

def ohko?
  return false
end

#one_target?Boolean Also known as: is_one_target?

Does the skill aim only one Pokemon

Returns:

  • (Boolean)


10
11
12
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00110 Target.rb', line 10

def one_target?
  return OneTarget.include?(target)
end

#physical?Boolean

Is the skill physical ?

Returns:

  • (Boolean)


255
256
257
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 255

def physical?
  return data.category == :physical
end

#powder?Boolean

Tell if the move is a powder move

Returns:

  • (Boolean)


366
367
368
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 366

def powder?
  return data.is_powder
end

#powerInteger Also known as: base_power

Return the actual base power of the move

Returns:



96
97
98
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 96

def power
  data.power
end

#power_textString

Return the text of the power of the skill (for the UI)

Returns:



103
104
105
106
107
108
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 103

def power_text
  power = data.power
  return text_get(11, 12) if power == 0

  return power.to_s
end

#pp_textString

Return the text of the PP of the skill

Returns:



90
91
92
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 90

def pp_text
  "#{@pp} / #{@ppmax}"
end

#pre_attack?Boolean

Is the move doing something before any other attack ?

Returns:

  • (Boolean)


360
361
362
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 360

def pre_attack?
  false
end

#priority(user = nil) ⇒ Integer

Return the priority of the skill

Parameters:

Returns:



134
135
136
137
138
139
140
141
142
143
144
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 134

def priority(user = nil)
  priority = data.priority - Logic::MOVE_PRIORITY_OFFSET # TODO: Check the whole engine to go to -7~+7
  return priority unless user

  logic.each_effects(user) do |e|
    new_priority = e.on_move_priority_change(user, priority, self)
    return new_priority if new_priority
  end

  return priority
end

#proceed(user, target_bank, target_position)

Function starting the move procedure

Parameters:



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00120 Procedure.rb', line 11

def proceed(user, target_bank, target_position)
  return if user.hp <= 0

  @damage_dealt = 0
  possible_targets = battler_targets(user, logic).select { |target| target&.alive? }
  exec_hooks(Move, :possible_targets, binding)
  possible_targets.sort_by(&:spd)
  return proceed_one_target(user, possible_targets, target_bank, target_position) if one_target?

  # Sort target by decreasing spd
  possible_targets.reverse!
  # Choose the right bank if user could choose bank
  possible_targets.select! { |pokemon| pokemon.bank == target_bank } unless no_choice_skill?
  proceed_internal(user, possible_targets)
end

#proceed_pre_attack(user)

Proceed the procedure before any other attack.

Parameters:



29
30
31
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00120 Procedure.rb', line 29

def proceed_pre_attack(user)
  nil && user
end

#pulse?Boolean

Tell if the move is a pulse move

Returns:

  • (Boolean)


330
331
332
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 330

def pulse?
  return data.is_pulse
end

#punching?Boolean

Is the skill a punching move ?

Returns:

  • (Boolean)


219
220
221
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 219

def punching?
  return data.is_punch
end

#real_base_power(user, target) ⇒ Integer

Get the real base power of the move (taking in account all parameter)

Parameters:

Returns:



48
49
50
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00101 Damage_Calc.rb', line 48

def real_base_power(user, target)
  return power
end

#recoil?Boolean

Does the skill has recoil ?

Returns:

  • (Boolean)


207
208
209
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 207

def recoil?
  false
end

#recoil_factorInteger

Returns the recoil factor

Returns:



213
214
215
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 213

def recoil_factor
  4
end

#relative_priority

Move priority



147
148
149
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 147

def relative_priority
  return priority + Logic::MOVE_PRIORITY_OFFSET
end

#self_user_switch?Boolean

Tell if the move is a move that switch the user if that hit

Returns:

  • (Boolean)


348
349
350
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 348

def self_user_switch?
  return false
end

#snatchable?Boolean

Is the skill snatchable ?

Returns:

  • (Boolean)


243
244
245
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 243

def snatchable?
  return data.is_snatchable
end

#sound_attack?Boolean

Is the skill a sound attack ?

Returns:

  • (Boolean)


225
226
227
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 225

def sound_attack?
  return data.is_sound_attack
end

#special?Boolean

Is the skill special ?

Returns:

  • (Boolean)


261
262
263
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 261

def special?
  return data.category == :special
end

#status?Boolean

Is the skill status ?

Returns:

  • (Boolean)


267
268
269
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 267

def status?
  return data.category == :status
end

#status_effectsArray<Studio::Move::MoveStatus>

Get all the status effect of a move

Returns:



159
160
161
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 159

def status_effects
  return data.move_status
end

#super_effective?Boolean

Was the move super effective ?

Returns:

  • (Boolean)


300
301
302
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 300

def super_effective?
  @effectiveness >= 2
end

#targetSymbol

Return the target symbol the skill can aim

Returns:

  • (Symbol)


165
166
167
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 165

def target
  return data.battle_engine_aimed_target
end

#to_s Also known as: inspect



52
53
54
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 52

def to_s
  "<PM:#{name},#{@consecutive_use_count} pp=#{@pp}>"
end

#trigger_king_rock?Boolean

Does the skill trigger the king rock

Returns:

  • (Boolean)


237
238
239
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 237

def trigger_king_rock?
  return data.is_king_rock_utility
end

#typeInteger

Return the current type of the move

Returns:



112
113
114
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 112

def type
  data_type(data.type).id
end

#type?(type_id) ⇒ Boolean

Is the skill a specific type ?

Parameters:

  • type_id (Integer)

    ID of the type

Returns:

  • (Boolean)


5
6
7
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb', line 5

def type?(type_id)
  return type == type_id
end

#type_dark?Boolean Also known as: type_tenebre?

Is the skill type dark ?

Returns:

  • (Boolean)


121
122
123
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb', line 121

def type_dark?
  return type?(data_type(:dark).id)
end

#type_dragon?Boolean

Is the skill type dragon ?

Returns:

  • (Boolean)


108
109
110
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb', line 108

def type_dragon?
  return type?(data_type(:dragon).id)
end

#type_electric?Boolean Also known as: type_electrique?

Is the skill type electric ?

Returns:

  • (Boolean)


31
32
33
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb', line 31

def type_electric?
  return type?(data_type(:electric).id)
end

#type_fairy?Boolean Also known as: type_fee?

Is the skill type fairy ?

Returns:

  • (Boolean)


128
129
130
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb', line 128

def type_fairy?
  return type?(data_type(:fairy).id)
end

#type_fighting?Boolean Also known as: type_combat?

Is the skill type fighting ?

Returns:

  • (Boolean)


52
53
54
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb', line 52

def type_fighting?
  return type?(data_type(:fighting).id)
end

#type_fire?Boolean Also known as: type_feu?

Is the skill type fire ?

Returns:

  • (Boolean)


17
18
19
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb', line 17

def type_fire?
  return type?(data_type(:fire).id)
end

#type_flying?Boolean Also known as: type_vol?, type_fly?

Is the skill type fly ?

Returns:

  • (Boolean)


72
73
74
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb', line 72

def type_flying?
  return type?(data_type(:flying).id)
end

#type_ghost?Boolean Also known as: type_spectre?

Is the skill type ghost ?

Returns:

  • (Boolean)


101
102
103
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb', line 101

def type_ghost?
  return type?(data_type(:ghost).id)
end

#type_grass?Boolean Also known as: type_plante?

Is the skill type grass ?

Returns:

  • (Boolean)


38
39
40
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb', line 38

def type_grass?
  return type?(data_type(:grass).id)
end

#type_ground?Boolean Also known as: type_sol?

Is the skill type ground ?

Returns:

  • (Boolean)


65
66
67
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb', line 65

def type_ground?
  return type?(data_type(:ground).id)
end

#type_ice?Boolean Also known as: type_glace?

Is the skill type ice ?

Returns:

  • (Boolean)


45
46
47
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb', line 45

def type_ice?
  return type?(data_type(:ice).id)
end

#type_insect?Boolean Also known as: type_bug?

Is the skill type insect/bug ?

Returns:

  • (Boolean)


87
88
89
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb', line 87

def type_insect?
  return type?(data_type(:bug).id)
end

#type_modifier(user, target) ⇒ Float

Function that calculate the type modifier (for specific uses)

Parameters:

Returns:

  • (Float)


7
8
9
10
11
12
13
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00103 Type_Processing.rb', line 7

def type_modifier(user, target)
  types = definitive_types(user, target)
  n = calc_type_n_multiplier(target, :type1, types) *
      calc_type_n_multiplier(target, :type2, types) *
      calc_type_n_multiplier(target, :type3, types)
  return n
end

#type_normal?Boolean

Is the skill type normal ?

Returns:

  • (Boolean)


11
12
13
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb', line 11

def type_normal?
  return type?(data_type(:normal).id)
end

#type_poison?Boolean

Is the skill type poison ?

Returns:

  • (Boolean)


59
60
61
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb', line 59

def type_poison?
  return type?(data_type(:poison).id)
end

#type_psychic?Boolean Also known as: type_psy?

Is the skill type psy ?

Returns:

  • (Boolean)


80
81
82
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb', line 80

def type_psychic?
  return type?(data_type(:psychic).id)
end

#type_rock?Boolean Also known as: type_roche?

Is the skill type rock ?

Returns:

  • (Boolean)


94
95
96
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb', line 94

def type_rock?
  return type?(data_type(:rock).id)
end

#type_steel?Boolean Also known as: type_acier?

Is the skill type steel ?

Returns:

  • (Boolean)


114
115
116
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb', line 114

def type_steel?
  return type?(data_type(:steel).id)
end

#type_water?Boolean Also known as: type_eau?

Is the skill type water ?

Returns:

  • (Boolean)


24
25
26
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00102 Type.rb', line 24

def type_water?
  return type?(data_type(:water).id)
end

#unfreeze?Boolean

Does the skill unfreeze

Returns:

  • (Boolean)


231
232
233
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00100 Move.rb', line 231

def unfreeze?
  return data.is_unfreeze
end