diff --git a/Data/Scripts/010_Data/002_PBS data/005_Move.rb b/Data/Scripts/010_Data/002_PBS data/005_Move.rb index 9789a5a52..03f07eff8 100644 --- a/Data/Scripts/010_Data/002_PBS data/005_Move.rb +++ b/Data/Scripts/010_Data/002_PBS data/005_Move.rb @@ -36,6 +36,7 @@ module GameData include InstanceMethods def initialize(hash) + convert_move_data(hash) @id = hash[:id] @real_name = hash[:name] || "Unnamed" @type = hash[:type] || :NONE @@ -45,7 +46,7 @@ module GameData @total_pp = hash[:total_pp] || 5 @target = hash[:target] || :None @priority = hash[:priority] || 0 - @function_code = hash[:function_code] || "000" + @function_code = hash[:function_code] || "None" @flags = hash[:flags] || [] @flags = [@flags] if !@flags.is_a?(Array) @effect_chance = hash[:effect_chance] || 0 @@ -80,5 +81,436 @@ module GameData end return false end + + def convert_move_data(data) + new_code = data[:function_code] + case data[:function_code] + when "000" then new_code = "None" + when "001" then new_code = "DoesNothingUnusableInGravity" + when "002" then new_code = "Struggle" + when "003" + if data[:id] == :RELICSONG + new_code = "SleepTargetChangeUserMeloettaForm" + elsif data[:id] == :DARKVOID && Settings::MECHANICS_GENERATION >= 7 + new_code = "SleepTargetIfUserDarkrai" + else + new_code = "SleepTarget" + end + when "004" then new_code = "SleepTargetNextTurn" + when "005" then new_code = "PoisonTarget" + when "006" then new_code = "BadPoisonTarget" + when "007" + if data[:id] == :THUNDERWAVE + new_code = "ParalyzeTargetIfNotTypeImmune" + elsif data[:id] == :BODYSLAM && Settings::MECHANICS_GENERATION >= 6 + new_code = "ParalyzeTargetTrampleMinimize" + else + new_code = "ParalyzeTarget" + end + when "008" then new_code = "ParalyzeTargetAlwaysHitsInRainHitsTargetInSky" + when "009" then new_code = "ParalyzeFlinchTarget" + when "00A" then new_code = "BurnTarget" + when "00B" then new_code = "BurnFlinchTarget" + when "00C" then new_code = "FreezeTarget" + when "00D" then new_code = "FreezeTargetAlwaysHitsInHail" + when "00E" then new_code = "FreezeFlinchTarget" + when "00F" then new_code = "FlinchTarget" + when "010" then new_code = "FlinchTargetTrampleMinimize" + when "011" then new_code = "FlinchTargetFailsIfUserNotAsleep" + when "012" then new_code = "FlinchTargetFailsIfNotUserFirstTurn" + when "013", "014" then new_code = "ConfuseTarget" + when "015" then new_code = "ConfuseTargetAlwaysHitsInRainHitsTargetInSky" + when "016" then new_code = "AttractTarget" + when "017" then new_code = "ParalyzeBurnOrFreezeTarget" + when "018" then new_code = "CureUserBurnPoisonParalysis" + when "019" then new_code = "CureUserPartyStatus" + when "01A" then new_code = "StartUserSideImmunityToInflictedStatus" + when "01B" then new_code = "GiveUserStatusToTarget" + when "01C" then new_code = "RaiseUserAttack1" + when "01D" then new_code = "RaiseUserDefense1" + when "01E" then new_code = "RaiseUserDefense1CurlUpUser" + when "01F" then new_code = "RaiseUserSpeed1" + when "020" then new_code = "RaiseUserSpAtk1" + when "021" then new_code = "RaiseUserSpDef1PowerUpElectricMove" + when "022" then new_code = "RaiseUserEvasion1" + when "023" then new_code = "RaiseUserCriticalHitRate2" + when "024" then new_code = "RaiseUserAtkDef1" + when "025" then new_code = "RaiseUserAtkDefAcc1" + when "026" then new_code = "RaiseUserAtkSpd1" + when "027" then new_code = "RaiseUserAtkSpAtk1" + when "028" then new_code = "RaiseUserAtkSpAtk1Or2InSun" + when "029" then new_code = "RaiseUserAtkAcc1" + when "02A" then new_code = "RaiseUserDefSpDef1" + when "02B" then new_code = "RaiseUserSpAtkSpDefSpd1" + when "02C" then new_code = "RaiseUserSpAtkSpDef1" + when "02D" then new_code = "RaiseUserMainStats1" + when "02E" then new_code = "RaiseUserAttack2" + when "02F" then new_code = "RaiseUserDefense2" + when "030" then new_code = "RaiseUserSpeed2" + when "031" then new_code = "RaiseUserSpeed2LowerUserWeight" + when "032" then new_code = "RaiseUserSpAtk2" + when "033" then new_code = "RaiseUserSpDef2" + when "034" then new_code = "RaiseUserEvasion2MinimizeUser" + when "035" then new_code = "LowerUserDefSpDef1RaiseUserAtkSpAtkSpd2" + when "036" then new_code = "RaiseUserAtk1Spd2" + when "037" then new_code = "RaiseTargetRandomStat2" + when "038" then new_code = "RaiseUserDefense3" + when "039" then new_code = "RaiseUserSpAtk3" + when "03A" then new_code = "MaxUserAttackLoseHalfOfTotalHP" + when "03B" then new_code = "LowerUserAtkDef1" + when "03C" then new_code = "LowerUserDefSpDef1" + when "03D" then new_code = "LowerUserDefSpDefSpd1" + when "03E" then new_code = "LowerUserSpeed1" + when "03F" then new_code = "LowerUserSpAtk2" + when "040" then new_code = "RaiseTargetSpAtk1ConfuseTarget" + when "041" then new_code = "RaiseTargetAttack2ConfuseTarget" + when "042" then new_code = "LowerTargetAttack1" + when "043" then new_code = "LowerTargetDefense1" + when "044" + if data[:id] == :BULLDOZE + new_code = "LowerTargetSpeed1WeakerInGrassyTerrain" + else + new_code = "LowerTargetSpeed1" + end + when "045" then new_code = "LowerTargetSpAtk1" + when "046" then new_code = "LowerTargetSpDef1" + when "047" then new_code = "LowerTargetAccuracy1" + when "048" + if data[:id] == :SWEETSCENT && Settings::MECHANICS_GENERATION >= 6 + new_code = "LowerTargetEvasion2" + else + new_code = "LowerTargetEvasion1" + end + when "049" then new_code = "LowerTargetEvasion1RemoveSideEffects" + when "04A" then new_code = "LowerTargetAtkDef1" + when "04B" then new_code = "LowerTargetAttack2" + when "04C" then new_code = "LowerTargetDefense2" + when "04D" then new_code = "LowerTargetSpeed2" + when "04E" then new_code = "LowerTargetSpAtk2IfCanAttract" + when "04F" then new_code = "LowerTargetSpDef2" + when "050" then new_code = "ResetTargetStatStages" + when "051" then new_code = "ResetAllBattlersStatStages" + when "052" then new_code = "UserTargetSwapAtkSpAtkStages" + when "053" then new_code = "UserTargetSwapDefSpDefStages" + when "054" then new_code = "UserTargetSwapStatStages" + when "055" then new_code = "UserCopyTargetStatStages" + when "056" then new_code = "StartUserSideImmunityToStatStageLowering" + when "057" then new_code = "UserSwapBaseAtkDef" + when "058" then new_code = "UserTargetAverageBaseAtkSpAtk" + when "059" then new_code = "UserTargetAverageBaseDefSpDef" + when "05A" then new_code = "UserTargetAverageHP" + when "05B" then new_code = "StartUserSideDoubleSpeed" + when "05C" then new_code = "ReplaceMoveThisBattleWithTargetLastMoveUsed" + when "05D" then new_code = "ReplaceMoveWithTargetLastMoveUsed" + when "05E" then new_code = "SetUserTypesToUserMoveType" + when "05F" then new_code = "SetUserTypesToResistLastAttack" + when "060" then new_code = "SetUserTypesBasedOnEnvironment" + when "061" then new_code = "SetTargetTypesToWater" + when "062" then new_code = "SetUserTypesToTargetTypes" + when "063" then new_code = "SetTargetAbilityToSimple" + when "064" then new_code = "SetTargetAbilityToInsomnia" + when "065" then new_code = "SetUserAbilityToTargetAbility" + when "066" then new_code = "SetTargetAbilityToUserAbility" + when "067" then new_code = "UserTargetSwapAbilities" + when "068" then new_code = "NegateTargetAbility" + when "069" then new_code = "TransformUserIntoTarget" + when "06A" then new_code = "FixedDamage20" + when "06B" then new_code = "FixedDamage40" + when "06C" then new_code = "FixedDamageHalfTargetHP" + when "06D" then new_code = "FixedDamageUserLevel" + when "06E" then new_code = "LowerTargetHPToUserHP" + when "06F" then new_code = "FixedDamageUserLevelRandom" + when "070" + if data[:id] == :FISSURE + new_code = "OHKOHitsTargetUnderground" + elsif data[:id] == :SHEERCOLD && Settings::MECHANICS_GENERATION >= 7 + new_code = "OHKOIce" + else + new_code = "OHKO" + end + when "071" then new_code = "CounterPhysicalDamage" + when "072" then new_code = "CounterSpecialDamage" + when "073" then new_code = "CounterDamagePlusHalf" + when "074" then new_code = "DamageTargetAlly" + when "075" then new_code = "DoublePowerIfTargetUnderwater" + when "076" then new_code = "DoublePowerIfTargetUnderground" + when "077" then new_code = "DoublePowerIfTargetInSky" + when "078" then new_code = "FlinchTargetDoublePowerIfTargetInSky" + when "079" then new_code = "DoublePowerAfterFusionFlare" + when "07A" then new_code = "DoublePowerAfterFusionBolt" + when "07B" then new_code = "DoublePowerIfTargetPoisoned" + when "07C" then new_code = "DoublePowerIfTargetParalyzedCureTarget" + when "07D" then new_code = "DoublePowerIfTargetAsleepCureTarget" + when "07E" then new_code = "DoublePowerIfUserPoisonedBurnedParalyzed" + when "07F" then new_code = "DoublePowerIfTargetStatusProblem" + when "080" then new_code = "DoublePowerIfTargetHPLessThanHalf" + when "081" then new_code = "DoublePowerIfUserLostHPThisTurn" + when "082" then new_code = "DoublePowerIfTargetLostHPThisTurn" + when "083" then new_code = "UsedAfterAllyRoundWithDoublePower" + when "084" then new_code = "DoublePowerIfTargetActed" + when "085" then new_code = "DoublePowerIfAllyFaintedLastTurn" + when "086" then new_code = "DoublePowerIfUserHasNoItem" + when "087" then new_code = "TypeAndPowerDependOnWeather" + when "088" then new_code = "PursueSwitchingFoe" + when "089" then new_code = "PowerHigherWithUserHappiness" + when "08A" then new_code = "PowerLowerWithUserHappiness" + when "08B" then new_code = "PowerHigherWithUserHP" + when "08C" then new_code = "PowerHigherWithTargetHP" + when "08D" then new_code = "PowerHigherWithTargetFasterThanUser" + when "08E" then new_code = "PowerHigherWithUserPositiveStatStages" + when "08F" then new_code = "PowerHigherWithTargetPositiveStatStages" + when "090" then new_code = "TypeDependsOnUserIVs" + when "091" then new_code = "PowerHigherWithConsecutiveUse" + when "092" then new_code = "PowerHigherWithConsecutiveUseOnUserSide" + when "093" then new_code = "StartRaiseUserAtk1WhenDamaged" + when "094" then new_code = "RandomlyDamageOrHealTarget" + when "095" then new_code = "RandomPowerDoublePowerIfTargetUnderground" + when "096" then new_code = "TypeAndPowerDependOnUserBerry" + when "097" then new_code = "PowerHigherWithLessPP" + when "098" then new_code = "PowerLowerWithUserHP" + when "099" then new_code = "PowerHigherWithUserFasterThanTarget" + when "09A" then new_code = "PowerHigherWithTargetWeight" + when "09B" then new_code = "PowerHigherWithUserHeavierThanTarget" + when "09C" then new_code = "PowerUpAllyMove" + when "09D" then new_code = "StartWeakenElectricMoves" + when "09E" then new_code = "StartWeakenFireMoves" + when "09F" + if data[:id] == :MULTIATTACK + new_code = "TypeDependsOnUserMemory" + elsif data[:id] == :TECHNOBLAST + new_code = "TypeDependsOnUserDrive" + else + new_code = "TypeDependsOnUserPlate" + end + when "0A0" then new_code = "AlwaysCriticalHit" + when "0A1" then new_code = "StartPreventCriticalHitsAgainstUserSide" + when "0A2" then new_code = "StartWeakenPhysicalDamageAgainstUserSide" + when "0A3" then new_code = "StartWeakenSpecialDamageAgainstUserSide" + when "0A4" then new_code = "EffectDependsOnEnvironment" + when "0A5" + new_code = "None" + data[:accuracy] = 0 + when "0A6" then new_code = "EnsureNextMoveAlwaysHits" + when "0A7" then new_code = "StartNegateTargetEvasionStatStageAndGhostImmunity" + when "0A8" then new_code = "StartNegateTargetEvasionStatStageAndDarkImmunity" + when "0A9" then new_code = "IgnoreTargetDefSpDefEvaStatStages" + when "0AA" then new_code = "ProtectUser" + when "0AB" then new_code = "ProtectUserSideFromPriorityMoves" + when "0AC" then new_code = "ProtectUserSideFromMultiTargetDamagingMoves" + when "0AD" then new_code = "RemoveProtections" + when "0AE" then new_code = "UseLastMoveUsedByTarget" + when "0AF" then new_code = "UseLastMoveUsed" + when "0B0" then new_code = "UseMoveTargetIsAboutToUse" + when "0B1" then new_code = "BounceBackProblemCausingStatusMoves" + when "0B2" then new_code = "StealAndUseBeneficialStatusMove" + when "0B3" then new_code = "UseMoveDependingOnEnvironment" + when "0B4" then new_code = "UseRandomUserMoveIfAsleep" + when "0B5" then new_code = "UseRandomMoveFromUserParty" + when "0B6" then new_code = "UseRandomMove" + when "0B7" then new_code = "DisableTargetUsingSameMoveConsecutively" + when "0B8" then new_code = "DisableTargetMovesKnownByUser" + when "0B9" then new_code = "DisableTargetLastMoveUsed" + when "0BA" then new_code = "DisableTargetStatusMoves" + when "0BB" then new_code = "DisableTargetHealingMoves" + when "0BC" then new_code = "DisableTargetUsingDifferentMove" + when "0BD" then new_code = "HitTwoTimes" + when "0BE" then new_code = "HitTwoTimesPoisonTarget" + when "0BF" then new_code = "HitThreeTimesPowersUpWithEachHit" + when "0C0" + if data[:id] == :WATERSHURIKEN + new_code = "HitTwoToFiveTimesOrThreeForAshGreninja" + else + new_code = "HitTwoToFiveTimes" + end + when "0C1" then new_code = "HitOncePerUserTeamMember" + when "0C2" then new_code = "AttackAndSkipNextTurn" + when "0C3" then new_code = "TwoTurnAttack" + when "0C4" then new_code = "TwoTurnAttackOneTurnInSun" + when "0C5" then new_code = "TwoTurnAttackParalyzeTarget" + when "0C6" then new_code = "TwoTurnAttackBurnTarget" + when "0C7" then new_code = "TwoTurnAttackFlinchTarget" + when "0C8" then new_code = "TwoTurnAttackChargeRaiseUserDefense1" + when "0C9" then new_code = "TwoTurnAttackInvulnerableInSky" + when "0CA" then new_code = "TwoTurnAttackInvulnerableUnderground" + when "0CB" then new_code = "TwoTurnAttackInvulnerableUnderwater" + when "0CC" then new_code = "TwoTurnAttackInvulnerableInSkyParalyzeTarget" + when "0CD" then new_code = "TwoTurnAttackInvulnerableRemoveProtections" + when "0CE" then new_code = "TwoTurnAttackInvulnerableInSkyTargetCannotAct" + when "0CF" then new_code = "BindTarget" + when "0D0" then new_code = "BindTargetDoublePowerIfTargetUnderwater" + when "0D1" then new_code = "MultiTurnAttackPreventSleeping" + when "0D2" then new_code = "MultiTurnAttackConfuseUserAtEnd" + when "0D3" then new_code = "MultiTurnAttackPowersUpEachTurn" + when "0D4" then new_code = "MultiTurnAttackBideThenReturnDoubleDamage" + when "0D5" then new_code = "HealUserHalfOfTotalHP" + when "0D6" then new_code = "HealUserHalfOfTotalHPLoseFlyingTypeThisTurn" + when "0D7" then new_code = "HealUserPositionNextTurn" + when "0D8" then new_code = "HealUserDependingOnWeather" + when "0D9" then new_code = "HealUserFullyAndFallAsleep" + when "0DA" then new_code = "StartHealUserEachTurn" + when "0DB" then new_code = "StartHealUserEachTurnTrapUserInBattle" + when "0DC" then new_code = "StartLeechSeedTarget" + when "0DD" then new_code = "HealUserByHalfOfDamageDone" + when "0DE" then new_code = "HealUserByHalfOfDamageDoneIfTargetAsleep" + when "0DF" then new_code = "HealTargetHalfOfTotalHP" + when "0E0" then new_code = "UserFaintsExplosive" + when "0E1" then new_code = "UserFaintsFixedDamageUserHP" + when "0E2" then new_code = "UserFaintsLowerTargetAtkSpAtk2" + when "0E3" then new_code = "UserFaintsHealAndCureReplacement" + when "0E4" then new_code = "UserFaintsHealAndCureReplacementRestorePP" + when "0E5" then new_code = "StartPerishCountsForAllBattlers" + when "0E6" then new_code = "SetAttackerMovePPTo0IfUserFaints" + when "0E7" then new_code = "AttackerFaintsIfUserFaints" + when "0E8" then new_code = "UserEnduresFaintingThisTurn" + when "0E9" then new_code = "CannotMakeTargetFaint" + when "0EA" + if Settings::MECHANICS_GENERATION >= 8 + new_code = "SwitchOutUserStatusMove" + else + new_code = "FleeFromBattle" + end + when "0EB" then new_code = "SwitchOutTargetStatusMove" + when "0EC" then new_code = "SwitchOutTargetDamagingMove" + when "0ED" then new_code = "SwitchOutUserPassOnEffects" + when "0EE" then new_code = "SwitchOutUserDamagingMove" + when "0EF" then new_code = "TrapTargetInBattle" + when "0F0" then new_code = "RemoveTargetItem" + when "0F1" then new_code = "UserTakesTargetItem" + when "0F2" then new_code = "UserTargetSwapItems" + when "0F3" then new_code = "TargetTakesUserItem" + when "0F4" then new_code = "UserConsumeTargetBerry" + when "0F5" then new_code = "DestroyTargetBerryOrGem" + when "0F6" then new_code = "RestoreUserConsumedItem" + when "0F7" then new_code = "ThrowUserItemAtTarget" + when "0F8" then new_code = "StartTargetCannotUseItem" + when "0F9" then new_code = "StartNegateHeldItems" + when "0FA" then new_code = "RecoilQuarterOfDamageDealt" + when "0FB" then new_code = "RecoilThirdOfDamageDealt" + when "0FC" then new_code = "RecoilHalfOfDamageDealt" + when "0FD" then new_code = "RecoilThirdOfDamageDealtParalyzeTarget" + when "0FE" then new_code = "RecoilThirdOfDamageDealtBurnTarget" + when "0FF" then new_code = "StartSunWeather" + when "100" then new_code = "StartRainWeather" + when "101" then new_code = "StartSandstormWeather" + when "102" then new_code = "StartHailWeather" + when "103" then new_code = "AddSpikesToFoeSide" + when "104" then new_code = "AddToxicSpikesToFoeSide" + when "105" then new_code = "AddStealthRocksToFoeSide" + when "106" then new_code = "GrassPledge" + when "107" then new_code = "FirePledge" + when "108" then new_code = "WaterPledge" + when "109" then new_code = "AddMoneyGainedFromBattle" + when "10A" then new_code = "RemoveScreens" + when "10B" then new_code = "CrashDamageIfFailsUnusableInGravity" + when "10C" then new_code = "UserMakeSubstitute" + when "10D" then new_code = "CurseTargetOrLowerUserSpd1RaiseUserAtkDef1" + when "10E" then new_code = "LowerPPOfTargetLastMoveBy4" + when "10F" then new_code = "StartDamageTargetEachTurnIfTargetAsleep" + when "110" then new_code = "RemoveUserBindingAndEntryHazards" + when "111" then new_code = "AttackTwoTurnsLater" + when "112" then new_code = "UserAddStockpileRaiseDefSpDef1" + when "113" then new_code = "PowerDependsOnUserStockpile" + when "114" then new_code = "HealUserDependingOnUserStockpile" + when "115" then new_code = "FailsIfUserDamagedThisTurn" + when "116" then new_code = "FailsIfTargetActed" + when "117" then new_code = "RedirectAllMovesToUser" + when "118" then new_code = "StartGravity" + when "119" then new_code = "StartUserAirborne" + when "11A" then new_code = "StartTargetAirborneAndAlwaysHitByMoves" + when "11B" then new_code = "HitsTargetInSky" + when "11C" then new_code = "HitsTargetInSkyGroundsTarget" + when "11D" then new_code = "TargetActsNext" + when "11E" then new_code = "TargetActsLast" + when "11F" then new_code = "StartSlowerBattlersActFirst" + when "120" then new_code = "UserSwapsPositionsWithAlly" + when "121" then new_code = "UseTargetAttackInsteadOfUserAttack" + when "122" then new_code = "UseTargetDefenseInsteadOfTargetSpDef" + when "123" then new_code = "FailsUnlessTargetSharesTypeWithUser" + when "124" then new_code = "StartSwapAllBattlersBaseDefensiveStats" + when "125" then new_code = "FailsIfUserHasUnusedMove" + when "126" then new_code = "None" + when "127" then new_code = "ParalyzeTarget" + when "128" then new_code = "BurnTarget" + when "129" then new_code = "FreezeTarget" + when "12A" then new_code = "ConfuseTarget" + when "12B" then new_code = "LowerTargetDefense2" + when "12C" then new_code = "LowerTargetEvasion2" + when "12D" then new_code = "DoublePowerIfTargetUnderwater" + when "12E" then new_code = "AllBattlersLoseHalfHPUserSkipsNextTurn" + when "12F" then new_code = "TrapTargetInBattle" + when "130" then new_code = "UserLosesHalfHP" + when "131" then new_code = "StartShadowSkyWeather" + when "132" then new_code = "RemoveAllScreens" + when "133" then new_code = "DoesNothingFailsIfNoAlly" + when "134" then new_code = "DoesNothingCongratuations" + when "135" then new_code = "FreezeTargetSuperEffectiveAgainstWater" + when "136" then new_code = "RaiseUserDefense2" + when "137" then new_code = "RaisePlusMinusUserAndAlliesDefSpDef1" + when "138" then new_code = "RaiseAllySpDef1" + when "139" then new_code = "LowerTargetAttack1BypassSubstitute" + when "13A" then new_code = "LowerTargetAtkSpAtk1" + when "13B" then new_code = "HoopaRemoveProtectionsBypassSubstituteLowerUserDef1" + when "13C" then new_code = "LowerTargetSpAtk1" + when "13D" then new_code = "LowerTargetSpAtk2" + when "13E" then new_code = "RaiseGroundedGrassBattlersAtkSpAtk1" + when "13F" then new_code = "RaiseGrassBattlersDef1" + when "140" then new_code = "LowerPoisonedTargetAtkSpAtkSpd1" + when "141" then new_code = "InvertTargetStatStages" + when "142" then new_code = "AddGhostTypeToTarget" + when "143" then new_code = "AddGrassTypeToTarget" + when "144" then new_code = "EffectivenessIncludesFlyingType" + when "145" then new_code = "TargetMovesBecomeElectric" + when "146" then new_code = "NormalMovesBecomeElectric" + when "147" then new_code = "RemoveProtectionsBypassSubstitute" + when "148" then new_code = "TargetNextFireMoveDamagesTarget" + when "149" then new_code = "ProtectUserSideFromDamagingMovesIfUserFirstTurn" + when "14A" then new_code = "ProtectUserSideFromStatusMoves" + when "14B" then new_code = "ProtectUserFromDamagingMovesKingsShield" + when "14C" then new_code = "ProtectUserFromTargetingMovesSpikyShield" + when "14D" then new_code = "TwoTurnAttackInvulnerableRemoveProtections" + when "14E" then new_code = "TwoTurnAttackRaiseUserSpAtkSpDefSpd2" + when "14F" then new_code = "HealUserByThreeQuartersOfDamageDone" + when "150" then new_code = "RaiseUserAttack3IfTargetFaints" + when "151" then new_code = "LowerTargetAtkSpAtk1SwitchOutUser" + when "152" then new_code = "TrapAllBattlersInBattleForOneTurn" + when "153" then new_code = "AddStickyWebToFoeSide" + when "154" then new_code = "StartElectricTerrain" + when "155" then new_code = "StartGrassyTerrain" + when "156" then new_code = "StartMistyTerrain" + when "157" then new_code = "DoubleMoneyGainedFromBattle" + when "158" then new_code = "FailsIfUserNotConsumedBerry" + when "159" then new_code = "PoisonTargetLowerTargetSpeed1" + when "15A" then new_code = "CureTargetBurn" + when "15B" then new_code = "CureTargetStatusHealUserHalfOfTotalHP" + when "15C" then new_code = "RaisePlusMinusUserAndAlliesAtkSpAtk1" + when "15D" then new_code = "UserStealTargetPositiveStatStages" + when "15E" then new_code = "EnsureNextCriticalHit" + when "15F" then new_code = "LowerUserDefense1" + when "160" then new_code = "HealUserByTargetAttackLowerTargetAttack1" + when "161" then new_code = "UserTargetSwapBaseSpeed" + when "162" then new_code = "UserLosesFireType" + when "163" then new_code = "IgnoreTargetAbility" + when "164" then new_code = "CategoryDependsOnHigherDamageIgnoreTargetAbility" + when "165" then new_code = "NegateTargetAbilityIfTargetActed" + when "166" then new_code = "DoublePowerIfUserLastMoveFailed" + when "167" then new_code = "StartWeakenDamageAgainstUserSideIfHail" + when "168" then new_code = "ProtectUserBanefulBunker" + when "169" then new_code = "TypeIsUserFirstType" + when "16A" then new_code = "RedirectAllMovesToTarget" + when "16B" then new_code = "TargetUsesItsLastUsedMoveAgain" + when "16C" then new_code = "DisableTargetSoundMoves" + when "16D" then new_code = "HealUserDependingOnSandstorm" + when "16E" then new_code = "HealTargetDependingOnGrassyTerrain" + when "16F" then new_code = "HealAllyOrDamageFoe" + when "170" then new_code = "UserLosesHalfOfTotalHPExplosive" + when "171" then new_code = "UsedAfterUserTakesPhysicalDamage" + when "172" then new_code = "BurnAttackerBeforeUserActs" + when "173" then new_code = "StartPsychicTerrain" + when "174" then new_code = "FailsIfNotUserFirstTurn" + when "175" then new_code = "HitTwoTimesFlinchTarget" + end + data[:function_code] = new_code + return data + end end end diff --git a/Data/Scripts/011_Battle/001_Battler/001_PokeBattle_Battler.rb b/Data/Scripts/011_Battle/001_Battler/001_PokeBattle_Battler.rb index 201301103..2af110ec6 100644 --- a/Data/Scripts/011_Battle/001_Battler/001_PokeBattle_Battler.rb +++ b/Data/Scripts/011_Battle/001_Battler/001_PokeBattle_Battler.rb @@ -522,7 +522,8 @@ class PokeBattle_Battler def takesSandstormDamage? return false if !takesIndirectDamage? return false if pbHasType?(:GROUND) || pbHasType?(:ROCK) || pbHasType?(:STEEL) - return false if inTwoTurnAttack?("0CA","0CB") # Dig, Dive + return false if inTwoTurnAttack?("TwoTurnAttackInvulnerableUnderground", + "TwoTurnAttackInvulnerableUnderwater") return false if hasActiveAbility?([:OVERCOAT,:SANDFORCE,:SANDRUSH,:SANDVEIL]) return false if hasActiveItem?(:SAFETYGOGGLES) return true @@ -531,7 +532,8 @@ class PokeBattle_Battler def takesHailDamage? return false if !takesIndirectDamage? return false if pbHasType?(:ICE) - return false if inTwoTurnAttack?("0CA","0CB") # Dig, Dive + return false if inTwoTurnAttack?("TwoTurnAttackInvulnerableUnderground", + "TwoTurnAttackInvulnerableUnderwater") return false if hasActiveAbility?([:OVERCOAT,:ICEBODY,:SNOWCLOAK]) return false if hasActiveItem?(:SAFETYGOGGLES) return true @@ -627,7 +629,12 @@ class PokeBattle_Battler end def semiInvulnerable? - return inTwoTurnAttack?("0C9","0CA","0CB","0CC","0CD","0CE","14D") + return inTwoTurnAttack?("TwoTurnAttackInvulnerableInSky", + "TwoTurnAttackInvulnerableUnderground", + "TwoTurnAttackInvulnerableUnderwater", + "TwoTurnAttackInvulnerableInSkyParalyzeTarget", + "TwoTurnAttackInvulnerableRemoveProtections", + "TwoTurnAttackInvulnerableInSkyTargetCannotAct") end def pbEncoredMoveIndex diff --git a/Data/Scripts/011_Battle/001_Battler/007_Battler_UseMove.rb b/Data/Scripts/011_Battle/001_Battler/007_Battler_UseMove.rb index a1412e31e..cdc4ee799 100644 --- a/Data/Scripts/011_Battle/001_Battler/007_Battler_UseMove.rb +++ b/Data/Scripts/011_Battle/001_Battler/007_Battler_UseMove.rb @@ -372,7 +372,7 @@ class PokeBattle_Battler # Pokémon which becomes Ghost-type because of Protean, it should # target and curse itself. I think this is silly, so I'm making it # choose a random opponent to curse instead. - if move.function=="10D" && targets.length==0 # Curse + if move.function=="CurseTargetOrLowerUserSpd1RaiseUserAtkDef1" && targets.length==0 choice[3] = -1 targets = pbFindTargets(choice,move,user) end @@ -658,7 +658,7 @@ class PokeBattle_Battler if move.pbDamagingMove? targets.each do |b| next if b.damageState.unaffected - # NOTE: This method is also used for the OKHO special message. + # NOTE: This method is also used for the OHKO special message. move.pbHitEffectivenessMessages(user,b,targets.length) # Record data about the hit for various effects' purposes move.pbRecordDamageLost(user,b) diff --git a/Data/Scripts/011_Battle/001_Battler/009_Battler_UseMove_SuccessChecks.rb b/Data/Scripts/011_Battle/001_Battler/009_Battler_UseMove_SuccessChecks.rb index b224988a1..cbeaf7cc0 100644 --- a/Data/Scripts/011_Battle/001_Battler/009_Battler_UseMove_SuccessChecks.rb +++ b/Data/Scripts/011_Battle/001_Battler/009_Battler_UseMove_SuccessChecks.rb @@ -535,17 +535,19 @@ class PokeBattle_Battler # Future Sight hitsInvul = true if @battle.futureSight # Helping Hand - hitsInvul = true if move.function=="09C" + hitsInvul = true if move.function=="PowerUpAllyMove" if !hitsInvul # Semi-invulnerable moves if target.effects[PBEffects::TwoTurnAttack] - if target.inTwoTurnAttack?("0C9","0CC","0CE") # Fly, Bounce, Sky Drop + if target.inTwoTurnAttack?("TwoTurnAttackInvulnerableInSky", + "TwoTurnAttackInvulnerableInSkyParalyzeTarget", + "TwoTurnAttackInvulnerableInSkyTargetCannotAct") miss = true if !move.hitsFlyingTargets? - elsif target.inTwoTurnAttack?("0CA") # Dig + elsif target.inTwoTurnAttack?("TwoTurnAttackInvulnerableUnderground") miss = true if !move.hitsDiggingTargets? - elsif target.inTwoTurnAttack?("0CB") # Dive + elsif target.inTwoTurnAttack?("TwoTurnAttackInvulnerableUnderwater") miss = true if !move.hitsDivingTargets? - elsif target.inTwoTurnAttack?("0CD","14D") # Shadow Force, Phantom Force + elsif target.inTwoTurnAttack?("TwoTurnAttackInvulnerableRemoveProtections") miss = true end end diff --git a/Data/Scripts/011_Battle/001_Battler/010_Battler_UseMove_TriggerEffects.rb b/Data/Scripts/011_Battle/001_Battler/010_Battler_UseMove_TriggerEffects.rb index 8de9b3cca..24308d5b2 100644 --- a/Data/Scripts/011_Battle/001_Battler/010_Battler_UseMove_TriggerEffects.rb +++ b/Data/Scripts/011_Battle/001_Battler/010_Battler_UseMove_TriggerEffects.rb @@ -145,7 +145,7 @@ class PokeBattle_Battler user.pbConsumeItem end # Room Service - if move.function == "11F" && @battle.field.effects[PBEffects::TrickRoom] > 0 # Trick Room + if move.function == "StartSlowerBattlersActFirst" && @battle.field.effects[PBEffects::TrickRoom] > 0 @battle.battlers.each do |b| next if !b.hasActiveItem?(:ROOMSERVICE) next if !b.pbCanLowerStatStage?(:SPEED, b) diff --git a/Data/Scripts/011_Battle/002_Move/001_PokeBattle_Move.rb b/Data/Scripts/011_Battle/002_Move/001_PokeBattle_Move.rb index 5db76dac0..5efb9c097 100644 --- a/Data/Scripts/011_Battle/002_Move/001_PokeBattle_Move.rb +++ b/Data/Scripts/011_Battle/002_Move/001_PokeBattle_Move.rb @@ -49,7 +49,7 @@ class PokeBattle_Move # function code (found in the script section PokeBattle_MoveEffect). def PokeBattle_Move.from_pokemon_move(battle, move) validate move => Pokemon::Move - moveFunction = move.function_code || "000" + moveFunction = move.function_code || "None" className = sprintf("PokeBattle_Move_%s", moveFunction) if Object.const_defined?(className) return Object.const_get(className).new(battle, move) diff --git a/Data/Scripts/011_Battle/002_Move/002_Move_Usage.rb b/Data/Scripts/011_Battle/002_Move/002_Move_Usage.rb index e1e6eafee..d2a14bc6d 100644 --- a/Data/Scripts/011_Battle/002_Move/002_Move_Usage.rb +++ b/Data/Scripts/011_Battle/002_Move/002_Move_Usage.rb @@ -347,7 +347,7 @@ class PokeBattle_Move # regardless of its calculated type. Hence the following two lines of # code. moveType = nil - moveType = :NORMAL if @function=="090" # Hidden Power + moveType = :NORMAL if @function=="TypeDependsOnUserIVs" # Hidden Power if physicalMove?(moveType) target.effects[PBEffects::Counter] = damage target.effects[PBEffects::CounterTarget] = user.index diff --git a/Data/Scripts/011_Battle/002_Move/003_Move_Usage_Calculations.rb b/Data/Scripts/011_Battle/002_Move/003_Move_Usage_Calculations.rb index 1f72d9991..fb4312ec3 100644 --- a/Data/Scripts/011_Battle/002_Move/003_Move_Usage_Calculations.rb +++ b/Data/Scripts/011_Battle/002_Move/003_Move_Usage_Calculations.rb @@ -88,8 +88,7 @@ class PokeBattle_Move #============================================================================= def pbBaseAccuracy(user,target); return @accuracy; end - # Accuracy calculations for one-hit KO moves and "always hit" moves are - # handled elsewhere. + # Accuracy calculations for one-hit KO moves are handled elsewhere. def pbAccuracyCheck(user,target) # "Always hit" effects and "always hit" accuracy return true if target.effects[PBEffects::Telekinesis]>0 @@ -396,7 +395,7 @@ class PokeBattle_Move multipliers[:final_damage_multiplier] *= 1.5 end when :Sandstorm - if target.pbHasType?(:ROCK) && specialMove? && @function != "122" # Psyshock + if target.pbHasType?(:ROCK) && specialMove? && @function != "UseTargetDefenseInsteadOfTargetSpDef" multipliers[:defense_multiplier] *= 1.5 end end @@ -467,7 +466,7 @@ class PokeBattle_Move def pbAdditionalEffectChance(user,target,effectChance=0) return 0 if target.hasActiveAbility?(:SHIELDDUST) && !@battle.moldBreaker ret = (effectChance>0) ? effectChance : @addlEffect - if Settings::MECHANICS_GENERATION >= 6 || @function != "0A4" # Secret Power + if Settings::MECHANICS_GENERATION >= 6 || @function != "EffectDependsOnEnvironment" ret *= 2 if user.hasActiveAbility?(:SERENEGRACE) || user.pbOwnSide.effects[PBEffects::Rainbow]>0 end diff --git a/Data/Scripts/011_Battle/002_Move/004_Move_Effects_Generic.rb b/Data/Scripts/011_Battle/002_Move/004_Move_BaseEffects.rb similarity index 98% rename from Data/Scripts/011_Battle/002_Move/004_Move_Effects_Generic.rb rename to Data/Scripts/011_Battle/002_Move/004_Move_BaseEffects.rb index b58a70b53..1ecd10d9b 100644 --- a/Data/Scripts/011_Battle/002_Move/004_Move_Effects_Generic.rb +++ b/Data/Scripts/011_Battle/002_Move/004_Move_BaseEffects.rb @@ -22,9 +22,9 @@ class PokeBattle_Confusion < PokeBattle_Move def initialize(battle,move) @battle = battle @realMove = move - @id = 0 + @id = :CONFUSEDAMAGE @name = "" - @function = "000" + @function = "None" @baseDamage = 40 @type = nil @category = 0 @@ -56,7 +56,7 @@ class PokeBattle_Struggle < PokeBattle_Move @realMove = nil # Not associated with a move @id = (move) ? move.id : :STRUGGLE @name = (move) ? move.name : _INTL("Struggle") - @function = "002" + @function = "Struggle" @baseDamage = 50 @type = nil @category = 0 @@ -466,7 +466,12 @@ class PokeBattle_TwoTurnMove < PokeBattle_Move # Moves that would make the user semi-invulnerable will hide the user # after the charging animation, so the "UseItem" animation shouldn't show # for it - if !["0C9","0CA","0CB","0CC","0CD","0CE","14D"].include?(@function) + if !["TwoTurnAttackInvulnerableInSky", + "TwoTurnAttackInvulnerableUnderground", + "TwoTurnAttackInvulnerableUnderwater", + "TwoTurnAttackInvulnerableInSkyParalyzeTarget", + "TwoTurnAttackInvulnerableRemoveProtections", + "TwoTurnAttackInvulnerableInSkyTargetCannotAct"].include?(@function) @battle.pbCommonAnimation("UseItem",user) end @battle.pbDisplay(_INTL("{1} became fully charged due to its Power Herb!",user.pbThis)) diff --git a/Data/Scripts/011_Battle/002_Move/005_MoveEffects_Misc.rb b/Data/Scripts/011_Battle/002_Move/005_MoveEffects_Misc.rb new file mode 100644 index 000000000..b2fd54c66 --- /dev/null +++ b/Data/Scripts/011_Battle/002_Move/005_MoveEffects_Misc.rb @@ -0,0 +1,702 @@ +#=============================================================================== +# No additional effect. +#=============================================================================== +class PokeBattle_Move_None < PokeBattle_Move +end + +#=============================================================================== +# Does absolutely nothing. Shows a special message. (Celebrate) +#=============================================================================== +class PokeBattle_Move_DoesNothingCongratuations < PokeBattle_Move + def pbEffectGeneral(user) + if @battle.wildBattle? && user.opposes? + @battle.pbDisplay(_INTL("Congratulations from {1}!",user.pbThis(true))) + else + @battle.pbDisplay(_INTL("Congratulations, {1}!",@battle.pbGetOwnerName(user.index))) + end + end +end + +#=============================================================================== +# Does absolutely nothing. (Hold Hands) +#=============================================================================== +class PokeBattle_Move_DoesNothingFailsIfNoAlly < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + + def pbMoveFailed?(user,targets) + hasAlly = false + user.eachAlly do |_b| + hasAlly = true + break + end + if !hasAlly + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end +end + +#=============================================================================== +# Does absolutely nothing. (Splash) +#=============================================================================== +class PokeBattle_Move_DoesNothingUnusableInGravity < PokeBattle_Move + def unusableInGravity?; return true; end + + def pbEffectGeneral(user) + @battle.pbDisplay(_INTL("But nothing happened!")) + end +end + +#=============================================================================== +# Struggle, if defined as a move in moves.txt. Typically it won't be. +#=============================================================================== +class PokeBattle_Move_Struggle < PokeBattle_Struggle +end + +#=============================================================================== +# Scatters coins that the player picks up after winning the battle. (Pay Day) +# NOTE: In Gen 6+, if the user levels up after this move is used, the amount of +# money picked up depends on the user's new level rather than its level +# when it used the move. I think this is silly, so I haven't coded this +# effect. +#=============================================================================== +class PokeBattle_Move_AddMoneyGainedFromBattle < PokeBattle_Move + def pbEffectGeneral(user) + if user.pbOwnedByPlayer? + @battle.field.effects[PBEffects::PayDay] += 5*user.level + end + @battle.pbDisplay(_INTL("Coins were scattered everywhere!")) + end +end + +#=============================================================================== +# Doubles the prize money the player gets after winning the battle. (Happy Hour) +#=============================================================================== +class PokeBattle_Move_DoubleMoneyGainedFromBattle < PokeBattle_Move + def pbEffectGeneral(user) + @battle.field.effects[PBEffects::HappyHour] = true if !user.opposes? + @battle.pbDisplay(_INTL("Everyone is caught up in the happy atmosphere!")) + end +end + +#=============================================================================== +# Fails if this isn't the user's first turn. (First Impression) +#=============================================================================== +class PokeBattle_Move_FailsIfNotUserFirstTurn < PokeBattle_Move + def pbMoveFailed?(user,targets) + if user.turnCount > 1 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end +end + +#=============================================================================== +# Fails unless user has already used all other moves it knows. (Last Resort) +#=============================================================================== +class PokeBattle_Move_FailsIfUserHasUnusedMove < PokeBattle_Move + def pbFailsAgainstTarget?(user, target, show_message) + hasThisMove = false + hasOtherMoves = false + hasUnusedMoves = false + user.eachMove do |m| + hasThisMove = true if m.id==@id + hasOtherMoves = true if m.id!=@id + hasUnusedMoves = true if m.id!=@id && !user.movesUsed.include?(m.id) + end + if !hasThisMove || !hasOtherMoves || hasUnusedMoves + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end +end + +#=============================================================================== +# Fails unless user has consumed a berry at some point. (Belch) +#=============================================================================== +class PokeBattle_Move_FailsIfUserNotConsumedBerry < PokeBattle_Move + def pbCanChooseMove?(user,commandPhase,showMessages) + if !user.belched? + if showMessages + msg = _INTL("{1} hasn't eaten any held berry, so it can't possibly belch!",user.pbThis) + (commandPhase) ? @battle.pbDisplayPaused(msg) : @battle.pbDisplay(msg) + end + return false + end + return true + end + + def pbMoveFailed?(user,targets) + if !user.belched? + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end +end + +#=============================================================================== +# Fails if the target is not holding an item, or if the target is affected by +# Magic Room/Klutz. (Poltergeist) +#=============================================================================== +class PokeBattle_Move_FailsIfTargetHasNoItem < PokeBattle_Move + def pbFailsAgainstTarget?(user, target, show_message) + if !target.item || !target.itemActive? + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + @battle.pbDisplay(_INTL("{1} is about to be attacked by its {2}!", target.pbThis, target.itemName)) + return false + end +end + +#=============================================================================== +# Only damages Pokémon that share a type with the user. (Synchronoise) +#=============================================================================== +class PokeBattle_Move_FailsUnlessTargetSharesTypeWithUser < PokeBattle_Move + def pbFailsAgainstTarget?(user, target, show_message) + userTypes = user.pbTypes(true) + targetTypes = target.pbTypes(true) + sharesType = false + userTypes.each do |t| + next if !targetTypes.include?(t) + sharesType = true + break + end + if !sharesType + @battle.pbDisplay(_INTL("{1} is unaffected!",target.pbThis)) if show_message + return true + end + return false + end +end + +#=============================================================================== +# Fails if user was hit by a damaging move this round. (Focus Punch) +#=============================================================================== +class PokeBattle_Move_FailsIfUserDamagedThisTurn < PokeBattle_Move + def pbDisplayChargeMessage(user) + user.effects[PBEffects::FocusPunch] = true + @battle.pbCommonAnimation("FocusPunch",user) + @battle.pbDisplay(_INTL("{1} is tightening its focus!",user.pbThis)) + end + + def pbDisplayUseMessage(user) + super if !user.effects[PBEffects::FocusPunch] || user.lastHPLost==0 + end + + def pbMoveFailed?(user,targets) + if user.effects[PBEffects::FocusPunch] && user.lastHPLost>0 + @battle.pbDisplay(_INTL("{1} lost its focus and couldn't move!",user.pbThis)) + return true + end + return false + end +end + +#=============================================================================== +# Fails if the target didn't chose a damaging move to use this round, or has +# already moved. (Sucker Punch) +#=============================================================================== +class PokeBattle_Move_FailsIfTargetActed < PokeBattle_Move + def pbFailsAgainstTarget?(user, target, show_message) + if @battle.choices[target.index][0]!=:UseMove + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + oppMove = @battle.choices[target.index][2] + if !oppMove || + (oppMove.function!="UseMoveTargetIsAboutToUse" && + (target.movedThisRound? || oppMove.statusMove?)) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end +end + +#=============================================================================== +# If attack misses, user takes crash damage of 1/2 of max HP. +# (High Jump Kick, Jump Kick) +#=============================================================================== +class PokeBattle_Move_CrashDamageIfFailsUnusableInGravity < PokeBattle_Move + def recoilMove?; return true; end + def unusableInGravity?; return true; end + + def pbCrashDamage(user) + return if !user.takesIndirectDamage? + @battle.pbDisplay(_INTL("{1} kept going and crashed!",user.pbThis)) + @battle.scene.pbDamageAnimation(user) + user.pbReduceHP(user.totalhp/2,false) + user.pbItemHPHealCheck + user.pbFaint if user.fainted? + end +end + +#=============================================================================== +# Starts sunny weather. (Sunny Day) +#=============================================================================== +class PokeBattle_Move_StartSunWeather < PokeBattle_WeatherMove + def initialize(battle,move) + super + @weatherType = :Sun + end +end + +#=============================================================================== +# Starts rainy weather. (Rain Dance) +#=============================================================================== +class PokeBattle_Move_StartRainWeather < PokeBattle_WeatherMove + def initialize(battle,move) + super + @weatherType = :Rain + end +end + +#=============================================================================== +# Starts sandstorm weather. (Sandstorm) +#=============================================================================== +class PokeBattle_Move_StartSandstormWeather < PokeBattle_WeatherMove + def initialize(battle,move) + super + @weatherType = :Sandstorm + end +end + +#=============================================================================== +# Starts hail weather. (Hail) +#=============================================================================== +class PokeBattle_Move_StartHailWeather < PokeBattle_WeatherMove + def initialize(battle,move) + super + @weatherType = :Hail + end +end + +#=============================================================================== +# For 5 rounds, creates an electric terrain which boosts Electric-type moves and +# prevents Pokémon from falling asleep. Affects non-airborne Pokémon only. +# (Electric Terrain) +#=============================================================================== +class PokeBattle_Move_StartElectricTerrain < PokeBattle_Move + def pbMoveFailed?(user,targets) + if @battle.field.terrain == :Electric + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + @battle.pbStartTerrain(user, :Electric) + end +end + +#=============================================================================== +# For 5 rounds, creates a grassy terrain which boosts Grass-type moves and heals +# Pokémon at the end of each round. Affects non-airborne Pokémon only. +# (Grassy Terrain) +#=============================================================================== +class PokeBattle_Move_StartGrassyTerrain < PokeBattle_Move + def pbMoveFailed?(user,targets) + if @battle.field.terrain == :Grassy + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + @battle.pbStartTerrain(user, :Grassy) + end +end + +#=============================================================================== +# For 5 rounds, creates a misty terrain which weakens Dragon-type moves and +# protects Pokémon from status problems. Affects non-airborne Pokémon only. +# (Misty Terrain) +#=============================================================================== +class PokeBattle_Move_StartMistyTerrain < PokeBattle_Move + def pbMoveFailed?(user,targets) + if @battle.field.terrain == :Misty + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + @battle.pbStartTerrain(user, :Misty) + end +end + +#=============================================================================== +# For 5 rounds, creates a psychic terrain which boosts Psychic-type moves and +# prevents Pokémon from being hit by >0 priority moves. Affects non-airborne +# Pokémon only. (Psychic Terrain) +#=============================================================================== +class PokeBattle_Move_StartPsychicTerrain < PokeBattle_Move + def pbMoveFailed?(user,targets) + if @battle.field.terrain == :Psychic + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + @battle.pbStartTerrain(user, :Psychic) + end +end + +#=============================================================================== +# Removes the current terrain. Fails if there is no terrain in effect. +# (Steel Roller) +#=============================================================================== +class PokeBattle_Move_RemoveTerrain < PokeBattle_Move + def pbMoveFailed?(user, targets) + if @battle.field.terrain == :None + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + case @battle.field.terrain + when :Electric + @battle.pbDisplay(_INTL("The electricity disappeared from the battlefield.")) + when :Grassy + @battle.pbDisplay(_INTL("The grass disappeared from the battlefield.")) + when :Misty + @battle.pbDisplay(_INTL("The mist disappeared from the battlefield.")) + when :Psychic + @battle.pbDisplay(_INTL("The weirdness disappeared from the battlefield.")) + end + @battle.field.terrain = :None + end +end + +#=============================================================================== +# Entry hazard. Lays spikes on the opposing side (max. 3 layers). (Spikes) +#=============================================================================== +class PokeBattle_Move_AddSpikesToFoeSide < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbMoveFailed?(user,targets) + if user.pbOpposingSide.effects[PBEffects::Spikes]>=3 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.pbOpposingSide.effects[PBEffects::Spikes] += 1 + @battle.pbDisplay(_INTL("Spikes were scattered all around {1}'s feet!", + user.pbOpposingTeam(true))) + end +end + +#=============================================================================== +# Entry hazard. Lays poison spikes on the opposing side (max. 2 layers). +# (Toxic Spikes) +#=============================================================================== +class PokeBattle_Move_AddToxicSpikesToFoeSide < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbMoveFailed?(user,targets) + if user.pbOpposingSide.effects[PBEffects::ToxicSpikes]>=2 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.pbOpposingSide.effects[PBEffects::ToxicSpikes] += 1 + @battle.pbDisplay(_INTL("Poison spikes were scattered all around {1}'s feet!", + user.pbOpposingTeam(true))) + end +end + +#=============================================================================== +# Entry hazard. Lays stealth rocks on the opposing side. (Stealth Rock) +#=============================================================================== +class PokeBattle_Move_AddStealthRocksToFoeSide < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbMoveFailed?(user,targets) + if user.pbOpposingSide.effects[PBEffects::StealthRock] + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.pbOpposingSide.effects[PBEffects::StealthRock] = true + @battle.pbDisplay(_INTL("Pointed stones float in the air around {1}!", + user.pbOpposingTeam(true))) + end +end + +#=============================================================================== +# Entry hazard. Lays stealth rocks on the opposing side. (Sticky Web) +#=============================================================================== +class PokeBattle_Move_AddStickyWebToFoeSide < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbMoveFailed?(user,targets) + if user.pbOpposingSide.effects[PBEffects::StickyWeb] + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.pbOpposingSide.effects[PBEffects::StickyWeb] = true + @battle.pbDisplay(_INTL("A sticky web has been laid out beneath {1}'s feet!", + user.pbOpposingTeam(true))) + end +end + +#=============================================================================== +# All effects that apply to one side of the field are swapped to the opposite +# side. (Court Change) +#=============================================================================== +class PokeBattle_Move_SwapSideEffects < PokeBattle_Move + def initialize(battle, move) + super + @number_effects = [ + PBEffects::AuroraVeil, + PBEffects::LightScreen, + PBEffects::Mist, + PBEffects::Rainbow, + PBEffects::Reflect, + PBEffects::Safeguard, + PBEffects::SeaOfFire, + PBEffects::Spikes, + PBEffects::Swamp, + PBEffects::Tailwind, + PBEffects::ToxicSpikes + ] + @boolean_effects = [ + PBEffects::StealthRock, + PBEffects::StickyWeb + ] + end + + def pbMoveFailed?(user, targets) + has_effect = false + for side in 0...2 + effects = @battle.sides[side].effects + @number_effects.each do |e| + next if effects[e] == 0 + has_effect = true + break + end + break if has_effect + @boolean_effects.each do |e| + next if !effects[e] + has_effect = true + break + end + break if has_effect + end + if !has_effect + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + side0 = @battle.sides[0] + side1 = @battle.sides[1] + @number_effects.each do |e| + side0.effects[e], side1.effects[e] = side1.effects[e], side0.effects[e] + end + @boolean_effects.each do |e| + side0.effects[e], side1.effects[e] = side1.effects[e], side0.effects[e] + end + @battle.pbDisplay(_INTL("{1} swapped the battle effects affecting each side of the field!", user.pbThis)) + end +end + +#=============================================================================== +# User turns 1/4 of max HP into a substitute. (Substitute) +#=============================================================================== +class PokeBattle_Move_UserMakeSubstitute < PokeBattle_Move + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if user.effects[PBEffects::Substitute]>0 + @battle.pbDisplay(_INTL("{1} already has a substitute!",user.pbThis)) + return true + end + @subLife = user.totalhp/4 + @subLife = 1 if @subLife<1 + if user.hp<=@subLife + @battle.pbDisplay(_INTL("But it does not have enough HP left to make a substitute!")) + return true + end + return false + end + + def pbOnStartUse(user,targets) + user.pbReduceHP(@subLife,false,false) + user.pbItemHPHealCheck + end + + def pbEffectGeneral(user) + user.effects[PBEffects::Trapping] = 0 + user.effects[PBEffects::TrappingMove] = nil + user.effects[PBEffects::Substitute] = @subLife + @battle.pbDisplay(_INTL("{1} put in a substitute!",user.pbThis)) + end +end + +#=============================================================================== +# Removes trapping moves, entry hazards and Leech Seed on user/user's side. +# Raises user's Speed by 1 stage (Gen 8+). (Rapid Spin) +#=============================================================================== +class PokeBattle_Move_RemoveUserBindingAndEntryHazards < PokeBattle_StatUpMove + def initialize(battle,move) + super + @statUp = [:SPEED, 1] + end + + def pbEffectAfterAllHits(user,target) + return if user.fainted? || target.damageState.unaffected + if user.effects[PBEffects::Trapping]>0 + trapMove = GameData::Move.get(user.effects[PBEffects::TrappingMove]).name + trapUser = @battle.battlers[user.effects[PBEffects::TrappingUser]] + @battle.pbDisplay(_INTL("{1} got free of {2}'s {3}!",user.pbThis,trapUser.pbThis(true),trapMove)) + user.effects[PBEffects::Trapping] = 0 + user.effects[PBEffects::TrappingMove] = nil + user.effects[PBEffects::TrappingUser] = -1 + end + if user.effects[PBEffects::LeechSeed]>=0 + user.effects[PBEffects::LeechSeed] = -1 + @battle.pbDisplay(_INTL("{1} shed Leech Seed!",user.pbThis)) + end + if user.pbOwnSide.effects[PBEffects::StealthRock] + user.pbOwnSide.effects[PBEffects::StealthRock] = false + @battle.pbDisplay(_INTL("{1} blew away stealth rocks!",user.pbThis)) + end + if user.pbOwnSide.effects[PBEffects::Spikes]>0 + user.pbOwnSide.effects[PBEffects::Spikes] = 0 + @battle.pbDisplay(_INTL("{1} blew away spikes!",user.pbThis)) + end + if user.pbOwnSide.effects[PBEffects::ToxicSpikes]>0 + user.pbOwnSide.effects[PBEffects::ToxicSpikes] = 0 + @battle.pbDisplay(_INTL("{1} blew away poison spikes!",user.pbThis)) + end + if user.pbOwnSide.effects[PBEffects::StickyWeb] + user.pbOwnSide.effects[PBEffects::StickyWeb] = false + @battle.pbDisplay(_INTL("{1} blew away sticky webs!",user.pbThis)) + end + end + + def pbAdditionalEffect(user,target) + super if Settings::MECHANICS_GENERATION >= 8 + end +end + +#=============================================================================== +# Attacks 2 rounds in the future. (Doom Desire, Future Sight) +#=============================================================================== +class PokeBattle_Move_AttackTwoTurnsLater < PokeBattle_Move + def targetsPosition?; return true; end + + def pbDamagingMove? # Stops damage being dealt in the setting-up turn + return false if !@battle.futureSight + return super + end + + def pbAccuracyCheck(user,target) + return true if !@battle.futureSight + return super + end + + def pbDisplayUseMessage(user) + super if !@battle.futureSight + end + + def pbFailsAgainstTarget?(user, target, show_message) + if !@battle.futureSight && + @battle.positions[target.index].effects[PBEffects::FutureSightCounter]>0 + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + return if @battle.futureSight # Attack is hitting + effects = @battle.positions[target.index].effects + effects[PBEffects::FutureSightCounter] = 3 + effects[PBEffects::FutureSightMove] = @id + effects[PBEffects::FutureSightUserIndex] = user.index + effects[PBEffects::FutureSightUserPartyIndex] = user.pokemonIndex + if @id == :DOOMDESIRE + @battle.pbDisplay(_INTL("{1} chose Doom Desire as its destiny!",user.pbThis)) + else + @battle.pbDisplay(_INTL("{1} foresaw an attack!",user.pbThis)) + end + end + + def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) + hitNum = 1 if !@battle.futureSight # Charging anim + super + end +end + +#=============================================================================== +# User switches places with its ally. (Ally Switch) +#=============================================================================== +class PokeBattle_Move_UserSwapsPositionsWithAlly < PokeBattle_Move + def pbMoveFailed?(user,targets) + numTargets = 0 + @idxAlly = -1 + idxUserOwner = @battle.pbGetOwnerIndexFromBattlerIndex(user.index) + user.eachAlly do |b| + next if @battle.pbGetOwnerIndexFromBattlerIndex(b.index)!=idxUserOwner + next if !b.near?(user) + numTargets += 1 + @idxAlly = b.index + end + if numTargets!=1 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + idxA = user.index + idxB = @idxAlly + if @battle.pbSwapBattlers(idxA,idxB) + @battle.pbDisplay(_INTL("{1} and {2} switched places!", + @battle.battlers[idxB].pbThis,@battle.battlers[idxA].pbThis(true))) + [idxA, idxB].each { |idx| @battle.battlers[idx].pbEffectsOnEnteringPosition } + end + end +end + +#=============================================================================== +# If a Pokémon makes contact with the user before it uses this move, the +# attacker is burned. (Beak Blast) +#=============================================================================== +class PokeBattle_Move_BurnAttackerBeforeUserActs < PokeBattle_Move + def pbDisplayChargeMessage(user) + user.effects[PBEffects::BeakBlast] = true + @battle.pbCommonAnimation("BeakBlast",user) + @battle.pbDisplay(_INTL("{1} started heating up its beak!",user.pbThis)) + end +end diff --git a/Data/Scripts/011_Battle/002_Move/005_Move_Effects_000-07F.rb b/Data/Scripts/011_Battle/002_Move/005_Move_Effects_000-07F.rb deleted file mode 100644 index 711738a24..000000000 --- a/Data/Scripts/011_Battle/002_Move/005_Move_Effects_000-07F.rb +++ /dev/null @@ -1,2792 +0,0 @@ -#=============================================================================== -# No additional effect. -#=============================================================================== -class PokeBattle_Move_000 < PokeBattle_Move -end - - - -#=============================================================================== -# Does absolutely nothing. (Splash) -#=============================================================================== -class PokeBattle_Move_001 < PokeBattle_Move - def unusableInGravity?; return true; end - - def pbEffectGeneral(user) - @battle.pbDisplay(_INTL("But nothing happened!")) - end -end - - - -#=============================================================================== -# Struggle, if defined as a move in moves.txt. Typically it won't be. -#=============================================================================== -class PokeBattle_Move_002 < PokeBattle_Struggle -end - - - -#=============================================================================== -# Puts the target to sleep. -#=============================================================================== -class PokeBattle_Move_003 < PokeBattle_SleepMove - def pbMoveFailed?(user,targets) - if Settings::MECHANICS_GENERATION >= 7 && @id == :DARKVOID - if !user.isSpecies?(:DARKRAI) && user.effects[PBEffects::TransformSpecies] != :DARKRAI - @battle.pbDisplay(_INTL("But {1} can't use the move!",user.pbThis)) - return true - end - end - return false - end - - def pbEndOfMoveUsageEffect(user,targets,numHits,switchedBattlers) - return if numHits==0 - return if user.fainted? || user.effects[PBEffects::Transform] - return if @id != :RELICSONG - return if !user.isSpecies?(:MELOETTA) - return if user.hasActiveAbility?(:SHEERFORCE) && @addlEffect>0 - newForm = (user.form+1)%2 - user.pbChangeForm(newForm,_INTL("{1} transformed!",user.pbThis)) - end -end - - - -#=============================================================================== -# Makes the target drowsy; it falls asleep at the end of the next turn. (Yawn) -#=============================================================================== -class PokeBattle_Move_004 < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.effects[PBEffects::Yawn]>0 - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return true if !target.pbCanSleep?(user,true,self) - return false - end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::Yawn] = 2 - @battle.pbDisplay(_INTL("{1} made {2} drowsy!",user.pbThis,target.pbThis(true))) - end -end - - - -#=============================================================================== -# Poisons the target. -#=============================================================================== -class PokeBattle_Move_005 < PokeBattle_PoisonMove -end - - - -#=============================================================================== -# Badly poisons the target. (Poison Fang, Toxic) -#=============================================================================== -class PokeBattle_Move_006 < PokeBattle_PoisonMove - def initialize(battle,move) - super - @toxic = true - end - - def pbOverrideSuccessCheckPerHit(user,target) - return (Settings::MORE_TYPE_EFFECTS && statusMove? && user.pbHasType?(:POISON)) - end -end - - - -#=============================================================================== -# Paralyzes the target. -# Thunder Wave: Doesn't affect target if move's type has no effect on it. -# Body Slam: Does double damage and has perfect accuracy if target is Minimized. -#=============================================================================== -class PokeBattle_Move_007 < PokeBattle_ParalysisMove - def tramplesMinimize?(param=1) - # Perfect accuracy and double damage (for Body Slam only) - return Settings::MECHANICS_GENERATION >= 6 if @id == :BODYSLAM - return super - end - - def pbFailsAgainstTarget?(user, target, show_message) - if @id == :THUNDERWAVE && Effectiveness.ineffective?(target.damageState.typeMod) - @battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true))) if show_message - return true - end - return super - end -end - - - -#=============================================================================== -# Paralyzes the target. Accuracy perfect in rain, 50% in sunshine. Hits some -# semi-invulnerable targets. (Thunder) -#=============================================================================== -class PokeBattle_Move_008 < PokeBattle_ParalysisMove - def hitsFlyingTargets?; return true; end - - def pbBaseAccuracy(user,target) - case target.effectiveWeather - when :Sun, :HarshSun - return 50 - when :Rain, :HeavyRain - return 0 - end - return super - end -end - - - -#=============================================================================== -# Paralyzes the target. May cause the target to flinch. (Thunder Fang) -#=============================================================================== -class PokeBattle_Move_009 < PokeBattle_Move - def flinchingMove?; return true; end - - def pbAdditionalEffect(user,target) - return if target.damageState.substitute - chance = pbAdditionalEffectChance(user,target,10) - return if chance==0 - if @battle.pbRandom(100)= 6 # Perfect accuracy - return true if param==2 # Double damage - return super - end -end - - - -#=============================================================================== -# Causes the target to flinch. Fails if the user is not asleep. (Snore) -#=============================================================================== -class PokeBattle_Move_011 < PokeBattle_FlinchMove - def usableWhenAsleep?; return true; end - - def pbMoveFailed?(user,targets) - if !user.asleep? - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end -end - - - -#=============================================================================== -# Causes the target to flinch. Fails if this isn't the user's first turn. -# (Fake Out) -#=============================================================================== -class PokeBattle_Move_012 < PokeBattle_FlinchMove - def pbMoveFailed?(user,targets) - if user.turnCount > 1 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end -end - - - -#=============================================================================== -# Confuses the target. -#=============================================================================== -class PokeBattle_Move_013 < PokeBattle_ConfuseMove -end - - - -#=============================================================================== -# Confuses the target. (Chatter) -#=============================================================================== -class PokeBattle_Move_014 < PokeBattle_Move_013 -end - - - -#=============================================================================== -# Confuses the target. Accuracy perfect in rain, 50% in sunshine. Hits some -# semi-invulnerable targets. (Hurricane) -#=============================================================================== -class PokeBattle_Move_015 < PokeBattle_ConfuseMove - def hitsFlyingTargets?; return true; end - - def pbBaseAccuracy(user,target) - case target.effectiveWeather - when :Sun, :HarshSun - return 50 - when :Rain, :HeavyRain - return 0 - end - return super - end -end - - - -#=============================================================================== -# Attracts the target. (Attract) -#=============================================================================== -class PokeBattle_Move_016 < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - return false if damagingMove? - return true if !target.pbCanAttract?(user, show_message) - return true if pbMoveFailedAromaVeil?(user, target, show_message) - return false - end - - def pbEffectAgainstTarget(user,target) - return if damagingMove? - target.pbAttract(user) - end - - def pbAdditionalEffect(user,target) - return if target.damageState.substitute - target.pbAttract(user) if target.pbCanAttract?(user,false) - end -end - - - -#=============================================================================== -# Burns, freezes or paralyzes the target. (Tri Attack) -#=============================================================================== -class PokeBattle_Move_017 < PokeBattle_Move - def pbAdditionalEffect(user,target) - return if target.damageState.substitute - case @battle.pbRandom(3) - when 0 then target.pbBurn(user) if target.pbCanBurn?(user, false, self) - when 1 then target.pbFreeze if target.pbCanFreeze?(user, false, self) - when 2 then target.pbParalyze(user) if target.pbCanParalyze?(user, false, self) - end - end -end - - - -#=============================================================================== -# Cures user of burn, poison and paralysis. (Refresh) -#=============================================================================== -class PokeBattle_Move_018 < PokeBattle_Move - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if ![:BURN, :POISON, :PARALYSIS].include?(user.status) - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - old_status = user.status - user.pbCureStatus(false) - case old_status - when :BURN - @battle.pbDisplay(_INTL("{1} healed its burn!",user.pbThis)) - when :POISON - @battle.pbDisplay(_INTL("{1} cured its poisoning!",user.pbThis)) - when :PARALYSIS - @battle.pbDisplay(_INTL("{1} cured its paralysis!",user.pbThis)) - end - end -end - - - -#=============================================================================== -# Cures all party Pokémon of permanent status problems. (Aromatherapy, Heal Bell) -#=============================================================================== -# NOTE: In Gen 5, this move should have a target of UserSide, while in Gen 6+ it -# should have a target of UserAndAllies. This is because, in Gen 5, this -# move shouldn't call def pbSuccessCheckAgainstTarget for each Pokémon -# currently in battle that will be affected by this move (i.e. allies -# aren't protected by their substitute/ability/etc., but they are in Gen -# 6+). We achieve this by not targeting any battlers in Gen 5, since -# pbSuccessCheckAgainstTarget is only called for targeted battlers. -class PokeBattle_Move_019 < PokeBattle_Move - def canSnatch?; return true; end - def worksWithNoTargets?; return true; end - - def pbMoveFailed?(user,targets) - failed = true - @battle.eachSameSideBattler(user) do |b| - next if b.status == :NONE - failed = false - break - end - if failed - @battle.pbParty(user.index).each do |pkmn| - next if !pkmn || !pkmn.able? || pkmn.status == :NONE - failed = false - break - end - end - if failed - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - return target.status == :NONE - end - - def pbAromatherapyHeal(pkmn,battler=nil) - oldStatus = (battler) ? battler.status : pkmn.status - curedName = (battler) ? battler.pbThis : pkmn.name - if battler - battler.pbCureStatus(false) - else - pkmn.status = :NONE - pkmn.statusCount = 0 - end - case oldStatus - when :SLEEP - @battle.pbDisplay(_INTL("{1} was woken from sleep.",curedName)) - when :POISON - @battle.pbDisplay(_INTL("{1} was cured of its poisoning.",curedName)) - when :BURN - @battle.pbDisplay(_INTL("{1}'s burn was healed.",curedName)) - when :PARALYSIS - @battle.pbDisplay(_INTL("{1} was cured of paralysis.",curedName)) - when :FROZEN - @battle.pbDisplay(_INTL("{1} was thawed out.",curedName)) - end - end - - def pbEffectAgainstTarget(user,target) - # Cure all Pokémon in battle on the user's side. - pbAromatherapyHeal(target.pokemon,target) - end - - def pbEffectGeneral(user) - # Cure all Pokémon in battle on the user's side. For the benefit of the Gen - # 5 version of this move, to make Pokémon out in battle get cured first. - if pbTarget(user) == :UserSide - @battle.eachSameSideBattler(user) do |b| - next if b.status == :NONE - pbAromatherapyHeal(b.pokemon,b) - end - end - # Cure all Pokémon in the user's and partner trainer's party. - # NOTE: This intentionally affects the partner trainer's inactive Pokémon - # too. - @battle.pbParty(user.index).each_with_index do |pkmn,i| - next if !pkmn || !pkmn.able? || pkmn.status == :NONE - next if @battle.pbFindBattler(i,user) # Skip Pokémon in battle - pbAromatherapyHeal(pkmn) - end - end - - def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) - super - if @id == :AROMATHERAPY - @battle.pbDisplay(_INTL("A soothing aroma wafted through the area!")) - elsif @id == :HEALBELL - @battle.pbDisplay(_INTL("A bell chimed!")) - end - end -end - - - -#=============================================================================== -# Safeguards the user's side from being inflicted with status problems. -# (Safeguard) -#=============================================================================== -class PokeBattle_Move_01A < PokeBattle_Move - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if user.pbOwnSide.effects[PBEffects::Safeguard]>0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.pbOwnSide.effects[PBEffects::Safeguard] = 5 - @battle.pbDisplay(_INTL("{1} became cloaked in a mystical veil!",user.pbTeam)) - end -end - - - -#=============================================================================== -# User passes its status problem to the target. (Psycho Shift) -#=============================================================================== -class PokeBattle_Move_01B < PokeBattle_Move - def pbMoveFailed?(user,targets) - if user.status == :NONE - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - if !target.pbCanInflictStatus?(user.status,user,false,self) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - msg = "" - case user.status - when :SLEEP - target.pbSleep - msg = _INTL("{1} woke up.",user.pbThis) - when :POISON - target.pbPoison(user,nil,user.statusCount!=0) - msg = _INTL("{1} was cured of its poisoning.",user.pbThis) - when :BURN - target.pbBurn(user) - msg = _INTL("{1}'s burn was healed.",user.pbThis) - when :PARALYSIS - target.pbParalyze(user) - msg = _INTL("{1} was cured of paralysis.",user.pbThis) - when :FROZEN - target.pbFreeze - msg = _INTL("{1} was thawed out.",user.pbThis) - end - if msg!="" - user.pbCureStatus(false) - @battle.pbDisplay(msg) - end - end -end - - - -#=============================================================================== -# Increases the user's Attack by 1 stage. -#=============================================================================== -class PokeBattle_Move_01C < PokeBattle_StatUpMove - def initialize(battle,move) - super - @statUp = [:ATTACK,1] - end -end - - - -#=============================================================================== -# Increases the user's Defense by 1 stage. (Harden, Steel Wing, Withdraw) -#=============================================================================== -class PokeBattle_Move_01D < PokeBattle_StatUpMove - def initialize(battle,move) - super - @statUp = [:DEFENSE,1] - end -end - - - -#=============================================================================== -# Increases the user's Defense by 1 stage. User curls up. (Defense Curl) -#=============================================================================== -class PokeBattle_Move_01E < PokeBattle_StatUpMove - def initialize(battle,move) - super - @statUp = [:DEFENSE,1] - end - - def pbEffectGeneral(user) - user.effects[PBEffects::DefenseCurl] = true - super - end -end - - - -#=============================================================================== -# Increases the user's Speed by 1 stage. (Flame Charge) -#=============================================================================== -class PokeBattle_Move_01F < PokeBattle_StatUpMove - def initialize(battle,move) - super - @statUp = [:SPEED,1] - end -end - - - -#=============================================================================== -# Increases the user's Special Attack by 1 stage. (Charge Beam, Fiery Dance) -#=============================================================================== -class PokeBattle_Move_020 < PokeBattle_StatUpMove - def initialize(battle,move) - super - @statUp = [:SPECIAL_ATTACK,1] - end -end - - - -#=============================================================================== -# Increases the user's Special Defense by 1 stage. -# Charges up user's next attack if it is Electric-type. (Charge) -#=============================================================================== -class PokeBattle_Move_021 < PokeBattle_StatUpMove - def initialize(battle,move) - super - @statUp = [:SPECIAL_DEFENSE,1] - end - - def pbEffectGeneral(user) - user.effects[PBEffects::Charge] = 2 - @battle.pbDisplay(_INTL("{1} began charging power!",user.pbThis)) - super - end -end - - - -#=============================================================================== -# Increases the user's evasion by 1 stage. (Double Team) -#=============================================================================== -class PokeBattle_Move_022 < PokeBattle_StatUpMove - def initialize(battle,move) - super - @statUp = [:EVASION,1] - end -end - - - -#=============================================================================== -# Increases the user's critical hit rate. (Focus Energy) -#=============================================================================== -class PokeBattle_Move_023 < PokeBattle_Move - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if user.effects[PBEffects::FocusEnergy]>=2 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.effects[PBEffects::FocusEnergy] = 2 - @battle.pbDisplay(_INTL("{1} is getting pumped!",user.pbThis)) - end -end - - - -#=============================================================================== -# Increases the user's Attack and Defense by 1 stage each. (Bulk Up) -#=============================================================================== -class PokeBattle_Move_024 < PokeBattle_MultiStatUpMove - def initialize(battle,move) - super - @statUp = [:ATTACK,1,:DEFENSE,1] - end -end - - - -#=============================================================================== -# Increases the user's Attack, Defense and accuracy by 1 stage each. (Coil) -#=============================================================================== -class PokeBattle_Move_025 < PokeBattle_MultiStatUpMove - def initialize(battle,move) - super - @statUp = [:ATTACK,1,:DEFENSE,1,:ACCURACY,1] - end -end - - - -#=============================================================================== -# Increases the user's Attack and Speed by 1 stage each. (Dragon Dance) -#=============================================================================== -class PokeBattle_Move_026 < PokeBattle_MultiStatUpMove - def initialize(battle,move) - super - @statUp = [:ATTACK,1,:SPEED,1] - end -end - - - -#=============================================================================== -# Increases the user's Attack and Special Attack by 1 stage each. (Work Up) -#=============================================================================== -class PokeBattle_Move_027 < PokeBattle_MultiStatUpMove - def initialize(battle,move) - super - @statUp = [:ATTACK,1,:SPECIAL_ATTACK,1] - end -end - - - -#=============================================================================== -# Increases the user's Attack and Sp. Attack by 1 stage each. -# In sunny weather, increases are 2 stages each instead. (Growth) -#=============================================================================== -class PokeBattle_Move_028 < PokeBattle_MultiStatUpMove - def initialize(battle,move) - super - @statUp = [:ATTACK,1,:SPECIAL_ATTACK,1] - end - - def pbOnStartUse(user,targets) - increment = 1 - increment = 2 if [:Sun, :HarshSun].include?(user.effectiveWeather) - @statUp[1] = @statUp[3] = increment - end -end - - - -#=============================================================================== -# Increases the user's Attack and accuracy by 1 stage each. (Hone Claws) -#=============================================================================== -class PokeBattle_Move_029 < PokeBattle_MultiStatUpMove - def initialize(battle,move) - super - @statUp = [:ATTACK,1,:ACCURACY,1] - end -end - - - -#=============================================================================== -# Increases the user's Defense and Special Defense by 1 stage each. -# (Cosmic Power, Defend Order) -#=============================================================================== -class PokeBattle_Move_02A < PokeBattle_MultiStatUpMove - def initialize(battle,move) - super - @statUp = [:DEFENSE,1,:SPECIAL_DEFENSE,1] - end -end - - - -#=============================================================================== -# Increases the user's Sp. Attack, Sp. Defense and Speed by 1 stage each. -# (Quiver Dance) -#=============================================================================== -class PokeBattle_Move_02B < PokeBattle_MultiStatUpMove - def initialize(battle,move) - super - @statUp = [:SPECIAL_ATTACK,1,:SPECIAL_DEFENSE,1,:SPEED,1] - end -end - - - -#=============================================================================== -# Increases the user's Sp. Attack and Sp. Defense by 1 stage each. (Calm Mind) -#=============================================================================== -class PokeBattle_Move_02C < PokeBattle_MultiStatUpMove - def initialize(battle,move) - super - @statUp = [:SPECIAL_ATTACK,1,:SPECIAL_DEFENSE,1] - end -end - - - -#=============================================================================== -# Increases the user's Attack, Defense, Speed, Special Attack and Special Defense -# by 1 stage each. (Ancient Power, Ominous Wind, Silver Wind) -#=============================================================================== -class PokeBattle_Move_02D < PokeBattle_MultiStatUpMove - def initialize(battle,move) - super - @statUp = [:ATTACK,1,:DEFENSE,1,:SPECIAL_ATTACK,1,:SPECIAL_DEFENSE,1,:SPEED,1] - end -end - - - -#=============================================================================== -# Increases the user's Attack by 2 stages. (Swords Dance) -#=============================================================================== -class PokeBattle_Move_02E < PokeBattle_StatUpMove - def initialize(battle,move) - super - @statUp = [:ATTACK,2] - end -end - - - -#=============================================================================== -# Increases the user's Defense by 2 stages. (Acid Armor, Barrier, Iron Defense) -#=============================================================================== -class PokeBattle_Move_02F < PokeBattle_StatUpMove - def initialize(battle,move) - super - @statUp = [:DEFENSE,2] - end -end - - - -#=============================================================================== -# Increases the user's Speed by 2 stages. (Agility, Rock Polish) -#=============================================================================== -class PokeBattle_Move_030 < PokeBattle_StatUpMove - def initialize(battle,move) - super - @statUp = [:SPEED,2] - end -end - - - -#=============================================================================== -# Increases the user's Speed by 2 stages. Lowers user's weight by 100kg. -# (Autotomize) -#=============================================================================== -class PokeBattle_Move_031 < PokeBattle_StatUpMove - def initialize(battle,move) - super - @statUp = [:SPEED,2] - end - - def pbEffectGeneral(user) - if user.pbWeight+user.effects[PBEffects::WeightChange]>1 - user.effects[PBEffects::WeightChange] -= 1000 - @battle.pbDisplay(_INTL("{1} became nimble!",user.pbThis)) - end - super - end -end - - - -#=============================================================================== -# Increases the user's Special Attack by 2 stages. (Nasty Plot) -#=============================================================================== -class PokeBattle_Move_032 < PokeBattle_StatUpMove - def initialize(battle,move) - super - @statUp = [:SPECIAL_ATTACK,2] - end -end - - - -#=============================================================================== -# Increases the user's Special Defense by 2 stages. (Amnesia) -#=============================================================================== -class PokeBattle_Move_033 < PokeBattle_StatUpMove - def initialize(battle,move) - super - @statUp = [:SPECIAL_DEFENSE,2] - end -end - - - -#=============================================================================== -# Increases the user's evasion by 2 stages. Minimizes the user. (Minimize) -#=============================================================================== -class PokeBattle_Move_034 < PokeBattle_StatUpMove - def initialize(battle,move) - super - @statUp = [:EVASION,2] - end - - def pbEffectGeneral(user) - user.effects[PBEffects::Minimize] = true - super - end -end - - - -#=============================================================================== -# Decreases the user's Defense and Special Defense by 1 stage each. -# Increases the user's Attack, Speed and Special Attack by 2 stages each. -# (Shell Smash) -#=============================================================================== -class PokeBattle_Move_035 < PokeBattle_Move - def canSnatch?; return true; end - - def initialize(battle,move) - super - @statUp = [:ATTACK,2,:SPECIAL_ATTACK,2,:SPEED,2] - @statDown = [:DEFENSE,1,:SPECIAL_DEFENSE,1] - end - - def pbMoveFailed?(user,targets) - failed = true - for i in 0...@statUp.length/2 - if user.pbCanRaiseStatStage?(@statUp[i*2],user,self) - failed = false - break - end - end - for i in 0...@statDown.length/2 - if user.pbCanLowerStatStage?(@statDown[i*2],user,self) - failed = false - break - end - end - if failed - @battle.pbDisplay(_INTL("{1}'s stats can't be changed further!",user.pbThis)) - return true - end - return false - end - - def pbEffectGeneral(user) - showAnim = true - for i in 0...@statDown.length/2 - next if !user.pbCanLowerStatStage?(@statDown[i*2],user,self) - if user.pbLowerStatStage(@statDown[i*2],@statDown[i*2+1],user,showAnim) - showAnim = false - end - end - showAnim = true - for i in 0...@statUp.length/2 - next if !user.pbCanRaiseStatStage?(@statUp[i*2],user,self) - if user.pbRaiseStatStage(@statUp[i*2],@statUp[i*2+1],user,showAnim) - showAnim = false - end - end - end -end - - - -#=============================================================================== -# Increases the user's Speed by 2 stages, and its Attack by 1 stage. (Shift Gear) -#=============================================================================== -class PokeBattle_Move_036 < PokeBattle_MultiStatUpMove - def initialize(battle,move) - super - @statUp = [:SPEED,2,:ATTACK,1] - end -end - - - -#=============================================================================== -# Increases one random stat of the target by 2 stages (except HP). (Acupressure) -#=============================================================================== -class PokeBattle_Move_037 < PokeBattle_Move - def pbFailsAgainstTarget?(user, target, show_message) - @statArray = [] - GameData::Stat.each_battle do |s| - @statArray.push(s.id) if target.pbCanRaiseStatStage?(s.id,user,self) - end - if @statArray.length==0 - @battle.pbDisplay(_INTL("{1}'s stats won't go any higher!", target.pbThis)) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - stat = @statArray[@battle.pbRandom(@statArray.length)] - target.pbRaiseStatStage(stat,2,user) - end -end - - - -#=============================================================================== -# Increases the user's Defense by 3 stages. (Cotton Guard) -#=============================================================================== -class PokeBattle_Move_038 < PokeBattle_StatUpMove - def initialize(battle,move) - super - @statUp = [:DEFENSE,3] - end -end - - - -#=============================================================================== -# Increases the user's Special Attack by 3 stages. (Tail Glow) -#=============================================================================== -class PokeBattle_Move_039 < PokeBattle_StatUpMove - def initialize(battle,move) - super - @statUp = [:SPECIAL_ATTACK,3] - end -end - - - -#=============================================================================== -# Reduces the user's HP by half of max, and sets its Attack to maximum. -# (Belly Drum) -#=============================================================================== -class PokeBattle_Move_03A < PokeBattle_Move - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - hpLoss = [user.totalhp/2,1].max - if user.hp<=hpLoss - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return true if !user.pbCanRaiseStatStage?(:ATTACK,user,self,true) - return false - end - - def pbEffectGeneral(user) - hpLoss = [user.totalhp/2,1].max - user.pbReduceHP(hpLoss,false) - if user.hasActiveAbility?(:CONTRARY) - user.stages[:ATTACK] = -6 - user.statsLowered = true - @battle.pbCommonAnimation("StatDown",user) - @battle.pbDisplay(_INTL("{1} cut its own HP and minimized its Attack!",user.pbThis)) - else - user.stages[:ATTACK] = 6 - user.statsRaised = true - @battle.pbCommonAnimation("StatUp",user) - @battle.pbDisplay(_INTL("{1} cut its own HP and maximized its Attack!",user.pbThis)) - end - user.pbItemHPHealCheck - end -end - - - -#=============================================================================== -# Decreases the user's Attack and Defense by 1 stage each. (Superpower) -#=============================================================================== -class PokeBattle_Move_03B < PokeBattle_StatDownMove - def initialize(battle,move) - super - @statDown = [:ATTACK,1,:DEFENSE,1] - end -end - - - -#=============================================================================== -# Decreases the user's Defense and Special Defense by 1 stage each. -# (Close Combat, Dragon Ascent) -#=============================================================================== -class PokeBattle_Move_03C < PokeBattle_StatDownMove - def initialize(battle,move) - super - @statDown = [:DEFENSE,1,:SPECIAL_DEFENSE,1] - end -end - - - -#=============================================================================== -# Decreases the user's Defense, Special Defense and Speed by 1 stage each. -# (V-create) -#=============================================================================== -class PokeBattle_Move_03D < PokeBattle_StatDownMove - def initialize(battle,move) - super - @statDown = [:SPEED,1,:DEFENSE,1,:SPECIAL_DEFENSE,1] - end -end - - - -#=============================================================================== -# Decreases the user's Speed by 1 stage. (Hammer Arm, Ice Hammer) -#=============================================================================== -class PokeBattle_Move_03E < PokeBattle_StatDownMove - def initialize(battle,move) - super - @statDown = [:SPEED,1] - end -end - - - -#=============================================================================== -# Decreases the user's Special Attack by 2 stages. -#=============================================================================== -class PokeBattle_Move_03F < PokeBattle_StatDownMove - def initialize(battle,move) - super - @statDown = [:SPECIAL_ATTACK,2] - end -end - - - -#=============================================================================== -# Increases the target's Special Attack by 1 stage. Confuses the target. (Flatter) -#=============================================================================== -class PokeBattle_Move_040 < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbMoveFailed?(user,targets) - failed = true - targets.each do |b| - next if !b.pbCanRaiseStatStage?(:SPECIAL_ATTACK,user,self) && - !b.pbCanConfuse?(user,false,self) - failed = false - break - end - if failed - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - if target.pbCanRaiseStatStage?(:SPECIAL_ATTACK,user,self) - target.pbRaiseStatStage(:SPECIAL_ATTACK,1,user) - end - target.pbConfuse if target.pbCanConfuse?(user,false,self) - end -end - - - -#=============================================================================== -# Increases the target's Attack by 2 stages. Confuses the target. (Swagger) -#=============================================================================== -class PokeBattle_Move_041 < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbMoveFailed?(user,targets) - failed = true - targets.each do |b| - next if !b.pbCanRaiseStatStage?(:ATTACK,user,self) && - !b.pbCanConfuse?(user,false,self) - failed = false - break - end - if failed - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - if target.pbCanRaiseStatStage?(:ATTACK,user,self) - target.pbRaiseStatStage(:ATTACK,2,user) - end - target.pbConfuse if target.pbCanConfuse?(user,false,self) - end -end - - - -#=============================================================================== -# Decreases the target's Attack by 1 stage. -#=============================================================================== -class PokeBattle_Move_042 < PokeBattle_TargetStatDownMove - def initialize(battle,move) - super - @statDown = [:ATTACK,1] - end -end - - -#=============================================================================== -# Decreases the target's Defense by 1 stage. -#=============================================================================== -class PokeBattle_Move_043 < PokeBattle_TargetStatDownMove - def initialize(battle,move) - super - @statDown = [:DEFENSE,1] - end -end - - - -#=============================================================================== -# Decreases the target's Speed by 1 stage. -#=============================================================================== -class PokeBattle_Move_044 < PokeBattle_TargetStatDownMove - def initialize(battle,move) - super - @statDown = [:SPEED,1] - end - - def pbBaseDamage(baseDmg,user,target) - if @id == :BULLDOZE && @battle.field.terrain == :Grassy - baseDmg = (baseDmg/2.0).round - end - return baseDmg - end -end - - - -#=============================================================================== -# Decreases the target's Special Attack by 1 stage. -#=============================================================================== -class PokeBattle_Move_045 < PokeBattle_TargetStatDownMove - def initialize(battle,move) - super - @statDown = [:SPECIAL_ATTACK,1] - end -end - - - -#=============================================================================== -# Decreases the target's Special Defense by 1 stage. -#=============================================================================== -class PokeBattle_Move_046 < PokeBattle_TargetStatDownMove - def initialize(battle,move) - super - @statDown = [:SPECIAL_DEFENSE,1] - end -end - - - -#=============================================================================== -# Decreases the target's accuracy by 1 stage. -#=============================================================================== -class PokeBattle_Move_047 < PokeBattle_TargetStatDownMove - def initialize(battle,move) - super - @statDown = [:ACCURACY,1] - end -end - - - -#=============================================================================== -# Decreases the target's evasion by 1 stage OR 2 stages. (Sweet Scent) -#=============================================================================== -class PokeBattle_Move_048 < PokeBattle_TargetStatDownMove - def initialize(battle,move) - super - @statDown = [:EVASION, (Settings::MECHANICS_GENERATION >= 6) ? 2 : 1] - end -end - - - -#=============================================================================== -# Decreases the target's evasion by 1 stage. Ends all barriers and entry -# hazards for the target's side OR on both sides. (Defog) -#=============================================================================== -class PokeBattle_Move_049 < PokeBattle_TargetStatDownMove - def ignoresSubstitute?(user); return true; end - - def initialize(battle,move) - super - @statDown = [:EVASION,1] - end - - def pbFailsAgainstTarget?(user, target, show_message) - targetSide = target.pbOwnSide - targetOpposingSide = target.pbOpposingSide - return false if targetSide.effects[PBEffects::AuroraVeil]>0 || - targetSide.effects[PBEffects::LightScreen]>0 || - targetSide.effects[PBEffects::Reflect]>0 || - targetSide.effects[PBEffects::Mist]>0 || - targetSide.effects[PBEffects::Safeguard]>0 - return false if targetSide.effects[PBEffects::StealthRock] || - targetSide.effects[PBEffects::Spikes]>0 || - targetSide.effects[PBEffects::ToxicSpikes]>0 || - targetSide.effects[PBEffects::StickyWeb] - return false if Settings::MECHANICS_GENERATION >= 6 && - (targetOpposingSide.effects[PBEffects::StealthRock] || - targetOpposingSide.effects[PBEffects::Spikes]>0 || - targetOpposingSide.effects[PBEffects::ToxicSpikes]>0 || - targetOpposingSide.effects[PBEffects::StickyWeb]) - return false if Settings::MECHANICS_GENERATION >= 8 && @battle.field.terrain != :None - return super - end - - def pbEffectAgainstTarget(user,target) - if target.pbCanLowerStatStage?(@statDown[0],user,self) - target.pbLowerStatStage(@statDown[0],@statDown[1],user) - end - if target.pbOwnSide.effects[PBEffects::AuroraVeil]>0 - target.pbOwnSide.effects[PBEffects::AuroraVeil] = 0 - @battle.pbDisplay(_INTL("{1}'s Aurora Veil wore off!",target.pbTeam)) - end - if target.pbOwnSide.effects[PBEffects::LightScreen]>0 - target.pbOwnSide.effects[PBEffects::LightScreen] = 0 - @battle.pbDisplay(_INTL("{1}'s Light Screen wore off!",target.pbTeam)) - end - if target.pbOwnSide.effects[PBEffects::Reflect]>0 - target.pbOwnSide.effects[PBEffects::Reflect] = 0 - @battle.pbDisplay(_INTL("{1}'s Reflect wore off!",target.pbTeam)) - end - if target.pbOwnSide.effects[PBEffects::Mist]>0 - target.pbOwnSide.effects[PBEffects::Mist] = 0 - @battle.pbDisplay(_INTL("{1}'s Mist faded!",target.pbTeam)) - end - if target.pbOwnSide.effects[PBEffects::Safeguard]>0 - target.pbOwnSide.effects[PBEffects::Safeguard] = 0 - @battle.pbDisplay(_INTL("{1} is no longer protected by Safeguard!!",target.pbTeam)) - end - if target.pbOwnSide.effects[PBEffects::StealthRock] || - (Settings::MECHANICS_GENERATION >= 6 && - target.pbOpposingSide.effects[PBEffects::StealthRock]) - target.pbOwnSide.effects[PBEffects::StealthRock] = false - target.pbOpposingSide.effects[PBEffects::StealthRock] = false if Settings::MECHANICS_GENERATION >= 6 - @battle.pbDisplay(_INTL("{1} blew away stealth rocks!",user.pbThis)) - end - if target.pbOwnSide.effects[PBEffects::Spikes]>0 || - (Settings::MECHANICS_GENERATION >= 6 && - target.pbOpposingSide.effects[PBEffects::Spikes]>0) - target.pbOwnSide.effects[PBEffects::Spikes] = 0 - target.pbOpposingSide.effects[PBEffects::Spikes] = 0 if Settings::MECHANICS_GENERATION >= 6 - @battle.pbDisplay(_INTL("{1} blew away spikes!",user.pbThis)) - end - if target.pbOwnSide.effects[PBEffects::ToxicSpikes]>0 || - (Settings::MECHANICS_GENERATION >= 6 && - target.pbOpposingSide.effects[PBEffects::ToxicSpikes]>0) - target.pbOwnSide.effects[PBEffects::ToxicSpikes] = 0 - target.pbOpposingSide.effects[PBEffects::ToxicSpikes] = 0 if Settings::MECHANICS_GENERATION >= 6 - @battle.pbDisplay(_INTL("{1} blew away poison spikes!",user.pbThis)) - end - if target.pbOwnSide.effects[PBEffects::StickyWeb] || - (Settings::MECHANICS_GENERATION >= 6 && - target.pbOpposingSide.effects[PBEffects::StickyWeb]) - target.pbOwnSide.effects[PBEffects::StickyWeb] = false - target.pbOpposingSide.effects[PBEffects::StickyWeb] = false if Settings::MECHANICS_GENERATION >= 6 - @battle.pbDisplay(_INTL("{1} blew away sticky webs!",user.pbThis)) - end - if Settings::MECHANICS_GENERATION >= 8 && @battle.field.terrain != :None - case @battle.field.terrain - when :Electric - @battle.pbDisplay(_INTL("The electricity disappeared from the battlefield.")) - when :Grassy - @battle.pbDisplay(_INTL("The grass disappeared from the battlefield.")) - when :Misty - @battle.pbDisplay(_INTL("The mist disappeared from the battlefield.")) - when :Psychic - @battle.pbDisplay(_INTL("The weirdness disappeared from the battlefield.")) - end - @battle.field.terrain = :None - end - end -end - - - -#=============================================================================== -# Decreases the target's Attack and Defense by 1 stage each. (Tickle) -#=============================================================================== -class PokeBattle_Move_04A < PokeBattle_TargetMultiStatDownMove - def initialize(battle,move) - super - @statDown = [:ATTACK,1,:DEFENSE,1] - end -end - - - -#=============================================================================== -# Decreases the target's Attack by 2 stages. (Charm, Feather Dance) -#=============================================================================== -class PokeBattle_Move_04B < PokeBattle_TargetStatDownMove - def initialize(battle,move) - super - @statDown = [:ATTACK,2] - end -end - - - -#=============================================================================== -# Decreases the target's Defense by 2 stages. (Screech) -#=============================================================================== -class PokeBattle_Move_04C < PokeBattle_TargetStatDownMove - def initialize(battle,move) - super - @statDown = [:DEFENSE,2] - end -end - - - -#=============================================================================== -# Decreases the target's Speed by 2 stages. (Cotton Spore, Scary Face, String Shot) -#=============================================================================== -class PokeBattle_Move_04D < PokeBattle_TargetStatDownMove - def initialize(battle,move) - super - inc = 2 - inc = 1 if @id == :STRINGSHOT && Settings::MECHANICS_GENERATION <= 5 - @statDown = [:SPEED,inc] - end -end - - - -#=============================================================================== -# Decreases the target's Special Attack by 2 stages. Only works on the opposite -# gender. (Captivate) -#=============================================================================== -class PokeBattle_Move_04E < PokeBattle_TargetStatDownMove - def initialize(battle,move) - super - @statDown = [:SPECIAL_ATTACK,2] - end - - def pbFailsAgainstTarget?(user, target, show_message) - return true if super - return false if damagingMove? - if user.gender==2 || target.gender==2 || user.gender==target.gender - @battle.pbDisplay(_INTL("{1} is unaffected!",target.pbThis)) if show_message - return true - end - if target.hasActiveAbility?(:OBLIVIOUS) && !@battle.moldBreaker - if show_message - @battle.pbShowAbilitySplash(target) - if PokeBattle_SceneConstants::USE_ABILITY_SPLASH - @battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis)) - else - @battle.pbDisplay(_INTL("{1}'s {2} prevents romance!", target.pbThis, target.abilityName)) - end - @battle.pbHideAbilitySplash(target) - end - return true - end - return false - end - - def pbAdditionalEffect(user,target) - return if user.gender==2 || target.gender==2 || user.gender==target.gender - return if target.hasActiveAbility?(:OBLIVIOUS) && !@battle.moldBreaker - super - end -end - - - -#=============================================================================== -# Decreases the target's Special Defense by 2 stages. -#=============================================================================== -class PokeBattle_Move_04F < PokeBattle_TargetStatDownMove - def initialize(battle,move) - super - @statDown = [:SPECIAL_DEFENSE,2] - end -end - - - -#=============================================================================== -# Resets all target's stat stages to 0. (Clear Smog) -#=============================================================================== -class PokeBattle_Move_050 < PokeBattle_Move - def pbEffectAgainstTarget(user,target) - if target.damageState.calcDamage>0 && !target.damageState.substitute && - target.hasAlteredStatStages? - target.pbResetStatStages - @battle.pbDisplay(_INTL("{1}'s stat changes were removed!",target.pbThis)) - end - end -end - - - -#=============================================================================== -# Resets all stat stages for all battlers to 0. (Haze) -#=============================================================================== -class PokeBattle_Move_051 < PokeBattle_Move - def pbMoveFailed?(user,targets) - failed = true - @battle.eachBattler do |b| - failed = false if b.hasAlteredStatStages? - break if !failed - end - if failed - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - @battle.eachBattler { |b| b.pbResetStatStages } - @battle.pbDisplay(_INTL("All stat changes were eliminated!")) - end -end - - - -#=============================================================================== -# User and target swap their Attack and Special Attack stat stages. (Power Swap) -#=============================================================================== -class PokeBattle_Move_052 < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - - def pbEffectAgainstTarget(user,target) - [:ATTACK,:SPECIAL_ATTACK].each do |s| - if user.stages[s] > target.stages[s] - user.statsLowered = true - target.statsRaised = true - elsif user.stages[s] < target.stages[s] - user.statsRaised = true - target.statsLowered = true - end - user.stages[s],target.stages[s] = target.stages[s],user.stages[s] - end - @battle.pbDisplay(_INTL("{1} switched all changes to its Attack and Sp. Atk with the target!",user.pbThis)) - end -end - - - -#=============================================================================== -# User and target swap their Defense and Special Defense stat stages. (Guard Swap) -#=============================================================================== -class PokeBattle_Move_053 < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - - def pbEffectAgainstTarget(user,target) - [:DEFENSE,:SPECIAL_DEFENSE].each do |s| - if user.stages[s] > target.stages[s] - user.statsLowered = true - target.statsRaised = true - elsif user.stages[s] < target.stages[s] - user.statsRaised = true - target.statsLowered = true - end - user.stages[s],target.stages[s] = target.stages[s],user.stages[s] - end - @battle.pbDisplay(_INTL("{1} switched all changes to its Defense and Sp. Def with the target!",user.pbThis)) - end -end - - - -#=============================================================================== -# User and target swap all their stat stages. (Heart Swap) -#=============================================================================== -class PokeBattle_Move_054 < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - - def pbEffectAgainstTarget(user,target) - GameData::Stat.each_battle do |s| - if user.stages[s.id] > target.stages[s.id] - user.statsLowered = true - target.statsRaised = true - elsif user.stages[s.id] < target.stages[s.id] - user.statsRaised = true - target.statsLowered = true - end - user.stages[s.id],target.stages[s.id] = target.stages[s.id],user.stages[s.id] - end - @battle.pbDisplay(_INTL("{1} switched stat changes with the target!",user.pbThis)) - end -end - - - -#=============================================================================== -# User copies the target's stat stages. (Psych Up) -#=============================================================================== -class PokeBattle_Move_055 < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - - def pbEffectAgainstTarget(user,target) - GameData::Stat.each_battle do |s| - if user.stages[s.id] > target.stages[s.id] - user.statsLowered = true - elsif user.stages[s.id] < target.stages[s.id] - user.statsRaised = true - end - user.stages[s.id] = target.stages[s.id] - end - if Settings::NEW_CRITICAL_HIT_RATE_MECHANICS - user.effects[PBEffects::FocusEnergy] = target.effects[PBEffects::FocusEnergy] - user.effects[PBEffects::LaserFocus] = target.effects[PBEffects::LaserFocus] - end - @battle.pbDisplay(_INTL("{1} copied {2}'s stat changes!",user.pbThis,target.pbThis(true))) - end -end - - - -#=============================================================================== -# For 5 rounds, user's and ally's stat stages cannot be lowered by foes. (Mist) -#=============================================================================== -class PokeBattle_Move_056 < PokeBattle_Move - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if user.pbOwnSide.effects[PBEffects::Mist]>0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.pbOwnSide.effects[PBEffects::Mist] = 5 - @battle.pbDisplay(_INTL("{1} became shrouded in mist!",user.pbTeam)) - end -end - - - -#=============================================================================== -# Swaps the user's Attack and Defense stats. (Power Trick) -#=============================================================================== -class PokeBattle_Move_057 < PokeBattle_Move - def canSnatch?; return true; end - - def pbEffectGeneral(user) - user.attack,user.defense = user.defense,user.attack - user.effects[PBEffects::PowerTrick] = !user.effects[PBEffects::PowerTrick] - @battle.pbDisplay(_INTL("{1} switched its Attack and Defense!",user.pbThis)) - end -end - - - -#=============================================================================== -# Averages the user's and target's Attack. -# Averages the user's and target's Special Attack. (Power Split) -#=============================================================================== -class PokeBattle_Move_058 < PokeBattle_Move - def pbEffectAgainstTarget(user,target) - newatk = ((user.attack+target.attack)/2).floor - newspatk = ((user.spatk+target.spatk)/2).floor - user.attack = target.attack = newatk - user.spatk = target.spatk = newspatk - @battle.pbDisplay(_INTL("{1} shared its power with the target!",user.pbThis)) - end -end - - - -#=============================================================================== -# Averages the user's and target's Defense. -# Averages the user's and target's Special Defense. (Guard Split) -#=============================================================================== -class PokeBattle_Move_059 < PokeBattle_Move - def pbEffectAgainstTarget(user,target) - newdef = ((user.defense+target.defense)/2).floor - newspdef = ((user.spdef+target.spdef)/2).floor - user.defense = target.defense = newdef - user.spdef = target.spdef = newspdef - @battle.pbDisplay(_INTL("{1} shared its guard with the target!",user.pbThis)) - end -end - - - -#=============================================================================== -# Averages the user's and target's current HP. (Pain Split) -#=============================================================================== -class PokeBattle_Move_05A < PokeBattle_Move - def pbEffectAgainstTarget(user,target) - newHP = (user.hp+target.hp)/2 - if user.hp>newHP - user.pbReduceHP(user.hp-newHP,false,false) - elsif user.hpnewHP - target.pbReduceHP(target.hp-newHP,false,false) - elsif target.hp0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.pbOwnSide.effects[PBEffects::Tailwind] = 4 - @battle.pbDisplay(_INTL("The Tailwind blew from behind {1}!",user.pbTeam(true))) - end -end - - - -#=============================================================================== -# This move turns into the last move used by the target, until user switches -# out. (Mimic) -#=============================================================================== -class PokeBattle_Move_05C < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - - def initialize(battle,move) - super - @moveBlacklist = [ - "014", # Chatter - "0B6", # Metronome - # Struggle - "002", # Struggle - # Moves that affect the moveset - "05C", # Mimic - "05D", # Sketch - "069" # Transform - ] - end - - def pbMoveFailed?(user,targets) - if user.effects[PBEffects::Transform] || !user.pbHasMove?(@id) - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - lastMoveData = GameData::Move.try_get(target.lastRegularMoveUsed) - if !lastMoveData || - user.pbHasMove?(target.lastRegularMoveUsed) || - @moveBlacklist.include?(lastMoveData.function_code) || - lastMoveData.type == :SHADOW - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - user.eachMoveWithIndex do |m,i| - next if m.id!=@id - newMove = Pokemon::Move.new(target.lastRegularMoveUsed) - user.moves[i] = PokeBattle_Move.from_pokemon_move(@battle,newMove) - @battle.pbDisplay(_INTL("{1} learned {2}!",user.pbThis,newMove.name)) - user.pbCheckFormOnMovesetChange - break - end - end -end - - - -#=============================================================================== -# This move permanently turns into the last move used by the target. (Sketch) -#=============================================================================== -class PokeBattle_Move_05D < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - - def initialize(battle,move) - super - @moveBlacklist = [ - "014", # Chatter - "05D", # Sketch (this move) - # Struggle - "002" # Struggle - ] - end - - def pbMoveFailed?(user,targets) - if user.effects[PBEffects::Transform] || !user.pbHasMove?(@id) - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - lastMoveData = GameData::Move.try_get(target.lastRegularMoveUsed) - if !lastMoveData || - user.pbHasMove?(target.lastRegularMoveUsed) || - @moveBlacklist.include?(lastMoveData.function_code) || - lastMoveData.type == :SHADOW - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - user.eachMoveWithIndex do |m,i| - next if m.id!=@id - newMove = Pokemon::Move.new(target.lastRegularMoveUsed) - user.pokemon.moves[i] = newMove - user.moves[i] = PokeBattle_Move.from_pokemon_move(@battle,newMove) - @battle.pbDisplay(_INTL("{1} learned {2}!",user.pbThis,newMove.name)) - user.pbCheckFormOnMovesetChange - break - end - end -end - - - -#=============================================================================== -# Changes user's type to that of a random user's move, except a type the user -# already has (even partially), OR changes to the user's first move's type. -# (Conversion) -#=============================================================================== -class PokeBattle_Move_05E < PokeBattle_Move - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if !user.canChangeType? - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - userTypes = user.pbTypes(true) - @newTypes = [] - user.eachMoveWithIndex do |m,i| - break if Settings::MECHANICS_GENERATION >= 6 && i>0 - next if GameData::Type.get(m.type).pseudo_type - next if userTypes.include?(m.type) - @newTypes.push(m.type) if !@newTypes.include?(m.type) - end - if @newTypes.length==0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - newType = @newTypes[@battle.pbRandom(@newTypes.length)] - user.pbChangeTypes(newType) - typeName = GameData::Type.get(newType).name - @battle.pbDisplay(_INTL("{1}'s type changed to {2}!",user.pbThis,typeName)) - end -end - - - -#=============================================================================== -# Changes user's type to a random one that resists/is immune to the last move -# used by the target. (Conversion 2) -#=============================================================================== -class PokeBattle_Move_05F < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - - def pbMoveFailed?(user, targets) - if !user.canChangeType? - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - if !target.lastMoveUsed || !target.lastMoveUsedType || - GameData::Type.get(target.lastMoveUsedType).pseudo_type - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - @newTypes = [] - GameData::Type.each do |t| - next if t.pseudo_type || user.pbHasType?(t.id) || - !Effectiveness.resistant_type?(target.lastMoveUsedType, t.id) - @newTypes.push(t.id) - end - if @newTypes.length == 0 - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectGeneral(user) - newType = @newTypes[@battle.pbRandom(@newTypes.length)] - user.pbChangeTypes(newType) - typeName = GameData::Type.get(newType).name - @battle.pbDisplay(_INTL("{1}'s type changed to {2}!", user.pbThis, typeName)) - end -end - - - -#=============================================================================== -# Changes user's type depending on the environment. (Camouflage) -#=============================================================================== -class PokeBattle_Move_060 < PokeBattle_Move - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if !user.canChangeType? - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - @newType = :NORMAL - checkedTerrain = false - case @battle.field.terrain - when :Electric - if GameData::Type.exists?(:ELECTRIC) - @newType = :ELECTRIC - checkedTerrain = true - end - when :Grassy - if GameData::Type.exists?(:GRASS) - @newType = :GRASS - checkedTerrain = true - end - when :Misty - if GameData::Type.exists?(:FAIRY) - @newType = :FAIRY - checkedTerrain = true - end - when :Psychic - if GameData::Type.exists?(:PSYCHIC) - @newType = :PSYCHIC - checkedTerrain = true - end - end - if !checkedTerrain - case @battle.environment - when :Grass, :TallGrass - @newType = :GRASS - when :MovingWater, :StillWater, :Puddle, :Underwater - @newType = :WATER - when :Cave - @newType = :ROCK - when :Rock, :Sand - @newType = :GROUND - when :Forest, :ForestGrass - @newType = :BUG - when :Snow, :Ice - @newType = :ICE - when :Volcano - @newType = :FIRE - when :Graveyard - @newType = :GHOST - when :Sky - @newType = :FLYING - when :Space - @newType = :DRAGON - when :UltraSpace - @newType = :PSYCHIC - end - end - @newType = :NORMAL if !GameData::Type.exists?(@newType) - if !GameData::Type.exists?(@newType) || !user.pbHasOtherType?(@newType) - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.pbChangeTypes(@newType) - typeName = GameData::Type.get(@newType).name - @battle.pbDisplay(_INTL("{1}'s type changed to {2}!",user.pbThis,typeName)) - end -end - - - -#=============================================================================== -# Target becomes Water type. (Soak) -#=============================================================================== -class PokeBattle_Move_061 < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if !target.canChangeType? || !GameData::Type.exists?(:WATER) || - !target.pbHasOtherType?(:WATER) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - target.pbChangeTypes(:WATER) - typeName = GameData::Type.get(:WATER).name - @battle.pbDisplay(_INTL("{1}'s type changed to {2}!",target.pbThis,typeName)) - end -end - - - -#=============================================================================== -# User copes target's types. (Reflect Type) -#=============================================================================== -class PokeBattle_Move_062 < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - - def pbMoveFailed?(user,targets) - if !user.canChangeType? - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - newTypes = target.pbTypes(true) - if newTypes.length==0 # Target has no type to copy - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - if user.pbTypes==target.pbTypes && - user.effects[PBEffects::Type3]==target.effects[PBEffects::Type3] - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - user.pbChangeTypes(target) - @battle.pbDisplay(_INTL("{1}'s type changed to match {2}'s!", - user.pbThis,target.pbThis(true))) - end -end - - - -#=============================================================================== -# Target's ability becomes Simple. (Simple Beam) -#=============================================================================== -class PokeBattle_Move_063 < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbMoveFailed?(user,targets) - if !GameData::Ability.exists?(:SIMPLE) - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.unstoppableAbility? || [:TRUANT, :SIMPLE].include?(target.ability) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - @battle.pbShowAbilitySplash(target,true,false) - oldAbil = target.ability - target.ability = :SIMPLE - @battle.pbReplaceAbilitySplash(target) - @battle.pbDisplay(_INTL("{1} acquired {2}!",target.pbThis,target.abilityName)) - @battle.pbHideAbilitySplash(target) - target.pbOnAbilityChanged(oldAbil) - end -end - - - -#=============================================================================== -# Target's ability becomes Insomnia. (Worry Seed) -#=============================================================================== -class PokeBattle_Move_064 < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbMoveFailed?(user,targets) - if !GameData::Ability.exists?(:INSOMNIA) - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.unstoppableAbility? || [:TRUANT, :INSOMNIA].include?(target.ability_id) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - @battle.pbShowAbilitySplash(target,true,false) - oldAbil = target.ability - target.ability = :INSOMNIA - @battle.pbReplaceAbilitySplash(target) - @battle.pbDisplay(_INTL("{1} acquired {2}!",target.pbThis,target.abilityName)) - @battle.pbHideAbilitySplash(target) - target.pbOnAbilityChanged(oldAbil) - end -end - - - -#=============================================================================== -# User copies target's ability. (Role Play) -#=============================================================================== -class PokeBattle_Move_065 < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - - def pbMoveFailed?(user,targets) - if user.unstoppableAbility? - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - if !target.ability || user.ability==target.ability - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - if target.ungainableAbility? || - [:POWEROFALCHEMY, :RECEIVER, :TRACE, :WONDERGUARD].include?(target.ability_id) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - @battle.pbShowAbilitySplash(user,true,false) - oldAbil = user.ability - user.ability = target.ability - @battle.pbReplaceAbilitySplash(user) - @battle.pbDisplay(_INTL("{1} copied {2}'s {3}!", - user.pbThis,target.pbThis(true),target.abilityName)) - @battle.pbHideAbilitySplash(user) - user.pbOnAbilityChanged(oldAbil) - user.pbEffectsOnSwitchIn - end -end - - - -#=============================================================================== -# Target copies user's ability. (Entrainment) -#=============================================================================== -class PokeBattle_Move_066 < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbMoveFailed?(user,targets) - if !user.ability - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - if user.ungainableAbility? || - [:POWEROFALCHEMY, :RECEIVER, :TRACE].include?(user.ability_id) - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.unstoppableAbility? || target.ability == :TRUANT - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - @battle.pbShowAbilitySplash(target,true,false) - oldAbil = target.ability - target.ability = user.ability - @battle.pbReplaceAbilitySplash(target) - @battle.pbDisplay(_INTL("{1} acquired {2}!",target.pbThis,target.abilityName)) - @battle.pbHideAbilitySplash(target) - target.pbOnAbilityChanged(oldAbil) - target.pbEffectsOnSwitchIn - end -end - - - -#=============================================================================== -# User and target swap abilities. (Skill Swap) -#=============================================================================== -class PokeBattle_Move_067 < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - - def pbMoveFailed?(user,targets) - if !user.ability - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - if user.unstoppableAbility? - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - if user.ungainableAbility? || user.ability == :WONDERGUARD - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - if !target.ability || - (user.ability == target.ability && Settings::MECHANICS_GENERATION <= 5) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - if target.unstoppableAbility? - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - if target.ungainableAbility? || target.ability == :WONDERGUARD - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - if user.opposes?(target) - @battle.pbShowAbilitySplash(user,false,false) - @battle.pbShowAbilitySplash(target,true,false) - end - oldUserAbil = user.ability - oldTargetAbil = target.ability - user.ability = oldTargetAbil - target.ability = oldUserAbil - if user.opposes?(target) - @battle.pbReplaceAbilitySplash(user) - @battle.pbReplaceAbilitySplash(target) - end - if PokeBattle_SceneConstants::USE_ABILITY_SPLASH - @battle.pbDisplay(_INTL("{1} swapped Abilities with its target!",user.pbThis)) - else - @battle.pbDisplay(_INTL("{1} swapped its {2} Ability with its target's {3} Ability!", - user.pbThis,target.abilityName,user.abilityName)) - end - if user.opposes?(target) - @battle.pbHideAbilitySplash(user) - @battle.pbHideAbilitySplash(target) - end - user.pbOnAbilityChanged(oldUserAbil) - target.pbOnAbilityChanged(oldTargetAbil) - user.pbEffectsOnSwitchIn - target.pbEffectsOnSwitchIn - end -end - - - -#=============================================================================== -# Target's ability is negated. (Gastro Acid) -#=============================================================================== -class PokeBattle_Move_068 < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.unstoppableAbility? - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::GastroAcid] = true - target.effects[PBEffects::Truant] = false - @battle.pbDisplay(_INTL("{1}'s Ability was suppressed!",target.pbThis)) - target.pbOnAbilityChanged(target.ability) - end -end - - - -#=============================================================================== -# User transforms into the target. (Transform) -#=============================================================================== -class PokeBattle_Move_069 < PokeBattle_Move - def pbMoveFailed?(user,targets) - if user.effects[PBEffects::Transform] - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.effects[PBEffects::Transform] || - target.effects[PBEffects::Illusion] - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - user.pbTransform(target) - end - - def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) - super - @battle.scene.pbChangePokemon(user,targets[0].pokemon) - end -end - - - -#=============================================================================== -# Inflicts a fixed 20HP damage. (Sonic Boom) -#=============================================================================== -class PokeBattle_Move_06A < PokeBattle_FixedDamageMove - def pbFixedDamage(user,target) - return 20 - end -end - - - -#=============================================================================== -# Inflicts a fixed 40HP damage. (Dragon Rage) -#=============================================================================== -class PokeBattle_Move_06B < PokeBattle_FixedDamageMove - def pbFixedDamage(user,target) - return 40 - end -end - - - -#=============================================================================== -# Halves the target's current HP. (Nature's Madness, Super Fang) -#=============================================================================== -class PokeBattle_Move_06C < PokeBattle_FixedDamageMove - def pbFixedDamage(user,target) - return (target.hp/2.0).round - end -end - - - -#=============================================================================== -# Inflicts damage equal to the user's level. (Night Shade, Seismic Toss) -#=============================================================================== -class PokeBattle_Move_06D < PokeBattle_FixedDamageMove - def pbFixedDamage(user,target) - return user.level - end -end - - - -#=============================================================================== -# Inflicts damage to bring the target's HP down to equal the user's HP. (Endeavor) -#=============================================================================== -class PokeBattle_Move_06E < PokeBattle_FixedDamageMove - def pbFailsAgainstTarget?(user, target, show_message) - if user.hp>=target.hp - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbNumHits(user,targets); return 1; end - - def pbFixedDamage(user,target) - return target.hp-user.hp - end -end - - - -#=============================================================================== -# Inflicts damage between 0.5 and 1.5 times the user's level. (Psywave) -#=============================================================================== -class PokeBattle_Move_06F < PokeBattle_FixedDamageMove - def pbFixedDamage(user,target) - min = (user.level/2).floor - max = (user.level*3/2).floor - return min+@battle.pbRandom(max-min+1) - end -end - - - -#=============================================================================== -# OHKO. Accuracy increases by difference between levels of user and target. -#=============================================================================== -class PokeBattle_Move_070 < PokeBattle_FixedDamageMove - def hitsDiggingTargets?; return @id == :FISSURE; end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.level>user.level - @battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis)) if show_message - return true - end - if target.hasActiveAbility?(:STURDY) && !@battle.moldBreaker - if show_message - @battle.pbShowAbilitySplash(target) - if PokeBattle_SceneConstants::USE_ABILITY_SPLASH - @battle.pbDisplay(_INTL("But it failed to affect {1}!", target.pbThis(true))) - else - @battle.pbDisplay(_INTL("But it failed to affect {1} because of its {2}!", - target.pbThis(true), target.abilityName)) - end - @battle.pbHideAbilitySplash(target) - end - return true - end - if Settings::MECHANICS_GENERATION >= 7 && @id == :SHEERCOLD && target.pbHasType?(:ICE) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbAccuracyCheck(user,target) - acc = @accuracy+user.level-target.level - acc -= 10 if Settings::MECHANICS_GENERATION >= 7 && @id == :SHEERCOLD && !user.pbHasType?(:ICE) - return @battle.pbRandom(100)0 - hitAlly.each do |b| - @battle.pbDisplay(_INTL("The bursting flame hit {1}!", - @battle.battlers[b[0]].pbThis(true))) - end - end - switchedAlly = [] - hitAlly.each do |b| - @battle.battlers[b[0]].pbItemHPHealCheck - if @battle.battlers[b[0]].pbAbilitiesOnDamageTaken(b[1]) - switchedAlly.push(@battle.battlers[b[0]]) - end - end - switchedAlly.each { |b| b.pbEffectsOnSwitchIn(true) } - end -end - - - -#=============================================================================== -# Power is doubled if the target is using Dive. Hits some semi-invulnerable -# targets. (Surf) -#=============================================================================== -class PokeBattle_Move_075 < PokeBattle_Move - def hitsDivingTargets?; return true; end - - def pbModifyDamage(damageMult,user,target) - damageMult *= 2 if target.inTwoTurnAttack?("0CB") # Dive - return damageMult - end -end - - - -#=============================================================================== -# Power is doubled if the target is using Dig. Power is halved if Grassy Terrain -# is in effect. Hits some semi-invulnerable targets. (Earthquake) -#=============================================================================== -class PokeBattle_Move_076 < PokeBattle_Move - def hitsDiggingTargets?; return true; end - - def pbModifyDamage(damageMult,user,target) - damageMult *= 2 if target.inTwoTurnAttack?("0CA") # Dig - damageMult /= 2 if @battle.field.terrain == :Grassy - return damageMult - end -end - - - -#=============================================================================== -# Power is doubled if the target is using Bounce, Fly or Sky Drop. Hits some -# semi-invulnerable targets. (Gust) -#=============================================================================== -class PokeBattle_Move_077 < PokeBattle_Move - def hitsFlyingTargets?; return true; end - - def pbBaseDamage(baseDmg,user,target) - baseDmg *= 2 if target.inTwoTurnAttack?("0C9","0CC","0CE") || # Fly/Bounce/Sky Drop - target.effects[PBEffects::SkyDrop]>=0 - return baseDmg - end -end - - - -#=============================================================================== -# Power is doubled if the target is using Bounce, Fly or Sky Drop. Hits some -# semi-invulnerable targets. May make the target flinch. (Twister) -#=============================================================================== -class PokeBattle_Move_078 < PokeBattle_FlinchMove - def hitsFlyingTargets?; return true; end - - def pbBaseDamage(baseDmg,user,target) - baseDmg *= 2 if target.inTwoTurnAttack?("0C9","0CC","0CE") || # Fly/Bounce/Sky Drop - target.effects[PBEffects::SkyDrop]>=0 - return baseDmg - end -end - - - -#=============================================================================== -# Power is doubled if Fusion Flare has already been used this round. (Fusion Bolt) -#=============================================================================== -class PokeBattle_Move_079 < PokeBattle_Move - def pbChangeUsageCounters(user,specialUsage) - @doublePower = @battle.field.effects[PBEffects::FusionFlare] - super - end - - def pbBaseDamageMultiplier(damageMult,user,target) - damageMult *= 2 if @doublePower - return damageMult - end - - def pbEffectGeneral(user) - @battle.field.effects[PBEffects::FusionBolt] = true - end - - def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) - hitNum = 1 if (targets.length>0 && targets[0].damageState.critical) || - @doublePower # Charged anim - super - end -end - - - -#=============================================================================== -# Power is doubled if Fusion Bolt has already been used this round. (Fusion Flare) -#=============================================================================== -class PokeBattle_Move_07A < PokeBattle_Move - def pbChangeUsageCounters(user,specialUsage) - @doublePower = @battle.field.effects[PBEffects::FusionBolt] - super - end - - def pbBaseDamageMultiplier(damageMult,user,target) - damageMult *= 2 if @doublePower - return damageMult - end - - def pbEffectGeneral(user) - @battle.field.effects[PBEffects::FusionFlare] = true - end - - def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) - hitNum = 1 if (targets.length>0 && targets[0].damageState.critical) || - @doublePower # Charged anim - super - end -end - - - -#=============================================================================== -# Power is doubled if the target is poisoned. (Venoshock) -#=============================================================================== -class PokeBattle_Move_07B < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - if target.poisoned? && - (target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user)) - baseDmg *= 2 - end - return baseDmg - end -end - - - -#=============================================================================== -# Power is doubled if the target is paralyzed. Cures the target of paralysis. -# (Smelling Salts) -#=============================================================================== -class PokeBattle_Move_07C < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - if target.paralyzed? && - (target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user)) - baseDmg *= 2 - end - return baseDmg - end - - def pbEffectAfterAllHits(user,target) - return if target.fainted? - return if target.damageState.unaffected || target.damageState.substitute - return if target.status != :PARALYSIS - target.pbCureStatus - end -end - - - -#=============================================================================== -# Power is doubled if the target is asleep. Wakes the target up. (Wake-Up Slap) -#=============================================================================== -class PokeBattle_Move_07D < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - if target.asleep? && - (target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user)) - baseDmg *= 2 - end - return baseDmg - end - - def pbEffectAfterAllHits(user,target) - return if target.fainted? - return if target.damageState.unaffected || target.damageState.substitute - return if target.status != :SLEEP - target.pbCureStatus - end -end - - - -#=============================================================================== -# Power is doubled if the user is burned, poisoned or paralyzed. (Facade) -# Burn's halving of Attack is negated (new mechanics). -#=============================================================================== -class PokeBattle_Move_07E < PokeBattle_Move - def damageReducedByBurn?; return Settings::MECHANICS_GENERATION <= 5; end - - def pbBaseDamage(baseDmg,user,target) - baseDmg *= 2 if user.poisoned? || user.burned? || user.paralyzed? - return baseDmg - end -end - - - -#=============================================================================== -# Power is doubled if the target has a status problem. (Hex) -#=============================================================================== -class PokeBattle_Move_07F < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - if target.pbHasAnyStatus? && - (target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user)) - baseDmg *= 2 - end - return baseDmg - end -end diff --git a/Data/Scripts/011_Battle/002_Move/006_MoveEffects_BattlerStats.rb b/Data/Scripts/011_Battle/002_Move/006_MoveEffects_BattlerStats.rb new file mode 100644 index 000000000..adf6245d3 --- /dev/null +++ b/Data/Scripts/011_Battle/002_Move/006_MoveEffects_BattlerStats.rb @@ -0,0 +1,1649 @@ +#=============================================================================== +# Increases the user's Attack by 1 stage. +#=============================================================================== +class PokeBattle_Move_RaiseUserAttack1 < PokeBattle_StatUpMove + def initialize(battle,move) + super + @statUp = [:ATTACK,1] + end +end + +#=============================================================================== +# Increases the user's Attack by 2 stages. (Swords Dance) +#=============================================================================== +class PokeBattle_Move_RaiseUserAttack2 < PokeBattle_StatUpMove + def initialize(battle,move) + super + @statUp = [:ATTACK,2] + end +end + +#=============================================================================== +# If this move KO's the target, increases the user's Attack by 3 stages. +# (Fell Stinger) +#=============================================================================== +class PokeBattle_Move_RaiseUserAttack3IfTargetFaints < PokeBattle_Move + def pbEffectAfterAllHits(user,target) + return if !target.damageState.fainted + return if !user.pbCanRaiseStatStage?(:ATTACK,user,self) + user.pbRaiseStatStage(:ATTACK,3,user) + end +end + +#=============================================================================== +# Reduces the user's HP by half of max, and sets its Attack to maximum. +# (Belly Drum) +#=============================================================================== +class PokeBattle_Move_MaxUserAttackLoseHalfOfTotalHP < PokeBattle_Move + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + hpLoss = [user.totalhp/2,1].max + if user.hp<=hpLoss + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return true if !user.pbCanRaiseStatStage?(:ATTACK,user,self,true) + return false + end + + def pbEffectGeneral(user) + hpLoss = [user.totalhp/2,1].max + user.pbReduceHP(hpLoss,false) + if user.hasActiveAbility?(:CONTRARY) + user.stages[:ATTACK] = -6 + user.statsLowered = true + @battle.pbCommonAnimation("StatDown",user) + @battle.pbDisplay(_INTL("{1} cut its own HP and minimized its Attack!",user.pbThis)) + else + user.stages[:ATTACK] = 6 + user.statsRaised = true + @battle.pbCommonAnimation("StatUp",user) + @battle.pbDisplay(_INTL("{1} cut its own HP and maximized its Attack!",user.pbThis)) + end + user.pbItemHPHealCheck + end +end + +#=============================================================================== +# Increases the user's Defense by 1 stage. (Harden, Steel Wing, Withdraw) +#=============================================================================== +class PokeBattle_Move_RaiseUserDefense1 < PokeBattle_StatUpMove + def initialize(battle,move) + super + @statUp = [:DEFENSE,1] + end +end + +#=============================================================================== +# Increases the user's Defense by 1 stage. User curls up. (Defense Curl) +#=============================================================================== +class PokeBattle_Move_RaiseUserDefense1CurlUpUser < PokeBattle_StatUpMove + def initialize(battle,move) + super + @statUp = [:DEFENSE,1] + end + + def pbEffectGeneral(user) + user.effects[PBEffects::DefenseCurl] = true + super + end +end + +#=============================================================================== +# Increases the user's Defense by 2 stages. (Acid Armor, Barrier, Iron Defense) +#=============================================================================== +class PokeBattle_Move_RaiseUserDefense2 < PokeBattle_StatUpMove + def initialize(battle,move) + super + @statUp = [:DEFENSE,2] + end +end + +#=============================================================================== +# Increases the user's Defense by 3 stages. (Cotton Guard) +#=============================================================================== +class PokeBattle_Move_RaiseUserDefense3 < PokeBattle_StatUpMove + def initialize(battle,move) + super + @statUp = [:DEFENSE,3] + end +end + +#=============================================================================== +# Increases the user's Special Attack by 1 stage. (Charge Beam, Fiery Dance) +#=============================================================================== +class PokeBattle_Move_RaiseUserSpAtk1 < PokeBattle_StatUpMove + def initialize(battle,move) + super + @statUp = [:SPECIAL_ATTACK,1] + end +end + +#=============================================================================== +# Increases the user's Special Attack by 2 stages. (Nasty Plot) +#=============================================================================== +class PokeBattle_Move_RaiseUserSpAtk2 < PokeBattle_StatUpMove + def initialize(battle,move) + super + @statUp = [:SPECIAL_ATTACK,2] + end +end + +#=============================================================================== +# Increases the user's Special Attack by 3 stages. (Tail Glow) +#=============================================================================== +class PokeBattle_Move_RaiseUserSpAtk3 < PokeBattle_StatUpMove + def initialize(battle,move) + super + @statUp = [:SPECIAL_ATTACK,3] + end +end + +#=============================================================================== +# Increases the user's Special Defense by 1 stage. +# Charges up user's next attack if it is Electric-type. (Charge) +#=============================================================================== +class PokeBattle_Move_RaiseUserSpDef1PowerUpElectricMove < PokeBattle_StatUpMove + def initialize(battle,move) + super + @statUp = [:SPECIAL_DEFENSE,1] + end + + def pbEffectGeneral(user) + user.effects[PBEffects::Charge] = 2 + @battle.pbDisplay(_INTL("{1} began charging power!",user.pbThis)) + super + end +end + +#=============================================================================== +# Increases the user's Special Defense by 2 stages. (Amnesia) +#=============================================================================== +class PokeBattle_Move_RaiseUserSpDef2 < PokeBattle_StatUpMove + def initialize(battle,move) + super + @statUp = [:SPECIAL_DEFENSE,2] + end +end + +#=============================================================================== +# Increases the user's Speed by 1 stage. (Flame Charge) +#=============================================================================== +class PokeBattle_Move_RaiseUserSpeed1 < PokeBattle_StatUpMove + def initialize(battle,move) + super + @statUp = [:SPEED,1] + end +end + +#=============================================================================== +# Increases the user's Speed by 2 stages. (Agility, Rock Polish) +#=============================================================================== +class PokeBattle_Move_RaiseUserSpeed2 < PokeBattle_StatUpMove + def initialize(battle,move) + super + @statUp = [:SPEED,2] + end +end + +#=============================================================================== +# Increases the user's Speed by 2 stages. Lowers user's weight by 100kg. +# (Autotomize) +#=============================================================================== +class PokeBattle_Move_RaiseUserSpeed2LowerUserWeight < PokeBattle_StatUpMove + def initialize(battle,move) + super + @statUp = [:SPEED,2] + end + + def pbEffectGeneral(user) + if user.pbWeight+user.effects[PBEffects::WeightChange]>1 + user.effects[PBEffects::WeightChange] -= 1000 + @battle.pbDisplay(_INTL("{1} became nimble!",user.pbThis)) + end + super + end +end + +#=============================================================================== +# Increases the user's evasion by 1 stage. (Double Team) +#=============================================================================== +class PokeBattle_Move_RaiseUserEvasion1 < PokeBattle_StatUpMove + def initialize(battle,move) + super + @statUp = [:EVASION,1] + end +end + +#=============================================================================== +# Increases the user's evasion by 2 stages. Minimizes the user. (Minimize) +#=============================================================================== +class PokeBattle_Move_RaiseUserEvasion2MinimizeUser < PokeBattle_StatUpMove + def initialize(battle,move) + super + @statUp = [:EVASION,2] + end + + def pbEffectGeneral(user) + user.effects[PBEffects::Minimize] = true + super + end +end + +#=============================================================================== +# Increases the user's critical hit rate. (Focus Energy) +#=============================================================================== +class PokeBattle_Move_RaiseUserCriticalHitRate2 < PokeBattle_Move + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if user.effects[PBEffects::FocusEnergy]>=2 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.effects[PBEffects::FocusEnergy] = 2 + @battle.pbDisplay(_INTL("{1} is getting pumped!",user.pbThis)) + end +end + +#=============================================================================== +# Increases the user's Attack and Defense by 1 stage each. (Bulk Up) +#=============================================================================== +class PokeBattle_Move_RaiseUserAtkDef1 < PokeBattle_MultiStatUpMove + def initialize(battle,move) + super + @statUp = [:ATTACK,1,:DEFENSE,1] + end +end + +#=============================================================================== +# Increases the user's Attack, Defense and accuracy by 1 stage each. (Coil) +#=============================================================================== +class PokeBattle_Move_RaiseUserAtkDefAcc1 < PokeBattle_MultiStatUpMove + def initialize(battle,move) + super + @statUp = [:ATTACK,1,:DEFENSE,1,:ACCURACY,1] + end +end + +#=============================================================================== +# Increases the user's Attack and Special Attack by 1 stage each. (Work Up) +#=============================================================================== +class PokeBattle_Move_RaiseUserAtkSpAtk1 < PokeBattle_MultiStatUpMove + def initialize(battle,move) + super + @statUp = [:ATTACK,1,:SPECIAL_ATTACK,1] + end +end + +#=============================================================================== +# Increases the user's Attack and Sp. Attack by 1 stage each. +# In sunny weather, increases are 2 stages each instead. (Growth) +#=============================================================================== +class PokeBattle_Move_RaiseUserAtkSpAtk1Or2InSun < PokeBattle_MultiStatUpMove + def initialize(battle,move) + super + @statUp = [:ATTACK,1,:SPECIAL_ATTACK,1] + end + + def pbOnStartUse(user,targets) + increment = 1 + increment = 2 if [:Sun, :HarshSun].include?(user.effectiveWeather) + @statUp[1] = @statUp[3] = increment + end +end + +#=============================================================================== +# Decreases the user's Defense and Special Defense by 1 stage each. +# Increases the user's Attack, Speed and Special Attack by 2 stages each. +# (Shell Smash) +#=============================================================================== +class PokeBattle_Move_LowerUserDefSpDef1RaiseUserAtkSpAtkSpd2 < PokeBattle_Move + def canSnatch?; return true; end + + def initialize(battle,move) + super + @statUp = [:ATTACK,2,:SPECIAL_ATTACK,2,:SPEED,2] + @statDown = [:DEFENSE,1,:SPECIAL_DEFENSE,1] + end + + def pbMoveFailed?(user,targets) + failed = true + for i in 0...@statUp.length/2 + if user.pbCanRaiseStatStage?(@statUp[i*2],user,self) + failed = false + break + end + end + for i in 0...@statDown.length/2 + if user.pbCanLowerStatStage?(@statDown[i*2],user,self) + failed = false + break + end + end + if failed + @battle.pbDisplay(_INTL("{1}'s stats can't be changed further!",user.pbThis)) + return true + end + return false + end + + def pbEffectGeneral(user) + showAnim = true + for i in 0...@statDown.length/2 + next if !user.pbCanLowerStatStage?(@statDown[i*2],user,self) + if user.pbLowerStatStage(@statDown[i*2],@statDown[i*2+1],user,showAnim) + showAnim = false + end + end + showAnim = true + for i in 0...@statUp.length/2 + next if !user.pbCanRaiseStatStage?(@statUp[i*2],user,self) + if user.pbRaiseStatStage(@statUp[i*2],@statUp[i*2+1],user,showAnim) + showAnim = false + end + end + end +end + +#=============================================================================== +# Increases the user's Attack and Speed by 1 stage each. (Dragon Dance) +#=============================================================================== +class PokeBattle_Move_RaiseUserAtkSpd1 < PokeBattle_MultiStatUpMove + def initialize(battle,move) + super + @statUp = [:ATTACK,1,:SPEED,1] + end +end + +#=============================================================================== +# Increases the user's Speed by 2 stages, and its Attack by 1 stage. (Shift Gear) +#=============================================================================== +class PokeBattle_Move_RaiseUserAtk1Spd2 < PokeBattle_MultiStatUpMove + def initialize(battle,move) + super + @statUp = [:SPEED,2,:ATTACK,1] + end +end + +#=============================================================================== +# Increases the user's Attack and accuracy by 1 stage each. (Hone Claws) +#=============================================================================== +class PokeBattle_Move_RaiseUserAtkAcc1 < PokeBattle_MultiStatUpMove + def initialize(battle,move) + super + @statUp = [:ATTACK,1,:ACCURACY,1] + end +end + +#=============================================================================== +# Increases the user's Defense and Special Defense by 1 stage each. +# (Cosmic Power, Defend Order) +#=============================================================================== +class PokeBattle_Move_RaiseUserDefSpDef1 < PokeBattle_MultiStatUpMove + def initialize(battle,move) + super + @statUp = [:DEFENSE,1,:SPECIAL_DEFENSE,1] + end +end + +#=============================================================================== +# Increases the user's Sp. Attack and Sp. Defense by 1 stage each. (Calm Mind) +#=============================================================================== +class PokeBattle_Move_RaiseUserSpAtkSpDef1 < PokeBattle_MultiStatUpMove + def initialize(battle,move) + super + @statUp = [:SPECIAL_ATTACK,1,:SPECIAL_DEFENSE,1] + end +end + +#=============================================================================== +# Increases the user's Sp. Attack, Sp. Defense and Speed by 1 stage each. +# (Quiver Dance) +#=============================================================================== +class PokeBattle_Move_RaiseUserSpAtkSpDefSpd1 < PokeBattle_MultiStatUpMove + def initialize(battle,move) + super + @statUp = [:SPECIAL_ATTACK,1,:SPECIAL_DEFENSE,1,:SPEED,1] + end +end + +#=============================================================================== +# Increases the user's Attack, Defense, Speed, Special Attack and Special Defense +# by 1 stage each. (Ancient Power, Ominous Wind, Silver Wind) +#=============================================================================== +class PokeBattle_Move_RaiseUserMainStats1 < PokeBattle_MultiStatUpMove + def initialize(battle,move) + super + @statUp = [:ATTACK,1,:DEFENSE,1,:SPECIAL_ATTACK,1,:SPECIAL_DEFENSE,1,:SPEED,1] + end +end + +#=============================================================================== +# Increases the user's Attack, Defense, Special Attack, Special Defense and +# Speed by 1 stage each, and reduces the user's HP by a third of its total HP. +# Fails if it can't do either effect. (Clangorous Soul) +#=============================================================================== +class PokeBattle_Move_RaiseUserMainStats1LoseThirdOfTotalHP < PokeBattle_MultiStatUpMove + def initialize(battle, move) + super + @statUp = [ + :ATTACK, 1, + :DEFENSE, 1, + :SPECIAL_ATTACK, 1, + :SPECIAL_DEFENSE, 1, + :SPEED, 1 + ] + end + + def pbMoveFailed?(user, targets) + if user.hp <= [user.totalhp / 3, 1].max + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return super + end + + def pbEffectGeneral(user) + super + user.pbReduceHP([user.totalhp / 3, 1].max, false) + user.pbItemHPHealCheck + end +end + +#=============================================================================== +# Increases the user's Attack, Defense, Speed, Special Attack and Special +# Defense by 1 stage each. The user cannot switch out or flee. Fails if the user +# is already affected by the second effect of this move, but can be used if the +# user is prevented from switching out or fleeing by another effect (in which +# case, the second effect of this move is not applied to the user). The user may +# still switch out if holding Shed Shell or Eject Button, or if affected by a +# Red Card. (No Retreat) +#=============================================================================== +class PokeBattle_Move_RaiseUserMainStats1TrapUserInBattle < PokeBattle_Move_RaiseUserMainStats1 + def pbMoveFailed?(user, targets) + if user.effects[PBEffects::NoRetreat] + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return super + end + + def pbEffectGeneral(user) + super + if !user.trappedInBattle? + user.effects[PBEffects::NoRetreat] = true + @battle.pbDisplay(_INTL("{1} can no longer escape because it used {2}!", user.pbThis, @name)) + end + end +end + +#=============================================================================== +# User rages until the start of a round in which they don't use this move. (Rage) +# (Handled in Battler's pbProcessMoveAgainstTarget): Ups rager's Attack by 1 +# stage each time it loses HP due to a move. +#=============================================================================== +class PokeBattle_Move_StartRaiseUserAtk1WhenDamaged < PokeBattle_Move + def pbEffectGeneral(user) + user.effects[PBEffects::Rage] = true + end +end + +#=============================================================================== +# Decreases the user's Defense by 1 stage. (Clanging Scales) +#=============================================================================== +class PokeBattle_Move_LowerUserDefense1 < PokeBattle_StatDownMove + def initialize(battle,move) + super + @statDown = [:DEFENSE,1] + end +end + +#=============================================================================== +# Decreases the user's Special Attack by 2 stages. +#=============================================================================== +class PokeBattle_Move_LowerUserSpAtk2 < PokeBattle_StatDownMove + def initialize(battle,move) + super + @statDown = [:SPECIAL_ATTACK,2] + end +end + +#=============================================================================== +# Decreases the user's Speed by 1 stage. (Hammer Arm, Ice Hammer) +#=============================================================================== +class PokeBattle_Move_LowerUserSpeed1 < PokeBattle_StatDownMove + def initialize(battle,move) + super + @statDown = [:SPEED,1] + end +end + +#=============================================================================== +# Decreases the user's Attack and Defense by 1 stage each. (Superpower) +#=============================================================================== +class PokeBattle_Move_LowerUserAtkDef1 < PokeBattle_StatDownMove + def initialize(battle,move) + super + @statDown = [:ATTACK,1,:DEFENSE,1] + end +end + +#=============================================================================== +# Decreases the user's Defense and Special Defense by 1 stage each. +# (Close Combat, Dragon Ascent) +#=============================================================================== +class PokeBattle_Move_LowerUserDefSpDef1 < PokeBattle_StatDownMove + def initialize(battle,move) + super + @statDown = [:DEFENSE,1,:SPECIAL_DEFENSE,1] + end +end + + + +#=============================================================================== +# Decreases the user's Defense, Special Defense and Speed by 1 stage each. +# (V-create) +#=============================================================================== +class PokeBattle_Move_LowerUserDefSpDefSpd1 < PokeBattle_StatDownMove + def initialize(battle,move) + super + @statDown = [:SPEED,1,:DEFENSE,1,:SPECIAL_DEFENSE,1] + end +end + +#=============================================================================== +# Increases the target's Attack by 2 stages. Confuses the target. (Swagger) +#=============================================================================== +class PokeBattle_Move_RaiseTargetAttack2ConfuseTarget < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbMoveFailed?(user,targets) + failed = true + targets.each do |b| + next if !b.pbCanRaiseStatStage?(:ATTACK,user,self) && + !b.pbCanConfuse?(user,false,self) + failed = false + break + end + if failed + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + if target.pbCanRaiseStatStage?(:ATTACK,user,self) + target.pbRaiseStatStage(:ATTACK,2,user) + end + target.pbConfuse if target.pbCanConfuse?(user,false,self) + end +end + +#=============================================================================== +# Increases the target's Special Attack by 1 stage. Confuses the target. (Flatter) +#=============================================================================== +class PokeBattle_Move_RaiseTargetSpAtk1ConfuseTarget < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbMoveFailed?(user,targets) + failed = true + targets.each do |b| + next if !b.pbCanRaiseStatStage?(:SPECIAL_ATTACK,user,self) && + !b.pbCanConfuse?(user,false,self) + failed = false + break + end + if failed + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + if target.pbCanRaiseStatStage?(:SPECIAL_ATTACK,user,self) + target.pbRaiseStatStage(:SPECIAL_ATTACK,1,user) + end + target.pbConfuse if target.pbCanConfuse?(user,false,self) + end +end + +#=============================================================================== +# Increases one random stat of the target by 2 stages (except HP). (Acupressure) +#=============================================================================== +class PokeBattle_Move_RaiseTargetRandomStat2 < PokeBattle_Move + def pbFailsAgainstTarget?(user, target, show_message) + @statArray = [] + GameData::Stat.each_battle do |s| + @statArray.push(s.id) if target.pbCanRaiseStatStage?(s.id,user,self) + end + if @statArray.length==0 + @battle.pbDisplay(_INTL("{1}'s stats won't go any higher!", target.pbThis)) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + stat = @statArray[@battle.pbRandom(@statArray.length)] + target.pbRaiseStatStage(stat,2,user) + end +end + +#=============================================================================== +# Increases the target's Attack and Special Attack by 2 stages each. (Decorate) +#=============================================================================== +class PokeBattle_Move_RaiseTargetAtkSpAtk2 < PokeBattle_Move + def pbMoveFailed?(user, targets) + failed = true + targets.each do |b| + next if !b.pbCanRaiseStatStage?(:ATTACK, user, self) && + !b.pbCanRaiseStatStage?(:SPECIAL_ATTACK, user, self) + failed = false + break + end + if failed + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectAgainstTarget(user, target) + if target.pbCanRaiseStatStage?(:ATTACK, user, self) + target.pbRaiseStatStage(:ATTACK, 2, user) + end + if target.pbCanRaiseStatStage?(:SPECIAL_ATTACK, user, self) + target.pbRaiseStatStage(:SPECIAL_ATTACK, 2, user) + end + end +end + +#=============================================================================== +# Decreases the target's Attack by 1 stage. +#=============================================================================== +class PokeBattle_Move_LowerTargetAttack1 < PokeBattle_TargetStatDownMove + def initialize(battle,move) + super + @statDown = [:ATTACK,1] + end +end + +#=============================================================================== +# Decreases the target's Attack by 1 stage. Bypasses target's Substitute. (Play Nice) +#=============================================================================== +class PokeBattle_Move_LowerTargetAttack1BypassSubstitute < PokeBattle_TargetStatDownMove + def ignoresSubstitute?(user); return true; end + + def initialize(battle,move) + super + @statDown = [:ATTACK,1] + end +end + +#=============================================================================== +# Decreases the target's Attack by 2 stages. (Charm, Feather Dance) +#=============================================================================== +class PokeBattle_Move_LowerTargetAttack2 < PokeBattle_TargetStatDownMove + def initialize(battle,move) + super + @statDown = [:ATTACK,2] + end +end + +#=============================================================================== +# Decreases the target's Defense by 1 stage. +#=============================================================================== +class PokeBattle_Move_LowerTargetDefense1 < PokeBattle_TargetStatDownMove + def initialize(battle,move) + super + @statDown = [:DEFENSE,1] + end +end + +#=============================================================================== +# Decreases the target's Defense by 1 stage. Power is doubled if Gravity is in +# effect. (Grav Apple) +#=============================================================================== +class PokeBattle_Move_LowerTargetDefense1DoublePowerInGravity < PokeBattle_Move_LowerTargetDefense1 + def pbBaseDamage(baseDmg, user, target) + baseDmg *= 2 if @battle.field.effects[PBEffects::Gravity] > 0 + return baseDmg + end +end + +#=============================================================================== +# Decreases the target's Defense by 2 stages. (Screech) +#=============================================================================== +class PokeBattle_Move_LowerTargetDefense2 < PokeBattle_TargetStatDownMove + def initialize(battle,move) + super + @statDown = [:DEFENSE,2] + end +end + +#=============================================================================== +# Decreases the target's Special Attack by 1 stage. +#=============================================================================== +class PokeBattle_Move_LowerTargetSpAtk1 < PokeBattle_TargetStatDownMove + def initialize(battle,move) + super + @statDown = [:SPECIAL_ATTACK,1] + end +end + +#=============================================================================== +# Decreases the target's Special Attack by 2 stages. (Eerie Impulse) +#=============================================================================== +class PokeBattle_Move_LowerTargetSpAtk2 < PokeBattle_TargetStatDownMove + def initialize(battle,move) + super + @statDown = [:SPECIAL_ATTACK,2] + end +end + +#=============================================================================== +# Decreases the target's Special Attack by 2 stages. Only works on the opposite +# gender. (Captivate) +#=============================================================================== +class PokeBattle_Move_LowerTargetSpAtk2IfCanAttract < PokeBattle_TargetStatDownMove + def initialize(battle,move) + super + @statDown = [:SPECIAL_ATTACK,2] + end + + def pbFailsAgainstTarget?(user, target, show_message) + return true if super + return false if damagingMove? + if user.gender==2 || target.gender==2 || user.gender==target.gender + @battle.pbDisplay(_INTL("{1} is unaffected!",target.pbThis)) if show_message + return true + end + if target.hasActiveAbility?(:OBLIVIOUS) && !@battle.moldBreaker + if show_message + @battle.pbShowAbilitySplash(target) + if PokeBattle_SceneConstants::USE_ABILITY_SPLASH + @battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis)) + else + @battle.pbDisplay(_INTL("{1}'s {2} prevents romance!", target.pbThis, target.abilityName)) + end + @battle.pbHideAbilitySplash(target) + end + return true + end + return false + end + + def pbAdditionalEffect(user,target) + return if user.gender==2 || target.gender==2 || user.gender==target.gender + return if target.hasActiveAbility?(:OBLIVIOUS) && !@battle.moldBreaker + super + end +end + +#=============================================================================== +# Decreases the target's Special Defense by 1 stage. +#=============================================================================== +class PokeBattle_Move_LowerTargetSpDef1 < PokeBattle_TargetStatDownMove + def initialize(battle,move) + super + @statDown = [:SPECIAL_DEFENSE,1] + end +end + +#=============================================================================== +# Decreases the target's Special Defense by 2 stages. +#=============================================================================== +class PokeBattle_Move_LowerTargetSpDef2 < PokeBattle_TargetStatDownMove + def initialize(battle,move) + super + @statDown = [:SPECIAL_DEFENSE,2] + end +end + +#=============================================================================== +# Decreases the target's Speed by 1 stage. +#=============================================================================== +class PokeBattle_Move_LowerTargetSpeed1 < PokeBattle_TargetStatDownMove + def initialize(battle,move) + super + @statDown = [:SPEED,1] + end +end + +#=============================================================================== +# Decreases the target's Speed by 1 stage. Power is halved in Grassy Terrain. +# (Bulldoze) +#=============================================================================== +class PokeBattle_Move_LowerTargetSpeed1WeakerInGrassyTerrain < PokeBattle_TargetStatDownMove + def initialize(battle,move) + super + @statDown = [:SPEED,1] + end + + def pbBaseDamage(baseDmg,user,target) + baseDmg = (baseDmg/2.0).round if @battle.field.terrain == :Grassy + return baseDmg + end +end + +#=============================================================================== +# Decreases the target's Speed by 1 stage. Doubles the effectiveness of damaging +# Fire moves used against the target (this effect does not stack). Fails if +# neither of these effects can be applied. (Tar Shot) +#=============================================================================== +class PokeBattle_Move_LowerTargetSpeed1MakeTargetWeakerToFire < PokeBattle_TargetStatDownMove + def initialize(battle,move) + super + @statDown = [:SPEED,1] + end + + def pbFailsAgainstTarget?(user, target, show_message) + return super if target.effects[PBEffects::TarShot] + return false + end + + def pbEffectAgainstTarget(user, target) + super + if !target.effects[PBEffects::TarShot] + target.effects[PBEffects::TarShot] = true + @battle.pbDisplay(_INTL("{1} became weaker to fire!", target.pbThis)) + end + end +end + +#=============================================================================== +# Decreases the target's Speed by 2 stages. (Cotton Spore, Scary Face, String Shot) +#=============================================================================== +class PokeBattle_Move_LowerTargetSpeed2 < PokeBattle_TargetStatDownMove + def initialize(battle,move) + super + @statDown = [:SPEED, 2] + end +end + +#=============================================================================== +# Decreases the target's accuracy by 1 stage. +#=============================================================================== +class PokeBattle_Move_LowerTargetAccuracy1 < PokeBattle_TargetStatDownMove + def initialize(battle,move) + super + @statDown = [:ACCURACY,1] + end +end + +#=============================================================================== +# Decreases the target's evasion by 1 stage. (Sweet Scent (Gen 5-)) +#=============================================================================== +class PokeBattle_Move_LowerTargetEvasion1 < PokeBattle_TargetStatDownMove + def initialize(battle,move) + super + @statDown = [:EVASION, 1] + end +end + +#=============================================================================== +# Decreases the target's evasion by 1 stage. Ends all barriers and entry +# hazards for the target's side OR on both sides. (Defog) +#=============================================================================== +class PokeBattle_Move_LowerTargetEvasion1RemoveSideEffects < PokeBattle_TargetStatDownMove + def ignoresSubstitute?(user); return true; end + + def initialize(battle,move) + super + @statDown = [:EVASION,1] + end + + def pbFailsAgainstTarget?(user, target, show_message) + targetSide = target.pbOwnSide + targetOpposingSide = target.pbOpposingSide + return false if targetSide.effects[PBEffects::AuroraVeil]>0 || + targetSide.effects[PBEffects::LightScreen]>0 || + targetSide.effects[PBEffects::Reflect]>0 || + targetSide.effects[PBEffects::Mist]>0 || + targetSide.effects[PBEffects::Safeguard]>0 + return false if targetSide.effects[PBEffects::StealthRock] || + targetSide.effects[PBEffects::Spikes]>0 || + targetSide.effects[PBEffects::ToxicSpikes]>0 || + targetSide.effects[PBEffects::StickyWeb] + return false if Settings::MECHANICS_GENERATION >= 6 && + (targetOpposingSide.effects[PBEffects::StealthRock] || + targetOpposingSide.effects[PBEffects::Spikes]>0 || + targetOpposingSide.effects[PBEffects::ToxicSpikes]>0 || + targetOpposingSide.effects[PBEffects::StickyWeb]) + return false if Settings::MECHANICS_GENERATION >= 8 && @battle.field.terrain != :None + return super + end + + def pbEffectAgainstTarget(user,target) + if target.pbCanLowerStatStage?(@statDown[0],user,self) + target.pbLowerStatStage(@statDown[0],@statDown[1],user) + end + if target.pbOwnSide.effects[PBEffects::AuroraVeil]>0 + target.pbOwnSide.effects[PBEffects::AuroraVeil] = 0 + @battle.pbDisplay(_INTL("{1}'s Aurora Veil wore off!",target.pbTeam)) + end + if target.pbOwnSide.effects[PBEffects::LightScreen]>0 + target.pbOwnSide.effects[PBEffects::LightScreen] = 0 + @battle.pbDisplay(_INTL("{1}'s Light Screen wore off!",target.pbTeam)) + end + if target.pbOwnSide.effects[PBEffects::Reflect]>0 + target.pbOwnSide.effects[PBEffects::Reflect] = 0 + @battle.pbDisplay(_INTL("{1}'s Reflect wore off!",target.pbTeam)) + end + if target.pbOwnSide.effects[PBEffects::Mist]>0 + target.pbOwnSide.effects[PBEffects::Mist] = 0 + @battle.pbDisplay(_INTL("{1}'s Mist faded!",target.pbTeam)) + end + if target.pbOwnSide.effects[PBEffects::Safeguard]>0 + target.pbOwnSide.effects[PBEffects::Safeguard] = 0 + @battle.pbDisplay(_INTL("{1} is no longer protected by Safeguard!!",target.pbTeam)) + end + if target.pbOwnSide.effects[PBEffects::StealthRock] || + (Settings::MECHANICS_GENERATION >= 6 && + target.pbOpposingSide.effects[PBEffects::StealthRock]) + target.pbOwnSide.effects[PBEffects::StealthRock] = false + target.pbOpposingSide.effects[PBEffects::StealthRock] = false if Settings::MECHANICS_GENERATION >= 6 + @battle.pbDisplay(_INTL("{1} blew away stealth rocks!",user.pbThis)) + end + if target.pbOwnSide.effects[PBEffects::Spikes]>0 || + (Settings::MECHANICS_GENERATION >= 6 && + target.pbOpposingSide.effects[PBEffects::Spikes]>0) + target.pbOwnSide.effects[PBEffects::Spikes] = 0 + target.pbOpposingSide.effects[PBEffects::Spikes] = 0 if Settings::MECHANICS_GENERATION >= 6 + @battle.pbDisplay(_INTL("{1} blew away spikes!",user.pbThis)) + end + if target.pbOwnSide.effects[PBEffects::ToxicSpikes]>0 || + (Settings::MECHANICS_GENERATION >= 6 && + target.pbOpposingSide.effects[PBEffects::ToxicSpikes]>0) + target.pbOwnSide.effects[PBEffects::ToxicSpikes] = 0 + target.pbOpposingSide.effects[PBEffects::ToxicSpikes] = 0 if Settings::MECHANICS_GENERATION >= 6 + @battle.pbDisplay(_INTL("{1} blew away poison spikes!",user.pbThis)) + end + if target.pbOwnSide.effects[PBEffects::StickyWeb] || + (Settings::MECHANICS_GENERATION >= 6 && + target.pbOpposingSide.effects[PBEffects::StickyWeb]) + target.pbOwnSide.effects[PBEffects::StickyWeb] = false + target.pbOpposingSide.effects[PBEffects::StickyWeb] = false if Settings::MECHANICS_GENERATION >= 6 + @battle.pbDisplay(_INTL("{1} blew away sticky webs!",user.pbThis)) + end + if Settings::MECHANICS_GENERATION >= 8 && @battle.field.terrain != :None + case @battle.field.terrain + when :Electric + @battle.pbDisplay(_INTL("The electricity disappeared from the battlefield.")) + when :Grassy + @battle.pbDisplay(_INTL("The grass disappeared from the battlefield.")) + when :Misty + @battle.pbDisplay(_INTL("The mist disappeared from the battlefield.")) + when :Psychic + @battle.pbDisplay(_INTL("The weirdness disappeared from the battlefield.")) + end + @battle.field.terrain = :None + end + end +end + +#=============================================================================== +# Decreases the target's evasion by 2 stages. (Sweet Scent (Gen 6+)) +#=============================================================================== +class PokeBattle_Move_LowerTargetEvasion2 < PokeBattle_TargetStatDownMove + def initialize(battle,move) + super + @statDown = [:EVASION, 2] + end +end + +#=============================================================================== +# Decreases the target's Attack and Defense by 1 stage each. (Tickle) +#=============================================================================== +class PokeBattle_Move_LowerTargetAtkDef1 < PokeBattle_TargetMultiStatDownMove + def initialize(battle,move) + super + @statDown = [:ATTACK,1,:DEFENSE,1] + end +end + +#=============================================================================== +# Decreases the target's Attack and Special Attack by 1 stage each. (Noble Roar) +#=============================================================================== +class PokeBattle_Move_LowerTargetAtkSpAtk1 < PokeBattle_TargetMultiStatDownMove + def initialize(battle,move) + super + @statDown = [:ATTACK,1,:SPECIAL_ATTACK,1] + end +end + +#=============================================================================== +# Decreases the Attack, Special Attack and Speed of all poisoned targets by 1 +# stage each. (Venom Drench) +#=============================================================================== +class PokeBattle_Move_LowerPoisonedTargetAtkSpAtkSpd1 < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbMoveFailed?(user,targets) + @validTargets = [] + targets.each do |b| + next if !b || b.fainted? + next if !b.poisoned? + next if !b.pbCanLowerStatStage?(:ATTACK,user,self) && + !b.pbCanLowerStatStage?(:SPECIAL_ATTACK,user,self) && + !b.pbCanLowerStatStage?(:SPEED,user,self) + @validTargets.push(b.index) + end + if @validTargets.length==0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + return if !@validTargets.include?(target.index) + showAnim = true + [:ATTACK,:SPECIAL_ATTACK,:SPEED].each do |s| + next if !target.pbCanLowerStatStage?(s,user,self) + if target.pbLowerStatStage(s,1,user,showAnim) + showAnim = false + end + end + end +end + +#=============================================================================== +# Increases target's Special Defense by 1 stage. (Aromatic Mist) +#=============================================================================== +class PokeBattle_Move_RaiseAllySpDef1 < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + return true if !target.pbCanRaiseStatStage?(:SPECIAL_DEFENSE, user, self, show_message) + return false + end + + def pbEffectAgainstTarget(user,target) + target.pbRaiseStatStage(:SPECIAL_DEFENSE,1,user) + end +end + +#=============================================================================== +# Increases the user's and allies' Attack by 1 stage. (Howl (Gen 8+)) +#=============================================================================== +class PokeBattle_Move_RaiseUserAndAlliesAttack1 < PokeBattle_Move + def canSnatch?; return true; end + + def pbMoveFailed?(user, targets) + return false if damagingMove? + failed = true + targets.each do |b| + next if b.pbCanRaiseStatStage?(:ATTACK, user, self) + failed = false + break + end + if failed + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + return false if damagingMove? + return !target.pbCanRaiseStatStage?(:ATTACK, user, self, show_message) + end + + def pbEffectAgainstTarget(user, target) + return if damagingMove? + target.pbRaiseStatStage(:ATTACK, 1, user) + end + + def pbAdditionalEffect(user, target) + return if !target.pbCanRaiseStatStage?(:ATTACK, user, self) + target.pbRaiseStatStage(:ATTACK, 1, user) + end +end + +#=============================================================================== +# Raises the Attack and Defense of all user's allies by 1 stage each. Bypasses +# protections, including Crafty Shield. Fails if there is no ally. (Coaching) +#=============================================================================== +class PokeBattle_Move_RaiseUserAndAlliesAtkDef1 < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + def canSnatch?; return true; end + + def pbMoveFailed?(user, targets) + @validTargets = [] + @battle.eachSameSideBattler(user) do |b| + next if b.index == user.index + next if !b.pbCanRaiseStatStage?(:ATTACK, user, self) && + !b.pbCanRaiseStatStage?(:DEFENSE, user, self) + @validTargets.push(b) + end + if @validTargets.length == 0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + return false if @validTargets.any? { |b| b.index == target.index } + @battle.pbDisplay(_INTL("{1}'s stats can't be raised further!", target.pbThis)) if show_message + return true + end + + def pbEffectAgainstTarget(user, target) + showAnim = true + if target.pbCanRaiseStatStage?(:ATTACK, user, self) + if target.pbRaiseStatStage(:ATTACK, 1, user, showAnim) + showAnim = false + end + end + if target.pbCanRaiseStatStage?(:DEFENSE, user, self) + target.pbRaiseStatStage(:DEFENSE, 1, user, showAnim) + end + end +end + +#=============================================================================== +# Increases the user's and its ally's Attack and Special Attack by 1 stage each, +# if they have Plus or Minus. (Gear Up) +#=============================================================================== +# NOTE: In Gen 5, this move should have a target of UserSide, while in Gen 6+ it +# should have a target of UserAndAllies. This is because, in Gen 5, this +# move shouldn't call def pbSuccessCheckAgainstTarget for each Pokémon +# currently in battle that will be affected by this move (i.e. allies +# aren't protected by their substitute/ability/etc., but they are in Gen +# 6+). We achieve this by not targeting any battlers in Gen 5, since +# pbSuccessCheckAgainstTarget is only called for targeted battlers. +class PokeBattle_Move_RaisePlusMinusUserAndAlliesAtkSpAtk1 < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + @validTargets = [] + @battle.eachSameSideBattler(user) do |b| + next if !b.hasActiveAbility?([:MINUS,:PLUS]) + next if !b.pbCanRaiseStatStage?(:ATTACK,user,self) && + !b.pbCanRaiseStatStage?(:SPECIAL_ATTACK,user,self) + @validTargets.push(b) + end + if @validTargets.length==0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + return false if @validTargets.any? { |b| b.index==target.index } + return true if !target.hasActiveAbility?([:MINUS,:PLUS]) + @battle.pbDisplay(_INTL("{1}'s stats can't be raised further!", target.pbThis)) if show_message + return true + end + + def pbEffectAgainstTarget(user,target) + showAnim = true + if target.pbCanRaiseStatStage?(:ATTACK,user,self) + if target.pbRaiseStatStage(:ATTACK,1,user,showAnim) + showAnim = false + end + end + if target.pbCanRaiseStatStage?(:SPECIAL_ATTACK,user,self) + target.pbRaiseStatStage(:SPECIAL_ATTACK,1,user,showAnim) + end + end + + def pbEffectGeneral(user) + return if pbTarget(user) != :UserSide + @validTargets.each { |b| pbEffectAgainstTarget(user,b) } + end +end + +#=============================================================================== +# Increases the user's and its ally's Defense and Special Defense by 1 stage +# each, if they have Plus or Minus. (Magnetic Flux) +#=============================================================================== +# NOTE: In Gen 5, this move should have a target of UserSide, while in Gen 6+ it +# should have a target of UserAndAllies. This is because, in Gen 5, this +# move shouldn't call def pbSuccessCheckAgainstTarget for each Pokémon +# currently in battle that will be affected by this move (i.e. allies +# aren't protected by their substitute/ability/etc., but they are in Gen +# 6+). We achieve this by not targeting any battlers in Gen 5, since +# pbSuccessCheckAgainstTarget is only called for targeted battlers. +class PokeBattle_Move_RaisePlusMinusUserAndAlliesDefSpDef1 < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + @validTargets = [] + @battle.eachSameSideBattler(user) do |b| + next if !b.hasActiveAbility?([:MINUS,:PLUS]) + next if !b.pbCanRaiseStatStage?(:DEFENSE,user,self) && + !b.pbCanRaiseStatStage?(:SPECIAL_DEFENSE,user,self) + @validTargets.push(b) + end + if @validTargets.length==0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + return false if @validTargets.any? { |b| b.index==target.index } + return true if !target.hasActiveAbility?([:MINUS,:PLUS]) + @battle.pbDisplay(_INTL("{1}'s stats can't be raised further!", target.pbThis)) if show_message + return true + end + + def pbEffectAgainstTarget(user,target) + showAnim = true + if target.pbCanRaiseStatStage?(:DEFENSE,user,self) + if target.pbRaiseStatStage(:DEFENSE,1,user,showAnim) + showAnim = false + end + end + if target.pbCanRaiseStatStage?(:SPECIAL_DEFENSE,user,self) + target.pbRaiseStatStage(:SPECIAL_DEFENSE,1,user,showAnim) + end + end + + def pbEffectGeneral(user) + return if pbTarget(user) != :UserSide + @validTargets.each { |b| pbEffectAgainstTarget(user,b) } + end +end + +#=============================================================================== +# Increases the Attack and Special Attack of all Grass-type Pokémon in battle by +# 1 stage each. Doesn't affect airborne Pokémon. (Rototiller) +#=============================================================================== +class PokeBattle_Move_RaiseGroundedGrassBattlersAtkSpAtk1 < PokeBattle_Move + def pbMoveFailed?(user,targets) + @validTargets = [] + @battle.eachBattler do |b| + next if !b.pbHasType?(:GRASS) + next if b.airborne? || b.semiInvulnerable? + next if !b.pbCanRaiseStatStage?(:ATTACK,user,self) && + !b.pbCanRaiseStatStage?(:SPECIAL_ATTACK,user,self) + @validTargets.push(b.index) + end + if @validTargets.length==0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + return false if @validTargets.include?(target.index) + return true if !target.pbHasType?(:GRASS) + return true if target.airborne? || target.semiInvulnerable? + @battle.pbDisplay(_INTL("{1}'s stats can't be raised further!", target.pbThis)) if show_message + return true + end + + def pbEffectAgainstTarget(user,target) + showAnim = true + if target.pbCanRaiseStatStage?(:ATTACK,user,self) + if target.pbRaiseStatStage(:ATTACK,1,user,showAnim) + showAnim = false + end + end + if target.pbCanRaiseStatStage?(:SPECIAL_ATTACK,user,self) + target.pbRaiseStatStage(:SPECIAL_ATTACK,1,user,showAnim) + end + end +end + +#=============================================================================== +# Increases the Defense of all Grass-type Pokémon on the field by 1 stage each. +# (Flower Shield) +#=============================================================================== +class PokeBattle_Move_RaiseGrassBattlersDef1 < PokeBattle_Move + def pbMoveFailed?(user,targets) + @validTargets = [] + @battle.eachBattler do |b| + next if !b.pbHasType?(:GRASS) + next if b.semiInvulnerable? + next if !b.pbCanRaiseStatStage?(:DEFENSE,user,self) + @validTargets.push(b.index) + end + if @validTargets.length==0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + return false if @validTargets.include?(target.index) + return true if !target.pbHasType?(:GRASS) || target.semiInvulnerable? + return !target.pbCanRaiseStatStage?(:DEFENSE, user, self, show_message) + end + + def pbEffectAgainstTarget(user,target) + target.pbRaiseStatStage(:DEFENSE,1,user) + end +end + +#=============================================================================== +# User and target swap their Attack and Special Attack stat stages. (Power Swap) +#=============================================================================== +class PokeBattle_Move_UserTargetSwapAtkSpAtkStages < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + + def pbEffectAgainstTarget(user,target) + [:ATTACK,:SPECIAL_ATTACK].each do |s| + if user.stages[s] > target.stages[s] + user.statsLowered = true + target.statsRaised = true + elsif user.stages[s] < target.stages[s] + user.statsRaised = true + target.statsLowered = true + end + user.stages[s],target.stages[s] = target.stages[s],user.stages[s] + end + @battle.pbDisplay(_INTL("{1} switched all changes to its Attack and Sp. Atk with the target!",user.pbThis)) + end +end + +#=============================================================================== +# User and target swap their Defense and Special Defense stat stages. (Guard Swap) +#=============================================================================== +class PokeBattle_Move_UserTargetSwapDefSpDefStages < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + + def pbEffectAgainstTarget(user,target) + [:DEFENSE,:SPECIAL_DEFENSE].each do |s| + if user.stages[s] > target.stages[s] + user.statsLowered = true + target.statsRaised = true + elsif user.stages[s] < target.stages[s] + user.statsRaised = true + target.statsLowered = true + end + user.stages[s],target.stages[s] = target.stages[s],user.stages[s] + end + @battle.pbDisplay(_INTL("{1} switched all changes to its Defense and Sp. Def with the target!",user.pbThis)) + end +end + +#=============================================================================== +# User and target swap all their stat stages. (Heart Swap) +#=============================================================================== +class PokeBattle_Move_UserTargetSwapStatStages < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + + def pbEffectAgainstTarget(user,target) + GameData::Stat.each_battle do |s| + if user.stages[s.id] > target.stages[s.id] + user.statsLowered = true + target.statsRaised = true + elsif user.stages[s.id] < target.stages[s.id] + user.statsRaised = true + target.statsLowered = true + end + user.stages[s.id],target.stages[s.id] = target.stages[s.id],user.stages[s.id] + end + @battle.pbDisplay(_INTL("{1} switched stat changes with the target!",user.pbThis)) + end +end + +#=============================================================================== +# User copies the target's stat stages. (Psych Up) +#=============================================================================== +class PokeBattle_Move_UserCopyTargetStatStages < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + + def pbEffectAgainstTarget(user,target) + GameData::Stat.each_battle do |s| + if user.stages[s.id] > target.stages[s.id] + user.statsLowered = true + elsif user.stages[s.id] < target.stages[s.id] + user.statsRaised = true + end + user.stages[s.id] = target.stages[s.id] + end + if Settings::NEW_CRITICAL_HIT_RATE_MECHANICS + user.effects[PBEffects::FocusEnergy] = target.effects[PBEffects::FocusEnergy] + user.effects[PBEffects::LaserFocus] = target.effects[PBEffects::LaserFocus] + end + @battle.pbDisplay(_INTL("{1} copied {2}'s stat changes!",user.pbThis,target.pbThis(true))) + end +end + +#=============================================================================== +# User gains stat stages equal to each of the target's positive stat stages, +# and target's positive stat stages become 0, before damage calculation. +# (Spectral Thief) +#=============================================================================== +class PokeBattle_Move_UserStealTargetPositiveStatStages < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + + def pbCalcDamage(user,target,numTargets=1) + if target.hasRaisedStatStages? + pbShowAnimation(@id,user,target,1) # Stat stage-draining animation + @battle.pbDisplay(_INTL("{1} stole the target's boosted stats!",user.pbThis)) + showAnim = true + GameData::Stat.each_battle do |s| + next if target.stages[s.id] <= 0 + if user.pbCanRaiseStatStage?(s.id,user,self) + if user.pbRaiseStatStage(s.id,target.stages[s.id],user,showAnim) + showAnim = false + end + end + target.statsLowered = true + target.stages[s.id] = 0 + end + end + super + end +end + +#=============================================================================== +# Reverses all stat changes of the target. (Topsy-Turvy) +#=============================================================================== +class PokeBattle_Move_InvertTargetStatStages < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if !target.hasAlteredStatStages? + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + GameData::Stat.each_battle do |s| + if target.stages[s.id] > 0 + target.statsLowered = true + elsif target.stages[s.id] < 0 + target.statsRaised = true + end + target.stages[s.id] *= -1 + end + @battle.pbDisplay(_INTL("{1}'s stats were reversed!",target.pbThis)) + end +end + +#=============================================================================== +# Resets all target's stat stages to 0. (Clear Smog) +#=============================================================================== +class PokeBattle_Move_ResetTargetStatStages < PokeBattle_Move + def pbEffectAgainstTarget(user,target) + if target.damageState.calcDamage>0 && !target.damageState.substitute && + target.hasAlteredStatStages? + target.pbResetStatStages + @battle.pbDisplay(_INTL("{1}'s stat changes were removed!",target.pbThis)) + end + end +end + +#=============================================================================== +# Resets all stat stages for all battlers to 0. (Haze) +#=============================================================================== +class PokeBattle_Move_ResetAllBattlersStatStages < PokeBattle_Move + def pbMoveFailed?(user,targets) + failed = true + @battle.eachBattler do |b| + failed = false if b.hasAlteredStatStages? + break if !failed + end + if failed + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + @battle.eachBattler { |b| b.pbResetStatStages } + @battle.pbDisplay(_INTL("All stat changes were eliminated!")) + end +end + +#=============================================================================== +# For 5 rounds, user's and ally's stat stages cannot be lowered by foes. (Mist) +#=============================================================================== +class PokeBattle_Move_StartUserSideImmunityToStatStageLowering < PokeBattle_Move + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if user.pbOwnSide.effects[PBEffects::Mist]>0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.pbOwnSide.effects[PBEffects::Mist] = 5 + @battle.pbDisplay(_INTL("{1} became shrouded in mist!",user.pbTeam)) + end +end + +#=============================================================================== +# Swaps the user's Attack and Defense stats. (Power Trick) +#=============================================================================== +class PokeBattle_Move_UserSwapBaseAtkDef < PokeBattle_Move + def canSnatch?; return true; end + + def pbEffectGeneral(user) + user.attack,user.defense = user.defense,user.attack + user.effects[PBEffects::PowerTrick] = !user.effects[PBEffects::PowerTrick] + @battle.pbDisplay(_INTL("{1} switched its Attack and Defense!",user.pbThis)) + end +end + +#=============================================================================== +# User and target swap their Speed stats (not their stat stages). (Speed Swap) +#=============================================================================== +class PokeBattle_Move_UserTargetSwapBaseSpeed < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + + def pbEffectAgainstTarget(user,target) + user.speed, target.speed = target.speed, user.speed + @battle.pbDisplay(_INTL("{1} switched Speed with its target!",user.pbThis)) + end +end + +#=============================================================================== +# Averages the user's and target's Attack. +# Averages the user's and target's Special Attack. (Power Split) +#=============================================================================== +class PokeBattle_Move_UserTargetAverageBaseAtkSpAtk < PokeBattle_Move + def pbEffectAgainstTarget(user,target) + newatk = ((user.attack+target.attack)/2).floor + newspatk = ((user.spatk+target.spatk)/2).floor + user.attack = target.attack = newatk + user.spatk = target.spatk = newspatk + @battle.pbDisplay(_INTL("{1} shared its power with the target!",user.pbThis)) + end +end + +#=============================================================================== +# Averages the user's and target's Defense. +# Averages the user's and target's Special Defense. (Guard Split) +#=============================================================================== +class PokeBattle_Move_UserTargetAverageBaseDefSpDef < PokeBattle_Move + def pbEffectAgainstTarget(user,target) + newdef = ((user.defense+target.defense)/2).floor + newspdef = ((user.spdef+target.spdef)/2).floor + user.defense = target.defense = newdef + user.spdef = target.spdef = newspdef + @battle.pbDisplay(_INTL("{1} shared its guard with the target!",user.pbThis)) + end +end + +#=============================================================================== +# Averages the user's and target's current HP. (Pain Split) +#=============================================================================== +class PokeBattle_Move_UserTargetAverageHP < PokeBattle_Move + def pbEffectAgainstTarget(user,target) + newHP = (user.hp+target.hp)/2 + if user.hp>newHP + user.pbReduceHP(user.hp-newHP,false,false) + elsif user.hpnewHP + target.pbReduceHP(target.hp-newHP,false,false) + elsif target.hp0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.pbOwnSide.effects[PBEffects::Tailwind] = 4 + @battle.pbDisplay(_INTL("The Tailwind blew from behind {1}!",user.pbTeam(true))) + end +end + +#=============================================================================== +# For 5 rounds, swaps all battlers' base Defense with base Special Defense. +# (Wonder Room) +#=============================================================================== +class PokeBattle_Move_StartSwapAllBattlersBaseDefensiveStats < PokeBattle_Move + def pbEffectGeneral(user) + if @battle.field.effects[PBEffects::WonderRoom]>0 + @battle.field.effects[PBEffects::WonderRoom] = 0 + @battle.pbDisplay(_INTL("Wonder Room wore off, and the Defense and Sp. Def stats returned to normal!")) + else + @battle.field.effects[PBEffects::WonderRoom] = 5 + @battle.pbDisplay(_INTL("It created a bizarre area in which the Defense and Sp. Def stats are swapped!")) + end + end + + def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) + return if @battle.field.effects[PBEffects::WonderRoom]>0 # No animation + super + end +end diff --git a/Data/Scripts/011_Battle/002_Move/006_Move_Effects_080-0FF.rb b/Data/Scripts/011_Battle/002_Move/006_Move_Effects_080-0FF.rb deleted file mode 100644 index 62510c606..000000000 --- a/Data/Scripts/011_Battle/002_Move/006_Move_Effects_080-0FF.rb +++ /dev/null @@ -1,3827 +0,0 @@ -#=============================================================================== -# Power is doubled if the target's HP is down to 1/2 or less. (Brine) -#=============================================================================== -class PokeBattle_Move_080 < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - baseDmg *= 2 if target.hp<=target.totalhp/2 - return baseDmg - end -end - - - -#=============================================================================== -# Power is doubled if the user has lost HP due to the target's move this round. -# (Avalanche, Revenge) -#=============================================================================== -class PokeBattle_Move_081 < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - baseDmg *= 2 if user.lastAttacker.include?(target.index) - return baseDmg - end -end - - - -#=============================================================================== -# Power is doubled if the target has already lost HP this round. (Assurance) -#=============================================================================== -class PokeBattle_Move_082 < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - baseDmg *= 2 if target.tookDamage - return baseDmg - end -end - - - -#=============================================================================== -# Power is doubled if a user's ally has already used this move this round. (Round) -# If an ally is about to use the same move, make it go next, ignoring priority. -#=============================================================================== -class PokeBattle_Move_083 < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - baseDmg *= 2 if user.pbOwnSide.effects[PBEffects::Round] - return baseDmg - end - - def pbEffectGeneral(user) - user.pbOwnSide.effects[PBEffects::Round] = true - user.eachAlly do |b| - next if @battle.choices[b.index][0]!=:UseMove || b.movedThisRound? - next if @battle.choices[b.index][2].function!=@function - b.effects[PBEffects::MoveNext] = true - b.effects[PBEffects::Quash] = 0 - break - end - end -end - - - -#=============================================================================== -# Power is doubled if the target has already moved this round. (Payback) -#=============================================================================== -class PokeBattle_Move_084 < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - if @battle.choices[target.index][0]!=:None && - ((@battle.choices[target.index][0]!=:UseMove && - @battle.choices[target.index][0]!=:Shift) || target.movedThisRound?) - baseDmg *= 2 - end - return baseDmg - end -end - - - -#=============================================================================== -# Power is doubled if a user's teammate fainted last round. (Retaliate) -#=============================================================================== -class PokeBattle_Move_085 < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - lrf = user.pbOwnSide.effects[PBEffects::LastRoundFainted] - baseDmg *= 2 if lrf>=0 && lrf==@battle.turnCount-1 - return baseDmg - end -end - - - -#=============================================================================== -# Power is doubled if the user has no held item. (Acrobatics) -#=============================================================================== -class PokeBattle_Move_086 < PokeBattle_Move - def pbBaseDamageMultiplier(damageMult,user,target) - damageMult *= 2 if !user.item || user.effects[PBEffects::GemConsumed] - return damageMult - end -end - - - -#=============================================================================== -# Power is doubled in weather. Type changes depending on the weather. (Weather Ball) -#=============================================================================== -class PokeBattle_Move_087 < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - baseDmg *= 2 if user.effectiveWeather != :None - return baseDmg - end - - def pbBaseType(user) - ret = :NORMAL - case user.effectiveWeather - when :Sun, :HarshSun - ret = :FIRE if GameData::Type.exists?(:FIRE) - when :Rain, :HeavyRain - ret = :WATER if GameData::Type.exists?(:WATER) - when :Sandstorm - ret = :ROCK if GameData::Type.exists?(:ROCK) - when :Hail - ret = :ICE if GameData::Type.exists?(:ICE) - end - return ret - end - - def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) - t = pbBaseType(user) - hitNum = 1 if t == :FIRE # Type-specific anims - hitNum = 2 if t == :WATER - hitNum = 3 if t == :ROCK - hitNum = 4 if t == :ICE - super - end -end - - - -#=============================================================================== -# Interrupts a foe switching out or using U-turn/Volt Switch/Parting Shot. Power -# is doubled in that case. (Pursuit) -# (Handled in Battle's pbAttackPhase): Makes this attack happen before switching. -#=============================================================================== -class PokeBattle_Move_088 < PokeBattle_Move - def pbAccuracyCheck(user,target) - return true if @battle.switching - return super - end - - def pbBaseDamage(baseDmg,user,target) - baseDmg *= 2 if @battle.switching - return baseDmg - end -end - - - -#=============================================================================== -# Power increases with the user's happiness. (Return) -#=============================================================================== -class PokeBattle_Move_089 < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - return [(user.happiness*2/5).floor,1].max - end -end - - - -#=============================================================================== -# Power decreases with the user's happiness. (Frustration) -#=============================================================================== -class PokeBattle_Move_08A < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - return [((255-user.happiness)*2/5).floor,1].max - end -end - - - -#=============================================================================== -# Power increases with the user's HP. (Eruption, Water Spout) -#=============================================================================== -class PokeBattle_Move_08B < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - return [150*user.hp/user.totalhp,1].max - end -end - - - -#=============================================================================== -# Power increases with the target's HP. (Crush Grip, Wring Out) -#=============================================================================== -class PokeBattle_Move_08C < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - return [120*target.hp/target.totalhp,1].max - end -end - - - -#=============================================================================== -# Power increases the quicker the target is than the user. (Gyro Ball) -#=============================================================================== -class PokeBattle_Move_08D < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - return [[(25*target.pbSpeed/user.pbSpeed).floor,150].min,1].max - end -end - - - -#=============================================================================== -# Power increases with the user's positive stat changes (ignores negative ones). -# (Power Trip, Stored Power) -#=============================================================================== -class PokeBattle_Move_08E < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - mult = 1 - GameData::Stat.each_battle { |s| mult += user.stages[s.id] if user.stages[s.id] > 0 } - return 20 * mult - end -end - - - -#=============================================================================== -# Power increases with the target's positive stat changes (ignores negative ones). -# (Punishment) -#=============================================================================== -class PokeBattle_Move_08F < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - mult = 3 - GameData::Stat.each_battle { |s| mult += target.stages[s.id] if target.stages[s.id] > 0 } - return [20 * mult, 200].min - end -end - - - -#=============================================================================== -# Power and type depends on the user's IVs. (Hidden Power) -#=============================================================================== -class PokeBattle_Move_090 < PokeBattle_Move - def pbBaseType(user) - hp = pbHiddenPower(user) - return hp[0] - end - - def pbBaseDamage(baseDmg,user,target) - return super if Settings::MECHANICS_GENERATION >= 6 - hp = pbHiddenPower(user) - return hp[1] - end -end - - - -def pbHiddenPower(pkmn) - # NOTE: This allows Hidden Power to be Fairy-type (if you have that type in - # your game). I don't care that the official games don't work like that. - iv = pkmn.iv - idxType = 0 - power = 60 - types = [] - GameData::Type.each do |t| - types[t.icon_position] ||= [] - types[t.icon_position].push(t.id) if !t.pseudo_type && ![:NORMAL, :SHADOW].include?(t.id) - end - types.flatten!.compact! - idxType |= (iv[:HP]&1) - idxType |= (iv[:ATTACK]&1)<<1 - idxType |= (iv[:DEFENSE]&1)<<2 - idxType |= (iv[:SPEED]&1)<<3 - idxType |= (iv[:SPECIAL_ATTACK]&1)<<4 - idxType |= (iv[:SPECIAL_DEFENSE]&1)<<5 - idxType = (types.length-1)*idxType/63 - type = types[idxType] - if Settings::MECHANICS_GENERATION <= 5 - powerMin = 30 - powerMax = 70 - power |= (iv[:HP]&2)>>1 - power |= (iv[:ATTACK]&2) - power |= (iv[:DEFENSE]&2)<<1 - power |= (iv[:SPEED]&2)<<2 - power |= (iv[:SPECIAL_ATTACK]&2)<<3 - power |= (iv[:SPECIAL_DEFENSE]&2)<<4 - power = powerMin+(powerMax-powerMin)*power/63 - end - return [type,power] -end - - - -#=============================================================================== -# Power doubles for each consecutive use. (Fury Cutter) -#=============================================================================== -class PokeBattle_Move_091 < PokeBattle_Move - def pbChangeUsageCounters(user,specialUsage) - oldVal = user.effects[PBEffects::FuryCutter] - super - maxMult = 1 - while (@baseDamage<<(maxMult-1))<160 - maxMult += 1 # 1-4 for base damage of 20, 1-3 for base damage of 40 - end - user.effects[PBEffects::FuryCutter] = (oldVal>=maxMult) ? maxMult : oldVal+1 - end - - def pbBaseDamage(baseDmg,user,target) - return baseDmg<<(user.effects[PBEffects::FuryCutter]-1) - end -end - - - -#=============================================================================== -# Power is multiplied by the number of consecutive rounds in which this move was -# used by any Pokémon on the user's side. (Echoed Voice) -#=============================================================================== -class PokeBattle_Move_092 < PokeBattle_Move - def pbChangeUsageCounters(user,specialUsage) - oldVal = user.pbOwnSide.effects[PBEffects::EchoedVoiceCounter] - super - if !user.pbOwnSide.effects[PBEffects::EchoedVoiceUsed] - user.pbOwnSide.effects[PBEffects::EchoedVoiceCounter] = (oldVal>=5) ? 5 : oldVal+1 - end - user.pbOwnSide.effects[PBEffects::EchoedVoiceUsed] = true - end - - def pbBaseDamage(baseDmg,user,target) - return baseDmg*user.pbOwnSide.effects[PBEffects::EchoedVoiceCounter] # 1-5 - end -end - - - -#=============================================================================== -# User rages until the start of a round in which they don't use this move. (Rage) -# (Handled in Battler's pbProcessMoveAgainstTarget): Ups rager's Attack by 1 -# stage each time it loses HP due to a move. -#=============================================================================== -class PokeBattle_Move_093 < PokeBattle_Move - def pbEffectGeneral(user) - user.effects[PBEffects::Rage] = true - end -end - - - -#=============================================================================== -# Randomly damages or heals the target. (Present) -# NOTE: Apparently a Normal Gem should be consumed even if this move will heal, -# but I think that's silly so I've omitted that effect. -#=============================================================================== -class PokeBattle_Move_094 < PokeBattle_Move - def pbOnStartUse(user,targets) - @presentDmg = 0 # 0 = heal, >0 = damage - r = @battle.pbRandom(100) - if r<40 - @presentDmg = 40 - elsif r<70 - @presentDmg = 80 - elsif r<80 - @presentDmg = 120 - end - end - - def pbFailsAgainstTarget?(user, target, show_message) - return false if @presentDmg>0 - if !target.canHeal? - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbDamagingMove? - return false if @presentDmg==0 - return super - end - - def pbBaseDamage(baseDmg,user,target) - return @presentDmg - end - - def pbEffectAgainstTarget(user,target) - return if @presentDmg>0 - target.pbRecoverHP(target.totalhp/4) - @battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis)) - end - - def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) - hitNum = 1 if @presentDmg==0 # Healing anim - super - end -end - - - -#=============================================================================== -# Power is chosen at random. Power is doubled if the target is using Dig. Hits -# some semi-invulnerable targets. (Magnitude) -#=============================================================================== -class PokeBattle_Move_095 < PokeBattle_Move - def hitsDiggingTargets?; return true; end - - def pbOnStartUse(user,targets) - baseDmg = [10,30,50,70,90,110,150] - magnitudes = [ - 4, - 5,5, - 6,6,6,6, - 7,7,7,7,7,7, - 8,8,8,8, - 9,9, - 10 - ] - magni = magnitudes[@battle.pbRandom(magnitudes.length)] - @magnitudeDmg = baseDmg[magni-4] - @battle.pbDisplay(_INTL("Magnitude {1}!",magni)) - end - - def pbBaseDamage(baseDmg,user,target) - return @magnitudeDmg - end - - def pbModifyDamage(damageMult,user,target) - damageMult *= 2 if target.inTwoTurnAttack?("0CA") # Dig - damageMult /= 2 if @battle.field.terrain == :Grassy - return damageMult - end -end - - - -#=============================================================================== -# Power and type depend on the user's held berry. Destroys the berry. -# (Natural Gift) -#=============================================================================== -class PokeBattle_Move_096 < PokeBattle_Move - def initialize(battle,move) - super - @typeArray = { - :NORMAL => [:CHILANBERRY], - :FIRE => [:CHERIBERRY, :BLUKBERRY, :WATMELBERRY, :OCCABERRY], - :WATER => [:CHESTOBERRY, :NANABBERRY, :DURINBERRY, :PASSHOBERRY], - :ELECTRIC => [:PECHABERRY, :WEPEARBERRY, :BELUEBERRY, :WACANBERRY], - :GRASS => [:RAWSTBERRY, :PINAPBERRY, :RINDOBERRY, :LIECHIBERRY], - :ICE => [:ASPEARBERRY, :POMEGBERRY, :YACHEBERRY, :GANLONBERRY], - :FIGHTING => [:LEPPABERRY, :KELPSYBERRY, :CHOPLEBERRY, :SALACBERRY], - :POISON => [:ORANBERRY, :QUALOTBERRY, :KEBIABERRY, :PETAYABERRY], - :GROUND => [:PERSIMBERRY, :HONDEWBERRY, :SHUCABERRY, :APICOTBERRY], - :FLYING => [:LUMBERRY, :GREPABERRY, :COBABERRY, :LANSATBERRY], - :PSYCHIC => [:SITRUSBERRY, :TAMATOBERRY, :PAYAPABERRY, :STARFBERRY], - :BUG => [:FIGYBERRY, :CORNNBERRY, :TANGABERRY, :ENIGMABERRY], - :ROCK => [:WIKIBERRY, :MAGOSTBERRY, :CHARTIBERRY, :MICLEBERRY], - :GHOST => [:MAGOBERRY, :RABUTABERRY, :KASIBBERRY, :CUSTAPBERRY], - :DRAGON => [:AGUAVBERRY, :NOMELBERRY, :HABANBERRY, :JABOCABERRY], - :DARK => [:IAPAPABERRY, :SPELONBERRY, :COLBURBERRY, :ROWAPBERRY, :MARANGABERRY], - :STEEL => [:RAZZBERRY, :PAMTREBERRY, :BABIRIBERRY], - :FAIRY => [:ROSELIBERRY, :KEEBERRY] - } - @damageArray = { - 60 => [:CHERIBERRY, :CHESTOBERRY, :PECHABERRY, :RAWSTBERRY, :ASPEARBERRY, - :LEPPABERRY, :ORANBERRY, :PERSIMBERRY, :LUMBERRY, :SITRUSBERRY, - :FIGYBERRY, :WIKIBERRY, :MAGOBERRY, :AGUAVBERRY, :IAPAPABERRY, - :RAZZBERRY, :OCCABERRY, :PASSHOBERRY, :WACANBERRY, :RINDOBERRY, - :YACHEBERRY, :CHOPLEBERRY, :KEBIABERRY, :SHUCABERRY, :COBABERRY, - :PAYAPABERRY, :TANGABERRY, :CHARTIBERRY, :KASIBBERRY, :HABANBERRY, - :COLBURBERRY, :BABIRIBERRY, :CHILANBERRY, :ROSELIBERRY], - 70 => [:BLUKBERRY, :NANABBERRY, :WEPEARBERRY, :PINAPBERRY, :POMEGBERRY, - :KELPSYBERRY, :QUALOTBERRY, :HONDEWBERRY, :GREPABERRY, :TAMATOBERRY, - :CORNNBERRY, :MAGOSTBERRY, :RABUTABERRY, :NOMELBERRY, :SPELONBERRY, - :PAMTREBERRY], - 80 => [:WATMELBERRY, :DURINBERRY, :BELUEBERRY, :LIECHIBERRY, :GANLONBERRY, - :SALACBERRY, :PETAYABERRY, :APICOTBERRY, :LANSATBERRY, :STARFBERRY, - :ENIGMABERRY, :MICLEBERRY, :CUSTAPBERRY, :JABOCABERRY, :ROWAPBERRY, - :KEEBERRY, :MARANGABERRY] - } - end - - def pbMoveFailed?(user,targets) - # NOTE: Unnerve does not stop a Pokémon using this move. - item = user.item - if !item || !item.is_berry? || !user.itemActive? - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - # NOTE: The AI calls this method via pbCalcType, but it involves user.item - # which here is assumed to be not nil (because item.id is called). Since - # the AI won't want to use it if the user has no item anyway, perhaps - # this is good enough. - def pbBaseType(user) - item = user.item - ret = :NORMAL - if item - @typeArray.each do |type, items| - next if !items.include?(item.id) - ret = type if GameData::Type.exists?(type) - break - end - end - return ret - end - - # This is a separate method so that the AI can use it as well - def pbNaturalGiftBaseDamage(heldItem) - ret = 1 - @damageArray.each do |dmg, items| - next if !items.include?(heldItem) - ret = dmg - ret += 20 if Settings::MECHANICS_GENERATION >= 6 - break - end - return ret - end - - def pbBaseDamage(baseDmg,user,target) - return pbNaturalGiftBaseDamage(user.item.id) - end - - def pbEndOfMoveUsageEffect(user,targets,numHits,switchedBattlers) - # NOTE: The item is consumed even if this move was Protected against or it - # missed. The item is not consumed if the target was switched out by - # an effect like a target's Red Card. - # NOTE: There is no item consumption animation. - user.pbConsumeItem(true,true,false) if user.item - end -end - - - -#=============================================================================== -# Power increases the less PP this move has. (Trump Card) -#=============================================================================== -class PokeBattle_Move_097 < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - dmgs = [200,80,60,50,40] - ppLeft = [@pp,dmgs.length-1].min # PP is reduced before the move is used - return dmgs[ppLeft] - end -end - - - -#=============================================================================== -# Power increases the less HP the user has. (Flail, Reversal) -#=============================================================================== -class PokeBattle_Move_098 < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - ret = 20 - n = 48*user.hp/user.totalhp - if n<2 - ret = 200 - elsif n<5 - ret = 150 - elsif n<10 - ret = 100 - elsif n<17 - ret = 80 - elsif n<33 - ret = 40 - end - return ret - end -end - - - -#=============================================================================== -# Power increases the quicker the user is than the target. (Electro Ball) -#=============================================================================== -class PokeBattle_Move_099 < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - ret = 40 - n = user.pbSpeed/target.pbSpeed - if n>=4 - ret = 150 - elsif n>=3 - ret = 120 - elsif n>=2 - ret = 80 - elsif n>=1 - ret = 60 - end - return ret - end -end - - - -#=============================================================================== -# Power increases the heavier the target is. (Grass Knot, Low Kick) -#=============================================================================== -class PokeBattle_Move_09A < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - ret = 20 - weight = target.pbWeight - if weight>=2000 - ret = 120 - elsif weight>=1000 - ret = 100 - elsif weight>=500 - ret = 80 - elsif weight>=250 - ret = 60 - elsif weight>=100 - ret = 40 - end - return ret - end -end - - - -#=============================================================================== -# Power increases the heavier the user is than the target. (Heat Crash, Heavy Slam) -# Does double damage and has perfect accuracy if the target is Minimized. -#=============================================================================== -class PokeBattle_Move_09B < PokeBattle_Move - def tramplesMinimize?(param=1) - return true if Settings::MECHANICS_GENERATION >= 7 # Perfect accuracy and double damage - return super - end - - def pbBaseDamage(baseDmg,user,target) - ret = 40 - n = (user.pbWeight/target.pbWeight).floor - if n>=5 - ret = 120 - elsif n>=4 - ret = 100 - elsif n>=3 - ret = 80 - elsif n>=2 - ret = 60 - end - return ret - end -end - - - -#=============================================================================== -# Powers up the ally's attack this round by 1.5. (Helping Hand) -#=============================================================================== -class PokeBattle_Move_09C < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.fainted? || target.effects[PBEffects::HelpingHand] - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return true if pbMoveFailedTargetAlreadyMoved?(target, show_message) - return false - end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::HelpingHand] = true - @battle.pbDisplay(_INTL("{1} is ready to help {2}!",user.pbThis,target.pbThis(true))) - end -end - - - -#=============================================================================== -# Weakens Electric attacks. (Mud Sport) -#=============================================================================== -class PokeBattle_Move_09D < PokeBattle_Move - def pbMoveFailed?(user,targets) - if Settings::MECHANICS_GENERATION >= 6 - if @battle.field.effects[PBEffects::MudSportField]>0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - else - @battle.eachBattler do |b| - next if !b.effects[PBEffects::MudSport] - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - end - return false - end - - def pbEffectGeneral(user) - if Settings::MECHANICS_GENERATION >= 6 - @battle.field.effects[PBEffects::MudSportField] = 5 - else - user.effects[PBEffects::MudSport] = true - end - @battle.pbDisplay(_INTL("Electricity's power was weakened!")) - end -end - - - -#=============================================================================== -# Weakens Fire attacks. (Water Sport) -#=============================================================================== -class PokeBattle_Move_09E < PokeBattle_Move - def pbMoveFailed?(user,targets) - if Settings::MECHANICS_GENERATION >= 6 - if @battle.field.effects[PBEffects::WaterSportField]>0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - else - @battle.eachBattler do |b| - next if !b.effects[PBEffects::WaterSport] - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - end - return false - end - - def pbEffectGeneral(user) - if Settings::MECHANICS_GENERATION >= 6 - @battle.field.effects[PBEffects::WaterSportField] = 5 - else - user.effects[PBEffects::WaterSport] = true - end - @battle.pbDisplay(_INTL("Fire's power was weakened!")) - end -end - - - -#=============================================================================== -# Type depends on the user's held item. (Judgment, Multi-Attack, Techno Blast) -#=============================================================================== -class PokeBattle_Move_09F < PokeBattle_Move - def initialize(battle,move) - super - if @id == :JUDGMENT - @itemTypes = { - :FISTPLATE => :FIGHTING, - :SKYPLATE => :FLYING, - :TOXICPLATE => :POISON, - :EARTHPLATE => :GROUND, - :STONEPLATE => :ROCK, - :INSECTPLATE => :BUG, - :SPOOKYPLATE => :GHOST, - :IRONPLATE => :STEEL, - :FLAMEPLATE => :FIRE, - :SPLASHPLATE => :WATER, - :MEADOWPLATE => :GRASS, - :ZAPPLATE => :ELECTRIC, - :MINDPLATE => :PSYCHIC, - :ICICLEPLATE => :ICE, - :DRACOPLATE => :DRAGON, - :DREADPLATE => :DARK, - :PIXIEPLATE => :FAIRY - } - elsif @id == :TECHNOBLAST - @itemTypes = { - :SHOCKDRIVE => :ELECTRIC, - :BURNDRIVE => :FIRE, - :CHILLDRIVE => :ICE, - :DOUSEDRIVE => :WATER - } - elsif @id == :MULTIATTACK - @itemTypes = { - :FIGHTINGMEMORY => :FIGHTING, - :FLYINGMEMORY => :FLYING, - :POISONMEMORY => :POISON, - :GROUNDMEMORY => :GROUND, - :ROCKMEMORY => :ROCK, - :BUGMEMORY => :BUG, - :GHOSTMEMORY => :GHOST, - :STEELMEMORY => :STEEL, - :FIREMEMORY => :FIRE, - :WATERMEMORY => :WATER, - :GRASSMEMORY => :GRASS, - :ELECTRICMEMORY => :ELECTRIC, - :PSYCHICMEMORY => :PSYCHIC, - :ICEMEMORY => :ICE, - :DRAGONMEMORY => :DRAGON, - :DARKMEMORY => :DARK, - :FAIRYMEMORY => :FAIRY - } - end - end - - def pbBaseType(user) - ret = :NORMAL - if user.itemActive? - @itemTypes.each do |item, itemType| - next if user.item != item - ret = itemType if GameData::Type.exists?(itemType) - break - end - end - return ret - end - - def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) - if @id == :TECHNOBLAST # Type-specific anim - t = pbBaseType(user) - hitNum = 0 - hitNum = 1 if t == :ELECTRIC - hitNum = 2 if t == :FIRE - hitNum = 3 if t == :ICE - hitNum = 4 if t == :WATER - end - super - end -end - - - -#=============================================================================== -# This attack is always a critical hit. (Frost Breath, Storm Throw) -#=============================================================================== -class PokeBattle_Move_0A0 < PokeBattle_Move - def pbCritialOverride(user,target); return 1; end -end - - - -#=============================================================================== -# For 5 rounds, foes' attacks cannot become critical hits. (Lucky Chant) -#=============================================================================== -class PokeBattle_Move_0A1 < PokeBattle_Move - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if user.pbOwnSide.effects[PBEffects::LuckyChant]>0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.pbOwnSide.effects[PBEffects::LuckyChant] = 5 - @battle.pbDisplay(_INTL("The Lucky Chant shielded {1} from critical hits!",user.pbTeam(true))) - end -end - - - -#=============================================================================== -# For 5 rounds, lowers power of physical attacks against the user's side. -# (Reflect) -#=============================================================================== -class PokeBattle_Move_0A2 < PokeBattle_Move - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if user.pbOwnSide.effects[PBEffects::Reflect]>0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.pbOwnSide.effects[PBEffects::Reflect] = 5 - user.pbOwnSide.effects[PBEffects::Reflect] = 8 if user.hasActiveItem?(:LIGHTCLAY) - @battle.pbDisplay(_INTL("{1} raised {2}'s Defense!",@name,user.pbTeam(true))) - end -end - - - -#=============================================================================== -# For 5 rounds, lowers power of special attacks against the user's side. (Light Screen) -#=============================================================================== -class PokeBattle_Move_0A3 < PokeBattle_Move - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if user.pbOwnSide.effects[PBEffects::LightScreen]>0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.pbOwnSide.effects[PBEffects::LightScreen] = 5 - user.pbOwnSide.effects[PBEffects::LightScreen] = 8 if user.hasActiveItem?(:LIGHTCLAY) - @battle.pbDisplay(_INTL("{1} raised {2}'s Special Defense!",@name,user.pbTeam(true))) - end -end - - - -#=============================================================================== -# Effect depends on the environment. (Secret Power) -#=============================================================================== -class PokeBattle_Move_0A4 < PokeBattle_Move - def flinchingMove?; return [6,10,12].include?(@secretPower); end - - def pbOnStartUse(user,targets) - # NOTE: This is Gen 7's list plus some of Gen 6 plus a bit of my own. - @secretPower = 0 # Body Slam, paralysis - case @battle.field.terrain - when :Electric - @secretPower = 1 # Thunder Shock, paralysis - when :Grassy - @secretPower = 2 # Vine Whip, sleep - when :Misty - @secretPower = 3 # Fairy Wind, lower Sp. Atk by 1 - when :Psychic - @secretPower = 4 # Confusion, lower Speed by 1 - else - case @battle.environment - when :Grass, :TallGrass, :Forest, :ForestGrass - @secretPower = 2 # (Same as Grassy Terrain) - when :MovingWater, :StillWater, :Underwater - @secretPower = 5 # Water Pulse, lower Attack by 1 - when :Puddle - @secretPower = 6 # Mud Shot, lower Speed by 1 - when :Cave - @secretPower = 7 # Rock Throw, flinch - when :Rock, :Sand - @secretPower = 8 # Mud-Slap, lower Acc by 1 - when :Snow, :Ice - @secretPower = 9 # Ice Shard, freeze - when :Volcano - @secretPower = 10 # Incinerate, burn - when :Graveyard - @secretPower = 11 # Shadow Sneak, flinch - when :Sky - @secretPower = 12 # Gust, lower Speed by 1 - when :Space - @secretPower = 13 # Swift, flinch - when :UltraSpace - @secretPower = 14 # Psywave, lower Defense by 1 - end - end - end - - # NOTE: This intentionally doesn't use def pbAdditionalEffect, because that - # method is called per hit and this move's additional effect only occurs - # once per use, after all the hits have happened (two hits are possible - # via Parental Bond). - def pbEffectAfterAllHits(user,target) - return if target.fainted? - return if target.damageState.unaffected || target.damageState.substitute - chance = pbAdditionalEffectChance(user,target) - return if @battle.pbRandom(100)>=chance - case @secretPower - when 2 - target.pbSleep if target.pbCanSleep?(user,false,self) - when 10 - target.pbBurn(user) if target.pbCanBurn?(user,false,self) - when 0, 1 - target.pbParalyze(user) if target.pbCanParalyze?(user,false,self) - when 9 - target.pbFreeze if target.pbCanFreeze?(user,false,self) - when 5 - if target.pbCanLowerStatStage?(:ATTACK,user,self) - target.pbLowerStatStage(:ATTACK,1,user) - end - when 14 - if target.pbCanLowerStatStage?(:DEFENSE,user,self) - target.pbLowerStatStage(:DEFENSE,1,user) - end - when 3 - if target.pbCanLowerStatStage?(:SPECIAL_ATTACK,user,self) - target.pbLowerStatStage(:SPECIAL_ATTACK,1,user) - end - when 4, 6, 12 - if target.pbCanLowerStatStage?(:SPEED,user,self) - target.pbLowerStatStage(:SPEED,1,user) - end - when 8 - if target.pbCanLowerStatStage?(:ACCURACY,user,self) - target.pbLowerStatStage(:ACCURACY,1,user) - end - when 7, 11, 13 - target.pbFlinch(user) - end - end - - def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) - id = :BODYSLAM # Environment-specific anim - case @secretPower - when 1 then id = :THUNDERSHOCK if GameData::Move.exists?(:THUNDERSHOCK) - when 2 then id = :VINEWHIP if GameData::Move.exists?(:VINEWHIP) - when 3 then id = :FAIRYWIND if GameData::Move.exists?(:FAIRYWIND) - when 4 then id = :CONFUSIO if GameData::Move.exists?(:CONFUSION) - when 5 then id = :WATERPULSE if GameData::Move.exists?(:WATERPULSE) - when 6 then id = :MUDSHOT if GameData::Move.exists?(:MUDSHOT) - when 7 then id = :ROCKTHROW if GameData::Move.exists?(:ROCKTHROW) - when 8 then id = :MUDSLAP if GameData::Move.exists?(:MUDSLAP) - when 9 then id = :ICESHARD if GameData::Move.exists?(:ICESHARD) - when 10 then id = :INCINERATE if GameData::Move.exists?(:INCINERATE) - when 11 then id = :SHADOWSNEAK if GameData::Move.exists?(:SHADOWSNEAK) - when 12 then id = :GUST if GameData::Move.exists?(:GUST) - when 13 then id = :SWIFT if GameData::Move.exists?(:SWIFT) - when 14 then id = :PSYWAVE if GameData::Move.exists?(:PSYWAVE) - end - super - end -end - - - -#=============================================================================== -# Always hits. -#=============================================================================== -class PokeBattle_Move_0A5 < PokeBattle_Move - def pbAccuracyCheck(user,target); return true; end -end - - - -#=============================================================================== -# User's attack next round against the target will definitely hit. -# (Lock-On, Mind Reader) -#=============================================================================== -class PokeBattle_Move_0A6 < PokeBattle_Move - def pbEffectAgainstTarget(user,target) - user.effects[PBEffects::LockOn] = 2 - user.effects[PBEffects::LockOnPos] = target.index - @battle.pbDisplay(_INTL("{1} took aim at {2}!",user.pbThis,target.pbThis(true))) - end -end - - - -#=============================================================================== -# Target's evasion stat changes are ignored from now on. (Foresight, Odor Sleuth) -# Normal and Fighting moves have normal effectiveness against the Ghost-type target. -#=============================================================================== -class PokeBattle_Move_0A7 < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - def canMagicCoat?; return true; end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::Foresight] = true - @battle.pbDisplay(_INTL("{1} was identified!",target.pbThis)) - end -end - - - -#=============================================================================== -# Target's evasion stat changes are ignored from now on. (Miracle Eye) -# Psychic moves have normal effectiveness against the Dark-type target. -#=============================================================================== -class PokeBattle_Move_0A8 < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - def canMagicCoat?; return true; end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::MiracleEye] = true - @battle.pbDisplay(_INTL("{1} was identified!",target.pbThis)) - end -end - - - -#=============================================================================== -# This move ignores target's Defense, Special Defense and evasion stat changes. -# (Chip Away, Darkest Lariat, Sacred Sword) -#=============================================================================== -class PokeBattle_Move_0A9 < PokeBattle_Move - def pbCalcAccuracyMultipliers(user,target,multipliers) - super - modifiers[:evasion_stage] = 0 - end - - def pbGetDefenseStats(user,target) - ret1, _ret2 = super - return ret1, 6 # Def/SpDef stat stage - end -end - - - -#=============================================================================== -# User is protected against moves with the "B" flag this round. (Detect, Protect) -#=============================================================================== -class PokeBattle_Move_0AA < PokeBattle_ProtectMove - def initialize(battle,move) - super - @effect = PBEffects::Protect - end -end - - - -#=============================================================================== -# User's side is protected against moves with priority greater than 0 this round. -# (Quick Guard) -#=============================================================================== -class PokeBattle_Move_0AB < PokeBattle_ProtectMove - def canSnatch?; return true; end - - def initialize(battle,move) - super - @effect = PBEffects::QuickGuard - @sidedEffect = true - end -end - - - -#=============================================================================== -# User's side is protected against moves that target multiple battlers this round. -# (Wide Guard) -#=============================================================================== -class PokeBattle_Move_0AC < PokeBattle_ProtectMove - def canSnatch?; return true; end - - def initialize(battle,move) - super - @effect = PBEffects::WideGuard - @sidedEffect = true - end -end - - - -#=============================================================================== -# Ends target's protections immediately. (Feint) -#=============================================================================== -class PokeBattle_Move_0AD < PokeBattle_Move - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::BanefulBunker] = false - target.effects[PBEffects::KingsShield] = false - target.effects[PBEffects::Obstruct] = false - target.effects[PBEffects::Protect] = false - target.effects[PBEffects::SpikyShield] = false - target.pbOwnSide.effects[PBEffects::CraftyShield] = false - target.pbOwnSide.effects[PBEffects::MatBlock] = false - target.pbOwnSide.effects[PBEffects::QuickGuard] = false - target.pbOwnSide.effects[PBEffects::WideGuard] = false - end -end - - - -#=============================================================================== -# Uses the last move that the target used. (Mirror Move) -#=============================================================================== -class PokeBattle_Move_0AE < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - def callsAnotherMove?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if !target.lastRegularMoveUsed || - !GameData::Move.get(target.lastRegularMoveUsed).flags.any? { |f| f[/^CanMirrorMove$/i] } - @battle.pbDisplay(_INTL("The mirror move failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - user.pbUseMoveSimple(target.lastRegularMoveUsed,target.index) - end - - def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) - # No animation - end -end - - - -#=============================================================================== -# Uses the last move that was used. (Copycat) -#=============================================================================== -class PokeBattle_Move_0AF < PokeBattle_Move - def callsAnotherMove?; return true; end - - def initialize(battle,move) - super - @moveBlacklist = [ - # Struggle, Chatter, Belch - "002", # Struggle - "014", # Chatter - "158", # Belch # Not listed on Bulbapedia - # Moves that affect the moveset - "05C", # Mimic - "05D", # Sketch - "069", # Transform - # Counter moves - "071", # Counter - "072", # Mirror Coat - "073", # Metal Burst # Not listed on Bulbapedia - # Helping Hand, Feint (always blacklisted together, don't know why) - "09C", # Helping Hand - "0AD", # Feint - # Protection moves - "0AA", # Detect, Protect - "0AB", # Quick Guard # Not listed on Bulbapedia - "0AC", # Wide Guard # Not listed on Bulbapedia - "0E8", # Endure - "149", # Mat Block - "14A", # Crafty Shield # Not listed on Bulbapedia - "14B", # King's Shield - "14C", # Spiky Shield - "168", # Baneful Bunker - # Moves that call other moves - "0AE", # Mirror Move - "0AF", # Copycat (this move) - "0B0", # Me First - "0B3", # Nature Power # Not listed on Bulbapedia - "0B4", # Sleep Talk - "0B5", # Assist - "0B6", # Metronome - # Move-redirecting and stealing moves - "0B1", # Magic Coat # Not listed on Bulbapedia - "0B2", # Snatch - "117", # Follow Me, Rage Powder - "16A", # Spotlight - # Set up effects that trigger upon KO - "0E6", # Grudge # Not listed on Bulbapedia - "0E7", # Destiny Bond - # Held item-moving moves - "0F1", # Covet, Thief - "0F2", # Switcheroo, Trick - "0F3", # Bestow - # Moves that start focussing at the start of the round - "115", # Focus Punch - "171", # Shell Trap - "172", # Beak Blast - # Event moves that do nothing - "133", # Hold Hands - "134" # Celebrate - ] - if Settings::MECHANICS_GENERATION >= 6 - @moveBlacklist += [ - # Target-switching moves - "0EB", # Roar, Whirlwind - "0EC" # Circle Throw, Dragon Tail - ] - end - end - - def pbChangeUsageCounters(user,specialUsage) - super - @copied_move = @battle.lastMoveUsed - end - - def pbMoveFailed?(user,targets) - if !@copied_move || - @moveBlacklist.include?(GameData::Move.get(@copied_move).function_code) - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.pbUseMoveSimple(@copied_move) - end -end - - - -#=============================================================================== -# Uses the move the target was about to use this round, with 1.5x power. -# (Me First) -#=============================================================================== -class PokeBattle_Move_0B0 < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - def callsAnotherMove?; return true; end - - def initialize(battle,move) - super - @moveBlacklist = [ - "0F1", # Covet, Thief - # Struggle, Chatter, Belch - "002", # Struggle - "014", # Chatter - "158", # Belch - # Counter moves - "071", # Counter - "072", # Mirror Coat - "073", # Metal Burst - # Moves that start focussing at the start of the round - "115", # Focus Punch - "171", # Shell Trap - "172" # Beak Blast - ] - end - - def pbFailsAgainstTarget?(user, target, show_message) - return true if pbMoveFailedTargetAlreadyMoved?(target, show_message) - oppMove = @battle.choices[target.index][2] - if !oppMove || oppMove.statusMove? || @moveBlacklist.include?(oppMove.function) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - user.effects[PBEffects::MeFirst] = true - user.pbUseMoveSimple(@battle.choices[target.index][2].id) - user.effects[PBEffects::MeFirst] = false - end -end - - - -#=============================================================================== -# This round, reflects all moves with the "C" flag targeting the user back at -# their origin. (Magic Coat) -#=============================================================================== -class PokeBattle_Move_0B1 < PokeBattle_Move - def pbEffectGeneral(user) - user.effects[PBEffects::MagicCoat] = true - @battle.pbDisplay(_INTL("{1} shrouded itself with Magic Coat!",user.pbThis)) - end -end - - - -#=============================================================================== -# This round, snatches all used moves with the "D" flag. (Snatch) -#=============================================================================== -class PokeBattle_Move_0B2 < PokeBattle_Move - def pbEffectGeneral(user) - user.effects[PBEffects::Snatch] = 1 - @battle.eachBattler do |b| - next if b.effects[PBEffects::Snatch]= 6) ? :ENERGYBALL : :SEEDBOMB - when :MovingWater, :StillWater, :Underwater - try_move = :HYDROPUMP - when :Puddle - try_move = :MUDBOMB - when :Cave - try_move = (Settings::MECHANICS_GENERATION >= 6) ? :POWERGEM : :ROCKSLIDE - when :Rock, :Sand - try_move = (Settings::MECHANICS_GENERATION >= 6) ? :EARTHPOWER : :EARTHQUAKE - when :Snow - try_move = :BLIZZARD - try_move = :FROSTBREATH if Settings::MECHANICS_GENERATION == 6 - try_move = :ICEBEAM if Settings::MECHANICS_GENERATION >= 7 - when :Ice - try_move = :ICEBEAM - when :Volcano - try_move = :LAVAPLUME - when :Graveyard - try_move = :SHADOWBALL - when :Sky - try_move = :AIRSLASH - when :Space - try_move = :DRACOMETEOR - when :UltraSpace - try_move = :PSYSHOCK - end - @npMove = try_move if GameData::Move.exists?(try_move) - end - end - - def pbEffectAgainstTarget(user,target) - @battle.pbDisplay(_INTL("{1} turned into {2}!", @name, GameData::Move.get(@npMove).name)) - user.pbUseMoveSimple(@npMove, target.index) - end -end - - - -#=============================================================================== -# Uses a random move the user knows. Fails if user is not asleep. (Sleep Talk) -#=============================================================================== -class PokeBattle_Move_0B4 < PokeBattle_Move - def usableWhenAsleep?; return true; end - def callsAnotherMove?; return true; end - - def initialize(battle,move) - super - @moveBlacklist = [ - "0D1", # Uproar - "0D4", # Bide - # Struggle, Chatter, Belch - "002", # Struggle # Not listed on Bulbapedia - "014", # Chatter # Not listed on Bulbapedia - "158", # Belch - # Moves that affect the moveset (except Transform) - "05C", # Mimic - "05D", # Sketch - # Moves that call other moves - "0AE", # Mirror Move - "0AF", # Copycat - "0B0", # Me First - "0B3", # Nature Power # Not listed on Bulbapedia - "0B4", # Sleep Talk - "0B5", # Assist - "0B6", # Metronome - # Two-turn attacks - "0C3", # Razor Wind - "0C4", # Solar Beam, Solar Blade - "0C5", # Freeze Shock - "0C6", # Ice Burn - "0C7", # Sky Attack - "0C8", # Skull Bash - "0C9", # Fly - "0CA", # Dig - "0CB", # Dive - "0CC", # Bounce - "0CD", # Shadow Force - "0CE", # Sky Drop - "12E", # Shadow Half - "14D", # Phantom Force - "14E", # Geomancy - # Moves that start focussing at the start of the round - "115", # Focus Punch - "171", # Shell Trap - "172" # Beak Blast - ] - end - - def pbMoveFailed?(user,targets) - @sleepTalkMoves = [] - user.eachMoveWithIndex do |m,i| - next if @moveBlacklist.include?(m.function) - next if !@battle.pbCanChooseMove?(user.index,i,false,true) - @sleepTalkMoves.push(i) - end - if !user.asleep? || @sleepTalkMoves.length==0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - choice = @sleepTalkMoves[@battle.pbRandom(@sleepTalkMoves.length)] - user.pbUseMoveSimple(user.moves[choice].id,user.pbDirectOpposing.index) - end -end - - - -#=============================================================================== -# Uses a random move known by any non-user Pokémon in the user's party. (Assist) -#=============================================================================== -class PokeBattle_Move_0B5 < PokeBattle_Move - def callsAnotherMove?; return true; end - - def initialize(battle,move) - super - @moveBlacklist = [ - # Struggle, Chatter, Belch - "002", # Struggle - "014", # Chatter - "158", # Belch - # Moves that affect the moveset - "05C", # Mimic - "05D", # Sketch - "069", # Transform - # Counter moves - "071", # Counter - "072", # Mirror Coat - "073", # Metal Burst # Not listed on Bulbapedia - # Helping Hand, Feint (always blacklisted together, don't know why) - "09C", # Helping Hand - "0AD", # Feint - # Protection moves - "0AA", # Detect, Protect - "0AB", # Quick Guard # Not listed on Bulbapedia - "0AC", # Wide Guard # Not listed on Bulbapedia - "0E8", # Endure - "149", # Mat Block - "14A", # Crafty Shield # Not listed on Bulbapedia - "14B", # King's Shield - "14C", # Spiky Shield - "168", # Baneful Bunker - # Moves that call other moves - "0AE", # Mirror Move - "0AF", # Copycat - "0B0", # Me First -# "0B3", # Nature Power # See below - "0B4", # Sleep Talk - "0B5", # Assist - "0B6", # Metronome - # Move-redirecting and stealing moves - "0B1", # Magic Coat # Not listed on Bulbapedia - "0B2", # Snatch - "117", # Follow Me, Rage Powder - "16A", # Spotlight - # Set up effects that trigger upon KO - "0E6", # Grudge # Not listed on Bulbapedia - "0E7", # Destiny Bond - # Target-switching moves -# "0EB", # Roar, Whirlwind # See below - "0EC", # Circle Throw, Dragon Tail - # Held item-moving moves - "0F1", # Covet, Thief - "0F2", # Switcheroo, Trick - "0F3", # Bestow - # Moves that start focussing at the start of the round - "115", # Focus Punch - "171", # Shell Trap - "172", # Beak Blast - # Event moves that do nothing - "133", # Hold Hands - "134" # Celebrate - ] - if Settings::MECHANICS_GENERATION >= 6 - @moveBlacklist += [ - # Moves that call other moves - "0B3", # Nature Power - # Two-turn attacks - "0C3", # Razor Wind # Not listed on Bulbapedia - "0C4", # Solar Beam, Solar Blade # Not listed on Bulbapedia - "0C5", # Freeze Shock # Not listed on Bulbapedia - "0C6", # Ice Burn # Not listed on Bulbapedia - "0C7", # Sky Attack # Not listed on Bulbapedia - "0C8", # Skull Bash # Not listed on Bulbapedia - "0C9", # Fly - "0CA", # Dig - "0CB", # Dive - "0CC", # Bounce - "0CD", # Shadow Force - "0CE", # Sky Drop - "12E", # Shadow Half - "14D", # Phantom Force - "14E", # Geomancy # Not listed on Bulbapedia - # Target-switching moves - "0EB" # Roar, Whirlwind - ] - end - end - - def pbMoveFailed?(user,targets) - @assistMoves = [] - # NOTE: This includes the Pokémon of ally trainers in multi battles. - @battle.pbParty(user.index).each_with_index do |pkmn,i| - next if !pkmn || i==user.pokemonIndex - next if Settings::MECHANICS_GENERATION >= 6 && pkmn.egg? - pkmn.moves.each do |move| - next if @moveBlacklist.include?(move.function_code) - next if move.type == :SHADOW - @assistMoves.push(move.id) - end - end - if @assistMoves.length==0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - move = @assistMoves[@battle.pbRandom(@assistMoves.length)] - user.pbUseMoveSimple(move) - end -end - - - -#=============================================================================== -# Uses a random move that exists. (Metronome) -#=============================================================================== -class PokeBattle_Move_0B6 < PokeBattle_Move - def callsAnotherMove?; return true; end - - def initialize(battle,move) - super - @moveBlacklist = [ - "011", # Snore - "11D", # After You - "11E", # Quash - "16C", # Instruct - # Struggle, Chatter, Belch - "002", # Struggle - "014", # Chatter - "158", # Belch - # Moves that affect the moveset - "05C", # Mimic - "05D", # Sketch - "069", # Transform - # Counter moves - "071", # Counter - "072", # Mirror Coat - "073", # Metal Burst # Not listed on Bulbapedia - # Helping Hand, Feint (always blacklisted together, don't know why) - "09C", # Helping Hand - "0AD", # Feint - # Protection moves - "0AA", # Detect, Protect - "0AB", # Quick Guard - "0AC", # Wide Guard - "0E8", # Endure - "149", # Mat Block - "14A", # Crafty Shield - "14B", # King's Shield - "14C", # Spiky Shield - "168", # Baneful Bunker - # Moves that call other moves - "0AE", # Mirror Move - "0AF", # Copycat - "0B0", # Me First - "0B3", # Nature Power - "0B4", # Sleep Talk - "0B5", # Assist - "0B6", # Metronome - # Move-redirecting and stealing moves - "0B1", # Magic Coat # Not listed on Bulbapedia - "0B2", # Snatch - "117", # Follow Me, Rage Powder - "16A", # Spotlight - # Set up effects that trigger upon KO - "0E6", # Grudge # Not listed on Bulbapedia - "0E7", # Destiny Bond - # Held item-moving moves - "0F1", # Covet, Thief - "0F2", # Switcheroo, Trick - "0F3", # Bestow - # Moves that start focussing at the start of the round - "115", # Focus Punch - "171", # Shell Trap - "172", # Beak Blast - # Event moves that do nothing - "133", # Hold Hands - "134" # Celebrate - ] - @moveBlacklistSignatures = [ - :SNARL, - # Signature moves - :DIAMONDSTORM, # Diancie (Gen 6) - :FLEURCANNON, # Magearna (Gen 7) - :FREEZESHOCK, # Black Kyurem (Gen 5) - :HYPERSPACEFURY, # Hoopa Unbound (Gen 6) - :HYPERSPACEHOLE, # Hoopa Confined (Gen 6) - :ICEBURN, # White Kyurem (Gen 5) - :LIGHTOFRUIN, # Eternal Flower Floette (Gen 6) - :MINDBLOWN, # Blacephalon (Gen 7) - :PHOTONGEYSER, # Necrozma (Gen 7) - :PLASMAFISTS, # Zeraora (Gen 7) - :RELICSONG, # Meloetta (Gen 5) - :SECRETSWORD, # Keldeo (Gen 5) - :SPECTRALTHIEF, # Marshadow (Gen 7) - :STEAMERUPTION, # Volcanion (Gen 6) - :TECHNOBLAST, # Genesect (Gen 5) - :THOUSANDARROWS, # Zygarde (Gen 6) - :THOUSANDWAVES, # Zygarde (Gen 6) - :VCREATE # Victini (Gen 5) - ] - end - - def pbMoveFailed?(user,targets) - @metronomeMove = nil - move_keys = GameData::Move.keys - # NOTE: You could be really unlucky and roll blacklisted moves 1000 times in - # a row. This is too unlikely to care about, though. - 1000.times do - move_id = move_keys[@battle.pbRandom(move_keys.length)] - move_data = GameData::Move.get(move_id) - next if @moveBlacklist.include?(move_data.function_code) - next if @moveBlacklistSignatures.include?(move_data.id) - next if move_data.type == :SHADOW - @metronomeMove = move_data.id - break - end - if !@metronomeMove - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.pbUseMoveSimple(@metronomeMove) - end -end - - - -#=============================================================================== -# The target can no longer use the same move twice in a row. (Torment) -#=============================================================================== -class PokeBattle_Move_0B7 < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.effects[PBEffects::Torment] - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return true if pbMoveFailedAromaVeil?(user, target, show_message) - return false - end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::Torment] = true - @battle.pbDisplay(_INTL("{1} was subjected to torment!",target.pbThis)) - target.pbItemStatusCureCheck - end -end - - - -#=============================================================================== -# Disables all target's moves that the user also knows. (Imprison) -#=============================================================================== -class PokeBattle_Move_0B8 < PokeBattle_Move - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if user.effects[PBEffects::Imprison] - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.effects[PBEffects::Imprison] = true - @battle.pbDisplay(_INTL("{1} sealed any moves its target shares with it!",user.pbThis)) - end -end - - - -#=============================================================================== -# For 5 rounds, disables the last move the target used. (Disable) -#=============================================================================== -class PokeBattle_Move_0B9 < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.effects[PBEffects::Disable]>0 || !target.lastRegularMoveUsed - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return true if pbMoveFailedAromaVeil?(user, target, show_message) - canDisable = false - target.eachMove do |m| - next if m.id!=target.lastRegularMoveUsed - next if m.pp==0 && m.total_pp>0 - canDisable = true - break - end - if !canDisable - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::Disable] = 5 - target.effects[PBEffects::DisableMove] = target.lastRegularMoveUsed - @battle.pbDisplay(_INTL("{1}'s {2} was disabled!",target.pbThis, - GameData::Move.get(target.lastRegularMoveUsed).name)) - target.pbItemStatusCureCheck - end -end - - - -#=============================================================================== -# For 4 rounds, disables the target's non-damaging moves. (Taunt) -#=============================================================================== -class PokeBattle_Move_0BA < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.effects[PBEffects::Taunt]>0 - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return true if pbMoveFailedAromaVeil?(user, target, show_message) - if Settings::MECHANICS_GENERATION >= 6 && target.hasActiveAbility?(:OBLIVIOUS) && - !@battle.moldBreaker - if show_message - @battle.pbShowAbilitySplash(target) - if PokeBattle_SceneConstants::USE_ABILITY_SPLASH - @battle.pbDisplay(_INTL("But it failed!")) - else - @battle.pbDisplay(_INTL("But it failed because of {1}'s {2}!", - target.pbThis(true), target.abilityName)) - end - @battle.pbHideAbilitySplash(target) - end - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::Taunt] = 4 - @battle.pbDisplay(_INTL("{1} fell for the taunt!",target.pbThis)) - target.pbItemStatusCureCheck - end -end - - - -#=============================================================================== -# For 5 rounds, disables the target's healing moves. (Heal Block) -#=============================================================================== -class PokeBattle_Move_0BB < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.effects[PBEffects::HealBlock]>0 - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return true if pbMoveFailedAromaVeil?(user, target, show_message) - return false - end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::HealBlock] = 5 - @battle.pbDisplay(_INTL("{1} was prevented from healing!",target.pbThis)) - target.pbItemStatusCureCheck - end -end - - - -#=============================================================================== -# For 4 rounds, the target must use the same move each round. (Encore) -#=============================================================================== -class PokeBattle_Move_0BC < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - def canMagicCoat?; return true; end - - def initialize(battle,move) - super - @moveBlacklist = [ - "0BC", # Encore - # Struggle - "002", # Struggle - # Moves that affect the moveset - "05C", # Mimic - "05D", # Sketch - "069", # Transform - # Moves that call other moves (see also below) - "0AE" # Mirror Move - ] - if Settings::MECHANICS_GENERATION >= 7 - @moveBlacklist += [ - # Moves that call other moves -# "0AE", # Mirror Move # See above - "0AF", # Copycat - "0B0", # Me First - "0B3", # Nature Power - "0B4", # Sleep Talk - "0B5", # Assist - "0B6" # Metronome - ] - end - end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.effects[PBEffects::Encore]>0 - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - if !target.lastRegularMoveUsed || - @moveBlacklist.include?(GameData::Move.get(target.lastRegularMoveUsed).function_code) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - if target.effects[PBEffects::ShellTrap] - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return true if pbMoveFailedAromaVeil?(user, target, show_message) - canEncore = false - target.eachMove do |m| - next if m.id!=target.lastRegularMoveUsed - next if m.pp==0 && m.total_pp>0 - canEncore = true - break - end - if !canEncore - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::Encore] = 4 - target.effects[PBEffects::EncoreMove] = target.lastRegularMoveUsed - @battle.pbDisplay(_INTL("{1} received an encore!",target.pbThis)) - target.pbItemStatusCureCheck - end -end - - - -#=============================================================================== -# Hits twice. -#=============================================================================== -class PokeBattle_Move_0BD < PokeBattle_Move - def multiHitMove?; return true; end - def pbNumHits(user,targets); return 2; end -end - - - -#=============================================================================== -# Hits twice. May poison the target on each hit. (Twineedle) -#=============================================================================== -class PokeBattle_Move_0BE < PokeBattle_PoisonMove - def multiHitMove?; return true; end - def pbNumHits(user,targets); return 2; end -end - - - -#=============================================================================== -# Hits 3 times. Power is multiplied by the hit number. (Triple Kick) -# An accuracy check is performed for each hit. -#=============================================================================== -class PokeBattle_Move_0BF < PokeBattle_Move - def multiHitMove?; return true; end - def pbNumHits(user,targets); return 3; end - - def successCheckPerHit? - return @accCheckPerHit - end - - def pbOnStartUse(user,targets) - @calcBaseDmg = 0 - @accCheckPerHit = !user.hasActiveAbility?(:SKILLLINK) - end - - def pbBaseDamage(baseDmg,user,target) - @calcBaseDmg += baseDmg - return @calcBaseDmg - end -end - - - -#=============================================================================== -# Hits 2-5 times. -#=============================================================================== -class PokeBattle_Move_0C0 < PokeBattle_Move - def multiHitMove?; return true; end - - def pbNumHits(user,targets) - if @id == :WATERSHURIKEN && user.isSpecies?(:GRENINJA) && user.form == 2 - return 3 - end - hitChances = [ - 2, 2, 2, 2, 2, 2, 2, - 3, 3, 3, 3, 3, 3, 3, - 4, 4, 4, - 5, 5, 5 - ] - r = @battle.pbRandom(hitChances.length) - r = hitChances.length-1 if user.hasActiveAbility?(:SKILLLINK) - return hitChances[r] - end - - def pbBaseDamage(baseDmg,user,target) - if @id == :WATERSHURIKEN && user.isSpecies?(:GRENINJA) && user.form == 2 - return 20 - end - return super - end -end - - - -#=============================================================================== -# Hits X times, where X is the number of non-user unfainted status-free Pokémon -# in the user's party (not including partner trainers). Fails if X is 0. -# Base power of each hit depends on the base Attack stat for the species of that -# hit's participant. (Beat Up) -#=============================================================================== -class PokeBattle_Move_0C1 < PokeBattle_Move - def multiHitMove?; return true; end - - def pbMoveFailed?(user,targets) - @beatUpList = [] - @battle.eachInTeamFromBattlerIndex(user.index) do |pkmn,i| - next if !pkmn.able? || pkmn.status != :NONE - @beatUpList.push(i) - end - if @beatUpList.length==0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbNumHits(user,targets) - return @beatUpList.length - end - - def pbBaseDamage(baseDmg,user,target) - i = @beatUpList.shift # First element in array, and removes it from array - atk = @battle.pbParty(user.index)[i].baseStats[:ATTACK] - return 5+(atk/10) - end -end - - - -#=============================================================================== -# Two turn attack. Attacks first turn, skips second turn (if successful). -#=============================================================================== -class PokeBattle_Move_0C2 < PokeBattle_Move - def pbEffectGeneral(user) - user.effects[PBEffects::HyperBeam] = 2 - user.currentMove = @id - end -end - - - -#=============================================================================== -# Two turn attack. Skips first turn, attacks second turn. (Razor Wind) -#=============================================================================== -class PokeBattle_Move_0C3 < PokeBattle_TwoTurnMove - def pbChargingTurnMessage(user,targets) - @battle.pbDisplay(_INTL("{1} whipped up a whirlwind!",user.pbThis)) - end -end - - - -#=============================================================================== -# Two turn attack. Skips first turn, attacks second turn. (Solar Beam, Solar Blade) -# Power halved in all weather except sunshine. In sunshine, takes 1 turn instead. -#=============================================================================== -class PokeBattle_Move_0C4 < PokeBattle_TwoTurnMove - def pbIsChargingTurn?(user) - ret = super - if !user.effects[PBEffects::TwoTurnAttack] - if [:Sun, :HarshSun].include?(user.effectiveWeather) - @powerHerb = false - @chargingTurn = true - @damagingTurn = true - return false - end - end - return ret - end - - def pbChargingTurnMessage(user,targets) - @battle.pbDisplay(_INTL("{1} took in sunlight!",user.pbThis)) - end - - def pbBaseDamageMultiplier(damageMult,user,target) - damageMult /= 2 if ![:None, :Sun, :HarshSun].include?(user.effectiveWeather) - return damageMult - end -end - - - -#=============================================================================== -# Two turn attack. Skips first turn, attacks second turn. (Freeze Shock) -# May paralyze the target. -#=============================================================================== -class PokeBattle_Move_0C5 < PokeBattle_TwoTurnMove - def pbChargingTurnMessage(user,targets) - @battle.pbDisplay(_INTL("{1} became cloaked in a freezing light!",user.pbThis)) - end - - def pbAdditionalEffect(user,target) - return if target.damageState.substitute - target.pbParalyze(user) if target.pbCanParalyze?(user,false,self) - end -end - - - -#=============================================================================== -# Two turn attack. Skips first turn, attacks second turn. (Ice Burn) -# May burn the target. -#=============================================================================== -class PokeBattle_Move_0C6 < PokeBattle_TwoTurnMove - def pbChargingTurnMessage(user,targets) - @battle.pbDisplay(_INTL("{1} became cloaked in freezing air!",user.pbThis)) - end - - def pbAdditionalEffect(user,target) - return if target.damageState.substitute - target.pbBurn(user) if target.pbCanBurn?(user,false,self) - end -end - - - -#=============================================================================== -# Two turn attack. Skips first turn, attacks second turn. (Sky Attack) -# May make the target flinch. -#=============================================================================== -class PokeBattle_Move_0C7 < PokeBattle_TwoTurnMove - def flinchingMove?; return true; end - - def pbChargingTurnMessage(user,targets) - @battle.pbDisplay(_INTL("{1} became cloaked in a harsh light!",user.pbThis)) - end - - def pbAdditionalEffect(user,target) - return if target.damageState.substitute - target.pbFlinch(user) - end -end - - - -#=============================================================================== -# Two turn attack. Ups user's Defense by 1 stage first turn, attacks second turn. -# (Skull Bash) -#=============================================================================== -class PokeBattle_Move_0C8 < PokeBattle_TwoTurnMove - def pbChargingTurnMessage(user,targets) - @battle.pbDisplay(_INTL("{1} tucked in its head!",user.pbThis)) - end - - def pbChargingTurnEffect(user,target) - if user.pbCanRaiseStatStage?(:DEFENSE,user,self) - user.pbRaiseStatStage(:DEFENSE,1,user) - end - end -end - - - -#=============================================================================== -# Two turn attack. Skips first turn, attacks second turn. (Fly) -# (Handled in Battler's pbSuccessCheckPerHit): Is semi-invulnerable during use. -#=============================================================================== -class PokeBattle_Move_0C9 < PokeBattle_TwoTurnMove - def unusableInGravity?; return true; end - - def pbChargingTurnMessage(user,targets) - @battle.pbDisplay(_INTL("{1} flew up high!",user.pbThis)) - end -end - - - -#=============================================================================== -# Two turn attack. Skips first turn, attacks second turn. (Dig) -# (Handled in Battler's pbSuccessCheckPerHit): Is semi-invulnerable during use. -#=============================================================================== -class PokeBattle_Move_0CA < PokeBattle_TwoTurnMove - def pbChargingTurnMessage(user,targets) - @battle.pbDisplay(_INTL("{1} burrowed its way under the ground!",user.pbThis)) - end -end - - - -#=============================================================================== -# Two turn attack. Skips first turn, attacks second turn. (Dive) -# (Handled in Battler's pbSuccessCheckPerHit): Is semi-invulnerable during use. -#=============================================================================== -class PokeBattle_Move_0CB < PokeBattle_TwoTurnMove - def pbChargingTurnMessage(user,targets) - @battle.pbDisplay(_INTL("{1} hid underwater!",user.pbThis)) - end -end - - - -#=============================================================================== -# Two turn attack. Skips first turn, attacks second turn. (Bounce) -# May paralyze the target. -# (Handled in Battler's pbSuccessCheckPerHit): Is semi-invulnerable during use. -#=============================================================================== -class PokeBattle_Move_0CC < PokeBattle_TwoTurnMove - def unusableInGravity?; return true; end - - def pbChargingTurnMessage(user,targets) - @battle.pbDisplay(_INTL("{1} sprang up!",user.pbThis)) - end - - def pbAdditionalEffect(user,target) - return if target.damageState.substitute - target.pbParalyze(user) if target.pbCanParalyze?(user,false,self) - end -end - - - -#=============================================================================== -# Two turn attack. Skips first turn, attacks second turn. (Shadow Force) -# Is invulnerable during use. Ends target's protections upon hit. -#=============================================================================== -class PokeBattle_Move_0CD < PokeBattle_TwoTurnMove - def pbChargingTurnMessage(user,targets) - @battle.pbDisplay(_INTL("{1} vanished instantly!",user.pbThis)) - end - - def pbAttackingTurnEffect(user,target) - target.effects[PBEffects::BanefulBunker] = false - target.effects[PBEffects::KingsShield] = false - target.effects[PBEffects::Obstruct] = false - target.effects[PBEffects::Protect] = false - target.effects[PBEffects::SpikyShield] = false - target.pbOwnSide.effects[PBEffects::CraftyShield] = false - target.pbOwnSide.effects[PBEffects::MatBlock] = false - target.pbOwnSide.effects[PBEffects::QuickGuard] = false - target.pbOwnSide.effects[PBEffects::WideGuard] = false - end -end - - - -#=============================================================================== -# Two turn attack. Skips first turn, attacks second turn. (Sky Drop) -# (Handled in Battler's pbSuccessCheckPerHit): Is semi-invulnerable during use. -# Target is also semi-invulnerable during use, and can't take any action. -# Doesn't damage airborne Pokémon (but still makes them unable to move during). -#=============================================================================== -class PokeBattle_Move_0CE < PokeBattle_TwoTurnMove - def unusableInGravity?; return true; end - - def pbIsChargingTurn?(user) - # NOTE: Sky Drop doesn't benefit from Power Herb, probably because it works - # differently (i.e. immobilises the target during use too). - @powerHerb = false - @chargingTurn = (user.effects[PBEffects::TwoTurnAttack].nil?) - @damagingTurn = (!user.effects[PBEffects::TwoTurnAttack].nil?) - return !@damagingTurn - end - - def pbFailsAgainstTarget?(user, target, show_message) - if !target.opposes?(user) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - if target.effects[PBEffects::Substitute]>0 && !ignoresSubstitute?(user) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - if Settings::MECHANICS_GENERATION >= 6 && target.pbWeight>=2000 # 200.0kg - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - if target.semiInvulnerable? || - (target.effects[PBEffects::SkyDrop]>=0 && @chargingTurn) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - if target.effects[PBEffects::SkyDrop]!=user.index && @damagingTurn - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbCalcTypeMod(movetype,user,target) - return Effectiveness::INEFFECTIVE if target.pbHasType?(:FLYING) - return super - end - - def pbChargingTurnMessage(user,targets) - @battle.pbDisplay(_INTL("{1} took {2} into the sky!",user.pbThis,targets[0].pbThis(true))) - end - - def pbAttackingTurnMessage(user,targets) - @battle.pbDisplay(_INTL("{1} was freed from the Sky Drop!",targets[0].pbThis)) - end - - def pbChargingTurnEffect(user,target) - target.effects[PBEffects::SkyDrop] = user.index - end - - def pbAttackingTurnEffect(user,target) - target.effects[PBEffects::SkyDrop] = -1 - end -end - - - -#=============================================================================== -# Trapping move. Traps for 5 or 6 rounds. Trapped Pokémon lose 1/16 of max HP -# at end of each round. -#=============================================================================== -class PokeBattle_Move_0CF < PokeBattle_Move - def pbEffectAgainstTarget(user,target) - return if target.fainted? || target.damageState.substitute - return if target.effects[PBEffects::Trapping]>0 - # Set trapping effect duration and info - if user.hasActiveItem?(:GRIPCLAW) - target.effects[PBEffects::Trapping] = (Settings::MECHANICS_GENERATION >= 5) ? 8 : 6 - else - target.effects[PBEffects::Trapping] = 5+@battle.pbRandom(2) - end - target.effects[PBEffects::TrappingMove] = @id - target.effects[PBEffects::TrappingUser] = user.index - # Message - msg = _INTL("{1} was trapped in the vortex!",target.pbThis) - case @id - when :BIND - msg = _INTL("{1} was squeezed by {2}!",target.pbThis,user.pbThis(true)) - when :CLAMP - msg = _INTL("{1} clamped {2}!",user.pbThis,target.pbThis(true)) - when :FIRESPIN - msg = _INTL("{1} was trapped in the fiery vortex!",target.pbThis) - when :INFESTATION - msg = _INTL("{1} has been afflicted with an infestation by {2}!",target.pbThis,user.pbThis(true)) - when :MAGMASTORM - msg = _INTL("{1} became trapped by Magma Storm!",target.pbThis) - when :SANDTOMB - msg = _INTL("{1} became trapped by Sand Tomb!",target.pbThis) - when :WHIRLPOOL - msg = _INTL("{1} became trapped in the vortex!",target.pbThis) - when :WRAP - msg = _INTL("{1} was wrapped by {2}!",target.pbThis,user.pbThis(true)) - end - @battle.pbDisplay(msg) - end -end - - - -#=============================================================================== -# Trapping move. Traps for 5 or 6 rounds. Trapped Pokémon lose 1/16 of max HP -# at end of each round. (Whirlpool) -# Power is doubled if target is using Dive. Hits some semi-invulnerable targets. -#=============================================================================== -class PokeBattle_Move_0D0 < PokeBattle_Move_0CF - def hitsDivingTargets?; return true; end - - def pbModifyDamage(damageMult,user,target) - damageMult *= 2 if target.inTwoTurnAttack?("0CB") # Dive - return damageMult - end -end - - - -#=============================================================================== -# User must use this move for 2 more rounds. No battlers can sleep. (Uproar) -# NOTE: Bulbapedia claims that an uproar will wake up Pokémon even if they have -# Soundproof, and will not allow Pokémon to fall asleep even if they have -# Soundproof. I think this is an oversight, so I've let Soundproof Pokémon -# be unaffected by Uproar waking/non-sleeping effects. -#=============================================================================== -class PokeBattle_Move_0D1 < PokeBattle_Move - def pbEffectGeneral(user) - return if user.effects[PBEffects::Uproar]>0 - user.effects[PBEffects::Uproar] = 3 - user.currentMove = @id - @battle.pbDisplay(_INTL("{1} caused an uproar!",user.pbThis)) - @battle.pbPriority(true).each do |b| - next if b.fainted? || b.status != :SLEEP - next if b.hasActiveAbility?(:SOUNDPROOF) - b.pbCureStatus - end - end -end - - - -#=============================================================================== -# User must use this move for 1 or 2 more rounds. At end, user becomes confused. -# (Outrage, Petal Dange, Thrash) -#=============================================================================== -class PokeBattle_Move_0D2 < PokeBattle_Move - def pbEffectAfterAllHits(user,target) - if !target.damageState.unaffected && user.effects[PBEffects::Outrage]==0 - user.effects[PBEffects::Outrage] = 2+@battle.pbRandom(2) - user.currentMove = @id - end - if user.effects[PBEffects::Outrage]>0 - user.effects[PBEffects::Outrage] -= 1 - if user.effects[PBEffects::Outrage]==0 && user.pbCanConfuseSelf?(false) - user.pbConfuse(_INTL("{1} became confused due to fatigue!",user.pbThis)) - end - end - end -end - - - -#=============================================================================== -# User must use this move for 4 more rounds. Power doubles each round. -# Power is also doubled if user has curled up. (Ice Ball, Rollout) -#=============================================================================== -class PokeBattle_Move_0D3 < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - shift = (5 - user.effects[PBEffects::Rollout]) # 0-4, where 0 is most powerful - shift = 0 if user.effects[PBEffects::Rollout] == 0 # For first turn - shift += 1 if user.effects[PBEffects::DefenseCurl] - baseDmg *= 2**shift - return baseDmg - end - - def pbEffectAfterAllHits(user,target) - if !target.damageState.unaffected && user.effects[PBEffects::Rollout] == 0 - user.effects[PBEffects::Rollout] = 5 - user.currentMove = @id - end - user.effects[PBEffects::Rollout] -= 1 if user.effects[PBEffects::Rollout] > 0 - end -end - - - -#=============================================================================== -# User bides its time this round and next round. The round after, deals 2x the -# total direct damage it took while biding to the last battler that damaged it. -# (Bide) -#=============================================================================== -class PokeBattle_Move_0D4 < PokeBattle_FixedDamageMove - def pbAddTarget(targets,user) - return if user.effects[PBEffects::Bide]!=1 # Not the attack turn - idxTarget = user.effects[PBEffects::BideTarget] - t = (idxTarget>=0) ? @battle.battlers[idxTarget] : nil - if !user.pbAddTarget(targets,user,t,self,false) - user.pbAddTargetRandomFoe(targets,user,self,false) - end - end - - def pbMoveFailed?(user,targets) - return false if user.effects[PBEffects::Bide]!=1 # Not the attack turn - if user.effects[PBEffects::BideDamage]==0 - @battle.pbDisplay(_INTL("But it failed!")) - user.effects[PBEffects::Bide] = 0 # No need to reset other Bide variables - return true - end - if targets.length==0 - @battle.pbDisplay(_INTL("But there was no target...")) - user.effects[PBEffects::Bide] = 0 # No need to reset other Bide variables - return true - end - return false - end - - def pbOnStartUse(user,targets) - @damagingTurn = (user.effects[PBEffects::Bide]==1) # If attack turn - end - - def pbDisplayUseMessage(user) - if @damagingTurn # Attack turn - @battle.pbDisplayBrief(_INTL("{1} unleashed energy!",user.pbThis)) - elsif user.effects[PBEffects::Bide]>1 # Charging turns - @battle.pbDisplayBrief(_INTL("{1} is storing energy!",user.pbThis)) - else - super # Start using Bide - end - end - - def pbDamagingMove? # Stops damage being dealt in the charging turns - return false if !@damagingTurn - return super - end - - def pbFixedDamage(user,target) - return user.effects[PBEffects::BideDamage]*2 - end - - def pbEffectGeneral(user) - if user.effects[PBEffects::Bide]==0 # Starting using Bide - user.effects[PBEffects::Bide] = 3 - user.effects[PBEffects::BideDamage] = 0 - user.effects[PBEffects::BideTarget] = -1 - user.currentMove = @id - end - user.effects[PBEffects::Bide] -= 1 - end - - def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) - hitNum = 1 if !@damagingTurn # Charging anim - super - end -end - - - -#=============================================================================== -# Heals user by 1/2 of its max HP. -#=============================================================================== -class PokeBattle_Move_0D5 < PokeBattle_HealingMove - def pbHealAmount(user) - return (user.totalhp/2.0).round - end -end - - - -#=============================================================================== -# Heals user by 1/2 of its max HP. (Roost) -# User roosts, and its Flying type is ignored for attacks used against it. -#=============================================================================== -class PokeBattle_Move_0D6 < PokeBattle_HealingMove - def pbHealAmount(user) - return (user.totalhp/2.0).round - end - - def pbEffectGeneral(user) - super - user.effects[PBEffects::Roost] = true - end -end - - - -#=============================================================================== -# Battler in user's position is healed by 1/2 of its max HP, at the end of the -# next round. (Wish) -#=============================================================================== -class PokeBattle_Move_0D7 < PokeBattle_Move - def healingMove?; return true; end - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if @battle.positions[user.index].effects[PBEffects::Wish]>0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - @battle.positions[user.index].effects[PBEffects::Wish] = 2 - @battle.positions[user.index].effects[PBEffects::WishAmount] = (user.totalhp/2.0).round - @battle.positions[user.index].effects[PBEffects::WishMaker] = user.pokemonIndex - end -end - - - -#=============================================================================== -# Heals user by an amount depending on the weather. (Moonlight, Morning Sun, -# Synthesis) -#=============================================================================== -class PokeBattle_Move_0D8 < PokeBattle_HealingMove - def pbOnStartUse(user,targets) - case user.effectiveWeather - when :Sun, :HarshSun - @healAmount = (user.totalhp*2/3.0).round - when :None, :StrongWinds - @healAmount = (user.totalhp/2.0).round - else - @healAmount = (user.totalhp/4.0).round - end - end - - def pbHealAmount(user) - return @healAmount - end -end - - - -#=============================================================================== -# Heals user to full HP. User falls asleep for 2 more rounds. (Rest) -#=============================================================================== -class PokeBattle_Move_0D9 < PokeBattle_HealingMove - def pbMoveFailed?(user,targets) - if user.asleep? - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return true if !user.pbCanSleep?(user,true,self,true) - return true if super - return false - end - - def pbHealAmount(user) - return user.totalhp-user.hp - end - - def pbEffectGeneral(user) - user.pbSleepSelf(_INTL("{1} slept and became healthy!",user.pbThis),3) - super - end -end - - - -#=============================================================================== -# Rings the user. Ringed Pokémon gain 1/16 of max HP at the end of each round. -# (Aqua Ring) -#=============================================================================== -class PokeBattle_Move_0DA < PokeBattle_Move - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if user.effects[PBEffects::AquaRing] - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.effects[PBEffects::AquaRing] = true - @battle.pbDisplay(_INTL("{1} surrounded itself with a veil of water!",user.pbThis)) - end -end - - - -#=============================================================================== -# Ingrains the user. Ingrained Pokémon gain 1/16 of max HP at the end of each -# round, and cannot flee or switch out. (Ingrain) -#=============================================================================== -class PokeBattle_Move_0DB < PokeBattle_Move - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if user.effects[PBEffects::Ingrain] - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.effects[PBEffects::Ingrain] = true - @battle.pbDisplay(_INTL("{1} planted its roots!",user.pbThis)) - end -end - - - -#=============================================================================== -# Seeds the target. Seeded Pokémon lose 1/8 of max HP at the end of each round, -# and the Pokémon in the user's position gains the same amount. (Leech Seed) -#=============================================================================== -class PokeBattle_Move_0DC < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.effects[PBEffects::LeechSeed]>=0 - @battle.pbDisplay(_INTL("{1} evaded the attack!", target.pbThis)) if show_message - return true - end - if target.pbHasType?(:GRASS) - @battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true))) if show_message - return true - end - return false - end - - def pbMissMessage(user,target) - @battle.pbDisplay(_INTL("{1} evaded the attack!",target.pbThis)) - return true - end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::LeechSeed] = user.index - @battle.pbDisplay(_INTL("{1} was seeded!",target.pbThis)) - end -end - - - -#=============================================================================== -# User gains half the HP it inflicts as damage. -#=============================================================================== -class PokeBattle_Move_0DD < PokeBattle_Move - def healingMove?; return Settings::MECHANICS_GENERATION >= 6; end - - def pbEffectAgainstTarget(user,target) - return if target.damageState.hpLost<=0 - hpGain = (target.damageState.hpLost/2.0).round - user.pbRecoverHPFromDrain(hpGain,target) - end -end - - - -#=============================================================================== -# User gains half the HP it inflicts as damage. Fails if target is not asleep. -# (Dream Eater) -#=============================================================================== -class PokeBattle_Move_0DE < PokeBattle_Move - def healingMove?; return Settings::MECHANICS_GENERATION >= 6; end - - def pbFailsAgainstTarget?(user, target, show_message) - if !target.asleep? - @battle.pbDisplay(_INTL("{1} wasn't affected!", target.pbThis)) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - return if target.damageState.hpLost<=0 - hpGain = (target.damageState.hpLost/2.0).round - user.pbRecoverHPFromDrain(hpGain,target) - end -end - - - -#=============================================================================== -# Heals target by 1/2 of its max HP. (Heal Pulse) -#=============================================================================== -class PokeBattle_Move_0DF < PokeBattle_Move - def healingMove?; return true; end - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.hp==target.totalhp - @battle.pbDisplay(_INTL("{1}'s HP is full!", target.pbThis)) if show_message - return true - elsif !target.canHeal? - @battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis)) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - hpGain = (target.totalhp/2.0).round - if pulseMove? && user.hasActiveAbility?(:MEGALAUNCHER) - hpGain = (target.totalhp*3/4.0).round - end - target.pbRecoverHP(hpGain) - @battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis)) - end -end - - - -#=============================================================================== -# User faints, even if the move does nothing else. (Explosion, Self-Destruct) -#=============================================================================== -class PokeBattle_Move_0E0 < PokeBattle_Move - def worksWithNoTargets?; return true; end - def pbNumHits(user,targets); return 1; end - - def pbMoveFailed?(user,targets) - if !@battle.moldBreaker - bearer = @battle.pbCheckGlobalAbility(:DAMP) - if bearer!=nil - @battle.pbShowAbilitySplash(bearer) - if PokeBattle_SceneConstants::USE_ABILITY_SPLASH - @battle.pbDisplay(_INTL("{1} cannot use {2}!",user.pbThis,@name)) - else - @battle.pbDisplay(_INTL("{1} cannot use {2} because of {3}'s {4}!", - user.pbThis,@name,bearer.pbThis(true),bearer.abilityName)) - end - @battle.pbHideAbilitySplash(bearer) - return true - end - end - return false - end - - def pbSelfKO(user) - return if user.fainted? - user.pbReduceHP(user.hp,false) - user.pbItemHPHealCheck - end -end - - - -#=============================================================================== -# Inflicts fixed damage equal to user's current HP. (Final Gambit) -# User faints (if successful). -#=============================================================================== -class PokeBattle_Move_0E1 < PokeBattle_FixedDamageMove - def pbNumHits(user,targets); return 1; end - - def pbOnStartUse(user,targets) - @finalGambitDamage = user.hp - end - - def pbFixedDamage(user,target) - return @finalGambitDamage - end - - def pbSelfKO(user) - return if user.fainted? - user.pbReduceHP(user.hp,false) - user.pbItemHPHealCheck - end -end - - - -#=============================================================================== -# Decreases the target's Attack and Special Attack by 2 stages each. (Memento) -# User faints (if successful). -#=============================================================================== -class PokeBattle_Move_0E2 < PokeBattle_TargetMultiStatDownMove - def canMagicCoat?; return false; end - - def initialize(battle,move) - super - @statDown = [:ATTACK,2,:SPECIAL_ATTACK,2] - end - - # NOTE: The user faints even if the target's stats cannot be changed, so this - # method must always return false to allow the move's usage to continue. - def pbFailsAgainstTarget?(user, target, show_message) - return false - end - - def pbSelfKO(user) - return if user.fainted? - user.pbReduceHP(user.hp,false) - user.pbItemHPHealCheck - end -end - - - -#=============================================================================== -# User faints. The Pokémon that replaces the user is fully healed (HP and -# status). Fails if user won't be replaced. (Healing Wish) -#=============================================================================== -class PokeBattle_Move_0E3 < PokeBattle_Move - def healingMove?; return true; end - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if !@battle.pbCanChooseNonActive?(user.index) - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbSelfKO(user) - return if user.fainted? - user.pbReduceHP(user.hp,false) - user.pbItemHPHealCheck - @battle.positions[user.index].effects[PBEffects::HealingWish] = true - end -end - - - -#=============================================================================== -# User faints. The Pokémon that replaces the user is fully healed (HP, PP and -# status). Fails if user won't be replaced. (Lunar Dance) -#=============================================================================== -class PokeBattle_Move_0E4 < PokeBattle_Move - def healingMove?; return true; end - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if !@battle.pbCanChooseNonActive?(user.index) - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbSelfKO(user) - return if user.fainted? - user.pbReduceHP(user.hp,false) - user.pbItemHPHealCheck - @battle.positions[user.index].effects[PBEffects::LunarDance] = true - end -end - - - -#=============================================================================== -# All current battlers will perish after 3 more rounds. (Perish Song) -#=============================================================================== -class PokeBattle_Move_0E5 < PokeBattle_Move - def pbMoveFailed?(user,targets) - failed = true - targets.each do |b| - next if b.effects[PBEffects::PerishSong]>0 # Heard it before - failed = false - break - end - if failed - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - return target.effects[PBEffects::PerishSong]>0 # Heard it before - end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::PerishSong] = 4 - target.effects[PBEffects::PerishSongUser] = user.index - end - - def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) - super - @battle.pbDisplay(_INTL("All Pokémon that hear the song will faint in three turns!")) - end -end - - - -#=============================================================================== -# If user is KO'd before it next moves, the attack that caused it loses all PP. -# (Grudge) -#=============================================================================== -class PokeBattle_Move_0E6 < PokeBattle_Move - def pbEffectGeneral(user) - user.effects[PBEffects::Grudge] = true - @battle.pbDisplay(_INTL("{1} wants its target to bear a grudge!",user.pbThis)) - end -end - - - -#=============================================================================== -# If user is KO'd before it next moves, the battler that caused it also faints. -# (Destiny Bond) -#=============================================================================== -class PokeBattle_Move_0E7 < PokeBattle_Move - def pbMoveFailed?(user,targets) - if Settings::MECHANICS_GENERATION >= 7 && user.effects[PBEffects::DestinyBondPrevious] - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.effects[PBEffects::DestinyBond] = true - @battle.pbDisplay(_INTL("{1} is hoping to take its attacker down with it!",user.pbThis)) - end -end - - - -#=============================================================================== -# If user would be KO'd this round, it survives with 1HP instead. (Endure) -#=============================================================================== -class PokeBattle_Move_0E8 < PokeBattle_ProtectMove - def initialize(battle,move) - super - @effect = PBEffects::Endure - end - - def pbProtectMessage(user) - @battle.pbDisplay(_INTL("{1} braced itself!",user.pbThis)) - end -end - - - -#=============================================================================== -# If target would be KO'd by this attack, it survives with 1HP instead. -# (False Swipe, Hold Back) -#=============================================================================== -class PokeBattle_Move_0E9 < PokeBattle_Move - def nonLethal?(user,target); return true; end -end - - - -#=============================================================================== -# User flees from battle (but in Gen 8+, only when user is a wild Pokémon). -# In Gen 8+, user switches out (except if user is a wild Pokémon). (Teleport) -#=============================================================================== -class PokeBattle_Move_0EA < PokeBattle_Move - def pbMoveFailed?(user,targets) - if Settings::MECHANICS_GENERATION < 8 || (@battle.wildBattle? && user.opposes?) - if !@battle.pbCanRun?(user.index) - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - elsif !@battle.pbCanChooseNonActive?(user.index) - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEndOfMoveUsageEffect(user,targets,numHits,switchedBattlers) - return if Settings::MECHANICS_GENERATION < 8 || (@battle.wildBattle? && user.opposes?) - @battle.pbDisplay(_INTL("{1} went back to {2}!",user.pbThis, - @battle.pbGetOwnerName(user.index))) - @battle.pbPursuit(user.index) - return if user.fainted? - newPkmn = @battle.pbGetReplacementPokemonIndex(user.index) # Owner chooses - return if newPkmn<0 - @battle.pbRecallAndReplace(user.index,newPkmn) - @battle.pbClearChoice(user.index) # Replacement Pokémon does nothing this round - @battle.moldBreaker = false - switchedBattlers.push(user.index) - user.pbEffectsOnSwitchIn(true) - end - - def pbEffectGeneral(user) - if Settings::MECHANICS_GENERATION < 8 || (@battle.wildBattle? && user.opposes?) - @battle.pbDisplay(_INTL("{1} fled from battle!",user.pbThis)) - @battle.decision = 3 # Escaped - end - end -end - - - -#=============================================================================== -# In wild battles, makes target flee. Fails if target is a higher level than the -# user. -# In trainer battles, target switches out. -# For status moves. (Roar, Whirlwind) -#=============================================================================== -class PokeBattle_Move_0EB < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.hasActiveAbility?(:SUCTIONCUPS) && !@battle.moldBreaker - if show_message - @battle.pbShowAbilitySplash(target) - if PokeBattle_SceneConstants::USE_ABILITY_SPLASH - @battle.pbDisplay(_INTL("{1} anchors itself!", target.pbThis)) - else - @battle.pbDisplay(_INTL("{1} anchors itself with {2}!", target.pbThis, target.abilityName)) - end - @battle.pbHideAbilitySplash(target) - end - return true - end - if target.effects[PBEffects::Ingrain] - @battle.pbDisplay(_INTL("{1} anchored itself with its roots!", target.pbThis)) if show_message - return true - end - if !@battle.canRun - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - if @battle.wildBattle? && target.level>user.level - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - if @battle.trainerBattle? - canSwitch = false - @battle.eachInTeamFromBattlerIndex(target.index) do |_pkmn,i| - next if !@battle.pbCanSwitchLax?(target.index,i) - canSwitch = true - break - end - if !canSwitch - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - end - return false - end - - def pbEffectGeneral(user) - @battle.decision = 3 if @battle.wildBattle? # Escaped from battle - end - - def pbSwitchOutTargetsEffect(user,targets,numHits,switchedBattlers) - return if @battle.wildBattle? - return if user.fainted? || numHits==0 - roarSwitched = [] - targets.each do |b| - next if b.fainted? || b.damageState.unaffected || switchedBattlers.include?(b.index) - newPkmn = @battle.pbGetReplacementPokemonIndex(b.index,true) # Random - next if newPkmn<0 - @battle.pbRecallAndReplace(b.index, newPkmn, true) - @battle.pbDisplay(_INTL("{1} was dragged out!",b.pbThis)) - @battle.pbClearChoice(b.index) # Replacement Pokémon does nothing this round - switchedBattlers.push(b.index) - roarSwitched.push(b.index) - end - if roarSwitched.length>0 - @battle.moldBreaker = false if roarSwitched.include?(user.index) - @battle.pbPriority(true).each do |b| - b.pbEffectsOnSwitchIn(true) if roarSwitched.include?(b.index) - end - end - end -end - - - -#=============================================================================== -# In wild battles, makes target flee. Fails if target is a higher level than the -# user. -# In trainer battles, target switches out. -# For damaging moves. (Circle Throw, Dragon Tail) -#=============================================================================== -class PokeBattle_Move_0EC < PokeBattle_Move - def pbEffectAgainstTarget(user,target) - if @battle.wildBattle? && target.level<=user.level && @battle.canRun && - (target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user)) - @battle.decision = 3 - end - end - - def pbSwitchOutTargetsEffect(user,targets,numHits,switchedBattlers) - return if @battle.wildBattle? - return if user.fainted? || numHits==0 - roarSwitched = [] - targets.each do |b| - next if b.fainted? || b.damageState.unaffected || b.damageState.substitute - next if switchedBattlers.include?(b.index) - next if b.effects[PBEffects::Ingrain] - next if b.hasActiveAbility?(:SUCTIONCUPS) && !@battle.moldBreaker - newPkmn = @battle.pbGetReplacementPokemonIndex(b.index,true) # Random - next if newPkmn<0 - @battle.pbRecallAndReplace(b.index, newPkmn, true) - @battle.pbDisplay(_INTL("{1} was dragged out!",b.pbThis)) - @battle.pbClearChoice(b.index) # Replacement Pokémon does nothing this round - switchedBattlers.push(b.index) - roarSwitched.push(b.index) - end - if roarSwitched.length>0 - @battle.moldBreaker = false if roarSwitched.include?(user.index) - @battle.pbPriority(true).each do |b| - b.pbEffectsOnSwitchIn(true) if roarSwitched.include?(b.index) - end - end - end -end - - - -#=============================================================================== -# User switches out. Various effects affecting the user are passed to the -# replacement. (Baton Pass) -#=============================================================================== -class PokeBattle_Move_0ED < PokeBattle_Move - def pbMoveFailed?(user,targets) - if !@battle.pbCanChooseNonActive?(user.index) - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEndOfMoveUsageEffect(user,targets,numHits,switchedBattlers) - return if user.fainted? || numHits==0 - return if !@battle.pbCanChooseNonActive?(user.index) - @battle.pbPursuit(user.index) - return if user.fainted? - newPkmn = @battle.pbGetReplacementPokemonIndex(user.index) # Owner chooses - return if newPkmn<0 - @battle.pbRecallAndReplace(user.index, newPkmn, false, true) - @battle.pbClearChoice(user.index) # Replacement Pokémon does nothing this round - @battle.moldBreaker = false - switchedBattlers.push(user.index) - user.pbEffectsOnSwitchIn(true) - end -end - - - -#=============================================================================== -# After inflicting damage, user switches out. Ignores trapping moves. -# (U-turn, Volt Switch) -#=============================================================================== -class PokeBattle_Move_0EE < PokeBattle_Move - def pbEndOfMoveUsageEffect(user,targets,numHits,switchedBattlers) - return if user.fainted? || numHits==0 || @battle.pbAllFainted?(user.idxOpposingSide) - targetSwitched = true - targets.each do |b| - targetSwitched = false if !switchedBattlers.include?(b.index) - end - return if targetSwitched - return if !@battle.pbCanChooseNonActive?(user.index) - @battle.pbDisplay(_INTL("{1} went back to {2}!",user.pbThis, - @battle.pbGetOwnerName(user.index))) - @battle.pbPursuit(user.index) - return if user.fainted? - newPkmn = @battle.pbGetReplacementPokemonIndex(user.index) # Owner chooses - return if newPkmn<0 - @battle.pbRecallAndReplace(user.index,newPkmn) - @battle.pbClearChoice(user.index) # Replacement Pokémon does nothing this round - @battle.moldBreaker = false - switchedBattlers.push(user.index) - user.pbEffectsOnSwitchIn(true) - end -end - - - -#=============================================================================== -# Target can no longer switch out or flee, as long as the user remains active. -# (Anchor Shot, Block, Mean Look, Spider Web, Spirit Shackle, Thousand Waves) -#=============================================================================== -class PokeBattle_Move_0EF < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - return false if damagingMove? - if target.effects[PBEffects::MeanLook]>=0 - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - if Settings::MORE_TYPE_EFFECTS && target.pbHasType?(:GHOST) - @battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true))) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - return if damagingMove? - target.effects[PBEffects::MeanLook] = user.index - @battle.pbDisplay(_INTL("{1} can no longer escape!",target.pbThis)) - end - - def pbAdditionalEffect(user,target) - return if target.fainted? || target.damageState.substitute - return if target.effects[PBEffects::MeanLook]>=0 - return if Settings::MORE_TYPE_EFFECTS && target.pbHasType?(:GHOST) - target.effects[PBEffects::MeanLook] = user.index - @battle.pbDisplay(_INTL("{1} can no longer escape!",target.pbThis)) - end -end - - - -#=============================================================================== -# Target drops its item. It regains the item at the end of the battle. (Knock Off) -# If target has a losable item, damage is multiplied by 1.5. -#=============================================================================== -class PokeBattle_Move_0F0 < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - if Settings::MECHANICS_GENERATION >= 6 && - target.item && !target.unlosableItem?(target.item) - # NOTE: Damage is still boosted even if target has Sticky Hold or a - # substitute. - baseDmg = (baseDmg*1.5).round - end - return baseDmg - end - - def pbEffectAfterAllHits(user,target) - return if @battle.wildBattle? && user.opposes? # Wild Pokémon can't knock off - return if user.fainted? - return if target.damageState.unaffected || target.damageState.substitute - return if !target.item || target.unlosableItem?(target.item) - return if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker - itemName = target.itemName - target.pbRemoveItem(false) - @battle.pbDisplay(_INTL("{1} dropped its {2}!",target.pbThis,itemName)) - end -end - - - -#=============================================================================== -# User steals the target's item, if the user has none itself. (Covet, Thief) -# Items stolen from wild Pokémon are kept after the battle. -#=============================================================================== -class PokeBattle_Move_0F1 < PokeBattle_Move - def pbEffectAfterAllHits(user,target) - return if @battle.wildBattle? && user.opposes? # Wild Pokémon can't thieve - return if user.fainted? - return if target.damageState.unaffected || target.damageState.substitute - return if !target.item || user.item - return if target.unlosableItem?(target.item) - return if user.unlosableItem?(target.item) - return if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker - itemName = target.itemName - user.item = target.item - # Permanently steal the item from wild Pokémon - if @battle.wildBattle? && target.opposes? && !user.initialItem && - target.item == target.initialItem - user.setInitialItem(target.item) - target.pbRemoveItem - else - target.pbRemoveItem(false) - end - @battle.pbDisplay(_INTL("{1} stole {2}'s {3}!",user.pbThis,target.pbThis(true),itemName)) - user.pbHeldItemTriggerCheck - end -end - - - -#=============================================================================== -# User and target swap items. They remain swapped after wild battles. -# (Switcheroo, Trick) -#=============================================================================== -class PokeBattle_Move_0F2 < PokeBattle_Move - def pbMoveFailed?(user,targets) - if @battle.wildBattle? && user.opposes? - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - if !user.item && !target.item - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - if target.unlosableItem?(target.item) || - target.unlosableItem?(user.item) || - user.unlosableItem?(user.item) || - user.unlosableItem?(target.item) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker - if show_message - @battle.pbShowAbilitySplash(target) - if PokeBattle_SceneConstants::USE_ABILITY_SPLASH - @battle.pbDisplay(_INTL("But it failed to affect {1}!", target.pbThis(true))) - else - @battle.pbDisplay(_INTL("But it failed to affect {1} because of its {2}!", - target.pbThis(true), target.abilityName)) - end - @battle.pbHideAbilitySplash(target) - end - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - oldUserItem = user.item - oldUserItemName = user.itemName - oldTargetItem = target.item - oldTargetItemName = target.itemName - user.item = oldTargetItem - user.effects[PBEffects::ChoiceBand] = nil if user.ability_id != :GORILLATACTICS - user.effects[PBEffects::Unburden] = (!user.item && oldUserItem) - target.item = oldUserItem - target.effects[PBEffects::ChoiceBand] = nil if target.ability_id != :GORILLATACTICS - target.effects[PBEffects::Unburden] = (!target.item && oldTargetItem) - # Permanently steal the item from wild Pokémon - if @battle.wildBattle? && target.opposes? && !user.initialItem && - oldTargetItem == target.initialItem - user.setInitialItem(oldTargetItem) - end - @battle.pbDisplay(_INTL("{1} switched items with its opponent!",user.pbThis)) - @battle.pbDisplay(_INTL("{1} obtained {2}.",user.pbThis,oldTargetItemName)) if oldTargetItem - @battle.pbDisplay(_INTL("{1} obtained {2}.",target.pbThis,oldUserItemName)) if oldUserItem - user.pbHeldItemTriggerCheck - target.pbHeldItemTriggerCheck - end -end - - - -#=============================================================================== -# User gives its item to the target. The item remains given after wild battles. -# (Bestow) -#=============================================================================== -class PokeBattle_Move_0F3 < PokeBattle_Move - def ignoresSubstitute?(user) - return true if Settings::MECHANICS_GENERATION >= 6 - return super - end - - def pbMoveFailed?(user,targets) - if !user.item || user.unlosableItem?(user.item) - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.item || target.unlosableItem?(user.item) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - itemName = user.itemName - target.item = user.item - # Permanently steal the item from wild Pokémon - if @battle.wildBattle? && user.opposes? && !target.initialItem && - user.item == user.initialItem - target.setInitialItem(user.item) - user.pbRemoveItem - else - user.pbRemoveItem(false) - end - @battle.pbDisplay(_INTL("{1} received {2} from {3}!",target.pbThis,itemName,user.pbThis(true))) - target.pbHeldItemTriggerCheck - end -end - - - -#=============================================================================== -# User consumes target's berry and gains its effect. (Bug Bite, Pluck) -#=============================================================================== -class PokeBattle_Move_0F4 < PokeBattle_Move - def pbEffectAfterAllHits(user,target) - return if user.fainted? || target.fainted? - return if target.damageState.unaffected || target.damageState.substitute - return if !target.item || !target.item.is_berry? - return if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker - item = target.item - itemName = target.itemName - target.pbRemoveItem - @battle.pbDisplay(_INTL("{1} stole and ate its target's {2}!",user.pbThis,itemName)) - user.pbHeldItemTriggerCheck(item,false) - end -end - - - -#=============================================================================== -# Target's berry/Gem is destroyed. (Incinerate) -#=============================================================================== -class PokeBattle_Move_0F5 < PokeBattle_Move - def pbEffectWhenDealingDamage(user,target) - return if target.damageState.substitute || target.damageState.berryWeakened - return if !target.item || (!target.item.is_berry? && - !(Settings::MECHANICS_GENERATION >= 6 && target.item.is_gem?)) - target.pbRemoveItem - @battle.pbDisplay(_INTL("{1}'s {2} was incinerated!",target.pbThis,target.itemName)) - end -end - - - -#=============================================================================== -# User recovers the last item it held and consumed. (Recycle) -#=============================================================================== -class PokeBattle_Move_0F6 < PokeBattle_Move - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if !user.recycleItem - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - item = user.recycleItem - user.item = item - user.setInitialItem(item) if @battle.wildBattle? && !user.initialItem - user.setRecycleItem(nil) - user.effects[PBEffects::PickupItem] = nil - user.effects[PBEffects::PickupUse] = 0 - itemName = GameData::Item.get(item).name - if itemName.starts_with_vowel? - @battle.pbDisplay(_INTL("{1} found an {2}!",user.pbThis,itemName)) - else - @battle.pbDisplay(_INTL("{1} found a {2}!",user.pbThis,itemName)) - end - user.pbHeldItemTriggerCheck - end -end - - - -#=============================================================================== -# User flings its item at the target. Power/effect depend on the item. (Fling) -#=============================================================================== -class PokeBattle_Move_0F7 < PokeBattle_Move - def initialize(battle,move) - super - # 80 => all Mega Stones - # 10 => all Berries - @flingPowers = { - 130 => [:IRONBALL - ], - 100 => [:HARDSTONE,:RAREBONE, - # Fossils - :ARMORFOSSIL,:CLAWFOSSIL,:COVERFOSSIL,:DOMEFOSSIL,:HELIXFOSSIL, - :JAWFOSSIL,:OLDAMBER,:PLUMEFOSSIL,:ROOTFOSSIL,:SAILFOSSIL, - :SKULLFOSSIL - ], - 90 => [:DEEPSEATOOTH,:GRIPCLAW,:THICKCLUB, - # Plates - :DRACOPLATE,:DREADPLATE,:EARTHPLATE,:FISTPLATE,:FLAMEPLATE, - :ICICLEPLATE,:INSECTPLATE,:IRONPLATE,:MEADOWPLATE,:MINDPLATE, - :PIXIEPLATE,:SKYPLATE,:SPLASHPLATE,:SPOOKYPLATE,:STONEPLATE, - :TOXICPLATE,:ZAPPLATE - ], - 80 => [:ASSAULTVEST,:CHIPPEDPOT,:CRACKEDPOT,:DAWNSTONE,:DUSKSTONE, - :ELECTIRIZER,:HEAVYDUTYBOOTS,:MAGMARIZER,:ODDKEYSTONE,:OVALSTONE, - :PROTECTOR,:QUICKCLAW,:RAZORCLAW,:SACHET,:SAFETYGOGGLES, - :SHINYSTONE,:STICKYBARB,:WEAKNESSPOLICY,:WHIPPEDDREAM - ], - 70 => [:DRAGONFANG,:POISONBARB, - # EV-training items (Macho Brace is 60) - :POWERANKLET,:POWERBAND,:POWERBELT,:POWERBRACER,:POWERLENS, - :POWERWEIGHT, - # Drives - :BURNDRIVE,:CHILLDRIVE,:DOUSEDRIVE,:SHOCKDRIVE - ], - 60 => [:ADAMANTORB,:DAMPROCK,:GRISEOUSORB,:HEATROCK,:LEEK,:LUSTROUSORB, - :MACHOBRACE,:ROCKYHELMET,:STICK,:TERRAINEXTENDER - ], - 50 => [:DUBIOUSDISC,:SHARPBEAK, - # Memories - :BUGMEMORY,:DARKMEMORY,:DRAGONMEMORY,:ELECTRICMEMORY,:FAIRYMEMORY, - :FIGHTINGMEMORY,:FIREMEMORY,:FLYINGMEMORY,:GHOSTMEMORY, - :GRASSMEMORY,:GROUNDMEMORY,:ICEMEMORY,:POISONMEMORY, - :PSYCHICMEMORY,:ROCKMEMORY,:STEELMEMORY,:WATERMEMORY - ], - 40 => [:EVIOLITE,:ICYROCK,:LUCKYPUNCH - ], - 30 => [:ABSORBBULB,:ADRENALINEORB,:AMULETCOIN,:BINDINGBAND,:BLACKBELT, - :BLACKGLASSES,:BLACKSLUDGE,:BOTTLECAP,:CELLBATTERY,:CHARCOAL, - :CLEANSETAG,:DEEPSEASCALE,:DRAGONSCALE,:EJECTBUTTON,:ESCAPEROPE, - :EXPSHARE,:FLAMEORB,:FLOATSTONE,:FLUFFYTAIL,:GOLDBOTTLECAP, - :HEARTSCALE,:HONEY,:KINGSROCK,:LIFEORB,:LIGHTBALL,:LIGHTCLAY, - :LUCKYEGG,:LUMINOUSMOSS,:MAGNET,:METALCOAT,:METRONOME, - :MIRACLESEED,:MYSTICWATER,:NEVERMELTICE,:PASSORB,:POKEDOLL, - :POKETOY,:PRISMSCALE,:PROTECTIVEPADS,:RAZORFANG,:SACREDASH, - :SCOPELENS,:SHELLBELL,:SHOALSALT,:SHOALSHELL,:SMOKEBALL,:SNOWBALL, - :SOULDEW,:SPELLTAG,:TOXICORB,:TWISTEDSPOON,:UPGRADE, - # Healing items - :ANTIDOTE,:AWAKENING,:BERRYJUICE,:BIGMALASADA,:BLUEFLUTE, - :BURNHEAL,:CASTELIACONE,:ELIXIR,:ENERGYPOWDER,:ENERGYROOT,:ETHER, - :FRESHWATER,:FULLHEAL,:FULLRESTORE,:HEALPOWDER,:HYPERPOTION, - :ICEHEAL,:LAVACOOKIE,:LEMONADE,:LUMIOSEGALETTE,:MAXELIXIR, - :MAXETHER,:MAXHONEY,:MAXPOTION,:MAXREVIVE,:MOOMOOMILK,:OLDGATEAU, - :PARALYZEHEAL,:PARLYZHEAL,:PEWTERCRUNCHIES,:POTION,:RAGECANDYBAR, - :REDFLUTE,:REVIVALHERB,:REVIVE,:SHALOURSABLE,:SODAPOP, - :SUPERPOTION,:SWEETHEART,:YELLOWFLUTE, - # Battle items - :XACCURACY,:XACCURACY2,:XACCURACY3,:XACCURACY6, - :XATTACK,:XATTACK2,:XATTACK3,:XATTACK6, - :XDEFEND,:XDEFEND2,:XDEFEND3,:XDEFEND6, - :XDEFENSE,:XDEFENSE2,:XDEFENSE3,:XDEFENSE6, - :XSPATK,:XSPATK2,:XSPATK3,:XSPATK6, - :XSPECIAL,:XSPECIAL2,:XSPECIAL3,:XSPECIAL6, - :XSPDEF,:XSPDEF2,:XSPDEF3,:XSPDEF6, - :XSPEED,:XSPEED2,:XSPEED3,:XSPEED6, - :DIREHIT,:DIREHIT2,:DIREHIT3, - :ABILITYURGE,:GUARDSPEC,:ITEMDROP,:ITEMURGE,:RESETURGE, - :MAXMUSHROOMS, - # Vitamins - :CALCIUM,:CARBOS,:HPUP,:IRON,:PPUP,:PPMAX,:PROTEIN,:ZINC, - :RARECANDY, - # Most evolution stones (see also 80) - :EVERSTONE,:FIRESTONE,:ICESTONE,:LEAFSTONE,:MOONSTONE,:SUNSTONE, - :THUNDERSTONE,:WATERSTONE,:SWEETAPPLE,:TARTAPPLE, :GALARICACUFF, - :GALARICAWREATH, - # Repels - :MAXREPEL,:REPEL,:SUPERREPEL, - # Mulches - :AMAZEMULCH,:BOOSTMULCH,:DAMPMULCH,:GOOEYMULCH,:GROWTHMULCH, - :RICHMULCH,:STABLEMULCH,:SURPRISEMULCH, - # Shards - :BLUESHARD,:GREENSHARD,:REDSHARD,:YELLOWSHARD, - # Valuables - :BALMMUSHROOM,:BIGMUSHROOM,:BIGNUGGET,:BIGPEARL,:COMETSHARD, - :NUGGET,:PEARL,:PEARLSTRING,:RELICBAND,:RELICCOPPER,:RELICCROWN, - :RELICGOLD,:RELICSILVER,:RELICSTATUE,:RELICVASE,:STARDUST, - :STARPIECE,:STRANGESOUVENIR,:TINYMUSHROOM, - # Exp Candies - :EXPCANDYXS, :EXPCANDYS, :EXPCANDYM, :EXPCANDYL, :EXPCANDYXL - ], - 20 => [# Feathers - :CLEVERFEATHER,:GENIUSFEATHER,:HEALTHFEATHER,:MUSCLEFEATHER, - :PRETTYFEATHER,:RESISTFEATHER,:SWIFTFEATHER, - :CLEVERWING,:GENIUSWING,:HEALTHWING,:MUSCLEWING,:PRETTYWING, - :RESISTWING,:SWIFTWING - ], - 10 => [:AIRBALLOON,:BIGROOT,:BRIGHTPOWDER,:CHOICEBAND,:CHOICESCARF, - :CHOICESPECS,:DESTINYKNOT,:DISCOUNTCOUPON,:EXPERTBELT,:FOCUSBAND, - :FOCUSSASH,:LAGGINGTAIL,:LEFTOVERS,:MENTALHERB,:METALPOWDER, - :MUSCLEBAND,:POWERHERB,:QUICKPOWDER,:REAPERCLOTH,:REDCARD, - :RINGTARGET,:SHEDSHELL,:SILKSCARF,:SILVERPOWDER,:SMOOTHROCK, - :SOFTSAND,:SOOTHEBELL,:WHITEHERB,:WIDELENS,:WISEGLASSES,:ZOOMLENS, - # Terrain seeds - :ELECTRICSEED,:GRASSYSEED,:MISTYSEED,:PSYCHICSEED, - # Nectar - :PINKNECTAR,:PURPLENECTAR,:REDNECTAR,:YELLOWNECTAR, - # Incenses - :FULLINCENSE,:LAXINCENSE,:LUCKINCENSE,:ODDINCENSE,:PUREINCENSE, - :ROCKINCENSE,:ROSEINCENSE,:SEAINCENSE,:WAVEINCENSE, - # Scarves - :BLUESCARF,:GREENSCARF,:PINKSCARF,:REDSCARF,:YELLOWSCARF, - # Mints - :LONELYMINT, :ADAMANTMINT, :NAUGHTYMINT, :BRAVEMINT, :BOLDMINT, - :IMPISHMINT, :LAXMINT, :RELAXEDMINT, :MODESTMINT, :MILDMINT, - :RASHMINT, :QUIETMINT, :CALMMINT, :GENTLEMINT, :CAREFULMINT, - :SASSYMINT, :TIMIDMINT, :HASTYMINT, :JOLLYMINT, :NAIVEMINT, - :SERIOUSMINT, - # Sweets - :STRAWBERRYSWEET, :LOVESWEET, :BERRYSWEET, :CLOVERSWEET, - :FLOWERSWEET, :STARSWEET, :RIBBONSWEET - ] - } - end - - def pbCheckFlingSuccess(user) - @willFail = false - @willFail = true if !user.item || !user.itemActive? || user.unlosableItem?(user.item) - return if @willFail - @willFail = true if user.item.is_berry? && !user.canConsumeBerry? - return if @willFail - return if user.item.is_mega_stone? || user.item.is_TR? - flingableItem = false - @flingPowers.each do |_power, items| - next if !items.include?(user.item_id) - flingableItem = true - break - end - @willFail = true if !flingableItem - end - - def pbMoveFailed?(user,targets) - if @willFail - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbDisplayUseMessage(user) - super - pbCheckFlingSuccess(user) - if !@willFail - @battle.pbDisplay(_INTL("{1} flung its {2}!",user.pbThis,user.itemName)) - end - end - - def pbNumHits(user,targets); return 1; end - - def pbBaseDamage(baseDmg,user,target) - return 0 if !user.item - return 10 if user.item.is_berry? - return 80 if user.item.is_mega_stone? - if user.item.is_TR? - ret = GameData::Move.get(user.item.move).base_damage - ret = 10 if ret < 10 - return ret - end - @flingPowers.each do |power,items| - return power if items.include?(user.item_id) - end - return 10 - end - - def pbEffectAgainstTarget(user,target) - return if target.damageState.substitute - return if target.hasActiveAbility?(:SHIELDDUST) && !@battle.moldBreaker - case user.item_id - when :POISONBARB - target.pbPoison(user) if target.pbCanPoison?(user,false,self) - when :TOXICORB - target.pbPoison(user,nil,true) if target.pbCanPoison?(user,false,self) - when :FLAMEORB - target.pbBurn(user) if target.pbCanBurn?(user,false,self) - when :LIGHTBALL - target.pbParalyze(user) if target.pbCanParalyze?(user,false,self) - when :KINGSROCK, :RAZORFANG - target.pbFlinch(user) - else - target.pbHeldItemTriggerCheck(user.item,true) - end - end - - def pbEndOfMoveUsageEffect(user,targets,numHits,switchedBattlers) - # NOTE: The item is consumed even if this move was Protected against or it - # missed. The item is not consumed if the target was switched out by - # an effect like a target's Red Card. - # NOTE: There is no item consumption animation. - user.pbConsumeItem(true,true,false) if user.item - end -end - - - -#=============================================================================== -# For 5 rounds, the target cannnot use its held item, its held item has no -# effect, and no items can be used on it. (Embargo) -#=============================================================================== -class PokeBattle_Move_0F8 < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.effects[PBEffects::Embargo]>0 - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::Embargo] = 5 - @battle.pbDisplay(_INTL("{1} can't use items anymore!",target.pbThis)) - end -end - - - -#=============================================================================== -# For 5 rounds, all held items cannot be used in any way and have no effect. -# Held items can still change hands, but can't be thrown. (Magic Room) -#=============================================================================== -class PokeBattle_Move_0F9 < PokeBattle_Move - def pbEffectGeneral(user) - if @battle.field.effects[PBEffects::MagicRoom]>0 - @battle.field.effects[PBEffects::MagicRoom] = 0 - @battle.pbDisplay(_INTL("The area returned to normal!")) - else - @battle.field.effects[PBEffects::MagicRoom] = 5 - @battle.pbDisplay(_INTL("It created a bizarre area in which Pokémon's held items lose their effects!")) - end - end - - def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) - return if @battle.field.effects[PBEffects::MagicRoom]>0 # No animation - super - end -end - - - -#=============================================================================== -# User takes recoil damage equal to 1/4 of the damage this move dealt. -#=============================================================================== -class PokeBattle_Move_0FA < PokeBattle_RecoilMove - def pbRecoilDamage(user,target) - return (target.damageState.totalHPLost/4.0).round - end -end - - - -#=============================================================================== -# User takes recoil damage equal to 1/3 of the damage this move dealt. -#=============================================================================== -class PokeBattle_Move_0FB < PokeBattle_RecoilMove - def pbRecoilDamage(user,target) - return (target.damageState.totalHPLost/3.0).round - end -end - - - -#=============================================================================== -# User takes recoil damage equal to 1/2 of the damage this move dealt. -# (Head Smash, Light of Ruin) -#=============================================================================== -class PokeBattle_Move_0FC < PokeBattle_RecoilMove - def pbRecoilDamage(user,target) - return (target.damageState.totalHPLost/2.0).round - end -end - - - -#=============================================================================== -# User takes recoil damage equal to 1/3 of the damage this move dealt. -# May paralyze the target. (Volt Tackle) -#=============================================================================== -class PokeBattle_Move_0FD < PokeBattle_RecoilMove - def pbRecoilDamage(user,target) - return (target.damageState.totalHPLost/3.0).round - end - - def pbAdditionalEffect(user,target) - return if target.damageState.substitute - target.pbParalyze(user) if target.pbCanParalyze?(user,false,self) - end -end - - - -#=============================================================================== -# User takes recoil damage equal to 1/3 of the damage this move dealt. -# May burn the target. (Flare Blitz) -#=============================================================================== -class PokeBattle_Move_0FE < PokeBattle_RecoilMove - def pbRecoilDamage(user,target) - return (target.damageState.totalHPLost/3.0).round - end - - def pbAdditionalEffect(user,target) - return if target.damageState.substitute - target.pbBurn(user) if target.pbCanBurn?(user,false,self) - end -end - - - -#=============================================================================== -# Starts sunny weather. (Sunny Day) -#=============================================================================== -class PokeBattle_Move_0FF < PokeBattle_WeatherMove - def initialize(battle,move) - super - @weatherType = :Sun - end -end diff --git a/Data/Scripts/011_Battle/002_Move/007_MoveEffects_BattlerOther.rb b/Data/Scripts/011_Battle/002_Move/007_MoveEffects_BattlerOther.rb new file mode 100644 index 000000000..5f7d66cc0 --- /dev/null +++ b/Data/Scripts/011_Battle/002_Move/007_MoveEffects_BattlerOther.rb @@ -0,0 +1,1290 @@ +#=============================================================================== +# Puts the target to sleep. +#=============================================================================== +class PokeBattle_Move_SleepTarget < PokeBattle_SleepMove +end + +#=============================================================================== +# Puts the target to sleep. Fails if user is not Darkrai. (Dark Void (Gen 7+)) +#=============================================================================== +class PokeBattle_Move_SleepTargetIfUserDarkrai < PokeBattle_SleepMove + def pbMoveFailed?(user,targets) + if !user.isSpecies?(:DARKRAI) && user.effects[PBEffects::TransformSpecies] != :DARKRAI + @battle.pbDisplay(_INTL("But {1} can't use the move!",user.pbThis)) + return true + end + return false + end +end + +#=============================================================================== +# Puts the target to sleep. Changes the user's form if the user is Meloetta. +# (Relic Song) +#=============================================================================== +class PokeBattle_Move_SleepTargetChangeUserMeloettaForm < PokeBattle_SleepMove + def pbEndOfMoveUsageEffect(user,targets,numHits,switchedBattlers) + return if numHits==0 + return if user.fainted? || user.effects[PBEffects::Transform] + return if !user.isSpecies?(:MELOETTA) + return if user.hasActiveAbility?(:SHEERFORCE) && @addlEffect>0 + newForm = (user.form+1)%2 + user.pbChangeForm(newForm,_INTL("{1} transformed!",user.pbThis)) + end +end + +#=============================================================================== +# Makes the target drowsy; it falls asleep at the end of the next turn. (Yawn) +#=============================================================================== +class PokeBattle_Move_SleepTargetNextTurn < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.effects[PBEffects::Yawn]>0 + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return true if !target.pbCanSleep?(user,true,self) + return false + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::Yawn] = 2 + @battle.pbDisplay(_INTL("{1} made {2} drowsy!",user.pbThis,target.pbThis(true))) + end +end + +#=============================================================================== +# Poisons the target. +#=============================================================================== +class PokeBattle_Move_PoisonTarget < PokeBattle_PoisonMove +end + +#=============================================================================== +# Poisons the target and decreases its Speed by 1 stage. (Toxic Thread) +#=============================================================================== +class PokeBattle_Move_PoisonTargetLowerTargetSpeed1 < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if !target.pbCanPoison?(user,false,self) && + !target.pbCanLowerStatStage?(:SPEED,user,self) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + target.pbPoison(user) if target.pbCanPoison?(user,false,self) + if target.pbCanLowerStatStage?(:SPEED,user,self) + target.pbLowerStatStage(:SPEED,1,user) + end + end +end + +#=============================================================================== +# Badly poisons the target. (Poison Fang, Toxic) +#=============================================================================== +class PokeBattle_Move_BadPoisonTarget < PokeBattle_PoisonMove + def initialize(battle,move) + super + @toxic = true + end + + def pbOverrideSuccessCheckPerHit(user,target) + return (Settings::MORE_TYPE_EFFECTS && statusMove? && user.pbHasType?(:POISON)) + end +end + +#=============================================================================== +# Paralyzes the target. +#=============================================================================== +class PokeBattle_Move_ParalyzeTarget < PokeBattle_ParalysisMove +end + +#=============================================================================== +# Paralyzes the target. Doesn't affect target if move's type has no effect on +# it. (Thunder Wave) +#=============================================================================== +class PokeBattle_Move_ParalyzeTargetIfNotTypeImmune < PokeBattle_ParalysisMove + def pbFailsAgainstTarget?(user, target, show_message) + if Effectiveness.ineffective?(target.damageState.typeMod) + @battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true))) if show_message + return true + end + return super + end +end + +#=============================================================================== +# Paralyzes the target. Does double damage and has perfect accuracy if target is +# Minimized. (Body Slam (Gen 6+)) +#=============================================================================== +class PokeBattle_Move_ParalyzeTargetTrampleMinimize < PokeBattle_ParalysisMove + def tramplesMinimize?(param=1) + return true if param==1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy + return true if param==2 # Double damage + return super + end +end + +#=============================================================================== +# Paralyzes the target. Accuracy perfect in rain, 50% in sunshine. Hits some +# semi-invulnerable targets. (Thunder) +#=============================================================================== +class PokeBattle_Move_ParalyzeTargetAlwaysHitsInRainHitsTargetInSky < PokeBattle_ParalysisMove + def hitsFlyingTargets?; return true; end + + def pbBaseAccuracy(user,target) + case target.effectiveWeather + when :Sun, :HarshSun + return 50 + when :Rain, :HeavyRain + return 0 + end + return super + end +end + +#=============================================================================== +# Paralyzes the target. May cause the target to flinch. (Thunder Fang) +#=============================================================================== +class PokeBattle_Move_ParalyzeFlinchTarget < PokeBattle_Move + def flinchingMove?; return true; end + + def pbAdditionalEffect(user,target) + return if target.damageState.substitute + chance = pbAdditionalEffectChance(user,target,10) + return if chance==0 + if @battle.pbRandom(100)0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.pbOwnSide.effects[PBEffects::Safeguard] = 5 + @battle.pbDisplay(_INTL("{1} became cloaked in a mystical veil!",user.pbTeam)) + end +end + +#=============================================================================== +# Causes the target to flinch. +#=============================================================================== +class PokeBattle_Move_FlinchTarget < PokeBattle_FlinchMove +end + +#=============================================================================== +# Causes the target to flinch. Does double damage and has perfect accuracy if +# the target is Minimized. (Dragon Rush (Gen 6+), Steamroller, Stomp) +#=============================================================================== +class PokeBattle_Move_FlinchTargetTrampleMinimize < PokeBattle_FlinchMove + def tramplesMinimize?(param=1) + return true if param==1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy + return true if param==2 # Double damage + return super + end +end + +#=============================================================================== +# Causes the target to flinch. Fails if the user is not asleep. (Snore) +#=============================================================================== +class PokeBattle_Move_FlinchTargetFailsIfUserNotAsleep < PokeBattle_FlinchMove + def usableWhenAsleep?; return true; end + + def pbMoveFailed?(user,targets) + if !user.asleep? + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end +end + +#=============================================================================== +# Causes the target to flinch. Fails if this isn't the user's first turn. +# (Fake Out) +#=============================================================================== +class PokeBattle_Move_FlinchTargetFailsIfNotUserFirstTurn < PokeBattle_FlinchMove + def pbMoveFailed?(user,targets) + if user.turnCount > 1 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end +end + +#=============================================================================== +# Power is doubled if the target is using Bounce, Fly or Sky Drop. Hits some +# semi-invulnerable targets. May make the target flinch. (Twister) +#=============================================================================== +class PokeBattle_Move_FlinchTargetDoublePowerIfTargetInSky < PokeBattle_FlinchMove + def hitsFlyingTargets?; return true; end + + def pbBaseDamage(baseDmg,user,target) + baseDmg *= 2 if target.inTwoTurnAttack?("TwoTurnAttackInvulnerableInSky", + "TwoTurnAttackInvulnerableInSkyParalyzeTarget", + "TwoTurnAttackInvulnerableInSkyTargetCannotAct") || + target.effects[PBEffects::SkyDrop]>=0 + return baseDmg + end +end + +#=============================================================================== +# Confuses the target. +#=============================================================================== +class PokeBattle_Move_ConfuseTarget < PokeBattle_ConfuseMove +end + +#=============================================================================== +# Confuses the target. Accuracy perfect in rain, 50% in sunshine. Hits some +# semi-invulnerable targets. (Hurricane) +#=============================================================================== +class PokeBattle_Move_ConfuseTargetAlwaysHitsInRainHitsTargetInSky < PokeBattle_ConfuseMove + def hitsFlyingTargets?; return true; end + + def pbBaseAccuracy(user,target) + case target.effectiveWeather + when :Sun, :HarshSun + return 50 + when :Rain, :HeavyRain + return 0 + end + return super + end +end + +#=============================================================================== +# Attracts the target. (Attract) +#=============================================================================== +class PokeBattle_Move_AttractTarget < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + return false if damagingMove? + return true if !target.pbCanAttract?(user, show_message) + return true if pbMoveFailedAromaVeil?(user, target, show_message) + return false + end + + def pbEffectAgainstTarget(user,target) + return if damagingMove? + target.pbAttract(user) + end + + def pbAdditionalEffect(user,target) + return if target.damageState.substitute + target.pbAttract(user) if target.pbCanAttract?(user,false) + end +end + +#=============================================================================== +# Changes user's type depending on the environment. (Camouflage) +#=============================================================================== +class PokeBattle_Move_SetUserTypesBasedOnEnvironment < PokeBattle_Move + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if !user.canChangeType? + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + @newType = :NORMAL + checkedTerrain = false + case @battle.field.terrain + when :Electric + if GameData::Type.exists?(:ELECTRIC) + @newType = :ELECTRIC + checkedTerrain = true + end + when :Grassy + if GameData::Type.exists?(:GRASS) + @newType = :GRASS + checkedTerrain = true + end + when :Misty + if GameData::Type.exists?(:FAIRY) + @newType = :FAIRY + checkedTerrain = true + end + when :Psychic + if GameData::Type.exists?(:PSYCHIC) + @newType = :PSYCHIC + checkedTerrain = true + end + end + if !checkedTerrain + case @battle.environment + when :Grass, :TallGrass + @newType = :GRASS + when :MovingWater, :StillWater, :Puddle, :Underwater + @newType = :WATER + when :Cave + @newType = :ROCK + when :Rock, :Sand + @newType = :GROUND + when :Forest, :ForestGrass + @newType = :BUG + when :Snow, :Ice + @newType = :ICE + when :Volcano + @newType = :FIRE + when :Graveyard + @newType = :GHOST + when :Sky + @newType = :FLYING + when :Space + @newType = :DRAGON + when :UltraSpace + @newType = :PSYCHIC + end + end + @newType = :NORMAL if !GameData::Type.exists?(@newType) + if !GameData::Type.exists?(@newType) || !user.pbHasOtherType?(@newType) + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.pbChangeTypes(@newType) + typeName = GameData::Type.get(@newType).name + @battle.pbDisplay(_INTL("{1}'s type changed to {2}!",user.pbThis,typeName)) + end +end + +#=============================================================================== +# Changes user's type to a random one that resists/is immune to the last move +# used by the target. (Conversion 2) +#=============================================================================== +class PokeBattle_Move_SetUserTypesToResistLastAttack < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + + def pbMoveFailed?(user, targets) + if !user.canChangeType? + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + if !target.lastMoveUsed || !target.lastMoveUsedType || + GameData::Type.get(target.lastMoveUsedType).pseudo_type + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + @newTypes = [] + GameData::Type.each do |t| + next if t.pseudo_type || user.pbHasType?(t.id) || + !Effectiveness.resistant_type?(target.lastMoveUsedType, t.id) + @newTypes.push(t.id) + end + if @newTypes.length == 0 + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectGeneral(user) + newType = @newTypes[@battle.pbRandom(@newTypes.length)] + user.pbChangeTypes(newType) + typeName = GameData::Type.get(newType).name + @battle.pbDisplay(_INTL("{1}'s type changed to {2}!", user.pbThis, typeName)) + end +end + +#=============================================================================== +# User copes target's types. (Reflect Type) +#=============================================================================== +class PokeBattle_Move_SetUserTypesToTargetTypes < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + + def pbMoveFailed?(user,targets) + if !user.canChangeType? + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + newTypes = target.pbTypes(true) + if newTypes.length==0 # Target has no type to copy + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + if user.pbTypes==target.pbTypes && + user.effects[PBEffects::Type3]==target.effects[PBEffects::Type3] + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + user.pbChangeTypes(target) + @battle.pbDisplay(_INTL("{1}'s type changed to match {2}'s!", + user.pbThis,target.pbThis(true))) + end +end + +#=============================================================================== +# Changes user's type to that of a random user's move, except a type the user +# already has (even partially), OR changes to the user's first move's type. +# (Conversion) +#=============================================================================== +class PokeBattle_Move_SetUserTypesToUserMoveType < PokeBattle_Move + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if !user.canChangeType? + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + userTypes = user.pbTypes(true) + @newTypes = [] + user.eachMoveWithIndex do |m,i| + break if Settings::MECHANICS_GENERATION >= 6 && i>0 + next if GameData::Type.get(m.type).pseudo_type + next if userTypes.include?(m.type) + @newTypes.push(m.type) if !@newTypes.include?(m.type) + end + if @newTypes.length==0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + newType = @newTypes[@battle.pbRandom(@newTypes.length)] + user.pbChangeTypes(newType) + typeName = GameData::Type.get(newType).name + @battle.pbDisplay(_INTL("{1}'s type changed to {2}!",user.pbThis,typeName)) + end +end + +#=============================================================================== +# The target's types become Psychic. (Magic Powder) +#=============================================================================== +class PokeBattle_Move_SetTargetTypesToPsychic < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if !target.canChangeType? || !GameData::Type.exists?(:PSYCHIC) || + !target.pbHasOtherType?(:PSYCHIC) || !target.affectedByPowder? + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user, target) + target.pbChangeTypes(:PSYCHIC) + typeName = GameData::Type.get(:PSYCHIC).name + @battle.pbDisplay(_INTL("{1}'s type changed to {2}!", target.pbThis, typeName)) + end +end + +#=============================================================================== +# Target becomes Water type. (Soak) +#=============================================================================== +class PokeBattle_Move_SetTargetTypesToWater < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if !target.canChangeType? || !GameData::Type.exists?(:WATER) || + !target.pbHasOtherType?(:WATER) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + target.pbChangeTypes(:WATER) + typeName = GameData::Type.get(:WATER).name + @battle.pbDisplay(_INTL("{1}'s type changed to {2}!",target.pbThis,typeName)) + end +end + +#=============================================================================== +# Gives target the Ghost type. (Trick-or-Treat) +#=============================================================================== +class PokeBattle_Move_AddGhostTypeToTarget < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if !GameData::Type.exists?(:GHOST) || target.pbHasType?(:GHOST) || !target.canChangeType? + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::Type3] = :GHOST + typeName = GameData::Type.get(:GHOST).name + @battle.pbDisplay(_INTL("{1} transformed into the {2} type!",target.pbThis,typeName)) + end +end + +#=============================================================================== +# Gives target the Grass type. (Forest's Curse) +#=============================================================================== +class PokeBattle_Move_AddGrassTypeToTarget < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if !GameData::Type.exists?(:GRASS) || target.pbHasType?(:GRASS) || !target.canChangeType? + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::Type3] = :GRASS + typeName = GameData::Type.get(:GRASS).name + @battle.pbDisplay(_INTL("{1} transformed into the {2} type!",target.pbThis,typeName)) + end +end + +#=============================================================================== +# User loses their Fire type. Fails if user is not Fire-type. (Burn Up) +#=============================================================================== +class PokeBattle_Move_UserLosesFireType < PokeBattle_Move + def pbMoveFailed?(user,targets) + if !user.pbHasType?(:FIRE) + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectAfterAllHits(user,target) + if !user.effects[PBEffects::BurnUp] + user.effects[PBEffects::BurnUp] = true + @battle.pbDisplay(_INTL("{1} burned itself out!",user.pbThis)) + end + end +end + +#=============================================================================== +# Target's ability becomes Simple. (Simple Beam) +#=============================================================================== +class PokeBattle_Move_SetTargetAbilityToSimple < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbMoveFailed?(user,targets) + if !GameData::Ability.exists?(:SIMPLE) + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.unstoppableAbility? || [:TRUANT, :SIMPLE].include?(target.ability) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + @battle.pbShowAbilitySplash(target,true,false) + oldAbil = target.ability + target.ability = :SIMPLE + @battle.pbReplaceAbilitySplash(target) + @battle.pbDisplay(_INTL("{1} acquired {2}!",target.pbThis,target.abilityName)) + @battle.pbHideAbilitySplash(target) + target.pbOnAbilityChanged(oldAbil) + end +end + +#=============================================================================== +# Target's ability becomes Insomnia. (Worry Seed) +#=============================================================================== +class PokeBattle_Move_SetTargetAbilityToInsomnia < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbMoveFailed?(user,targets) + if !GameData::Ability.exists?(:INSOMNIA) + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.unstoppableAbility? || [:TRUANT, :INSOMNIA].include?(target.ability_id) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + @battle.pbShowAbilitySplash(target,true,false) + oldAbil = target.ability + target.ability = :INSOMNIA + @battle.pbReplaceAbilitySplash(target) + @battle.pbDisplay(_INTL("{1} acquired {2}!",target.pbThis,target.abilityName)) + @battle.pbHideAbilitySplash(target) + target.pbOnAbilityChanged(oldAbil) + end +end + +#=============================================================================== +# User copies target's ability. (Role Play) +#=============================================================================== +class PokeBattle_Move_SetUserAbilityToTargetAbility < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + + def pbMoveFailed?(user,targets) + if user.unstoppableAbility? + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + if !target.ability || user.ability==target.ability + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + if target.ungainableAbility? || + [:POWEROFALCHEMY, :RECEIVER, :TRACE, :WONDERGUARD].include?(target.ability_id) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + @battle.pbShowAbilitySplash(user,true,false) + oldAbil = user.ability + user.ability = target.ability + @battle.pbReplaceAbilitySplash(user) + @battle.pbDisplay(_INTL("{1} copied {2}'s {3}!", + user.pbThis,target.pbThis(true),target.abilityName)) + @battle.pbHideAbilitySplash(user) + user.pbOnAbilityChanged(oldAbil) + user.pbEffectsOnSwitchIn + end +end + +#=============================================================================== +# Target copies user's ability. (Entrainment) +#=============================================================================== +class PokeBattle_Move_SetTargetAbilityToUserAbility < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbMoveFailed?(user,targets) + if !user.ability + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + if user.ungainableAbility? || + [:POWEROFALCHEMY, :RECEIVER, :TRACE].include?(user.ability_id) + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.unstoppableAbility? || target.ability == :TRUANT + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + @battle.pbShowAbilitySplash(target,true,false) + oldAbil = target.ability + target.ability = user.ability + @battle.pbReplaceAbilitySplash(target) + @battle.pbDisplay(_INTL("{1} acquired {2}!",target.pbThis,target.abilityName)) + @battle.pbHideAbilitySplash(target) + target.pbOnAbilityChanged(oldAbil) + target.pbEffectsOnSwitchIn + end +end + +#=============================================================================== +# User and target swap abilities. (Skill Swap) +#=============================================================================== +class PokeBattle_Move_UserTargetSwapAbilities < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + + def pbMoveFailed?(user,targets) + if !user.ability + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + if user.unstoppableAbility? + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + if user.ungainableAbility? || user.ability == :WONDERGUARD + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + if !target.ability || + (user.ability == target.ability && Settings::MECHANICS_GENERATION <= 5) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + if target.unstoppableAbility? + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + if target.ungainableAbility? || target.ability == :WONDERGUARD + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + if user.opposes?(target) + @battle.pbShowAbilitySplash(user,false,false) + @battle.pbShowAbilitySplash(target,true,false) + end + oldUserAbil = user.ability + oldTargetAbil = target.ability + user.ability = oldTargetAbil + target.ability = oldUserAbil + if user.opposes?(target) + @battle.pbReplaceAbilitySplash(user) + @battle.pbReplaceAbilitySplash(target) + end + if PokeBattle_SceneConstants::USE_ABILITY_SPLASH + @battle.pbDisplay(_INTL("{1} swapped Abilities with its target!",user.pbThis)) + else + @battle.pbDisplay(_INTL("{1} swapped its {2} Ability with its target's {3} Ability!", + user.pbThis,target.abilityName,user.abilityName)) + end + if user.opposes?(target) + @battle.pbHideAbilitySplash(user) + @battle.pbHideAbilitySplash(target) + end + user.pbOnAbilityChanged(oldUserAbil) + target.pbOnAbilityChanged(oldTargetAbil) + user.pbEffectsOnSwitchIn + target.pbEffectsOnSwitchIn + end +end + +#=============================================================================== +# Target's ability is negated. (Gastro Acid) +#=============================================================================== +class PokeBattle_Move_NegateTargetAbility < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.unstoppableAbility? + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::GastroAcid] = true + target.effects[PBEffects::Truant] = false + @battle.pbDisplay(_INTL("{1}'s Ability was suppressed!",target.pbThis)) + target.pbOnAbilityChanged(target.ability) + end +end + +#=============================================================================== +# Negates the target's ability while it remains on the field, if it has already +# performed its action this round. (Core Enforcer) +#=============================================================================== +class PokeBattle_Move_NegateTargetAbilityIfTargetActed < PokeBattle_Move + def pbEffectAgainstTarget(user,target) + return if target.damageState.substitute || target.effects[PBEffects::GastroAcid] + return if target.unstoppableAbility? + return if @battle.choices[target.index][0]!=:UseItem && + !((@battle.choices[target.index][0]==:UseMove || + @battle.choices[target.index][0]==:Shift) && target.movedThisRound?) + target.effects[PBEffects::GastroAcid] = true + target.effects[PBEffects::Truant] = false + @battle.pbDisplay(_INTL("{1}'s Ability was suppressed!",target.pbThis)) + target.pbOnAbilityChanged(target.ability) + end +end + +#=============================================================================== +# Ignores all abilities that alter this move's success or damage. +# (Moongeist Beam, Sunsteel Strike) +#=============================================================================== +class PokeBattle_Move_IgnoreTargetAbility < PokeBattle_Move + def pbChangeUsageCounters(user,specialUsage) + super + @battle.moldBreaker = true if !specialUsage + end +end + +#=============================================================================== +# For 5 rounds, user becomes airborne. (Magnet Rise) +#=============================================================================== +class PokeBattle_Move_StartUserAirborne < PokeBattle_Move + def unusableInGravity?; return true; end + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if user.effects[PBEffects::Ingrain] || + user.effects[PBEffects::SmackDown] || + user.effects[PBEffects::MagnetRise]>0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.effects[PBEffects::MagnetRise] = 5 + @battle.pbDisplay(_INTL("{1} levitated with electromagnetism!",user.pbThis)) + end +end + +#=============================================================================== +# For 3 rounds, target becomes airborne and can always be hit. (Telekinesis) +#=============================================================================== +class PokeBattle_Move_StartTargetAirborneAndAlwaysHitByMoves < PokeBattle_Move + def unusableInGravity?; return true; end + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.effects[PBEffects::Ingrain] || + target.effects[PBEffects::SmackDown] || + target.effects[PBEffects::Telekinesis]>0 + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + if target.isSpecies?(:DIGLETT) || + target.isSpecies?(:DUGTRIO) || + target.isSpecies?(:SANDYGAST) || + target.isSpecies?(:PALOSSAND) || + (target.isSpecies?(:GENGAR) && target.mega?) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::Telekinesis] = 3 + @battle.pbDisplay(_INTL("{1} was hurled into the air!",target.pbThis)) + end +end + +#=============================================================================== +# Hits airborne semi-invulnerable targets. (Sky Uppercut) +#=============================================================================== +class PokeBattle_Move_HitsTargetInSky < PokeBattle_Move + def hitsFlyingTargets?; return true; end +end + +#=============================================================================== +# Grounds the target while it remains active. Hits some semi-invulnerable +# targets. (Smack Down, Thousand Arrows) +#=============================================================================== +class PokeBattle_Move_HitsTargetInSkyGroundsTarget < PokeBattle_Move + def hitsFlyingTargets?; return true; end + + def pbCalcTypeModSingle(moveType,defType,user,target) + return Effectiveness::NORMAL_EFFECTIVE_ONE if moveType == :GROUND && defType == :FLYING + return super + end + + def pbEffectAfterAllHits(user,target) + return if target.fainted? + return if target.damageState.unaffected || target.damageState.substitute + return if target.inTwoTurnAttack?("TwoTurnAttackInvulnerableInSkyTargetCannotAct") || + target.effects[PBEffects::SkyDrop]>=0 # Sky Drop + return if !target.airborne? && !target.inTwoTurnAttack?("TwoTurnAttackInvulnerableInSky", + "TwoTurnAttackInvulnerableInSkyParalyzeTarget") + target.effects[PBEffects::SmackDown] = true + if target.inTwoTurnAttack?("TwoTurnAttackInvulnerableInSky", + "TwoTurnAttackInvulnerableInSkyParalyzeTarget") # NOTE: Not Sky Drop. + target.effects[PBEffects::TwoTurnAttack] = nil + @battle.pbClearChoice(target.index) if !target.movedThisRound? + end + target.effects[PBEffects::MagnetRise] = 0 + target.effects[PBEffects::Telekinesis] = 0 + @battle.pbDisplay(_INTL("{1} fell straight down!",target.pbThis)) + end +end + +#=============================================================================== +# For 5 rounds, increases gravity on the field. Pokémon cannot become airborne. +# (Gravity) +#=============================================================================== +class PokeBattle_Move_StartGravity < PokeBattle_Move + def pbMoveFailed?(user,targets) + if @battle.field.effects[PBEffects::Gravity]>0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + @battle.field.effects[PBEffects::Gravity] = 5 + @battle.pbDisplay(_INTL("Gravity intensified!")) + @battle.eachBattler do |b| + showMessage = false + if b.inTwoTurnAttack?("TwoTurnAttackInvulnerableInSky", + "TwoTurnAttackInvulnerableInSkyParalyzeTarget", + "TwoTurnAttackInvulnerableInSkyTargetCannotAct") + b.effects[PBEffects::TwoTurnAttack] = nil + @battle.pbClearChoice(b.index) if !b.movedThisRound? + showMessage = true + end + if b.effects[PBEffects::MagnetRise]>0 || + b.effects[PBEffects::Telekinesis]>0 || + b.effects[PBEffects::SkyDrop]>=0 + b.effects[PBEffects::MagnetRise] = 0 + b.effects[PBEffects::Telekinesis] = 0 + b.effects[PBEffects::SkyDrop] = -1 + showMessage = true + end + @battle.pbDisplay(_INTL("{1} couldn't stay airborne because of gravity!", + b.pbThis)) if showMessage + end + end +end + +#=============================================================================== +# User transforms into the target. (Transform) +#=============================================================================== +class PokeBattle_Move_TransformUserIntoTarget < PokeBattle_Move + def pbMoveFailed?(user,targets) + if user.effects[PBEffects::Transform] + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.effects[PBEffects::Transform] || + target.effects[PBEffects::Illusion] + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + user.pbTransform(target) + end + + def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) + super + @battle.scene.pbChangePokemon(user,targets[0].pokemon) + end +end diff --git a/Data/Scripts/011_Battle/002_Move/007_Move_Effects_100-17F.rb b/Data/Scripts/011_Battle/002_Move/007_Move_Effects_100-17F.rb deleted file mode 100644 index 83af75acd..000000000 --- a/Data/Scripts/011_Battle/002_Move/007_Move_Effects_100-17F.rb +++ /dev/null @@ -1,2647 +0,0 @@ -#=============================================================================== -# Starts rainy weather. (Rain Dance) -#=============================================================================== -class PokeBattle_Move_100 < PokeBattle_WeatherMove - def initialize(battle,move) - super - @weatherType = :Rain - end -end - - - -#=============================================================================== -# Starts sandstorm weather. (Sandstorm) -#=============================================================================== -class PokeBattle_Move_101 < PokeBattle_WeatherMove - def initialize(battle,move) - super - @weatherType = :Sandstorm - end -end - - - -#=============================================================================== -# Starts hail weather. (Hail) -#=============================================================================== -class PokeBattle_Move_102 < PokeBattle_WeatherMove - def initialize(battle,move) - super - @weatherType = :Hail - end -end - - - -#=============================================================================== -# Entry hazard. Lays spikes on the opposing side (max. 3 layers). (Spikes) -#=============================================================================== -class PokeBattle_Move_103 < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbMoveFailed?(user,targets) - if user.pbOpposingSide.effects[PBEffects::Spikes]>=3 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.pbOpposingSide.effects[PBEffects::Spikes] += 1 - @battle.pbDisplay(_INTL("Spikes were scattered all around {1}'s feet!", - user.pbOpposingTeam(true))) - end -end - - - -#=============================================================================== -# Entry hazard. Lays poison spikes on the opposing side (max. 2 layers). -# (Toxic Spikes) -#=============================================================================== -class PokeBattle_Move_104 < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbMoveFailed?(user,targets) - if user.pbOpposingSide.effects[PBEffects::ToxicSpikes]>=2 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.pbOpposingSide.effects[PBEffects::ToxicSpikes] += 1 - @battle.pbDisplay(_INTL("Poison spikes were scattered all around {1}'s feet!", - user.pbOpposingTeam(true))) - end -end - - - -#=============================================================================== -# Entry hazard. Lays stealth rocks on the opposing side. (Stealth Rock) -#=============================================================================== -class PokeBattle_Move_105 < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbMoveFailed?(user,targets) - if user.pbOpposingSide.effects[PBEffects::StealthRock] - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.pbOpposingSide.effects[PBEffects::StealthRock] = true - @battle.pbDisplay(_INTL("Pointed stones float in the air around {1}!", - user.pbOpposingTeam(true))) - end -end - - - -#=============================================================================== -# Combos with another Pledge move used by the ally. (Grass Pledge) -# If the move is a combo, power is doubled and causes either a sea of fire or a -# swamp on the opposing side. -#=============================================================================== -class PokeBattle_Move_106 < PokeBattle_PledgeMove - def initialize(battle,move) - super - # [Function code to combo with, effect, override type, override animation] - @combos = [["107", :SeaOfFire, :FIRE, :FIREPLEDGE], - ["108", :Swamp, nil, nil]] - end -end - - - -#=============================================================================== -# Combos with another Pledge move used by the ally. (Fire Pledge) -# If the move is a combo, power is doubled and causes either a rainbow on the -# user's side or a sea of fire on the opposing side. -#=============================================================================== -class PokeBattle_Move_107 < PokeBattle_PledgeMove - def initialize(battle,move) - super - # [Function code to combo with, effect, override type, override animation] - @combos = [["108", :Rainbow, :WATER, :WATERPLEDGE], - ["106", :SeaOfFire, nil, nil]] - end -end - - - -#=============================================================================== -# Combos with another Pledge move used by the ally. (Water Pledge) -# If the move is a combo, power is doubled and causes either a swamp on the -# opposing side or a rainbow on the user's side. -#=============================================================================== -class PokeBattle_Move_108 < PokeBattle_PledgeMove - def initialize(battle,move) - super - # [Function code to combo with, effect, override type, override animation] - @combos = [["106", :Swamp, :GRASS, :GRASSPLEDGE], - ["107", :Rainbow, nil, nil]] - end -end - - - -#=============================================================================== -# Scatters coins that the player picks up after winning the battle. (Pay Day) -# NOTE: In Gen 6+, if the user levels up after this move is used, the amount of -# money picked up depends on the user's new level rather than its level -# when it used the move. I think this is silly, so I haven't coded this -# effect. -#=============================================================================== -class PokeBattle_Move_109 < PokeBattle_Move - def pbEffectGeneral(user) - if user.pbOwnedByPlayer? - @battle.field.effects[PBEffects::PayDay] += 5*user.level - end - @battle.pbDisplay(_INTL("Coins were scattered everywhere!")) - end -end - - - -#=============================================================================== -# Ends the opposing side's Light Screen, Reflect and Aurora Break. (Brick Break, -# Psychic Fangs) -#=============================================================================== -class PokeBattle_Move_10A < PokeBattle_Move - def ignoresReflect?; return true; end - - def pbEffectGeneral(user) - if user.pbOpposingSide.effects[PBEffects::LightScreen]>0 - user.pbOpposingSide.effects[PBEffects::LightScreen] = 0 - @battle.pbDisplay(_INTL("{1}'s Light Screen wore off!",user.pbOpposingTeam)) - end - if user.pbOpposingSide.effects[PBEffects::Reflect]>0 - user.pbOpposingSide.effects[PBEffects::Reflect] = 0 - @battle.pbDisplay(_INTL("{1}'s Reflect wore off!",user.pbOpposingTeam)) - end - if user.pbOpposingSide.effects[PBEffects::AuroraVeil]>0 - user.pbOpposingSide.effects[PBEffects::AuroraVeil] = 0 - @battle.pbDisplay(_INTL("{1}'s Aurora Veil wore off!",user.pbOpposingTeam)) - end - end - - def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) - if user.pbOpposingSide.effects[PBEffects::LightScreen]>0 || - user.pbOpposingSide.effects[PBEffects::Reflect]>0 || - user.pbOpposingSide.effects[PBEffects::AuroraVeil]>0 - hitNum = 1 # Wall-breaking anim - end - super - end -end - - - -#=============================================================================== -# If attack misses, user takes crash damage of 1/2 of max HP. -# (High Jump Kick, Jump Kick) -#=============================================================================== -class PokeBattle_Move_10B < PokeBattle_Move - def recoilMove?; return true; end - def unusableInGravity?; return true; end - - def pbCrashDamage(user) - return if !user.takesIndirectDamage? - @battle.pbDisplay(_INTL("{1} kept going and crashed!",user.pbThis)) - @battle.scene.pbDamageAnimation(user) - user.pbReduceHP(user.totalhp/2,false) - user.pbItemHPHealCheck - user.pbFaint if user.fainted? - end -end - - - -#=============================================================================== -# User turns 1/4 of max HP into a substitute. (Substitute) -#=============================================================================== -class PokeBattle_Move_10C < PokeBattle_Move - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if user.effects[PBEffects::Substitute]>0 - @battle.pbDisplay(_INTL("{1} already has a substitute!",user.pbThis)) - return true - end - @subLife = user.totalhp/4 - @subLife = 1 if @subLife<1 - if user.hp<=@subLife - @battle.pbDisplay(_INTL("But it does not have enough HP left to make a substitute!")) - return true - end - return false - end - - def pbOnStartUse(user,targets) - user.pbReduceHP(@subLife,false,false) - user.pbItemHPHealCheck - end - - def pbEffectGeneral(user) - user.effects[PBEffects::Trapping] = 0 - user.effects[PBEffects::TrappingMove] = nil - user.effects[PBEffects::Substitute] = @subLife - @battle.pbDisplay(_INTL("{1} put in a substitute!",user.pbThis)) - end -end - - - -#=============================================================================== -# User is Ghost: User loses 1/2 of max HP, and curses the target. -# Cursed Pokémon lose 1/4 of their max HP at the end of each round. -# User is not Ghost: Decreases the user's Speed by 1 stage, and increases the -# user's Attack and Defense by 1 stage each. (Curse) -#=============================================================================== -class PokeBattle_Move_10D < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - - def pbTarget(user) - if user.pbHasType?(:GHOST) - ghost_target = (Settings::MECHANICS_GENERATION >= 8) ? :RandomNearFoe : :NearFoe - return GameData::Target.get(ghost_target) - end - return super - end - - def pbMoveFailed?(user,targets) - return false if user.pbHasType?(:GHOST) - if !user.pbCanLowerStatStage?(:SPEED,user,self) && - !user.pbCanRaiseStatStage?(:ATTACK,user,self) && - !user.pbCanRaiseStatStage?(:DEFENSE,user,self) - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - if user.pbHasType?(:GHOST) && target.effects[PBEffects::Curse] - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectGeneral(user) - return if user.pbHasType?(:GHOST) - # Non-Ghost effect - if user.pbCanLowerStatStage?(:SPEED,user,self) - user.pbLowerStatStage(:SPEED,1,user) - end - showAnim = true - if user.pbCanRaiseStatStage?(:ATTACK,user,self) - if user.pbRaiseStatStage(:ATTACK,1,user,showAnim) - showAnim = false - end - end - if user.pbCanRaiseStatStage?(:DEFENSE,user,self) - user.pbRaiseStatStage(:DEFENSE,1,user,showAnim) - end - end - - def pbEffectAgainstTarget(user,target) - return if !user.pbHasType?(:GHOST) - # Ghost effect - @battle.pbDisplay(_INTL("{1} cut its own HP and laid a curse on {2}!",user.pbThis,target.pbThis(true))) - target.effects[PBEffects::Curse] = true - user.pbReduceHP(user.totalhp/2,false) - user.pbItemHPHealCheck - end - - def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) - hitNum = 1 if !user.pbHasType?(:GHOST) # Non-Ghost anim - super - end -end - - - -#=============================================================================== -# Target's last move used loses 4 PP. (Spite) -#=============================================================================== -class PokeBattle_Move_10E < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - last_move = target.pbGetMoveWithID(target.lastRegularMoveUsed) - if !last_move || last_move.pp == 0 || last_move.total_pp <= 0 - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user, target) - last_move = target.pbGetMoveWithID(target.lastRegularMoveUsed) - reduction = [4, last_move.pp].min - target.pbSetPP(last_move, last_move.pp - reduction) - @battle.pbDisplay(_INTL("It reduced the PP of {1}'s {2} by {3}!", - target.pbThis(true), last_move.name, reduction)) - end -end - - - -#=============================================================================== -# Target will lose 1/4 of max HP at end of each round, while asleep. (Nightmare) -#=============================================================================== -class PokeBattle_Move_10F < PokeBattle_Move - def pbFailsAgainstTarget?(user, target, show_message) - if !target.asleep? || target.effects[PBEffects::Nightmare] - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::Nightmare] = true - @battle.pbDisplay(_INTL("{1} began having a nightmare!",target.pbThis)) - end -end - - - -#=============================================================================== -# Removes trapping moves, entry hazards and Leech Seed on user/user's side. -# Raises user's Speed by 1 stage (Gen 8+). (Rapid Spin) -#=============================================================================== -class PokeBattle_Move_110 < PokeBattle_StatUpMove - def initialize(battle,move) - super - @statUp = [:SPEED, 1] - end - - def pbEffectAfterAllHits(user,target) - return if user.fainted? || target.damageState.unaffected - if user.effects[PBEffects::Trapping]>0 - trapMove = GameData::Move.get(user.effects[PBEffects::TrappingMove]).name - trapUser = @battle.battlers[user.effects[PBEffects::TrappingUser]] - @battle.pbDisplay(_INTL("{1} got free of {2}'s {3}!",user.pbThis,trapUser.pbThis(true),trapMove)) - user.effects[PBEffects::Trapping] = 0 - user.effects[PBEffects::TrappingMove] = nil - user.effects[PBEffects::TrappingUser] = -1 - end - if user.effects[PBEffects::LeechSeed]>=0 - user.effects[PBEffects::LeechSeed] = -1 - @battle.pbDisplay(_INTL("{1} shed Leech Seed!",user.pbThis)) - end - if user.pbOwnSide.effects[PBEffects::StealthRock] - user.pbOwnSide.effects[PBEffects::StealthRock] = false - @battle.pbDisplay(_INTL("{1} blew away stealth rocks!",user.pbThis)) - end - if user.pbOwnSide.effects[PBEffects::Spikes]>0 - user.pbOwnSide.effects[PBEffects::Spikes] = 0 - @battle.pbDisplay(_INTL("{1} blew away spikes!",user.pbThis)) - end - if user.pbOwnSide.effects[PBEffects::ToxicSpikes]>0 - user.pbOwnSide.effects[PBEffects::ToxicSpikes] = 0 - @battle.pbDisplay(_INTL("{1} blew away poison spikes!",user.pbThis)) - end - if user.pbOwnSide.effects[PBEffects::StickyWeb] - user.pbOwnSide.effects[PBEffects::StickyWeb] = false - @battle.pbDisplay(_INTL("{1} blew away sticky webs!",user.pbThis)) - end - end - - def pbAdditionalEffect(user,target) - super if Settings::MECHANICS_GENERATION >= 8 - end -end - - - -#=============================================================================== -# Attacks 2 rounds in the future. (Doom Desire, Future Sight) -#=============================================================================== -class PokeBattle_Move_111 < PokeBattle_Move - def targetsPosition?; return true; end - - def pbDamagingMove? # Stops damage being dealt in the setting-up turn - return false if !@battle.futureSight - return super - end - - def pbAccuracyCheck(user,target) - return true if !@battle.futureSight - return super - end - - def pbDisplayUseMessage(user) - super if !@battle.futureSight - end - - def pbFailsAgainstTarget?(user, target, show_message) - if !@battle.futureSight && - @battle.positions[target.index].effects[PBEffects::FutureSightCounter]>0 - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - return if @battle.futureSight # Attack is hitting - effects = @battle.positions[target.index].effects - effects[PBEffects::FutureSightCounter] = 3 - effects[PBEffects::FutureSightMove] = @id - effects[PBEffects::FutureSightUserIndex] = user.index - effects[PBEffects::FutureSightUserPartyIndex] = user.pokemonIndex - if @id == :DOOMDESIRE - @battle.pbDisplay(_INTL("{1} chose Doom Desire as its destiny!",user.pbThis)) - else - @battle.pbDisplay(_INTL("{1} foresaw an attack!",user.pbThis)) - end - end - - def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) - hitNum = 1 if !@battle.futureSight # Charging anim - super - end -end - - - -#=============================================================================== -# Increases the user's Defense and Special Defense by 1 stage each. Ups the -# user's stockpile by 1 (max. 3). (Stockpile) -#=============================================================================== -class PokeBattle_Move_112 < PokeBattle_Move - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if user.effects[PBEffects::Stockpile]>=3 - @battle.pbDisplay(_INTL("{1} can't stockpile any more!",user.pbThis)) - return true - end - return false - end - - def pbEffectGeneral(user) - user.effects[PBEffects::Stockpile] += 1 - @battle.pbDisplay(_INTL("{1} stockpiled {2}!", - user.pbThis,user.effects[PBEffects::Stockpile])) - showAnim = true - if user.pbCanRaiseStatStage?(:DEFENSE,user,self) - if user.pbRaiseStatStage(:DEFENSE,1,user,showAnim) - user.effects[PBEffects::StockpileDef] += 1 - showAnim = false - end - end - if user.pbCanRaiseStatStage?(:SPECIAL_DEFENSE,user,self) - if user.pbRaiseStatStage(:SPECIAL_DEFENSE,1,user,showAnim) - user.effects[PBEffects::StockpileSpDef] += 1 - end - end - end -end - - - -#=============================================================================== -# Power is 100 multiplied by the user's stockpile (X). Resets the stockpile to -# 0. Decreases the user's Defense and Special Defense by X stages each. (Spit Up) -#=============================================================================== -class PokeBattle_Move_113 < PokeBattle_Move - def pbMoveFailed?(user,targets) - if user.effects[PBEffects::Stockpile]==0 - @battle.pbDisplay(_INTL("But it failed to spit up a thing!")) - return true - end - return false - end - - def pbBaseDamage(baseDmg,user,target) - return 100*user.effects[PBEffects::Stockpile] - end - - def pbEffectAfterAllHits(user,target) - return if user.fainted? || user.effects[PBEffects::Stockpile]==0 - return if target.damageState.unaffected - @battle.pbDisplay(_INTL("{1}'s stockpiled effect wore off!",user.pbThis)) - return if @battle.pbAllFainted?(target.idxOwnSide) - showAnim = true - if user.effects[PBEffects::StockpileDef]>0 && - user.pbCanLowerStatStage?(:DEFENSE,user,self) - if user.pbLowerStatStage(:DEFENSE,user.effects[PBEffects::StockpileDef],user,showAnim) - showAnim = false - end - end - if user.effects[PBEffects::StockpileSpDef]>0 && - user.pbCanLowerStatStage?(:SPECIAL_DEFENSE,user,self) - user.pbLowerStatStage(:SPECIAL_DEFENSE,user.effects[PBEffects::StockpileSpDef],user,showAnim) - end - user.effects[PBEffects::Stockpile] = 0 - user.effects[PBEffects::StockpileDef] = 0 - user.effects[PBEffects::StockpileSpDef] = 0 - end -end - - - -#=============================================================================== -# Heals user depending on the user's stockpile (X). Resets the stockpile to 0. -# Decreases the user's Defense and Special Defense by X stages each. (Swallow) -#=============================================================================== -class PokeBattle_Move_114 < PokeBattle_Move - def healingMove?; return true; end - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if user.effects[PBEffects::Stockpile]==0 - @battle.pbDisplay(_INTL("But it failed to swallow a thing!")) - return true - end - if !user.canHeal? && - user.effects[PBEffects::StockpileDef]==0 && - user.effects[PBEffects::StockpileSpDef]==0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - hpGain = 0 - case [user.effects[PBEffects::Stockpile],1].max - when 1 then hpGain = user.totalhp/4 - when 2 then hpGain = user.totalhp/2 - when 3 then hpGain = user.totalhp - end - if user.pbRecoverHP(hpGain)>0 - @battle.pbDisplay(_INTL("{1}'s HP was restored.",user.pbThis)) - end - @battle.pbDisplay(_INTL("{1}'s stockpiled effect wore off!",user.pbThis)) - showAnim = true - if user.effects[PBEffects::StockpileDef]>0 && - user.pbCanLowerStatStage?(:DEFENSE,user,self) - if user.pbLowerStatStage(:DEFENSE,user.effects[PBEffects::StockpileDef],user,showAnim) - showAnim = false - end - end - if user.effects[PBEffects::StockpileSpDef]>0 && - user.pbCanLowerStatStage?(:SPECIAL_DEFENSE,user,self) - user.pbLowerStatStage(:SPECIAL_DEFENSE,user.effects[PBEffects::StockpileSpDef],user,showAnim) - end - user.effects[PBEffects::Stockpile] = 0 - user.effects[PBEffects::StockpileDef] = 0 - user.effects[PBEffects::StockpileSpDef] = 0 - end -end - - - -#=============================================================================== -# Fails if user was hit by a damaging move this round. (Focus Punch) -#=============================================================================== -class PokeBattle_Move_115 < PokeBattle_Move - def pbDisplayChargeMessage(user) - user.effects[PBEffects::FocusPunch] = true - @battle.pbCommonAnimation("FocusPunch",user) - @battle.pbDisplay(_INTL("{1} is tightening its focus!",user.pbThis)) - end - - def pbDisplayUseMessage(user) - super if !user.effects[PBEffects::FocusPunch] || user.lastHPLost==0 - end - - def pbMoveFailed?(user,targets) - if user.effects[PBEffects::FocusPunch] && user.lastHPLost>0 - @battle.pbDisplay(_INTL("{1} lost its focus and couldn't move!",user.pbThis)) - return true - end - return false - end -end - - - -#=============================================================================== -# Fails if the target didn't chose a damaging move to use this round, or has -# already moved. (Sucker Punch) -#=============================================================================== -class PokeBattle_Move_116 < PokeBattle_Move - def pbFailsAgainstTarget?(user, target, show_message) - if @battle.choices[target.index][0]!=:UseMove - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - oppMove = @battle.choices[target.index][2] - if !oppMove || - (oppMove.function!="0B0" && # Me First - (target.movedThisRound? || oppMove.statusMove?)) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end -end - - - -#=============================================================================== -# This round, user becomes the target of attacks that have single targets. -# (Follow Me, Rage Powder) -#=============================================================================== -class PokeBattle_Move_117 < PokeBattle_Move - def pbEffectGeneral(user) - user.effects[PBEffects::FollowMe] = 1 - user.eachAlly do |b| - next if b.effects[PBEffects::FollowMe]0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - @battle.field.effects[PBEffects::Gravity] = 5 - @battle.pbDisplay(_INTL("Gravity intensified!")) - @battle.eachBattler do |b| - showMessage = false - if b.inTwoTurnAttack?("0C9","0CC","0CE") # Fly/Bounce/Sky Drop - b.effects[PBEffects::TwoTurnAttack] = nil - @battle.pbClearChoice(b.index) if !b.movedThisRound? - showMessage = true - end - if b.effects[PBEffects::MagnetRise]>0 || - b.effects[PBEffects::Telekinesis]>0 || - b.effects[PBEffects::SkyDrop]>=0 - b.effects[PBEffects::MagnetRise] = 0 - b.effects[PBEffects::Telekinesis] = 0 - b.effects[PBEffects::SkyDrop] = -1 - showMessage = true - end - @battle.pbDisplay(_INTL("{1} couldn't stay airborne because of gravity!", - b.pbThis)) if showMessage - end - end -end - - - -#=============================================================================== -# For 5 rounds, user becomes airborne. (Magnet Rise) -#=============================================================================== -class PokeBattle_Move_119 < PokeBattle_Move - def unusableInGravity?; return true; end - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if user.effects[PBEffects::Ingrain] || - user.effects[PBEffects::SmackDown] || - user.effects[PBEffects::MagnetRise]>0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.effects[PBEffects::MagnetRise] = 5 - @battle.pbDisplay(_INTL("{1} levitated with electromagnetism!",user.pbThis)) - end -end - - - -#=============================================================================== -# For 3 rounds, target becomes airborne and can always be hit. (Telekinesis) -#=============================================================================== -class PokeBattle_Move_11A < PokeBattle_Move - def unusableInGravity?; return true; end - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.effects[PBEffects::Ingrain] || - target.effects[PBEffects::SmackDown] || - target.effects[PBEffects::Telekinesis]>0 - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - if target.isSpecies?(:DIGLETT) || - target.isSpecies?(:DUGTRIO) || - target.isSpecies?(:SANDYGAST) || - target.isSpecies?(:PALOSSAND) || - (target.isSpecies?(:GENGAR) && target.mega?) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::Telekinesis] = 3 - @battle.pbDisplay(_INTL("{1} was hurled into the air!",target.pbThis)) - end -end - - - -#=============================================================================== -# Hits airborne semi-invulnerable targets. (Sky Uppercut) -#=============================================================================== -class PokeBattle_Move_11B < PokeBattle_Move - def hitsFlyingTargets?; return true; end -end - - - -#=============================================================================== -# Grounds the target while it remains active. Hits some semi-invulnerable -# targets. (Smack Down, Thousand Arrows) -#=============================================================================== -class PokeBattle_Move_11C < PokeBattle_Move - def hitsFlyingTargets?; return true; end - - def pbCalcTypeModSingle(moveType,defType,user,target) - return Effectiveness::NORMAL_EFFECTIVE_ONE if moveType == :GROUND && defType == :FLYING - return super - end - - def pbEffectAfterAllHits(user,target) - return if target.fainted? - return if target.damageState.unaffected || target.damageState.substitute - return if target.inTwoTurnAttack?("0CE") || target.effects[PBEffects::SkyDrop]>=0 # Sky Drop - return if !target.airborne? && !target.inTwoTurnAttack?("0C9","0CC") # Fly/Bounce - target.effects[PBEffects::SmackDown] = true - if target.inTwoTurnAttack?("0C9","0CC") # Fly/Bounce. NOTE: Not Sky Drop. - target.effects[PBEffects::TwoTurnAttack] = nil - @battle.pbClearChoice(target.index) if !target.movedThisRound? - end - target.effects[PBEffects::MagnetRise] = 0 - target.effects[PBEffects::Telekinesis] = 0 - @battle.pbDisplay(_INTL("{1} fell straight down!",target.pbThis)) - end -end - - - -#=============================================================================== -# Target moves immediately after the user, ignoring priority/speed. (After You) -#=============================================================================== -class PokeBattle_Move_11D < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - # Target has already moved this round - return true if pbMoveFailedTargetAlreadyMoved?(target, show_message) - # Target was going to move next anyway (somehow) - if target.effects[PBEffects::MoveNext] - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - # Target didn't choose to use a move this round - oppMove = @battle.choices[target.index][2] - if !oppMove - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::MoveNext] = true - target.effects[PBEffects::Quash] = 0 - @battle.pbDisplay(_INTL("{1} took the kind offer!",target.pbThis)) - end -end - - - -#=============================================================================== -# Target moves last this round, ignoring priority/speed. (Quash) -#=============================================================================== -class PokeBattle_Move_11E < PokeBattle_Move - def pbFailsAgainstTarget?(user, target, show_message) - return true if pbMoveFailedTargetAlreadyMoved?(target, show_message) - # Target isn't going to use a move - oppMove = @battle.choices[target.index][2] - if !oppMove - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - # Target is already maximally Quashed and will move last anyway - highestQuash = 0 - @battle.battlers.each do |b| - next if b.effects[PBEffects::Quash]<=highestQuash - highestQuash = b.effects[PBEffects::Quash] - end - if highestQuash>0 && target.effects[PBEffects::Quash]==highestQuash - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - # Target was already going to move last - if highestQuash==0 && @battle.pbPriority.last.index==target.index - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - highestQuash = 0 - @battle.battlers.each do |b| - next if b.effects[PBEffects::Quash]<=highestQuash - highestQuash = b.effects[PBEffects::Quash] - end - target.effects[PBEffects::Quash] = highestQuash+1 - target.effects[PBEffects::MoveNext] = false - @battle.pbDisplay(_INTL("{1}'s move was postponed!",target.pbThis)) - end -end - - - -#=============================================================================== -# For 5 rounds, for each priority bracket, slow Pokémon move before fast ones. -# (Trick Room) -#=============================================================================== -class PokeBattle_Move_11F < PokeBattle_Move - def pbEffectGeneral(user) - if @battle.field.effects[PBEffects::TrickRoom]>0 - @battle.field.effects[PBEffects::TrickRoom] = 0 - @battle.pbDisplay(_INTL("{1} reverted the dimensions!",user.pbThis)) - else - @battle.field.effects[PBEffects::TrickRoom] = 5 - @battle.pbDisplay(_INTL("{1} twisted the dimensions!",user.pbThis)) - end - end - - def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) - return if @battle.field.effects[PBEffects::TrickRoom]>0 # No animation - super - end -end - - - -#=============================================================================== -# User switches places with its ally. (Ally Switch) -#=============================================================================== -class PokeBattle_Move_120 < PokeBattle_Move - def pbMoveFailed?(user,targets) - numTargets = 0 - @idxAlly = -1 - idxUserOwner = @battle.pbGetOwnerIndexFromBattlerIndex(user.index) - user.eachAlly do |b| - next if @battle.pbGetOwnerIndexFromBattlerIndex(b.index)!=idxUserOwner - next if !b.near?(user) - numTargets += 1 - @idxAlly = b.index - end - if numTargets!=1 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - idxA = user.index - idxB = @idxAlly - if @battle.pbSwapBattlers(idxA,idxB) - @battle.pbDisplay(_INTL("{1} and {2} switched places!", - @battle.battlers[idxB].pbThis,@battle.battlers[idxA].pbThis(true))) - [idxA, idxB].each { |idx| @battle.battlers[idx].pbEffectsOnEnteringPosition } - end - end -end - - - -#=============================================================================== -# Target's Attack is used instead of user's Attack for this move's calculations. -# (Foul Play) -#=============================================================================== -class PokeBattle_Move_121 < PokeBattle_Move - def pbGetAttackStats(user,target) - if specialMove? - return target.spatk, target.stages[:SPECIAL_ATTACK]+6 - end - return target.attack, target.stages[:ATTACK]+6 - end -end - - - -#=============================================================================== -# Target's Defense is used instead of its Special Defense for this move's -# calculations. (Psyshock, Psystrike, Secret Sword) -#=============================================================================== -class PokeBattle_Move_122 < PokeBattle_Move - def pbGetDefenseStats(user,target) - return target.defense, target.stages[:DEFENSE]+6 - end -end - - - -#=============================================================================== -# Only damages Pokémon that share a type with the user. (Synchronoise) -#=============================================================================== -class PokeBattle_Move_123 < PokeBattle_Move - def pbFailsAgainstTarget?(user, target, show_message) - userTypes = user.pbTypes(true) - targetTypes = target.pbTypes(true) - sharesType = false - userTypes.each do |t| - next if !targetTypes.include?(t) - sharesType = true - break - end - if !sharesType - @battle.pbDisplay(_INTL("{1} is unaffected!",target.pbThis)) if show_message - return true - end - return false - end -end - - - -#=============================================================================== -# For 5 rounds, swaps all battlers' base Defense with base Special Defense. -# (Wonder Room) -#=============================================================================== -class PokeBattle_Move_124 < PokeBattle_Move - def pbEffectGeneral(user) - if @battle.field.effects[PBEffects::WonderRoom]>0 - @battle.field.effects[PBEffects::WonderRoom] = 0 - @battle.pbDisplay(_INTL("Wonder Room wore off, and the Defense and Sp. Def stats returned to normal!")) - else - @battle.field.effects[PBEffects::WonderRoom] = 5 - @battle.pbDisplay(_INTL("It created a bizarre area in which the Defense and Sp. Def stats are swapped!")) - end - end - - def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) - return if @battle.field.effects[PBEffects::WonderRoom]>0 # No animation - super - end -end - - - -#=============================================================================== -# Fails unless user has already used all other moves it knows. (Last Resort) -#=============================================================================== -class PokeBattle_Move_125 < PokeBattle_Move - def pbFailsAgainstTarget?(user, target, show_message) - hasThisMove = false - hasOtherMoves = false - hasUnusedMoves = false - user.eachMove do |m| - hasThisMove = true if m.id==@id - hasOtherMoves = true if m.id!=@id - hasUnusedMoves = true if m.id!=@id && !user.movesUsed.include?(m.id) - end - if !hasThisMove || !hasOtherMoves || hasUnusedMoves - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end -end - - - -#=============================================================================== -# NOTE: Shadow moves use function codes 126-132 inclusive. -#=============================================================================== - - - -#=============================================================================== -# Does absolutely nothing. (Hold Hands) -#=============================================================================== -class PokeBattle_Move_133 < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - - def pbMoveFailed?(user,targets) - hasAlly = false - user.eachAlly do |_b| - hasAlly = true - break - end - if !hasAlly - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end -end - - - -#=============================================================================== -# Does absolutely nothing. Shows a special message. (Celebrate) -#=============================================================================== -class PokeBattle_Move_134 < PokeBattle_Move - def pbEffectGeneral(user) - if @battle.wildBattle? && user.opposes? - @battle.pbDisplay(_INTL("Congratulations from {1}!",user.pbThis(true))) - else - @battle.pbDisplay(_INTL("Congratulations, {1}!",@battle.pbGetOwnerName(user.index))) - end - end -end - - - -#=============================================================================== -# Freezes the target. Effectiveness against Water-type is 2x. (Freeze-Dry) -#=============================================================================== -class PokeBattle_Move_135 < PokeBattle_FreezeMove - def pbCalcTypeModSingle(moveType,defType,user,target) - return Effectiveness::SUPER_EFFECTIVE_ONE if defType == :WATER - return super - end -end - - - -#=============================================================================== -# Increases the user's Defense by 2 stages. (Diamond Storm) -#=============================================================================== -class PokeBattle_Move_136 < PokeBattle_Move_02F - # NOTE: In Gen 6, this move increased the user's Defense by 1 stage for each - # target it hit. This effect changed in Gen 7 and is now identical to - # function code 02F. -end - - - -#=============================================================================== -# Increases the user's and its ally's Defense and Special Defense by 1 stage -# each, if they have Plus or Minus. (Magnetic Flux) -#=============================================================================== -# NOTE: In Gen 5, this move should have a target of UserSide, while in Gen 6+ it -# should have a target of UserAndAllies. This is because, in Gen 5, this -# move shouldn't call def pbSuccessCheckAgainstTarget for each Pokémon -# currently in battle that will be affected by this move (i.e. allies -# aren't protected by their substitute/ability/etc., but they are in Gen -# 6+). We achieve this by not targeting any battlers in Gen 5, since -# pbSuccessCheckAgainstTarget is only called for targeted battlers. -class PokeBattle_Move_137 < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - @validTargets = [] - @battle.eachSameSideBattler(user) do |b| - next if !b.hasActiveAbility?([:MINUS,:PLUS]) - next if !b.pbCanRaiseStatStage?(:DEFENSE,user,self) && - !b.pbCanRaiseStatStage?(:SPECIAL_DEFENSE,user,self) - @validTargets.push(b) - end - if @validTargets.length==0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - return false if @validTargets.any? { |b| b.index==target.index } - return true if !target.hasActiveAbility?([:MINUS,:PLUS]) - @battle.pbDisplay(_INTL("{1}'s stats can't be raised further!", target.pbThis)) if show_message - return true - end - - def pbEffectAgainstTarget(user,target) - showAnim = true - if target.pbCanRaiseStatStage?(:DEFENSE,user,self) - if target.pbRaiseStatStage(:DEFENSE,1,user,showAnim) - showAnim = false - end - end - if target.pbCanRaiseStatStage?(:SPECIAL_DEFENSE,user,self) - target.pbRaiseStatStage(:SPECIAL_DEFENSE,1,user,showAnim) - end - end - - def pbEffectGeneral(user) - return if pbTarget(user) != :UserSide - @validTargets.each { |b| pbEffectAgainstTarget(user,b) } - end -end - - - -#=============================================================================== -# Increases target's Special Defense by 1 stage. (Aromatic Mist) -#=============================================================================== -class PokeBattle_Move_138 < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - return true if !target.pbCanRaiseStatStage?(:SPECIAL_DEFENSE, user, self, show_message) - return false - end - - def pbEffectAgainstTarget(user,target) - target.pbRaiseStatStage(:SPECIAL_DEFENSE,1,user) - end -end - - - -#=============================================================================== -# Decreases the target's Attack by 1 stage. Always hits. (Play Nice) -#=============================================================================== -class PokeBattle_Move_139 < PokeBattle_TargetStatDownMove - def ignoresSubstitute?(user); return true; end - - def initialize(battle,move) - super - @statDown = [:ATTACK,1] - end - - def pbAccuracyCheck(user,target); return true; end -end - - - -#=============================================================================== -# Decreases the target's Attack and Special Attack by 1 stage each. Always hits. -# (Noble Roar) -#=============================================================================== -class PokeBattle_Move_13A < PokeBattle_TargetMultiStatDownMove - def ignoresSubstitute?(user); return true; end - - def initialize(battle,move) - super - @statDown = [:ATTACK,1,:SPECIAL_ATTACK,1] - end - - def pbAccuracyCheck(user,target); return true; end -end - - - -#=============================================================================== -# Decreases the user's Defense by 1 stage. Always hits. Ends target's -# protections immediately. (Hyperspace Fury) -#=============================================================================== -class PokeBattle_Move_13B < PokeBattle_StatDownMove - def ignoresSubstitute?(user); return true; end - - def initialize(battle,move) - super - @statDown = [:DEFENSE,1] - end - - def pbMoveFailed?(user,targets) - if !user.isSpecies?(:HOOPA) - @battle.pbDisplay(_INTL("But {1} can't use the move!",user.pbThis(true))) - return true - elsif user.form!=1 - @battle.pbDisplay(_INTL("But {1} can't use it the way it is now!",user.pbThis(true))) - return true - end - return false - end - - def pbAccuracyCheck(user,target); return true; end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::BanefulBunker] = false - target.effects[PBEffects::KingsShield] = false - target.effects[PBEffects::Obstruct] = false - target.effects[PBEffects::Protect] = false - target.effects[PBEffects::SpikyShield] = false - target.pbOwnSide.effects[PBEffects::CraftyShield] = false - target.pbOwnSide.effects[PBEffects::MatBlock] = false - target.pbOwnSide.effects[PBEffects::QuickGuard] = false - target.pbOwnSide.effects[PBEffects::WideGuard] = false - end -end - - - -#=============================================================================== -# Decreases the target's Special Attack by 1 stage. Always hits. (Confide) -#=============================================================================== -class PokeBattle_Move_13C < PokeBattle_TargetStatDownMove - def ignoresSubstitute?(user); return true; end - - def initialize(battle,move) - super - @statDown = [:SPECIAL_ATTACK,1] - end - - def pbAccuracyCheck(user,target); return true; end -end - - - -#=============================================================================== -# Decreases the target's Special Attack by 2 stages. (Eerie Impulse) -#=============================================================================== -class PokeBattle_Move_13D < PokeBattle_TargetStatDownMove - def initialize(battle,move) - super - @statDown = [:SPECIAL_ATTACK,2] - end -end - - - -#=============================================================================== -# Increases the Attack and Special Attack of all Grass-type Pokémon in battle by -# 1 stage each. Doesn't affect airborne Pokémon. (Rototiller) -#=============================================================================== -class PokeBattle_Move_13E < PokeBattle_Move - def pbMoveFailed?(user,targets) - @validTargets = [] - @battle.eachBattler do |b| - next if !b.pbHasType?(:GRASS) - next if b.airborne? || b.semiInvulnerable? - next if !b.pbCanRaiseStatStage?(:ATTACK,user,self) && - !b.pbCanRaiseStatStage?(:SPECIAL_ATTACK,user,self) - @validTargets.push(b.index) - end - if @validTargets.length==0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - return false if @validTargets.include?(target.index) - return true if !target.pbHasType?(:GRASS) - return true if target.airborne? || target.semiInvulnerable? - @battle.pbDisplay(_INTL("{1}'s stats can't be raised further!", target.pbThis)) if show_message - return true - end - - def pbEffectAgainstTarget(user,target) - showAnim = true - if target.pbCanRaiseStatStage?(:ATTACK,user,self) - if target.pbRaiseStatStage(:ATTACK,1,user,showAnim) - showAnim = false - end - end - if target.pbCanRaiseStatStage?(:SPECIAL_ATTACK,user,self) - target.pbRaiseStatStage(:SPECIAL_ATTACK,1,user,showAnim) - end - end -end - - - -#=============================================================================== -# Increases the Defense of all Grass-type Pokémon on the field by 1 stage each. -# (Flower Shield) -#=============================================================================== -class PokeBattle_Move_13F < PokeBattle_Move - def pbMoveFailed?(user,targets) - @validTargets = [] - @battle.eachBattler do |b| - next if !b.pbHasType?(:GRASS) - next if b.semiInvulnerable? - next if !b.pbCanRaiseStatStage?(:DEFENSE,user,self) - @validTargets.push(b.index) - end - if @validTargets.length==0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - return false if @validTargets.include?(target.index) - return true if !target.pbHasType?(:GRASS) || target.semiInvulnerable? - return !target.pbCanRaiseStatStage?(:DEFENSE, user, self, show_message) - end - - def pbEffectAgainstTarget(user,target) - target.pbRaiseStatStage(:DEFENSE,1,user) - end -end - - - -#=============================================================================== -# Decreases the Attack, Special Attack and Speed of all poisoned targets by 1 -# stage each. (Venom Drench) -#=============================================================================== -class PokeBattle_Move_140 < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbMoveFailed?(user,targets) - @validTargets = [] - targets.each do |b| - next if !b || b.fainted? - next if !b.poisoned? - next if !b.pbCanLowerStatStage?(:ATTACK,user,self) && - !b.pbCanLowerStatStage?(:SPECIAL_ATTACK,user,self) && - !b.pbCanLowerStatStage?(:SPEED,user,self) - @validTargets.push(b.index) - end - if @validTargets.length==0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - return if !@validTargets.include?(target.index) - showAnim = true - [:ATTACK,:SPECIAL_ATTACK,:SPEED].each do |s| - next if !target.pbCanLowerStatStage?(s,user,self) - if target.pbLowerStatStage(s,1,user,showAnim) - showAnim = false - end - end - end -end - - - -#=============================================================================== -# Reverses all stat changes of the target. (Topsy-Turvy) -#=============================================================================== -class PokeBattle_Move_141 < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if !target.hasAlteredStatStages? - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - GameData::Stat.each_battle do |s| - if target.stages[s.id] > 0 - target.statsLowered = true - elsif target.stages[s.id] < 0 - target.statsRaised = true - end - target.stages[s.id] *= -1 - end - @battle.pbDisplay(_INTL("{1}'s stats were reversed!",target.pbThis)) - end -end - - - -#=============================================================================== -# Gives target the Ghost type. (Trick-or-Treat) -#=============================================================================== -class PokeBattle_Move_142 < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if !GameData::Type.exists?(:GHOST) || target.pbHasType?(:GHOST) || !target.canChangeType? - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::Type3] = :GHOST - typeName = GameData::Type.get(:GHOST).name - @battle.pbDisplay(_INTL("{1} transformed into the {2} type!",target.pbThis,typeName)) - end -end - - - -#=============================================================================== -# Gives target the Grass type. (Forest's Curse) -#=============================================================================== -class PokeBattle_Move_143 < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if !GameData::Type.exists?(:GRASS) || target.pbHasType?(:GRASS) || !target.canChangeType? - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::Type3] = :GRASS - typeName = GameData::Type.get(:GRASS).name - @battle.pbDisplay(_INTL("{1} transformed into the {2} type!",target.pbThis,typeName)) - end -end - - - -#=============================================================================== -# Type effectiveness is multiplied by the Flying-type's effectiveness against -# the target. Does double damage and has perfect accuracy if the target is -# Minimized. (Flying Press) -#=============================================================================== -class PokeBattle_Move_144 < PokeBattle_Move - def tramplesMinimize?(param=1) - return true if param==1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy - return true if param==2 # Double damage - return super - end - - def pbCalcTypeModSingle(moveType,defType,user,target) - ret = super - if GameData::Type.exists?(:FLYING) - flyingEff = Effectiveness.calculate_one(:FLYING, defType) - ret *= flyingEff.to_f / Effectiveness::NORMAL_EFFECTIVE_ONE - end - return ret - end -end - - - -#=============================================================================== -# Target's moves become Electric-type for the rest of the round. (Electrify) -#=============================================================================== -class PokeBattle_Move_145 < PokeBattle_Move - def pbFailsAgainstTarget?(user, target, show_message) - if target.effects[PBEffects::Electrify] - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return true if pbMoveFailedTargetAlreadyMoved?(target, show_message) - return false - end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::Electrify] = true - @battle.pbDisplay(_INTL("{1}'s moves have been electrified!",target.pbThis)) - end -end - - - -#=============================================================================== -# All Normal-type moves become Electric-type for the rest of the round. -# (Ion Deluge, Plasma Fists) -#=============================================================================== -class PokeBattle_Move_146 < PokeBattle_Move - def pbMoveFailed?(user,targets) - return false if damagingMove? - if @battle.field.effects[PBEffects::IonDeluge] - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return true if pbMoveFailedLastInRound?(user) - return false - end - - def pbEffectGeneral(user) - return if @battle.field.effects[PBEffects::IonDeluge] - @battle.field.effects[PBEffects::IonDeluge] = true - @battle.pbDisplay(_INTL("A deluge of ions showers the battlefield!")) - end -end - - - -#=============================================================================== -# Always hits. Ends target's protections immediately. (Hyperspace Hole) -#=============================================================================== -class PokeBattle_Move_147 < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - def pbAccuracyCheck(user,target); return true; end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::BanefulBunker] = false - target.effects[PBEffects::KingsShield] = false - target.effects[PBEffects::Obstruct] = false - target.effects[PBEffects::Protect] = false - target.effects[PBEffects::SpikyShield] = false - target.pbOwnSide.effects[PBEffects::CraftyShield] = false - target.pbOwnSide.effects[PBEffects::MatBlock] = false - target.pbOwnSide.effects[PBEffects::QuickGuard] = false - target.pbOwnSide.effects[PBEffects::WideGuard] = false - end -end - - - -#=============================================================================== -# Powders the foe. This round, if it uses a Fire move, it loses 1/4 of its max -# HP instead. (Powder) -#=============================================================================== -class PokeBattle_Move_148 < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.effects[PBEffects::Powder] - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::Powder] = true - @battle.pbDisplay(_INTL("{1} is covered in powder!",user.pbThis)) - end -end - - - -#=============================================================================== -# This round, the user's side is unaffected by damaging moves. (Mat Block) -#=============================================================================== -class PokeBattle_Move_149 < PokeBattle_Move - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if user.turnCount > 1 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return true if pbMoveFailedLastInRound?(user) - return false - end - - def pbEffectGeneral(user) - user.pbOwnSide.effects[PBEffects::MatBlock] = true - @battle.pbDisplay(_INTL("{1} intends to flip up a mat and block incoming attacks!",user.pbThis)) - end -end - - - -#=============================================================================== -# User's side is protected against status moves this round. (Crafty Shield) -#=============================================================================== -class PokeBattle_Move_14A < PokeBattle_Move - def pbMoveFailed?(user,targets) - if user.pbOwnSide.effects[PBEffects::CraftyShield] - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return true if pbMoveFailedLastInRound?(user) - return false - end - - def pbEffectGeneral(user) - user.pbOwnSide.effects[PBEffects::CraftyShield] = true - @battle.pbDisplay(_INTL("Crafty Shield protected {1}!",user.pbTeam(true))) - end -end - - - -#=============================================================================== -# User is protected against damaging moves this round. Decreases the Attack of -# the user of a stopped contact move by 2 stages. (King's Shield) -#=============================================================================== -class PokeBattle_Move_14B < PokeBattle_ProtectMove - def initialize(battle,move) - super - @effect = PBEffects::KingsShield - end -end - - - -#=============================================================================== -# User is protected against moves that target it this round. Damages the user of -# a stopped contact move by 1/8 of its max HP. (Spiky Shield) -#=============================================================================== -class PokeBattle_Move_14C < PokeBattle_ProtectMove - def initialize(battle,move) - super - @effect = PBEffects::SpikyShield - end -end - - - -#=============================================================================== -# Two turn attack. Skips first turn, attacks second turn. (Phantom Force) -# Is invulnerable during use. Ends target's protections upon hit. -#=============================================================================== -class PokeBattle_Move_14D < PokeBattle_Move_0CD - # NOTE: This move is identical to function code 0CD (Shadow Force). -end - - - -#=============================================================================== -# Two turn attack. Skips first turn, and increases the user's Special Attack, -# Special Defense and Speed by 2 stages each in the second turn. (Geomancy) -#=============================================================================== -class PokeBattle_Move_14E < PokeBattle_TwoTurnMove - def pbMoveFailed?(user,targets) - return false if user.effects[PBEffects::TwoTurnAttack] # Charging turn - if !user.pbCanRaiseStatStage?(:SPECIAL_ATTACK,user,self) && - !user.pbCanRaiseStatStage?(:SPECIAL_DEFENSE,user,self) && - !user.pbCanRaiseStatStage?(:SPEED,user,self) - @battle.pbDisplay(_INTL("{1}'s stats won't go any higher!",user.pbThis)) - return true - end - return false - end - - def pbChargingTurnMessage(user,targets) - @battle.pbDisplay(_INTL("{1} is absorbing power!",user.pbThis)) - end - - def pbEffectGeneral(user) - return if !@damagingTurn - showAnim = true - [:SPECIAL_ATTACK,:SPECIAL_DEFENSE,:SPEED].each do |s| - next if !user.pbCanRaiseStatStage?(s,user,self) - if user.pbRaiseStatStage(s,2,user,showAnim) - showAnim = false - end - end - end -end - - - -#=============================================================================== -# User gains 3/4 the HP it inflicts as damage. (Draining Kiss, Oblivion Wing) -#=============================================================================== -class PokeBattle_Move_14F < PokeBattle_Move - def healingMove?; return Settings::MECHANICS_GENERATION >= 6; end - - def pbEffectAgainstTarget(user,target) - return if target.damageState.hpLost<=0 - hpGain = (target.damageState.hpLost*0.75).round - user.pbRecoverHPFromDrain(hpGain,target) - end -end - - - -#=============================================================================== -# If this move KO's the target, increases the user's Attack by 3 stages. -# (Fell Stinger) -#=============================================================================== -class PokeBattle_Move_150 < PokeBattle_Move - def pbEffectAfterAllHits(user,target) - return if !target.damageState.fainted - return if !user.pbCanRaiseStatStage?(:ATTACK,user,self) - user.pbRaiseStatStage(:ATTACK,3,user) - end -end - - - -#=============================================================================== -# Decreases the target's Attack and Special Attack by 1 stage each. Then, user -# switches out. Ignores trapping moves. (Parting Shot) -#=============================================================================== -class PokeBattle_Move_151 < PokeBattle_TargetMultiStatDownMove - def initialize(battle,move) - super - @statDown = [:ATTACK,1,:SPECIAL_ATTACK,1] - end - - def pbEndOfMoveUsageEffect(user,targets,numHits,switchedBattlers) - switcher = user - targets.each do |b| - next if switchedBattlers.include?(b.index) - switcher = b if b.effects[PBEffects::MagicCoat] || b.effects[PBEffects::MagicBounce] - end - return if switcher.fainted? || numHits==0 - return if !@battle.pbCanChooseNonActive?(switcher.index) - @battle.pbDisplay(_INTL("{1} went back to {2}!",switcher.pbThis, - @battle.pbGetOwnerName(switcher.index))) - @battle.pbPursuit(switcher.index) - return if switcher.fainted? - newPkmn = @battle.pbGetReplacementPokemonIndex(switcher.index) # Owner chooses - return if newPkmn<0 - @battle.pbRecallAndReplace(switcher.index,newPkmn) - @battle.pbClearChoice(switcher.index) # Replacement Pokémon does nothing this round - @battle.moldBreaker = false if switcher.index==user.index - switchedBattlers.push(switcher.index) - switcher.pbEffectsOnSwitchIn(true) - end -end - - - -#=============================================================================== -# No Pokémon can switch out or flee until the end of the next round, as long as -# the user remains active. (Fairy Lock) -#=============================================================================== -class PokeBattle_Move_152 < PokeBattle_Move - def pbMoveFailed?(user,targets) - if @battle.field.effects[PBEffects::FairyLock]>0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - @battle.field.effects[PBEffects::FairyLock] = 2 - @battle.pbDisplay(_INTL("No one will be able to run away during the next turn!")) - end -end - - - -#=============================================================================== -# Entry hazard. Lays stealth rocks on the opposing side. (Sticky Web) -#=============================================================================== -class PokeBattle_Move_153 < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbMoveFailed?(user,targets) - if user.pbOpposingSide.effects[PBEffects::StickyWeb] - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.pbOpposingSide.effects[PBEffects::StickyWeb] = true - @battle.pbDisplay(_INTL("A sticky web has been laid out beneath {1}'s feet!", - user.pbOpposingTeam(true))) - end -end - - - -#=============================================================================== -# For 5 rounds, creates an electric terrain which boosts Electric-type moves and -# prevents Pokémon from falling asleep. Affects non-airborne Pokémon only. -# (Electric Terrain) -#=============================================================================== -class PokeBattle_Move_154 < PokeBattle_Move - def pbMoveFailed?(user,targets) - if @battle.field.terrain == :Electric - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - @battle.pbStartTerrain(user, :Electric) - end -end - - - -#=============================================================================== -# For 5 rounds, creates a grassy terrain which boosts Grass-type moves and heals -# Pokémon at the end of each round. Affects non-airborne Pokémon only. -# (Grassy Terrain) -#=============================================================================== -class PokeBattle_Move_155 < PokeBattle_Move - def pbMoveFailed?(user,targets) - if @battle.field.terrain == :Grassy - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - @battle.pbStartTerrain(user, :Grassy) - end -end - - - -#=============================================================================== -# For 5 rounds, creates a misty terrain which weakens Dragon-type moves and -# protects Pokémon from status problems. Affects non-airborne Pokémon only. -# (Misty Terrain) -#=============================================================================== -class PokeBattle_Move_156 < PokeBattle_Move - def pbMoveFailed?(user,targets) - if @battle.field.terrain == :Misty - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - @battle.pbStartTerrain(user, :Misty) - end -end - - - -#=============================================================================== -# Doubles the prize money the player gets after winning the battle. (Happy Hour) -#=============================================================================== -class PokeBattle_Move_157 < PokeBattle_Move - def pbEffectGeneral(user) - @battle.field.effects[PBEffects::HappyHour] = true if !user.opposes? - @battle.pbDisplay(_INTL("Everyone is caught up in the happy atmosphere!")) - end -end - - - -#=============================================================================== -# Fails unless user has consumed a berry at some point. (Belch) -#=============================================================================== -class PokeBattle_Move_158 < PokeBattle_Move - def pbCanChooseMove?(user,commandPhase,showMessages) - if !user.belched? - if showMessages - msg = _INTL("{1} hasn't eaten any held berry, so it can't possibly belch!",user.pbThis) - (commandPhase) ? @battle.pbDisplayPaused(msg) : @battle.pbDisplay(msg) - end - return false - end - return true - end - - def pbMoveFailed?(user,targets) - if !user.belched? - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end -end - - - -#=============================================================================== -# Poisons the target and decreases its Speed by 1 stage. (Toxic Thread) -#=============================================================================== -class PokeBattle_Move_159 < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if !target.pbCanPoison?(user,false,self) && - !target.pbCanLowerStatStage?(:SPEED,user,self) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - target.pbPoison(user) if target.pbCanPoison?(user,false,self) - if target.pbCanLowerStatStage?(:SPEED,user,self) - target.pbLowerStatStage(:SPEED,1,user) - end - end -end - - - -#=============================================================================== -# Cures the target's burn. (Sparkling Aria) -#=============================================================================== -class PokeBattle_Move_15A < PokeBattle_Move - def pbAdditionalEffect(user,target) - return if target.fainted? || target.damageState.substitute - return if target.status != :BURN - target.pbCureStatus - end -end - - - -#=============================================================================== -# Cures the target's permanent status problems. Heals user by 1/2 of its max HP. -# (Purify) -#=============================================================================== -class PokeBattle_Move_15B < PokeBattle_HealingMove - def canSnatch?; return false; end # Because it affects a target - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.status == :NONE - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbHealAmount(user) - return (user.totalhp/2.0).round - end - - def pbEffectAgainstTarget(user,target) - target.pbCureStatus - super - end -end - - - -#=============================================================================== -# Increases the user's and its ally's Attack and Special Attack by 1 stage each, -# if they have Plus or Minus. (Gear Up) -#=============================================================================== -# NOTE: In Gen 5, this move should have a target of UserSide, while in Gen 6+ it -# should have a target of UserAndAllies. This is because, in Gen 5, this -# move shouldn't call def pbSuccessCheckAgainstTarget for each Pokémon -# currently in battle that will be affected by this move (i.e. allies -# aren't protected by their substitute/ability/etc., but they are in Gen -# 6+). We achieve this by not targeting any battlers in Gen 5, since -# pbSuccessCheckAgainstTarget is only called for targeted battlers. -class PokeBattle_Move_15C < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - @validTargets = [] - @battle.eachSameSideBattler(user) do |b| - next if !b.hasActiveAbility?([:MINUS,:PLUS]) - next if !b.pbCanRaiseStatStage?(:ATTACK,user,self) && - !b.pbCanRaiseStatStage?(:SPECIAL_ATTACK,user,self) - @validTargets.push(b) - end - if @validTargets.length==0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - return false if @validTargets.any? { |b| b.index==target.index } - return true if !target.hasActiveAbility?([:MINUS,:PLUS]) - @battle.pbDisplay(_INTL("{1}'s stats can't be raised further!", target.pbThis)) if show_message - return true - end - - def pbEffectAgainstTarget(user,target) - showAnim = true - if target.pbCanRaiseStatStage?(:ATTACK,user,self) - if target.pbRaiseStatStage(:ATTACK,1,user,showAnim) - showAnim = false - end - end - if target.pbCanRaiseStatStage?(:SPECIAL_ATTACK,user,self) - target.pbRaiseStatStage(:SPECIAL_ATTACK,1,user,showAnim) - end - end - - def pbEffectGeneral(user) - return if pbTarget(user) != :UserSide - @validTargets.each { |b| pbEffectAgainstTarget(user,b) } - end -end - - - -#=============================================================================== -# User gains stat stages equal to each of the target's positive stat stages, -# and target's positive stat stages become 0, before damage calculation. -# (Spectral Thief) -#=============================================================================== -class PokeBattle_Move_15D < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - - def pbCalcDamage(user,target,numTargets=1) - if target.hasRaisedStatStages? - pbShowAnimation(@id,user,target,1) # Stat stage-draining animation - @battle.pbDisplay(_INTL("{1} stole the target's boosted stats!",user.pbThis)) - showAnim = true - GameData::Stat.each_battle do |s| - next if target.stages[s.id] <= 0 - if user.pbCanRaiseStatStage?(s.id,user,self) - if user.pbRaiseStatStage(s.id,target.stages[s.id],user,showAnim) - showAnim = false - end - end - target.statsLowered = true - target.stages[s.id] = 0 - end - end - super - end -end - - - -#=============================================================================== -# Until the end of the next round, the user's moves will always be critical hits. -# (Laser Focus) -#=============================================================================== -class PokeBattle_Move_15E < PokeBattle_Move - def canSnatch?; return true; end - - def pbEffectGeneral(user) - user.effects[PBEffects::LaserFocus] = 2 - @battle.pbDisplay(_INTL("{1} concentrated intensely!",user.pbThis)) - end -end - - - -#=============================================================================== -# Decreases the user's Defense by 1 stage. (Clanging Scales) -#=============================================================================== -class PokeBattle_Move_15F < PokeBattle_StatDownMove - def initialize(battle,move) - super - @statDown = [:DEFENSE,1] - end -end - - - -#=============================================================================== -# Decreases the target's Attack by 1 stage. Heals user by an amount equal to the -# target's Attack stat (after applying stat stages, before this move decreases -# it). (Strength Sap) -#=============================================================================== -class PokeBattle_Move_160 < PokeBattle_Move - def healingMove?; return true; end - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - # NOTE: The official games appear to just check whether the target's Attack - # stat stage is -6 and fail if so, but I've added the "fail if target - # has Contrary and is at +6" check too for symmetry. This move still - # works even if the stat stage cannot be changed due to an ability or - # other effect. - if !@battle.moldBreaker && target.hasActiveAbility?(:CONTRARY) && - target.statStageAtMax?(:ATTACK) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - elsif target.statStageAtMin?(:ATTACK) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - # Calculate target's effective attack value - stageMul = [2,2,2,2,2,2, 2, 3,4,5,6,7,8] - stageDiv = [8,7,6,5,4,3, 2, 2,2,2,2,2,2] - atk = target.attack - atkStage = target.stages[:ATTACK]+6 - healAmt = (atk.to_f*stageMul[atkStage]/stageDiv[atkStage]).floor - # Reduce target's Attack stat - if target.pbCanLowerStatStage?(:ATTACK,user,self) - target.pbLowerStatStage(:ATTACK,1,user) - end - # Heal user - if target.hasActiveAbility?(:LIQUIDOOZE) - @battle.pbShowAbilitySplash(target) - user.pbReduceHP(healAmt) - @battle.pbDisplay(_INTL("{1} sucked up the liquid ooze!",user.pbThis)) - @battle.pbHideAbilitySplash(target) - user.pbItemHPHealCheck - elsif user.canHeal? - healAmt = (healAmt*1.3).floor if user.hasActiveItem?(:BIGROOT) - user.pbRecoverHP(healAmt) - @battle.pbDisplay(_INTL("{1}'s HP was restored.",user.pbThis)) - end - end -end - - - -#=============================================================================== -# User and target swap their Speed stats (not their stat stages). (Speed Swap) -#=============================================================================== -class PokeBattle_Move_161 < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - - def pbEffectAgainstTarget(user,target) - user.speed, target.speed = target.speed, user.speed - @battle.pbDisplay(_INTL("{1} switched Speed with its target!",user.pbThis)) - end -end - - - -#=============================================================================== -# User loses their Fire type. Fails if user is not Fire-type. (Burn Up) -#=============================================================================== -class PokeBattle_Move_162 < PokeBattle_Move - def pbMoveFailed?(user,targets) - if !user.pbHasType?(:FIRE) - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectAfterAllHits(user,target) - if !user.effects[PBEffects::BurnUp] - user.effects[PBEffects::BurnUp] = true - @battle.pbDisplay(_INTL("{1} burned itself out!",user.pbThis)) - end - end -end - - - -#=============================================================================== -# Ignores all abilities that alter this move's success or damage. -# (Moongeist Beam, Sunsteel Strike) -#=============================================================================== -class PokeBattle_Move_163 < PokeBattle_Move - def pbChangeUsageCounters(user,specialUsage) - super - @battle.moldBreaker = true if !specialUsage - end -end - - - -#=============================================================================== -# Ignores all abilities that alter this move's success or damage. This move is -# physical if user's Attack is higher than its Special Attack (after applying -# stat stages), and special otherwise. (Photon Geyser) -#=============================================================================== -class PokeBattle_Move_164 < PokeBattle_Move_163 - def initialize(battle,move) - super - @calcCategory = 1 - end - - def physicalMove?(thisType=nil); return (@calcCategory==0); end - def specialMove?(thisType=nil); return (@calcCategory==1); end - - def pbOnStartUse(user,targets) - # Calculate user's effective attacking value - stageMul = [2,2,2,2,2,2, 2, 3,4,5,6,7,8] - stageDiv = [8,7,6,5,4,3, 2, 2,2,2,2,2,2] - atk = user.attack - atkStage = user.stages[:ATTACK]+6 - realAtk = (atk.to_f*stageMul[atkStage]/stageDiv[atkStage]).floor - spAtk = user.spatk - spAtkStage = user.stages[:SPECIAL_ATTACK]+6 - realSpAtk = (spAtk.to_f*stageMul[spAtkStage]/stageDiv[spAtkStage]).floor - # Determine move's category - @calcCategory = (realAtk>realSpAtk) ? 0 : 1 - end -end - - - -#=============================================================================== -# Negates the target's ability while it remains on the field, if it has already -# performed its action this round. (Core Enforcer) -#=============================================================================== -class PokeBattle_Move_165 < PokeBattle_Move - def pbEffectAgainstTarget(user,target) - return if target.damageState.substitute || target.effects[PBEffects::GastroAcid] - return if target.unstoppableAbility? - return if @battle.choices[target.index][0]!=:UseItem && - !((@battle.choices[target.index][0]==:UseMove || - @battle.choices[target.index][0]==:Shift) && target.movedThisRound?) - target.effects[PBEffects::GastroAcid] = true - target.effects[PBEffects::Truant] = false - @battle.pbDisplay(_INTL("{1}'s Ability was suppressed!",target.pbThis)) - target.pbOnAbilityChanged(target.ability) - end -end - - - -#=============================================================================== -# Power is doubled if the user's last move failed. (Stomping Tantrum) -#=============================================================================== -class PokeBattle_Move_166 < PokeBattle_Move - def pbBaseDamage(baseDmg,user,target) - baseDmg *= 2 if user.lastRoundMoveFailed - return baseDmg - end -end - - - -#=============================================================================== -# For 5 rounds, lowers power of attacks against the user's side. Fails if -# weather is not hail. (Aurora Veil) -#=============================================================================== -class PokeBattle_Move_167 < PokeBattle_Move - def canSnatch?; return true; end - - def pbMoveFailed?(user,targets) - if user.effectiveWeather != :Hail - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - if user.pbOwnSide.effects[PBEffects::AuroraVeil]>0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - user.pbOwnSide.effects[PBEffects::AuroraVeil] = 5 - user.pbOwnSide.effects[PBEffects::AuroraVeil] = 8 if user.hasActiveItem?(:LIGHTCLAY) - @battle.pbDisplay(_INTL("{1} made {2} stronger against physical and special moves!", - @name,user.pbTeam(true))) - end -end - - - -#=============================================================================== -# User is protected against moves with the "B" flag this round. If a Pokémon -# makes contact with the user while this effect applies, that Pokémon is -# poisoned. (Baneful Bunker) -#=============================================================================== -class PokeBattle_Move_168 < PokeBattle_ProtectMove - def initialize(battle,move) - super - @effect = PBEffects::BanefulBunker - end -end - - - -#=============================================================================== -# This move's type is the same as the user's first type. (Revelation Dance) -#=============================================================================== -class PokeBattle_Move_169 < PokeBattle_Move - def pbBaseType(user) - userTypes = user.pbTypes(true) - return userTypes[0] - end -end - - - -#=============================================================================== -# This round, target becomes the target of attacks that have single targets. -# (Spotlight) -#=============================================================================== -class PokeBattle_Move_16A < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::Spotlight] = 1 - target.eachAlly do |b| - next if b.effects[PBEffects::Spotlight]0 - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - target.effects[PBEffects::Instruct] = true - end -end - - - -#=============================================================================== -# Target cannot use sound-based moves for 2 more rounds. (Throat Chop) -#=============================================================================== -class PokeBattle_Move_16C < PokeBattle_Move - def pbAdditionalEffect(user,target) - return if target.fainted? || target.damageState.substitute - @battle.pbDisplay(_INTL("The effects of {1} prevent {2} from using certain moves!", - @name,target.pbThis(true))) if target.effects[PBEffects::ThroatChop]==0 - target.effects[PBEffects::ThroatChop] = 3 - end -end - - - -#=============================================================================== -# Heals user by 1/2 of its max HP, or 2/3 of its max HP in a sandstorm. (Shore Up) -#=============================================================================== -class PokeBattle_Move_16D < PokeBattle_HealingMove - def pbHealAmount(user) - return (user.totalhp * 2 / 3.0).round if user.effectiveWeather == :Sandstorm - return (user.totalhp / 2.0).round - end -end - - - -#=============================================================================== -# Heals target by 1/2 of its max HP, or 2/3 of its max HP in Grassy Terrain. -# (Floral Healing) -#=============================================================================== -class PokeBattle_Move_16E < PokeBattle_Move - def healingMove?; return true; end - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if target.hp==target.totalhp - @battle.pbDisplay(_INTL("{1}'s HP is full!", target.pbThis)) if show_message - return true - elsif !target.canHeal? - @battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis)) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user,target) - hpGain = (target.totalhp/2.0).round - hpGain = (target.totalhp*2/3.0).round if @battle.field.terrain == :Grassy - target.pbRecoverHP(hpGain) - @battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis)) - end -end - - - -#=============================================================================== -# Damages target if target is a foe, or heals target by 1/2 of its max HP if -# target is an ally. (Pollen Puff) -#=============================================================================== -class PokeBattle_Move_16F < PokeBattle_Move - def pbTarget(user) - return GameData::Target.get(:NearFoe) if user.effects[PBEffects::HealBlock]>0 - return super - end - - def pbOnStartUse(user,targets) - @healing = false - @healing = !user.opposes?(targets[0]) if targets.length>0 - end - - def pbFailsAgainstTarget?(user, target, show_message) - return false if !@healing - if target.effects[PBEffects::Substitute]>0 && !ignoresSubstitute?(user) - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - if !target.canHeal? - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbDamagingMove? - return false if @healing - return super - end - - def pbEffectAgainstTarget(user,target) - return if !@healing - target.pbRecoverHP(target.totalhp/2) - @battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis)) - end - - def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) - hitNum = 1 if @healing # Healing anim - super - end -end - - - -#=============================================================================== -# Damages user by 1/2 of its max HP, even if this move misses. (Mind Blown) -#=============================================================================== -class PokeBattle_Move_170 < PokeBattle_Move - def worksWithNoTargets?; return true; end - - def pbMoveFailed?(user,targets) - if !@battle.moldBreaker - bearer = @battle.pbCheckGlobalAbility(:DAMP) - if bearer!=nil - @battle.pbShowAbilitySplash(bearer) - if PokeBattle_SceneConstants::USE_ABILITY_SPLASH - @battle.pbDisplay(_INTL("{1} cannot use {2}!",user.pbThis,@name)) - else - @battle.pbDisplay(_INTL("{1} cannot use {2} because of {3}'s {4}!", - user.pbThis,@name,bearer.pbThis(true),bearer.abilityName)) - end - @battle.pbHideAbilitySplash(bearer) - return true - end - end - return false - end - - def pbSelfKO(user) - return if !user.takesIndirectDamage? - user.pbReduceHP((user.totalhp/2.0).round,false) - user.pbItemHPHealCheck - end -end - - - -#=============================================================================== -# Fails if user has not been hit by an opponent's physical move this round. -# (Shell Trap) -#=============================================================================== -class PokeBattle_Move_171 < PokeBattle_Move - def pbDisplayChargeMessage(user) - user.effects[PBEffects::ShellTrap] = true - @battle.pbCommonAnimation("ShellTrap",user) - @battle.pbDisplay(_INTL("{1} set a shell trap!",user.pbThis)) - end - - def pbDisplayUseMessage(user) - super if user.tookPhysicalHit - end - - def pbMoveFailed?(user,targets) - if !user.effects[PBEffects::ShellTrap] - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - if !user.tookPhysicalHit - @battle.pbDisplay(_INTL("{1}'s shell trap didn't work!",user.pbThis)) - return true - end - return false - end -end - - - -#=============================================================================== -# If a Pokémon makes contact with the user before it uses this move, the -# attacker is burned. (Beak Blast) -#=============================================================================== -class PokeBattle_Move_172 < PokeBattle_Move - def pbDisplayChargeMessage(user) - user.effects[PBEffects::BeakBlast] = true - @battle.pbCommonAnimation("BeakBlast",user) - @battle.pbDisplay(_INTL("{1} started heating up its beak!",user.pbThis)) - end -end - - - -#=============================================================================== -# For 5 rounds, creates a psychic terrain which boosts Psychic-type moves and -# prevents Pokémon from being hit by >0 priority moves. Affects non-airborne -# Pokémon only. (Psychic Terrain) -#=============================================================================== -class PokeBattle_Move_173 < PokeBattle_Move - def pbMoveFailed?(user,targets) - if @battle.field.terrain == :Psychic - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - @battle.pbStartTerrain(user, :Psychic) - end -end - - - -#=============================================================================== -# Fails if this isn't the user's first turn. (First Impression) -#=============================================================================== -class PokeBattle_Move_174 < PokeBattle_Move - def pbMoveFailed?(user,targets) - if user.turnCount > 1 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end -end - - - -#=============================================================================== -# Hits twice. Causes the target to flinch. Does double damage and has perfect -# accuracy if the target is Minimized. (Double Iron Bash) -#=============================================================================== -class PokeBattle_Move_175 < PokeBattle_FlinchMove - def multiHitMove?; return true; end - def pbNumHits(user,targets); return 2; end - def tramplesMinimize?(param=1); return Settings::MECHANICS_GENERATION <= 7; end -end - - - -# NOTE: If you're inventing new move effects, use function code 176 and onwards. -# Actually, you might as well use high numbers like 500+ (up to FFFF), -# just to make sure later additions to Essentials don't clash with your -# new effects. diff --git a/Data/Scripts/011_Battle/002_Move/008_MoveEffects_MoveAttributes.rb b/Data/Scripts/011_Battle/002_Move/008_MoveEffects_MoveAttributes.rb new file mode 100644 index 000000000..c70db3ecb --- /dev/null +++ b/Data/Scripts/011_Battle/002_Move/008_MoveEffects_MoveAttributes.rb @@ -0,0 +1,1719 @@ +#=============================================================================== +# Inflicts a fixed 20HP damage. (Sonic Boom) +#=============================================================================== +class PokeBattle_Move_FixedDamage20 < PokeBattle_FixedDamageMove + def pbFixedDamage(user,target) + return 20 + end +end + +#=============================================================================== +# Inflicts a fixed 40HP damage. (Dragon Rage) +#=============================================================================== +class PokeBattle_Move_FixedDamage40 < PokeBattle_FixedDamageMove + def pbFixedDamage(user,target) + return 40 + end +end + +#=============================================================================== +# Halves the target's current HP. (Nature's Madness, Super Fang) +#=============================================================================== +class PokeBattle_Move_FixedDamageHalfTargetHP < PokeBattle_FixedDamageMove + def pbFixedDamage(user,target) + return (target.hp/2.0).round + end +end + +#=============================================================================== +# Inflicts damage equal to the user's level. (Night Shade, Seismic Toss) +#=============================================================================== +class PokeBattle_Move_FixedDamageUserLevel < PokeBattle_FixedDamageMove + def pbFixedDamage(user,target) + return user.level + end +end + +#=============================================================================== +# Inflicts damage between 0.5 and 1.5 times the user's level. (Psywave) +#=============================================================================== +class PokeBattle_Move_FixedDamageUserLevelRandom < PokeBattle_FixedDamageMove + def pbFixedDamage(user,target) + min = (user.level/2).floor + max = (user.level*3/2).floor + return min+@battle.pbRandom(max-min+1) + end +end + +#=============================================================================== +# Inflicts damage to bring the target's HP down to equal the user's HP. (Endeavor) +#=============================================================================== +class PokeBattle_Move_LowerTargetHPToUserHP < PokeBattle_FixedDamageMove + def pbFailsAgainstTarget?(user, target, show_message) + if user.hp>=target.hp + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbNumHits(user,targets); return 1; end + + def pbFixedDamage(user,target) + return target.hp-user.hp + end +end + +#=============================================================================== +# OHKO. Accuracy increases by difference between levels of user and target. +#=============================================================================== +class PokeBattle_Move_OHKO < PokeBattle_FixedDamageMove + def pbFailsAgainstTarget?(user, target, show_message) + if target.level>user.level + @battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis)) if show_message + return true + end + if target.hasActiveAbility?(:STURDY) && !@battle.moldBreaker + if show_message + @battle.pbShowAbilitySplash(target) + if PokeBattle_SceneConstants::USE_ABILITY_SPLASH + @battle.pbDisplay(_INTL("But it failed to affect {1}!", target.pbThis(true))) + else + @battle.pbDisplay(_INTL("But it failed to affect {1} because of its {2}!", + target.pbThis(true), target.abilityName)) + end + @battle.pbHideAbilitySplash(target) + end + return true + end + return false + end + + def pbAccuracyCheck(user,target) + acc = @accuracy+user.level-target.level + return @battle.pbRandom(100)0 + hitAlly.each do |b| + @battle.pbDisplay(_INTL("The bursting flame hit {1}!", + @battle.battlers[b[0]].pbThis(true))) + end + end + switchedAlly = [] + hitAlly.each do |b| + @battle.battlers[b[0]].pbItemHPHealCheck + if @battle.battlers[b[0]].pbAbilitiesOnDamageTaken(b[1]) + switchedAlly.push(@battle.battlers[b[0]]) + end + end + switchedAlly.each { |b| b.pbEffectsOnSwitchIn(true) } + end +end + +#=============================================================================== +# Power increases with the user's HP. (Eruption, Water Spout) +#=============================================================================== +class PokeBattle_Move_PowerHigherWithUserHP < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + return [150*user.hp/user.totalhp,1].max + end +end + +#=============================================================================== +# Power increases the less HP the user has. (Flail, Reversal) +#=============================================================================== +class PokeBattle_Move_PowerLowerWithUserHP < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + ret = 20 + n = 48*user.hp/user.totalhp + if n<2 + ret = 200 + elsif n<5 + ret = 150 + elsif n<10 + ret = 100 + elsif n<17 + ret = 80 + elsif n<33 + ret = 40 + end + return ret + end +end + +#=============================================================================== +# Power increases with the target's HP. (Crush Grip, Wring Out) +#=============================================================================== +class PokeBattle_Move_PowerHigherWithTargetHP < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + return [120*target.hp/target.totalhp,1].max + end +end + +#=============================================================================== +# Power increases with the user's happiness. (Return) +#=============================================================================== +class PokeBattle_Move_PowerHigherWithUserHappiness < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + return [(user.happiness*2/5).floor,1].max + end +end + +#=============================================================================== +# Power decreases with the user's happiness. (Frustration) +#=============================================================================== +class PokeBattle_Move_PowerLowerWithUserHappiness < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + return [((255-user.happiness)*2/5).floor,1].max + end +end + +#=============================================================================== +# Power increases with the user's positive stat changes (ignores negative ones). +# (Power Trip, Stored Power) +#=============================================================================== +class PokeBattle_Move_PowerHigherWithUserPositiveStatStages < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + mult = 1 + GameData::Stat.each_battle { |s| mult += user.stages[s.id] if user.stages[s.id] > 0 } + return 20 * mult + end +end + +#=============================================================================== +# Power increases with the target's positive stat changes (ignores negative ones). +# (Punishment) +#=============================================================================== +class PokeBattle_Move_PowerHigherWithTargetPositiveStatStages < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + mult = 3 + GameData::Stat.each_battle { |s| mult += target.stages[s.id] if target.stages[s.id] > 0 } + return [20 * mult, 200].min + end +end + +#=============================================================================== +# Power increases the quicker the user is than the target. (Electro Ball) +#=============================================================================== +class PokeBattle_Move_PowerHigherWithUserFasterThanTarget < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + ret = 40 + n = user.pbSpeed/target.pbSpeed + if n>=4 + ret = 150 + elsif n>=3 + ret = 120 + elsif n>=2 + ret = 80 + elsif n>=1 + ret = 60 + end + return ret + end +end + +#=============================================================================== +# Power increases the quicker the target is than the user. (Gyro Ball) +#=============================================================================== +class PokeBattle_Move_PowerHigherWithTargetFasterThanUser < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + return [[(25*target.pbSpeed/user.pbSpeed).floor,150].min,1].max + end +end + +#=============================================================================== +# Power increases the less PP this move has. (Trump Card) +#=============================================================================== +class PokeBattle_Move_PowerHigherWithLessPP < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + dmgs = [200,80,60,50,40] + ppLeft = [@pp,dmgs.length-1].min # PP is reduced before the move is used + return dmgs[ppLeft] + end +end + +#=============================================================================== +# Power increases the heavier the target is. (Grass Knot, Low Kick) +#=============================================================================== +class PokeBattle_Move_PowerHigherWithTargetWeight < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + ret = 20 + weight = target.pbWeight + if weight>=2000 + ret = 120 + elsif weight>=1000 + ret = 100 + elsif weight>=500 + ret = 80 + elsif weight>=250 + ret = 60 + elsif weight>=100 + ret = 40 + end + return ret + end +end + +#=============================================================================== +# Power increases the heavier the user is than the target. (Heat Crash, Heavy Slam) +# Does double damage and has perfect accuracy if the target is Minimized. +#=============================================================================== +class PokeBattle_Move_PowerHigherWithUserHeavierThanTarget < PokeBattle_Move + def tramplesMinimize?(param=1) + return true if Settings::MECHANICS_GENERATION >= 7 # Perfect accuracy and double damage + return super + end + + def pbBaseDamage(baseDmg,user,target) + ret = 40 + n = (user.pbWeight/target.pbWeight).floor + if n>=5 + ret = 120 + elsif n>=4 + ret = 100 + elsif n>=3 + ret = 80 + elsif n>=2 + ret = 60 + end + return ret + end +end + +#=============================================================================== +# Power doubles for each consecutive use. (Fury Cutter) +#=============================================================================== +class PokeBattle_Move_PowerHigherWithConsecutiveUse < PokeBattle_Move + def pbChangeUsageCounters(user,specialUsage) + oldVal = user.effects[PBEffects::FuryCutter] + super + maxMult = 1 + while (@baseDamage<<(maxMult-1))<160 + maxMult += 1 # 1-4 for base damage of 20, 1-3 for base damage of 40 + end + user.effects[PBEffects::FuryCutter] = (oldVal>=maxMult) ? maxMult : oldVal+1 + end + + def pbBaseDamage(baseDmg,user,target) + return baseDmg<<(user.effects[PBEffects::FuryCutter]-1) + end +end + +#=============================================================================== +# Power is multiplied by the number of consecutive rounds in which this move was +# used by any Pokémon on the user's side. (Echoed Voice) +#=============================================================================== +class PokeBattle_Move_PowerHigherWithConsecutiveUseOnUserSide < PokeBattle_Move + def pbChangeUsageCounters(user,specialUsage) + oldVal = user.pbOwnSide.effects[PBEffects::EchoedVoiceCounter] + super + if !user.pbOwnSide.effects[PBEffects::EchoedVoiceUsed] + user.pbOwnSide.effects[PBEffects::EchoedVoiceCounter] = (oldVal>=5) ? 5 : oldVal+1 + end + user.pbOwnSide.effects[PBEffects::EchoedVoiceUsed] = true + end + + def pbBaseDamage(baseDmg,user,target) + return baseDmg*user.pbOwnSide.effects[PBEffects::EchoedVoiceCounter] # 1-5 + end +end + +#=============================================================================== +# Power is chosen at random. Power is doubled if the target is using Dig. Hits +# some semi-invulnerable targets. (Magnitude) +#=============================================================================== +class PokeBattle_Move_RandomPowerDoublePowerIfTargetUnderground < PokeBattle_Move + def hitsDiggingTargets?; return true; end + + def pbOnStartUse(user,targets) + baseDmg = [10,30,50,70,90,110,150] + magnitudes = [ + 4, + 5,5, + 6,6,6,6, + 7,7,7,7,7,7, + 8,8,8,8, + 9,9, + 10 + ] + magni = magnitudes[@battle.pbRandom(magnitudes.length)] + @magnitudeDmg = baseDmg[magni-4] + @battle.pbDisplay(_INTL("Magnitude {1}!",magni)) + end + + def pbBaseDamage(baseDmg,user,target) + return @magnitudeDmg + end + + def pbModifyDamage(damageMult,user,target) + damageMult *= 2 if target.inTwoTurnAttack?("TwoTurnAttackInvulnerableUnderground") + damageMult /= 2 if @battle.field.terrain == :Grassy + return damageMult + end +end + +#=============================================================================== +# Power is doubled if the target's HP is down to 1/2 or less. (Brine) +#=============================================================================== +class PokeBattle_Move_DoublePowerIfTargetHPLessThanHalf < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + baseDmg *= 2 if target.hp<=target.totalhp/2 + return baseDmg + end +end + +#=============================================================================== +# Power is doubled if the user is burned, poisoned or paralyzed. (Facade) +# Burn's halving of Attack is negated (new mechanics). +#=============================================================================== +class PokeBattle_Move_DoublePowerIfUserPoisonedBurnedParalyzed < PokeBattle_Move + def damageReducedByBurn?; return Settings::MECHANICS_GENERATION <= 5; end + + def pbBaseDamage(baseDmg,user,target) + baseDmg *= 2 if user.poisoned? || user.burned? || user.paralyzed? + return baseDmg + end +end + +#=============================================================================== +# Power is doubled if the target is asleep. Wakes the target up. (Wake-Up Slap) +#=============================================================================== +class PokeBattle_Move_DoublePowerIfTargetAsleepCureTarget < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + if target.asleep? && + (target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user)) + baseDmg *= 2 + end + return baseDmg + end + + def pbEffectAfterAllHits(user,target) + return if target.fainted? + return if target.damageState.unaffected || target.damageState.substitute + return if target.status != :SLEEP + target.pbCureStatus + end +end + +#=============================================================================== +# Power is doubled if the target is poisoned. (Venoshock) +#=============================================================================== +class PokeBattle_Move_DoublePowerIfTargetPoisoned < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + if target.poisoned? && + (target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user)) + baseDmg *= 2 + end + return baseDmg + end +end + + + +#=============================================================================== +# Power is doubled if the target is paralyzed. Cures the target of paralysis. +# (Smelling Salts) +#=============================================================================== +class PokeBattle_Move_DoublePowerIfTargetParalyzedCureTarget < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + if target.paralyzed? && + (target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user)) + baseDmg *= 2 + end + return baseDmg + end + + def pbEffectAfterAllHits(user,target) + return if target.fainted? + return if target.damageState.unaffected || target.damageState.substitute + return if target.status != :PARALYSIS + target.pbCureStatus + end +end + +#=============================================================================== +# Power is doubled if the target has a status problem. (Hex) +#=============================================================================== +class PokeBattle_Move_DoublePowerIfTargetStatusProblem < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + if target.pbHasAnyStatus? && + (target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user)) + baseDmg *= 2 + end + return baseDmg + end +end + +#=============================================================================== +# Power is doubled if the user has no held item. (Acrobatics) +#=============================================================================== +class PokeBattle_Move_DoublePowerIfUserHasNoItem < PokeBattle_Move + def pbBaseDamageMultiplier(damageMult,user,target) + damageMult *= 2 if !user.item || user.effects[PBEffects::GemConsumed] + return damageMult + end +end + +#=============================================================================== +# Power is doubled if the target is using Dive. Hits some semi-invulnerable +# targets. (Surf) +#=============================================================================== +class PokeBattle_Move_DoublePowerIfTargetUnderwater < PokeBattle_Move + def hitsDivingTargets?; return true; end + + def pbModifyDamage(damageMult,user,target) + damageMult *= 2 if target.inTwoTurnAttack?("TwoTurnAttackInvulnerableUnderwater") + return damageMult + end +end + +#=============================================================================== +# Power is doubled if the target is using Dig. Power is halved if Grassy Terrain +# is in effect. Hits some semi-invulnerable targets. (Earthquake) +#=============================================================================== +class PokeBattle_Move_DoublePowerIfTargetUnderground < PokeBattle_Move + def hitsDiggingTargets?; return true; end + + def pbModifyDamage(damageMult,user,target) + damageMult *= 2 if target.inTwoTurnAttack?("TwoTurnAttackInvulnerableUnderground") + damageMult /= 2 if @battle.field.terrain == :Grassy + return damageMult + end +end + +#=============================================================================== +# Power is doubled if the target is using Bounce, Fly or Sky Drop. Hits some +# semi-invulnerable targets. (Gust) +#=============================================================================== +class PokeBattle_Move_DoublePowerIfTargetInSky < PokeBattle_Move + def hitsFlyingTargets?; return true; end + + def pbBaseDamage(baseDmg,user,target) + baseDmg *= 2 if target.inTwoTurnAttack?("TwoTurnAttackInvulnerableInSky", + "TwoTurnAttackInvulnerableInSkyParalyzeTarget", + "TwoTurnAttackInvulnerableInSkyTargetCannotAct") || + target.effects[PBEffects::SkyDrop]>=0 + return baseDmg + end +end + +#=============================================================================== +# Power is doubled if Electric Terrain applies. (Rising Voltage) +#=============================================================================== +class PokeBattle_Move_DoublePowerInElectricTerrain < PokeBattle_Move + def pbBaseDamage(baseDmg, user, target) + baseDmg *= 2 if @battle.field.terrain == :Electric && target.affectedByTerrain? + return baseDmg + end +end + +#=============================================================================== +# Power is doubled if the user's last move failed. (Stomping Tantrum) +#=============================================================================== +class PokeBattle_Move_DoublePowerIfUserLastMoveFailed < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + baseDmg *= 2 if user.lastRoundMoveFailed + return baseDmg + end +end + +#=============================================================================== +# Power is doubled if a user's teammate fainted last round. (Retaliate) +#=============================================================================== +class PokeBattle_Move_DoublePowerIfAllyFaintedLastTurn < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + lrf = user.pbOwnSide.effects[PBEffects::LastRoundFainted] + baseDmg *= 2 if lrf>=0 && lrf==@battle.turnCount-1 + return baseDmg + end +end + +#=============================================================================== +# Power is doubled if the user has lost HP due to the target's move this round. +# (Avalanche, Revenge) +#=============================================================================== +class PokeBattle_Move_DoublePowerIfUserLostHPThisTurn < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + baseDmg *= 2 if user.lastAttacker.include?(target.index) + return baseDmg + end +end + +#=============================================================================== +# Power is doubled if the target has already lost HP this round. (Assurance) +#=============================================================================== +class PokeBattle_Move_DoublePowerIfTargetLostHPThisTurn < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + baseDmg *= 2 if target.tookDamage + return baseDmg + end +end + +#=============================================================================== +# Power is doubled if any of the user's stats were lowered this round. (Lash Out) +#=============================================================================== +class PokeBattle_Move_DoublePowerIfUserStatsLoweredThisTurn < PokeBattle_Move + def pbBaseDamage(baseDmg, user, target) + baseDmg *= 2 if user.statsLowered + return baseDmg + end +end + +#=============================================================================== +# Power is doubled if the target has already moved this round. (Payback) +#=============================================================================== +class PokeBattle_Move_DoublePowerIfTargetActed < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + if @battle.choices[target.index][0]!=:None && + ((@battle.choices[target.index][0]!=:UseMove && + @battle.choices[target.index][0]!=:Shift) || target.movedThisRound?) + baseDmg *= 2 + end + return baseDmg + end +end + +#=============================================================================== +# Power is doubled if the user moves before the target, or if the target +# switched in this round. (Bolt Beak, Fishious Rend) +#=============================================================================== +class PokeBattle_Move_DoublePowerIfTargetNotActed < PokeBattle_Move + def pbBaseDamage(baseDmg, user, target) + if @battle.choices[target.index][0] == :None || # Switched in + ([:UseMove, :Shift].include?(@battle.choices[target.index][0]) && !target.movedThisRound?) + baseDmg *= 2 + end + return baseDmg + end +end + +#=============================================================================== +# This attack is always a critical hit. (Frost Breath, Storm Throw) +#=============================================================================== +class PokeBattle_Move_AlwaysCriticalHit < PokeBattle_Move + def pbCritialOverride(user,target); return 1; end +end + +#=============================================================================== +# Until the end of the next round, the user's moves will always be critical hits. +# (Laser Focus) +#=============================================================================== +class PokeBattle_Move_EnsureNextCriticalHit < PokeBattle_Move + def canSnatch?; return true; end + + def pbEffectGeneral(user) + user.effects[PBEffects::LaserFocus] = 2 + @battle.pbDisplay(_INTL("{1} concentrated intensely!",user.pbThis)) + end +end + +#=============================================================================== +# For 5 rounds, foes' attacks cannot become critical hits. (Lucky Chant) +#=============================================================================== +class PokeBattle_Move_StartPreventCriticalHitsAgainstUserSide < PokeBattle_Move + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if user.pbOwnSide.effects[PBEffects::LuckyChant]>0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.pbOwnSide.effects[PBEffects::LuckyChant] = 5 + @battle.pbDisplay(_INTL("The Lucky Chant shielded {1} from critical hits!",user.pbTeam(true))) + end +end + +#=============================================================================== +# If target would be KO'd by this attack, it survives with 1HP instead. +# (False Swipe, Hold Back) +#=============================================================================== +class PokeBattle_Move_CannotMakeTargetFaint < PokeBattle_Move + def nonLethal?(user,target); return true; end +end + +#=============================================================================== +# If user would be KO'd this round, it survives with 1HP instead. (Endure) +#=============================================================================== +class PokeBattle_Move_UserEnduresFaintingThisTurn < PokeBattle_ProtectMove + def initialize(battle,move) + super + @effect = PBEffects::Endure + end + + def pbProtectMessage(user) + @battle.pbDisplay(_INTL("{1} braced itself!",user.pbThis)) + end +end + +#=============================================================================== +# Weakens Electric attacks. (Mud Sport) +#=============================================================================== +class PokeBattle_Move_StartWeakenElectricMoves < PokeBattle_Move + def pbMoveFailed?(user,targets) + if Settings::MECHANICS_GENERATION >= 6 + if @battle.field.effects[PBEffects::MudSportField]>0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + else + @battle.eachBattler do |b| + next if !b.effects[PBEffects::MudSport] + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + end + return false + end + + def pbEffectGeneral(user) + if Settings::MECHANICS_GENERATION >= 6 + @battle.field.effects[PBEffects::MudSportField] = 5 + else + user.effects[PBEffects::MudSport] = true + end + @battle.pbDisplay(_INTL("Electricity's power was weakened!")) + end +end + +#=============================================================================== +# Weakens Fire attacks. (Water Sport) +#=============================================================================== +class PokeBattle_Move_StartWeakenFireMoves < PokeBattle_Move + def pbMoveFailed?(user,targets) + if Settings::MECHANICS_GENERATION >= 6 + if @battle.field.effects[PBEffects::WaterSportField]>0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + else + @battle.eachBattler do |b| + next if !b.effects[PBEffects::WaterSport] + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + end + return false + end + + def pbEffectGeneral(user) + if Settings::MECHANICS_GENERATION >= 6 + @battle.field.effects[PBEffects::WaterSportField] = 5 + else + user.effects[PBEffects::WaterSport] = true + end + @battle.pbDisplay(_INTL("Fire's power was weakened!")) + end +end + +#=============================================================================== +# For 5 rounds, lowers power of physical attacks against the user's side. +# (Reflect) +#=============================================================================== +class PokeBattle_Move_StartWeakenPhysicalDamageAgainstUserSide < PokeBattle_Move + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if user.pbOwnSide.effects[PBEffects::Reflect]>0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.pbOwnSide.effects[PBEffects::Reflect] = 5 + user.pbOwnSide.effects[PBEffects::Reflect] = 8 if user.hasActiveItem?(:LIGHTCLAY) + @battle.pbDisplay(_INTL("{1} raised {2}'s Defense!",@name,user.pbTeam(true))) + end +end + +#=============================================================================== +# For 5 rounds, lowers power of special attacks against the user's side. (Light Screen) +#=============================================================================== +class PokeBattle_Move_StartWeakenSpecialDamageAgainstUserSide < PokeBattle_Move + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if user.pbOwnSide.effects[PBEffects::LightScreen]>0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.pbOwnSide.effects[PBEffects::LightScreen] = 5 + user.pbOwnSide.effects[PBEffects::LightScreen] = 8 if user.hasActiveItem?(:LIGHTCLAY) + @battle.pbDisplay(_INTL("{1} raised {2}'s Special Defense!",@name,user.pbTeam(true))) + end +end + +#=============================================================================== +# For 5 rounds, lowers power of attacks against the user's side. Fails if +# weather is not hail. (Aurora Veil) +#=============================================================================== +class PokeBattle_Move_StartWeakenDamageAgainstUserSideIfHail < PokeBattle_Move + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if user.effectiveWeather != :Hail + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + if user.pbOwnSide.effects[PBEffects::AuroraVeil]>0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.pbOwnSide.effects[PBEffects::AuroraVeil] = 5 + user.pbOwnSide.effects[PBEffects::AuroraVeil] = 8 if user.hasActiveItem?(:LIGHTCLAY) + @battle.pbDisplay(_INTL("{1} made {2} stronger against physical and special moves!", + @name,user.pbTeam(true))) + end +end + +#=============================================================================== +# Ends the opposing side's Light Screen, Reflect and Aurora Break. (Brick Break, +# Psychic Fangs) +#=============================================================================== +class PokeBattle_Move_RemoveScreens < PokeBattle_Move + def ignoresReflect?; return true; end + + def pbEffectGeneral(user) + if user.pbOpposingSide.effects[PBEffects::LightScreen]>0 + user.pbOpposingSide.effects[PBEffects::LightScreen] = 0 + @battle.pbDisplay(_INTL("{1}'s Light Screen wore off!",user.pbOpposingTeam)) + end + if user.pbOpposingSide.effects[PBEffects::Reflect]>0 + user.pbOpposingSide.effects[PBEffects::Reflect] = 0 + @battle.pbDisplay(_INTL("{1}'s Reflect wore off!",user.pbOpposingTeam)) + end + if user.pbOpposingSide.effects[PBEffects::AuroraVeil]>0 + user.pbOpposingSide.effects[PBEffects::AuroraVeil] = 0 + @battle.pbDisplay(_INTL("{1}'s Aurora Veil wore off!",user.pbOpposingTeam)) + end + end + + def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) + if user.pbOpposingSide.effects[PBEffects::LightScreen]>0 || + user.pbOpposingSide.effects[PBEffects::Reflect]>0 || + user.pbOpposingSide.effects[PBEffects::AuroraVeil]>0 + hitNum = 1 # Wall-breaking anim + end + super + end +end + +#=============================================================================== +# User is protected against moves with the "B" flag this round. (Detect, Protect) +#=============================================================================== +class PokeBattle_Move_ProtectUser < PokeBattle_ProtectMove + def initialize(battle,move) + super + @effect = PBEffects::Protect + end +end + +#=============================================================================== +# User is protected against moves with the "B" flag this round. If a Pokémon +# makes contact with the user while this effect applies, that Pokémon is +# poisoned. (Baneful Bunker) +#=============================================================================== +class PokeBattle_Move_ProtectUserBanefulBunker < PokeBattle_ProtectMove + def initialize(battle,move) + super + @effect = PBEffects::BanefulBunker + end +end + +#=============================================================================== +# User is protected against damaging moves this round. Decreases the Attack of +# the user of a stopped contact move by 2 stages. (King's Shield) +#=============================================================================== +class PokeBattle_Move_ProtectUserFromDamagingMovesKingsShield < PokeBattle_ProtectMove + def initialize(battle,move) + super + @effect = PBEffects::KingsShield + end +end + +#=============================================================================== +# For the rest of this round, the user avoids all damaging moves that would hit +# it. If a move that makes contact is stopped by this effect, decreases the +# Defense of the Pokémon using that move by 2 stages. Contributes to Protect's +# counter. (Obstruct) +#=============================================================================== +class PokeBattle_Move_ProtectUserFromDamagingMovesObstruct < PokeBattle_ProtectMove + def initialize(battle, move) + super + @effect = PBEffects::Obstruct + end +end + +#=============================================================================== +# User is protected against moves that target it this round. Damages the user of +# a stopped contact move by 1/8 of its max HP. (Spiky Shield) +#=============================================================================== +class PokeBattle_Move_ProtectUserFromTargetingMovesSpikyShield < PokeBattle_ProtectMove + def initialize(battle,move) + super + @effect = PBEffects::SpikyShield + end +end + +#=============================================================================== +# This round, the user's side is unaffected by damaging moves. (Mat Block) +#=============================================================================== +class PokeBattle_Move_ProtectUserSideFromDamagingMovesIfUserFirstTurn < PokeBattle_Move + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if user.turnCount > 1 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return true if pbMoveFailedLastInRound?(user) + return false + end + + def pbEffectGeneral(user) + user.pbOwnSide.effects[PBEffects::MatBlock] = true + @battle.pbDisplay(_INTL("{1} intends to flip up a mat and block incoming attacks!",user.pbThis)) + end +end + +#=============================================================================== +# User's side is protected against status moves this round. (Crafty Shield) +#=============================================================================== +class PokeBattle_Move_ProtectUserSideFromStatusMoves < PokeBattle_Move + def pbMoveFailed?(user,targets) + if user.pbOwnSide.effects[PBEffects::CraftyShield] + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return true if pbMoveFailedLastInRound?(user) + return false + end + + def pbEffectGeneral(user) + user.pbOwnSide.effects[PBEffects::CraftyShield] = true + @battle.pbDisplay(_INTL("Crafty Shield protected {1}!",user.pbTeam(true))) + end +end + +#=============================================================================== +# User's side is protected against moves with priority greater than 0 this round. +# (Quick Guard) +#=============================================================================== +class PokeBattle_Move_ProtectUserSideFromPriorityMoves < PokeBattle_ProtectMove + def canSnatch?; return true; end + + def initialize(battle,move) + super + @effect = PBEffects::QuickGuard + @sidedEffect = true + end +end + +#=============================================================================== +# User's side is protected against moves that target multiple battlers this round. +# (Wide Guard) +#=============================================================================== +class PokeBattle_Move_ProtectUserSideFromMultiTargetDamagingMoves < PokeBattle_ProtectMove + def canSnatch?; return true; end + + def initialize(battle,move) + super + @effect = PBEffects::WideGuard + @sidedEffect = true + end +end + +#=============================================================================== +# Ends target's protections immediately. (Feint) +#=============================================================================== +class PokeBattle_Move_RemoveProtections < PokeBattle_Move + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::BanefulBunker] = false + target.effects[PBEffects::KingsShield] = false + target.effects[PBEffects::Obstruct] = false + target.effects[PBEffects::Protect] = false + target.effects[PBEffects::SpikyShield] = false + target.pbOwnSide.effects[PBEffects::CraftyShield] = false + target.pbOwnSide.effects[PBEffects::MatBlock] = false + target.pbOwnSide.effects[PBEffects::QuickGuard] = false + target.pbOwnSide.effects[PBEffects::WideGuard] = false + end +end + +#=============================================================================== +# Ends target's protections immediately. (Hyperspace Hole) +#=============================================================================== +class PokeBattle_Move_RemoveProtectionsBypassSubstitute < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::BanefulBunker] = false + target.effects[PBEffects::KingsShield] = false + target.effects[PBEffects::Obstruct] = false + target.effects[PBEffects::Protect] = false + target.effects[PBEffects::SpikyShield] = false + target.pbOwnSide.effects[PBEffects::CraftyShield] = false + target.pbOwnSide.effects[PBEffects::MatBlock] = false + target.pbOwnSide.effects[PBEffects::QuickGuard] = false + target.pbOwnSide.effects[PBEffects::WideGuard] = false + end +end + +#=============================================================================== +# Decreases the user's Defense by 1 stage. Ends target's protections +# immediately. (Hyperspace Fury) +#=============================================================================== +class PokeBattle_Move_HoopaRemoveProtectionsBypassSubstituteLowerUserDef1 < PokeBattle_StatDownMove + def ignoresSubstitute?(user); return true; end + + def initialize(battle,move) + super + @statDown = [:DEFENSE,1] + end + + def pbMoveFailed?(user,targets) + if !user.isSpecies?(:HOOPA) + @battle.pbDisplay(_INTL("But {1} can't use the move!",user.pbThis(true))) + return true + elsif user.form!=1 + @battle.pbDisplay(_INTL("But {1} can't use it the way it is now!",user.pbThis(true))) + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::BanefulBunker] = false + target.effects[PBEffects::KingsShield] = false + target.effects[PBEffects::Obstruct] = false + target.effects[PBEffects::Protect] = false + target.effects[PBEffects::SpikyShield] = false + target.pbOwnSide.effects[PBEffects::CraftyShield] = false + target.pbOwnSide.effects[PBEffects::MatBlock] = false + target.pbOwnSide.effects[PBEffects::QuickGuard] = false + target.pbOwnSide.effects[PBEffects::WideGuard] = false + end +end + +#=============================================================================== +# User takes recoil damage equal to 1/4 of the damage this move dealt. +#=============================================================================== +class PokeBattle_Move_RecoilQuarterOfDamageDealt < PokeBattle_RecoilMove + def pbRecoilDamage(user,target) + return (target.damageState.totalHPLost/4.0).round + end +end + +#=============================================================================== +# User takes recoil damage equal to 1/3 of the damage this move dealt. +#=============================================================================== +class PokeBattle_Move_RecoilThirdOfDamageDealt < PokeBattle_RecoilMove + def pbRecoilDamage(user,target) + return (target.damageState.totalHPLost/3.0).round + end +end + +#=============================================================================== +# User takes recoil damage equal to 1/3 of the damage this move dealt. +# May paralyze the target. (Volt Tackle) +#=============================================================================== +class PokeBattle_Move_RecoilThirdOfDamageDealtParalyzeTarget < PokeBattle_RecoilMove + def pbRecoilDamage(user,target) + return (target.damageState.totalHPLost/3.0).round + end + + def pbAdditionalEffect(user,target) + return if target.damageState.substitute + target.pbParalyze(user) if target.pbCanParalyze?(user,false,self) + end +end + +#=============================================================================== +# User takes recoil damage equal to 1/3 of the damage this move dealt. +# May burn the target. (Flare Blitz) +#=============================================================================== +class PokeBattle_Move_RecoilThirdOfDamageDealtBurnTarget < PokeBattle_RecoilMove + def pbRecoilDamage(user,target) + return (target.damageState.totalHPLost/3.0).round + end + + def pbAdditionalEffect(user,target) + return if target.damageState.substitute + target.pbBurn(user) if target.pbCanBurn?(user,false,self) + end +end + +#=============================================================================== +# User takes recoil damage equal to 1/2 of the damage this move dealt. +# (Head Smash, Light of Ruin) +#=============================================================================== +class PokeBattle_Move_RecoilHalfOfDamageDealt < PokeBattle_RecoilMove + def pbRecoilDamage(user,target) + return (target.damageState.totalHPLost/2.0).round + end +end + +#=============================================================================== +# Type effectiveness is multiplied by the Flying-type's effectiveness against +# the target. Does double damage and has perfect accuracy if the target is +# Minimized. (Flying Press) +#=============================================================================== +class PokeBattle_Move_EffectivenessIncludesFlyingType < PokeBattle_Move + def tramplesMinimize?(param=1) + return true if param==1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy + return true if param==2 # Double damage + return super + end + + def pbCalcTypeModSingle(moveType,defType,user,target) + ret = super + if GameData::Type.exists?(:FLYING) + flyingEff = Effectiveness.calculate_one(:FLYING, defType) + ret *= flyingEff.to_f / Effectiveness::NORMAL_EFFECTIVE_ONE + end + return ret + end +end + +#=============================================================================== +# Poisons the target. This move becomes physical or special, whichever will deal +# more damage (only considers stats, stat stages and Wonder Room). Makes contact +# if it is a physical move. Has a different animation depending on the move's +# category. (Shell Side Arm) +#=============================================================================== +class PokeBattle_Move_CategoryDependsOnHigherDamagePoisonTarget < PokeBattle_PoisonMove + def initialize(battle, move) + super + @calcCategory = 1 + end + + def physicalMove?(thisType = nil); return (@calcCategory == 0); end + def specialMove?(thisType = nil); return (@calcCategory == 1); end + def contactMove?; return physicalMove?; end + + def pbOnStartUse(user, targets) + target = targets[0] + stageMul = [2, 2, 2, 2, 2, 2, 2, 3, 4, 5, 6, 7, 8] + stageDiv = [8, 7, 6, 5, 4, 3, 2, 2, 2, 2, 2, 2, 2] + # Calculate user's effective attacking values + attack_stage = user.stages[:ATTACK] + 6 + real_attack = (user.attack.to_f * stageMul[attack_stage] / stageDiv[attack_stage]).floor + special_attack_stage = user.stages[:SPECIAL_ATTACK] + 6 + real_special_attack = (user.spatk.to_f * stageMul[special_attack_stage] / stageDiv[special_attack_stage]).floor + # Calculate target's effective defending values + defense_stage = target.stages[:DEFENSE] + 6 + real_defense = (target.defense.to_f * stageMul[defense_stage] / stageDiv[defense_stage]).floor + special_defense_stage = target.stages[:SPECIAL_DEFENSE] + 6 + real_special_defense = (target.spdef.to_f * stageMul[special_defense_stage] / stageDiv[special_defense_stage]).floor + # Perform simple damage calculation + physical_damage = real_attack.to_f / real_defense + special_damage = real_special_attack.to_f / real_special_defense + # Determine move's category + if physical_damage == special_damage + @calcCategry = @battle.pbRandom(2) + else + @calcCategory = (physical_damage > special_damage) ? 0 : 1 + end + end + + def pbShowAnimation(id, user, targets, hitNum = 0, showAnimation = true) + hitNum = 1 if physicalMove? + super + end +end + +#=============================================================================== +# Ignores all abilities that alter this move's success or damage. This move is +# physical if user's Attack is higher than its Special Attack (after applying +# stat stages), and special otherwise. (Photon Geyser) +#=============================================================================== +class PokeBattle_Move_CategoryDependsOnHigherDamageIgnoreTargetAbility < PokeBattle_Move_IgnoreTargetAbility + def initialize(battle,move) + super + @calcCategory = 1 + end + + def physicalMove?(thisType=nil); return (@calcCategory==0); end + def specialMove?(thisType=nil); return (@calcCategory==1); end + + def pbOnStartUse(user,targets) + # Calculate user's effective attacking value + stageMul = [2,2,2,2,2,2, 2, 3,4,5,6,7,8] + stageDiv = [8,7,6,5,4,3, 2, 2,2,2,2,2,2] + atk = user.attack + atkStage = user.stages[:ATTACK]+6 + realAtk = (atk.to_f*stageMul[atkStage]/stageDiv[atkStage]).floor + spAtk = user.spatk + spAtkStage = user.stages[:SPECIAL_ATTACK]+6 + realSpAtk = (spAtk.to_f*stageMul[spAtkStage]/stageDiv[spAtkStage]).floor + # Determine move's category + @calcCategory = (realAtk>realSpAtk) ? 0 : 1 + end +end + +#=============================================================================== +# The user's Defense (and its Defense stat stages) are used instead of the +# user's Attack (and Attack stat stages) to calculate damage. All other effects +# are applied normally, applying the user's Attack modifiers and not the user's +# Defence modifiers. (Body Press) +#=============================================================================== +class PokeBattle_Move_UseUserBaseDefenseInsteadOfUserBaseAttack < PokeBattle_Move + def pbGetAttackStats(user, target) + return user.defense, user.stages[:DEFENSE] + 6 + end +end + +#=============================================================================== +# Target's Attack is used instead of user's Attack for this move's calculations. +# (Foul Play) +#=============================================================================== +class PokeBattle_Move_UseTargetAttackInsteadOfUserAttack < PokeBattle_Move + def pbGetAttackStats(user,target) + if specialMove? + return target.spatk, target.stages[:SPECIAL_ATTACK]+6 + end + return target.attack, target.stages[:ATTACK]+6 + end +end + +#=============================================================================== +# Target's Defense is used instead of its Special Defense for this move's +# calculations. (Psyshock, Psystrike, Secret Sword) +#=============================================================================== +class PokeBattle_Move_UseTargetDefenseInsteadOfTargetSpDef < PokeBattle_Move + def pbGetDefenseStats(user,target) + return target.defense, target.stages[:DEFENSE]+6 + end +end + +#=============================================================================== +# User's attack next round against the target will definitely hit. +# (Lock-On, Mind Reader) +#=============================================================================== +class PokeBattle_Move_EnsureNextMoveAlwaysHits < PokeBattle_Move + def pbEffectAgainstTarget(user,target) + user.effects[PBEffects::LockOn] = 2 + user.effects[PBEffects::LockOnPos] = target.index + @battle.pbDisplay(_INTL("{1} took aim at {2}!",user.pbThis,target.pbThis(true))) + end +end + +#=============================================================================== +# Target's evasion stat changes are ignored from now on. (Foresight, Odor Sleuth) +# Normal and Fighting moves have normal effectiveness against the Ghost-type target. +#=============================================================================== +class PokeBattle_Move_StartNegateTargetEvasionStatStageAndGhostImmunity < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + def canMagicCoat?; return true; end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::Foresight] = true + @battle.pbDisplay(_INTL("{1} was identified!",target.pbThis)) + end +end + +#=============================================================================== +# Target's evasion stat changes are ignored from now on. (Miracle Eye) +# Psychic moves have normal effectiveness against the Dark-type target. +#=============================================================================== +class PokeBattle_Move_StartNegateTargetEvasionStatStageAndDarkImmunity < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + def canMagicCoat?; return true; end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::MiracleEye] = true + @battle.pbDisplay(_INTL("{1} was identified!",target.pbThis)) + end +end + +#=============================================================================== +# This move ignores target's Defense, Special Defense and evasion stat changes. +# (Chip Away, Darkest Lariat, Sacred Sword) +#=============================================================================== +class PokeBattle_Move_IgnoreTargetDefSpDefEvaStatStages < PokeBattle_Move + def pbCalcAccuracyMultipliers(user,target,multipliers) + super + modifiers[:evasion_stage] = 0 + end + + def pbGetDefenseStats(user,target) + ret1, _ret2 = super + return ret1, 6 # Def/SpDef stat stage + end +end + +#=============================================================================== +# This move's type is the same as the user's first type. (Revelation Dance) +#=============================================================================== +class PokeBattle_Move_TypeIsUserFirstType < PokeBattle_Move + def pbBaseType(user) + userTypes = user.pbTypes(true) + return userTypes[0] + end +end + +#=============================================================================== +# Power and type depends on the user's IVs. (Hidden Power) +#=============================================================================== +class PokeBattle_Move_TypeDependsOnUserIVs < PokeBattle_Move + def pbBaseType(user) + hp = pbHiddenPower(user) + return hp[0] + end + + def pbBaseDamage(baseDmg,user,target) + return super if Settings::MECHANICS_GENERATION >= 6 + hp = pbHiddenPower(user) + return hp[1] + end +end + +def pbHiddenPower(pkmn) + # NOTE: This allows Hidden Power to be Fairy-type (if you have that type in + # your game). I don't care that the official games don't work like that. + iv = pkmn.iv + idxType = 0 + power = 60 + types = [] + GameData::Type.each do |t| + types[t.icon_position] ||= [] + types[t.icon_position].push(t.id) if !t.pseudo_type && ![:NORMAL, :SHADOW].include?(t.id) + end + types.flatten!.compact! + idxType |= (iv[:HP]&1) + idxType |= (iv[:ATTACK]&1)<<1 + idxType |= (iv[:DEFENSE]&1)<<2 + idxType |= (iv[:SPEED]&1)<<3 + idxType |= (iv[:SPECIAL_ATTACK]&1)<<4 + idxType |= (iv[:SPECIAL_DEFENSE]&1)<<5 + idxType = (types.length-1)*idxType/63 + type = types[idxType] + if Settings::MECHANICS_GENERATION <= 5 + powerMin = 30 + powerMax = 70 + power |= (iv[:HP]&2)>>1 + power |= (iv[:ATTACK]&2) + power |= (iv[:DEFENSE]&2)<<1 + power |= (iv[:SPEED]&2)<<2 + power |= (iv[:SPECIAL_ATTACK]&2)<<3 + power |= (iv[:SPECIAL_DEFENSE]&2)<<4 + power = powerMin+(powerMax-powerMin)*power/63 + end + return [type,power] +end + +#=============================================================================== +# Power and type depend on the user's held berry. Destroys the berry. +# (Natural Gift) +#=============================================================================== +class PokeBattle_Move_TypeAndPowerDependOnUserBerry < PokeBattle_Move + def initialize(battle,move) + super + @typeArray = { + :NORMAL => [:CHILANBERRY], + :FIRE => [:CHERIBERRY, :BLUKBERRY, :WATMELBERRY, :OCCABERRY], + :WATER => [:CHESTOBERRY, :NANABBERRY, :DURINBERRY, :PASSHOBERRY], + :ELECTRIC => [:PECHABERRY, :WEPEARBERRY, :BELUEBERRY, :WACANBERRY], + :GRASS => [:RAWSTBERRY, :PINAPBERRY, :RINDOBERRY, :LIECHIBERRY], + :ICE => [:ASPEARBERRY, :POMEGBERRY, :YACHEBERRY, :GANLONBERRY], + :FIGHTING => [:LEPPABERRY, :KELPSYBERRY, :CHOPLEBERRY, :SALACBERRY], + :POISON => [:ORANBERRY, :QUALOTBERRY, :KEBIABERRY, :PETAYABERRY], + :GROUND => [:PERSIMBERRY, :HONDEWBERRY, :SHUCABERRY, :APICOTBERRY], + :FLYING => [:LUMBERRY, :GREPABERRY, :COBABERRY, :LANSATBERRY], + :PSYCHIC => [:SITRUSBERRY, :TAMATOBERRY, :PAYAPABERRY, :STARFBERRY], + :BUG => [:FIGYBERRY, :CORNNBERRY, :TANGABERRY, :ENIGMABERRY], + :ROCK => [:WIKIBERRY, :MAGOSTBERRY, :CHARTIBERRY, :MICLEBERRY], + :GHOST => [:MAGOBERRY, :RABUTABERRY, :KASIBBERRY, :CUSTAPBERRY], + :DRAGON => [:AGUAVBERRY, :NOMELBERRY, :HABANBERRY, :JABOCABERRY], + :DARK => [:IAPAPABERRY, :SPELONBERRY, :COLBURBERRY, :ROWAPBERRY, :MARANGABERRY], + :STEEL => [:RAZZBERRY, :PAMTREBERRY, :BABIRIBERRY], + :FAIRY => [:ROSELIBERRY, :KEEBERRY] + } + @damageArray = { + 60 => [:CHERIBERRY, :CHESTOBERRY, :PECHABERRY, :RAWSTBERRY, :ASPEARBERRY, + :LEPPABERRY, :ORANBERRY, :PERSIMBERRY, :LUMBERRY, :SITRUSBERRY, + :FIGYBERRY, :WIKIBERRY, :MAGOBERRY, :AGUAVBERRY, :IAPAPABERRY, + :RAZZBERRY, :OCCABERRY, :PASSHOBERRY, :WACANBERRY, :RINDOBERRY, + :YACHEBERRY, :CHOPLEBERRY, :KEBIABERRY, :SHUCABERRY, :COBABERRY, + :PAYAPABERRY, :TANGABERRY, :CHARTIBERRY, :KASIBBERRY, :HABANBERRY, + :COLBURBERRY, :BABIRIBERRY, :CHILANBERRY, :ROSELIBERRY], + 70 => [:BLUKBERRY, :NANABBERRY, :WEPEARBERRY, :PINAPBERRY, :POMEGBERRY, + :KELPSYBERRY, :QUALOTBERRY, :HONDEWBERRY, :GREPABERRY, :TAMATOBERRY, + :CORNNBERRY, :MAGOSTBERRY, :RABUTABERRY, :NOMELBERRY, :SPELONBERRY, + :PAMTREBERRY], + 80 => [:WATMELBERRY, :DURINBERRY, :BELUEBERRY, :LIECHIBERRY, :GANLONBERRY, + :SALACBERRY, :PETAYABERRY, :APICOTBERRY, :LANSATBERRY, :STARFBERRY, + :ENIGMABERRY, :MICLEBERRY, :CUSTAPBERRY, :JABOCABERRY, :ROWAPBERRY, + :KEEBERRY, :MARANGABERRY] + } + end + + def pbMoveFailed?(user,targets) + # NOTE: Unnerve does not stop a Pokémon using this move. + item = user.item + if !item || !item.is_berry? || !user.itemActive? + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + # NOTE: The AI calls this method via pbCalcType, but it involves user.item + # which here is assumed to be not nil (because item.id is called). Since + # the AI won't want to use it if the user has no item anyway, perhaps + # this is good enough. + def pbBaseType(user) + item = user.item + ret = :NORMAL + if item + @typeArray.each do |type, items| + next if !items.include?(item.id) + ret = type if GameData::Type.exists?(type) + break + end + end + return ret + end + + # This is a separate method so that the AI can use it as well + def pbNaturalGiftBaseDamage(heldItem) + ret = 1 + @damageArray.each do |dmg, items| + next if !items.include?(heldItem) + ret = dmg + ret += 20 if Settings::MECHANICS_GENERATION >= 6 + break + end + return ret + end + + def pbBaseDamage(baseDmg,user,target) + return pbNaturalGiftBaseDamage(user.item.id) + end + + def pbEndOfMoveUsageEffect(user,targets,numHits,switchedBattlers) + # NOTE: The item is consumed even if this move was Protected against or it + # missed. The item is not consumed if the target was switched out by + # an effect like a target's Red Card. + # NOTE: There is no item consumption animation. + user.pbConsumeItem(true,true,false) if user.item + end +end + +#=============================================================================== +# Type depends on the user's held Plate. (Judgment) +#=============================================================================== +class PokeBattle_Move_TypeDependsOnUserPlate < PokeBattle_Move + def initialize(battle,move) + super + @itemTypes = { + :FISTPLATE => :FIGHTING, + :SKYPLATE => :FLYING, + :TOXICPLATE => :POISON, + :EARTHPLATE => :GROUND, + :STONEPLATE => :ROCK, + :INSECTPLATE => :BUG, + :SPOOKYPLATE => :GHOST, + :IRONPLATE => :STEEL, + :FLAMEPLATE => :FIRE, + :SPLASHPLATE => :WATER, + :MEADOWPLATE => :GRASS, + :ZAPPLATE => :ELECTRIC, + :MINDPLATE => :PSYCHIC, + :ICICLEPLATE => :ICE, + :DRACOPLATE => :DRAGON, + :DREADPLATE => :DARK, + :PIXIEPLATE => :FAIRY + } + end + + def pbBaseType(user) + ret = :NORMAL + if user.itemActive? + @itemTypes.each do |item, itemType| + next if user.item != item + ret = itemType if GameData::Type.exists?(itemType) + break + end + end + return ret + end +end + +#=============================================================================== +# Type depends on the user's held Memory. (Multi-Attack) +#=============================================================================== +class PokeBattle_Move_TypeDependsOnUserMemory < PokeBattle_Move + def initialize(battle,move) + super + @itemTypes = { + :FIGHTINGMEMORY => :FIGHTING, + :FLYINGMEMORY => :FLYING, + :POISONMEMORY => :POISON, + :GROUNDMEMORY => :GROUND, + :ROCKMEMORY => :ROCK, + :BUGMEMORY => :BUG, + :GHOSTMEMORY => :GHOST, + :STEELMEMORY => :STEEL, + :FIREMEMORY => :FIRE, + :WATERMEMORY => :WATER, + :GRASSMEMORY => :GRASS, + :ELECTRICMEMORY => :ELECTRIC, + :PSYCHICMEMORY => :PSYCHIC, + :ICEMEMORY => :ICE, + :DRAGONMEMORY => :DRAGON, + :DARKMEMORY => :DARK, + :FAIRYMEMORY => :FAIRY + } + end + + def pbBaseType(user) + ret = :NORMAL + if user.itemActive? + @itemTypes.each do |item, itemType| + next if user.item != item + ret = itemType if GameData::Type.exists?(itemType) + break + end + end + return ret + end +end + +#=============================================================================== +# Type depends on the user's held Drive. (Techno Blast) +#=============================================================================== +class PokeBattle_Move_TypeDependsOnUserDrive < PokeBattle_Move + def initialize(battle,move) + super + @itemTypes = { + :SHOCKDRIVE => :ELECTRIC, + :BURNDRIVE => :FIRE, + :CHILLDRIVE => :ICE, + :DOUSEDRIVE => :WATER + } + end + + def pbBaseType(user) + ret = :NORMAL + if user.itemActive? + @itemTypes.each do |item, itemType| + next if user.item != item + ret = itemType if GameData::Type.exists?(itemType) + break + end + end + return ret + end + + def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) + t = pbBaseType(user) + hitNum = 0 + hitNum = 1 if t == :ELECTRIC + hitNum = 2 if t == :FIRE + hitNum = 3 if t == :ICE + hitNum = 4 if t == :WATER + super + end +end + +#=============================================================================== +# Increases the user's Speed by 1 stage. This move's type depends on the user's +# form (Electric if Full Belly, Dark if Hangry). Fails if the user is not +# Morpeko (works if transformed into Morpeko). (Aura Wheel) +#=============================================================================== +class PokeBattle_Move_TypeDependsOnUserMorpekoFormRaiseUserSpeed1 < PokeBattle_Move_RaiseUserSpeed1 + def pbMoveFailed?(user, targets) + if !user.isSpecies?(:MORPEKO) && user.effects[PBEffects::TransformSpecies] != :MORPEKO + @battle.pbDisplay(_INTL("But {1} can't use the move!", user.pbThis)) + return true + end + return false + end + + def pbBaseType(user) + return :DARK if user.form == 1 && GameData::Type.exists?(:DARK) + return @type + end +end + +#=============================================================================== +# Power is doubled in weather. Type changes depending on the weather. (Weather Ball) +#=============================================================================== +class PokeBattle_Move_TypeAndPowerDependOnWeather < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + baseDmg *= 2 if user.effectiveWeather != :None + return baseDmg + end + + def pbBaseType(user) + ret = :NORMAL + case user.effectiveWeather + when :Sun, :HarshSun + ret = :FIRE if GameData::Type.exists?(:FIRE) + when :Rain, :HeavyRain + ret = :WATER if GameData::Type.exists?(:WATER) + when :Sandstorm + ret = :ROCK if GameData::Type.exists?(:ROCK) + when :Hail + ret = :ICE if GameData::Type.exists?(:ICE) + end + return ret + end + + def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) + t = pbBaseType(user) + hitNum = 1 if t == :FIRE # Type-specific anims + hitNum = 2 if t == :WATER + hitNum = 3 if t == :ROCK + hitNum = 4 if t == :ICE + super + end +end + +#=============================================================================== +# Power is doubled if a terrain applies and user is grounded; also, this move's +# type and animation depends on the terrain. (Terrain Pulse) +#=============================================================================== +class PokeBattle_Move_TypeAndPowerDependOnTerrain < PokeBattle_Move + def pbBaseDamage(baseDmg, user, target) + baseDmg *= 2 if @battle.field.terrain != :None && user.affectedByTerrain? + return baseDmg + end + + def pbBaseType(user) + ret = :NORMAL + case @battle.field.terrain + when :Electric + ret = :ELECTRIC if GameData::Type.exists?(:ELECTRIC) + when :Grassy + ret = :GRASS if GameData::Type.exists?(:GRASS) + when :Misty + ret = :FAIRY if GameData::Type.exists?(:FAIRY) + when :Psychic + ret = :PSYCHIC if GameData::Type.exists?(:PSYCHIC) + end + return ret + end + + def pbShowAnimation(id, user, targets, hitNum = 0, showAnimation = true) + t = pbBaseType(user) + hitNum = 1 if t == :ELECTRIC # Type-specific anims + hitNum = 2 if t == :GRASS + hitNum = 3 if t == :FAIRY + hitNum = 4 if t == :PSYCHIC + super + end +end + +#=============================================================================== +# Target's moves become Electric-type for the rest of the round. (Electrify) +#=============================================================================== +class PokeBattle_Move_TargetMovesBecomeElectric < PokeBattle_Move + def pbFailsAgainstTarget?(user, target, show_message) + if target.effects[PBEffects::Electrify] + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return true if pbMoveFailedTargetAlreadyMoved?(target, show_message) + return false + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::Electrify] = true + @battle.pbDisplay(_INTL("{1}'s moves have been electrified!",target.pbThis)) + end +end + +#=============================================================================== +# All Normal-type moves become Electric-type for the rest of the round. +# (Ion Deluge, Plasma Fists) +#=============================================================================== +class PokeBattle_Move_NormalMovesBecomeElectric < PokeBattle_Move + def pbMoveFailed?(user,targets) + return false if damagingMove? + if @battle.field.effects[PBEffects::IonDeluge] + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return true if pbMoveFailedLastInRound?(user) + return false + end + + def pbEffectGeneral(user) + return if @battle.field.effects[PBEffects::IonDeluge] + @battle.field.effects[PBEffects::IonDeluge] = true + @battle.pbDisplay(_INTL("A deluge of ions showers the battlefield!")) + end +end diff --git a/Data/Scripts/011_Battle/002_Move/008_Move_Effects_Gen8.rb b/Data/Scripts/011_Battle/002_Move/008_Move_Effects_Gen8.rb deleted file mode 100644 index b6cd869ab..000000000 --- a/Data/Scripts/011_Battle/002_Move/008_Move_Effects_Gen8.rb +++ /dev/null @@ -1,926 +0,0 @@ -#=============================================================================== -# Poisons the target. This move becomes physical or special, whichever will deal -# more damage (only considers stats, stat stages and Wonder Room). Makes contact -# if it is a physical move. Has a different animation depending on the move's -# category. (Shell Side Arm) -#=============================================================================== -class PokeBattle_Move_176 < PokeBattle_PoisonMove - def initialize(battle, move) - super - @calcCategory = 1 - end - - def physicalMove?(thisType = nil); return (@calcCategory == 0); end - def specialMove?(thisType = nil); return (@calcCategory == 1); end - def contactMove?; return physicalMove?; end - - def pbOnStartUse(user, targets) - target = targets[0] - stageMul = [2, 2, 2, 2, 2, 2, 2, 3, 4, 5, 6, 7, 8] - stageDiv = [8, 7, 6, 5, 4, 3, 2, 2, 2, 2, 2, 2, 2] - # Calculate user's effective attacking values - attack_stage = user.stages[:ATTACK] + 6 - real_attack = (user.attack.to_f * stageMul[attack_stage] / stageDiv[attack_stage]).floor - special_attack_stage = user.stages[:SPECIAL_ATTACK] + 6 - real_special_attack = (user.spatk.to_f * stageMul[special_attack_stage] / stageDiv[special_attack_stage]).floor - # Calculate target's effective defending values - defense_stage = target.stages[:DEFENSE] + 6 - real_defense = (target.defense.to_f * stageMul[defense_stage] / stageDiv[defense_stage]).floor - special_defense_stage = target.stages[:SPECIAL_DEFENSE] + 6 - real_special_defense = (target.spdef.to_f * stageMul[special_defense_stage] / stageDiv[special_defense_stage]).floor - # Perform simple damage calculation - physical_damage = real_attack.to_f / real_defense - special_damage = real_special_attack.to_f / real_special_defense - # Determine move's category - if physical_damage == special_damage - @calcCategry = @battle.pbRandom(2) - else - @calcCategory = (physical_damage > special_damage) ? 0 : 1 - end - end - - def pbShowAnimation(id, user, targets, hitNum = 0, showAnimation = true) - hitNum = 1 if physicalMove? - super - end -end - -#=============================================================================== -# Burns the target if any of its stats were increased this round. -# (Burning Jealousy) -#=============================================================================== -class PokeBattle_Move_177 < PokeBattle_BurnMove - def pbAdditionalEffect(user, target) - super if target.statsRaised - end -end - -#=============================================================================== -# Increases the user's Speed by 1 stage. This move's type depends on the user's -# form (Electric if Full Belly, Dark if Hangry). Fails if the user is not -# Morpeko (works if transformed into Morpeko). (Aura Wheel) -#=============================================================================== -class PokeBattle_Move_178 < PokeBattle_Move_01F - def pbMoveFailed?(user, targets) - if !user.isSpecies?(:MORPEKO) && user.effects[PBEffects::TransformSpecies] != :MORPEKO - @battle.pbDisplay(_INTL("But {1} can't use the move!", user.pbThis)) - return true - end - return false - end - - def pbBaseType(user) - return :DARK if user.form == 1 && GameData::Type.exists?(:DARK) - return @type - end -end - -#=============================================================================== -# Increases the user's Attack, Defense, Speed, Special Attack and Special -# Defense by 1 stage each. The user cannot switch out or flee. Fails if the user -# is already affected by the second effect of this move, but can be used if the -# user is prevented from switching out or fleeing by another effect (in which -# case, the second effect of this move is not applied to the user). The user may -# still switch out if holding Shed Shell or Eject Button, or if affected by a -# Red Card. (No Retreat) -#=============================================================================== -class PokeBattle_Move_179 < PokeBattle_Move_02D - def pbMoveFailed?(user, targets) - if user.effects[PBEffects::NoRetreat] - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return super - end - - def pbEffectGeneral(user) - super - if !user.trappedInBattle? - user.effects[PBEffects::NoRetreat] = true - @battle.pbDisplay(_INTL("{1} can no longer escape because it used {2}!", user.pbThis, @name)) - end - end -end - -#=============================================================================== -# Increases the user's Attack, Defense, Special Attack, Special Defense and -# Speed by 1 stage each, and reduces the user's HP by a third of its total HP. -# Fails if it can't do either effect. (Clangorous Soul) -#=============================================================================== -class PokeBattle_Move_17A < PokeBattle_MultiStatUpMove - def initialize(battle, move) - super - @statUp = [ - :ATTACK, 1, - :DEFENSE, 1, - :SPECIAL_ATTACK, 1, - :SPECIAL_DEFENSE, 1, - :SPEED, 1 - ] - end - - def pbMoveFailed?(user, targets) - if user.hp <= [user.totalhp / 3, 1].max - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return super - end - - def pbEffectGeneral(user) - super - user.pbReduceHP([user.totalhp / 3, 1].max, false) - user.pbItemHPHealCheck - end -end - -#=============================================================================== -# Raises the Attack and Defense of all user's allies by 1 stage each. Bypasses -# protections, including Crafty Shield. Fails if there is no ally. (Coaching) -#=============================================================================== -class PokeBattle_Move_17B < PokeBattle_Move - def ignoresSubstitute?(user); return true; end - def canSnatch?; return true; end - - def pbMoveFailed?(user, targets) - @validTargets = [] - @battle.eachSameSideBattler(user) do |b| - next if b.index == user.index - next if !b.pbCanRaiseStatStage?(:ATTACK, user, self) && - !b.pbCanRaiseStatStage?(:DEFENSE, user, self) - @validTargets.push(b) - end - if @validTargets.length == 0 - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - return false if @validTargets.any? { |b| b.index == target.index } - @battle.pbDisplay(_INTL("{1}'s stats can't be raised further!", target.pbThis)) if show_message - return true - end - - def pbEffectAgainstTarget(user, target) - showAnim = true - if target.pbCanRaiseStatStage?(:ATTACK, user, self) - if target.pbRaiseStatStage(:ATTACK, 1, user, showAnim) - showAnim = false - end - end - if target.pbCanRaiseStatStage?(:DEFENSE, user, self) - target.pbRaiseStatStage(:DEFENSE, 1, user, showAnim) - end - end -end - -#=============================================================================== -# Increases the target's Attack and Special Attack by 2 stages each. (Decorate) -#=============================================================================== -class PokeBattle_Move_17C < PokeBattle_Move - def pbMoveFailed?(user, targets) - failed = true - targets.each do |b| - next if !b.pbCanRaiseStatStage?(:ATTACK, user, self) && - !b.pbCanRaiseStatStage?(:SPECIAL_ATTACK, user, self) - failed = false - break - end - if failed - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectAgainstTarget(user, target) - if target.pbCanRaiseStatStage?(:ATTACK, user, self) - target.pbRaiseStatStage(:ATTACK, 2, user) - end - if target.pbCanRaiseStatStage?(:SPECIAL_ATTACK, user, self) - target.pbRaiseStatStage(:SPECIAL_ATTACK, 2, user) - end - end -end - -#=============================================================================== -# Decreases the target's Defense by 1 stage. Power is doubled if Gravity is in -# effect. (Grav Apple) -#=============================================================================== -class PokeBattle_Move_17D < PokeBattle_Move_043 - def pbBaseDamage(baseDmg, user, target) - baseDmg *= 2 if @battle.field.effects[PBEffects::Gravity] > 0 - return baseDmg - end -end - -#=============================================================================== -# Decreases the target's Speed by 1 stage. Doubles the effectiveness of damaging -# Fire moves used against the target (this effect does not stack). Fails if -# neither of these effects can be applied. (Tar Shot) -#=============================================================================== -class PokeBattle_Move_17E < PokeBattle_Move_044 - def pbFailsAgainstTarget?(user, target, show_message) - return super if target.effects[PBEffects::TarShot] - return false - end - - def pbEffectAgainstTarget(user, target) - super - if !target.effects[PBEffects::TarShot] - target.effects[PBEffects::TarShot] = true - @battle.pbDisplay(_INTL("{1} became weaker to fire!", target.pbThis)) - end - end -end - -#=============================================================================== -# The target's types become Psychic. Fails if the target has the ability -# Multitype/RKS System or has a substitute. (Magic Powder) -#=============================================================================== -class PokeBattle_Move_17F < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if !target.canChangeType? || !GameData::Type.exists?(:PSYCHIC) || - !target.pbHasOtherType?(:PSYCHIC) || !target.affectedByPowder? - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user, target) - target.pbChangeTypes(:PSYCHIC) - typeName = GameData::Type.get(:PSYCHIC).name - @battle.pbDisplay(_INTL("{1}'s type changed to {2}!", target.pbThis, typeName)) - end -end - -#=============================================================================== -# Power is doubled if Electric Terrain applies. (Rising Voltage) -#=============================================================================== -class PokeBattle_Move_180 < PokeBattle_Move - def pbBaseDamage(baseDmg, user, target) - baseDmg *= 2 if @battle.field.terrain == :Electric && target.affectedByTerrain? - return baseDmg - end -end - -#=============================================================================== -# If Psychic Terrain applies and the user is grounded, power is multiplied by -# 1.5 (in addition to Psychic Terrain's multiplier) and it targets all opposing -# Pokémon. (Expanding Force) -#=============================================================================== -class PokeBattle_Move_181 < PokeBattle_Move - def pbTarget(user) - if @battle.field.terrain == :Psychic && user.affectedByTerrain? - return GameData::Target.get(:AllNearFoes) - end - return super - end - - def pbBaseDamage(baseDmg, user, target) - if @battle.field.terrain == :Psychic && user.affectedByTerrain? - baseDmg = baseDmg * 3 / 2 - end - return baseDmg - end -end - -#=============================================================================== -# Power is doubled if a terrain applies and user is grounded; also, this move's -# type and animation depends on the terrain. (Terrain Pulse) -#=============================================================================== -class PokeBattle_Move_182 < PokeBattle_Move - def pbBaseDamage(baseDmg, user, target) - baseDmg *= 2 if @battle.field.terrain != :None && user.affectedByTerrain? - return baseDmg - end - - def pbBaseType(user) - ret = :NORMAL - case @battle.field.terrain - when :Electric - ret = :ELECTRIC if GameData::Type.exists?(:ELECTRIC) - when :Grassy - ret = :GRASS if GameData::Type.exists?(:GRASS) - when :Misty - ret = :FAIRY if GameData::Type.exists?(:FAIRY) - when :Psychic - ret = :PSYCHIC if GameData::Type.exists?(:PSYCHIC) - end - return ret - end - - def pbShowAnimation(id, user, targets, hitNum = 0, showAnimation = true) - t = pbBaseType(user) - hitNum = 1 if t == :ELECTRIC # Type-specific anims - hitNum = 2 if t == :GRASS - hitNum = 3 if t == :FAIRY - hitNum = 4 if t == :PSYCHIC - super - end -end - -#=============================================================================== -# Power is doubled if the user moves before the target, or if the target -# switched in this round. (Bolt Beak, Fishious Rend) -#=============================================================================== -class PokeBattle_Move_183 < PokeBattle_Move - def pbBaseDamage(baseDmg, user, target) - if @battle.choices[target.index][0] == :None || # Switched in - ([:UseMove, :Shift].include?(@battle.choices[target.index][0]) && !target.movedThisRound?) - baseDmg *= 2 - end - return baseDmg - end -end - -#=============================================================================== -# Power is doubled if any of the user's stats were lowered this round. (Lash Out) -#=============================================================================== -class PokeBattle_Move_184 < PokeBattle_Move - def pbBaseDamage(baseDmg, user, target) - baseDmg *= 2 if user.statsLowered - return baseDmg - end -end - -#=============================================================================== -# If Grassy Terrain applies, priority is increased by 1. (Grassy Glide) -#=============================================================================== -class PokeBattle_Move_185 < PokeBattle_Move - def pbPriority(user) - ret = super - ret += 1 if @battle.field.terrain == :Grass && user.affectedByTerrain? - return ret - end -end - -#=============================================================================== -# For the rest of this round, the user avoids all damaging moves that would hit -# it. If a move that makes contact is stopped by this effect, decreases the -# Defense of the Pokémon using that move by 2 stages. Contributes to Protect's -# counter. (Obstruct) -#=============================================================================== -class PokeBattle_Move_186 < PokeBattle_ProtectMove - def initialize(battle, move) - super - @effect = PBEffects::Obstruct - end -end - -#=============================================================================== -# Unaffected by moves and abilities that would redirect this move. (Snipe Shot) -#=============================================================================== -class PokeBattle_Move_187 < PokeBattle_Move - def cannotRedirect?; return true; end -end - -#=============================================================================== -# Hits in 2 volleys. The second volley targets the original target's ally if it -# has one (that can be targeted), or the original target if not. A battler -# cannot be targeted if it is is immune to or protected from this move somehow, -# or if this move will miss it. (Dragon Darts) -# NOTE: This move sometimes shows a different failure message compared to the -# official games. This is because of the order in which failure checks are -# done (all checks for each target in turn, versus all targets for each -# check in turn). This is considered unimportant, and since correcting it -# would involve extensive code rewrites, it is being ignored. -#=============================================================================== -class PokeBattle_Move_188 < PokeBattle_Move - def pbNumHits(user, targets); return 1; end - def pbRepeatHit?; return true; end - - def pbModifyTargets(targets, user) - return if targets.length != 1 - choices = [] - targets[0].eachAlly { |b| user.pbAddTarget(choices, user, b, self) } - return if choices.length == 0 - idxChoice = (choices.length > 1) ? @battle.pbRandom(choices.length) : 0 - user.pbAddTarget(targets, user, choices[idxChoice], self, !pbTarget(user).can_choose_distant_target?) - end - - def pbShowFailMessages?(targets) - if targets.length > 1 - valid_targets = targets.select { |b| !b.fainted? && !b.damageState.unaffected } - return valid_targets.length <= 1 - end - return super - end - - def pbDesignateTargetsForHit(targets, hitNum) - valid_targets = [] - targets.each { |b| valid_targets.push(b) if !b.damageState.unaffected } - return [valid_targets[1]] if valid_targets[1] && hitNum == 1 - return [valid_targets[0]] - end -end - -#=============================================================================== -# Hits 3 times in a row. If each hit could be a critical hit, it will definitely -# be a critical hit. (Surging Strikes) -#=============================================================================== -class PokeBattle_Move_189 < PokeBattle_Move - def multiHitMove?; return true; end - def pbNumHits(user, targets); return 3; end - def pbCritialOverride(user, target); return 1; end -end - -#=============================================================================== -# Hits 2-5 times in a row. If the move does not fail, increases the user's Speed -# by 1 stage and decreases the user's Defense by 1 stage. (Scale Shot) -#=============================================================================== -class PokeBattle_Move_18A < PokeBattle_Move - def multiHitMove?; return true; end - - def pbNumHits(user, targets) - hitChances = [ - 2, 2, 2, 2, 2, 2, 2, - 3, 3, 3, 3, 3, 3, 3, - 4, 4, 4, - 5, 5, 5] - r = @battle.pbRandom(hitChances.length) - r = hitChances.length - 1 if user.hasActiveAbility?(:SKILLLINK) - return hitChances[r] - end - - def pbEffectAfterAllHits(user, target) - return if target.damageState.unaffected - if user.pbCanLowerStatStage?(:DEFENSE, user, self) - user.pbLowerStatStage(:DEFENSE, 1, user) - end - if user.pbCanRaiseStatStage?(:SPEED, user, self) - user.pbRaiseStatStage(:SPEED, 1, user) - end - end -end - -#=============================================================================== -# Two-turn attack. On the first turn, increases the user's Special Attack by 1 -# stage. On the second turn, does damage. (Meteor Beam) -#=============================================================================== -class PokeBattle_Move_18B < PokeBattle_TwoTurnMove - def pbChargingTurnMessage(user, targets) - @battle.pbDisplay(_INTL("{1} is overflowing with space power!", user.pbThis)) - end - - def pbChargingTurnEffect(user, target) - if user.pbCanRaiseStatStage?(:SPECIAL_ATTACK, user, self) - user.pbRaiseStatStage(:SPECIAL_ATTACK, 1, user) - end - end -end - -#=============================================================================== -# The user and its allies gain 25% of their total HP. (Life Dew) -#=============================================================================== -class PokeBattle_Move_18C < PokeBattle_Move - def healingMove?; return true; end - - def pbMoveFailed?(user, targets) - failed = true - @battle.eachSameSideBattler(user) do |b| - next if !b.canHeal? - failed = false - break - end - if failed - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - return !target.canHeal? - end - - def pbEffectAgainstTarget(user, target) - target.pbRecoverHP(target.totalhp / 4) - @battle.pbDisplay(_INTL("{1}'s HP was restored.", target.pbThis)) - end -end - -#=============================================================================== -# The user and its allies gain 25% of their total HP and are cured of their -# permanent status problems. (Jungle Healing) -#=============================================================================== -class PokeBattle_Move_18D < PokeBattle_Move - def healingMove?; return true; end - - def pbMoveFailed?(user, targets) - failed = true - @battle.eachSameSideBattler(user) do |b| - next if b.status == :NONE && !b.canHeal? - failed = false - break - end - if failed - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - return target.status == :NONE && !target.canHeal? - end - - def pbEffectAgainstTarget(user, target) - if target.canHeal? - target.pbRecoverHP(target.totalhp / 4) - @battle.pbDisplay(_INTL("{1}'s HP was restored.", target.pbThis)) - end - if target.status != :NONE - old_status = target.status - target.pbCureStatus(false) - case old_status - when :SLEEP - @battle.pbDisplay(_INTL("{1} was woken from sleep.", target.pbThis)) - when :POISON - @battle.pbDisplay(_INTL("{1} was cured of its poisoning.", target.pbThis)) - when :BURN - @battle.pbDisplay(_INTL("{1}'s burn was healed.", target.pbThis)) - when :PARALYSIS - @battle.pbDisplay(_INTL("{1} was cured of paralysis.", target.pbThis)) - when :FROZEN - @battle.pbDisplay(_INTL("{1} was thawed out.", target.pbThis)) - end - end - end -end - -#=============================================================================== -# User faints. If Misty Terrain applies, base power is multiplied by 1.5. -# (Misty Explosion) -#=============================================================================== -class PokeBattle_Move_18E < PokeBattle_Move_0E0 - def pbBaseDamage(baseDmg, user, target) - baseDmg = baseDmg * 3 / 2 if @battle.field.terrain == :Misty - return baseDmg - end -end - -#=============================================================================== -# The target can no longer switch out or flee, while the user remains in battle. -# At the end of each round, the target's Defense and Special Defense are lowered -# by 1 stage each. (Octolock) -#=============================================================================== -class PokeBattle_Move_18F < PokeBattle_Move - def pbFailsAgainstTarget?(user, target, show_message) - return false if damagingMove? - if target.effects[PBEffects::Octolock] >= 0 - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - if Settings::MORE_TYPE_EFFECTS && target.pbHasType?(:GHOST) - @battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true))) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user, target) - target.effects[PBEffects::Octolock] = user.index - @battle.pbDisplay(_INTL("{1} can no longer escape because of {2}!", target.pbThis, @name)) - end -end - -#=============================================================================== -# Prevents the user and the target from switching out or fleeing. This effect -# isn't applied if either Pokémon is already prevented from switching out or -# fleeing. (Jaw Lock) -#=============================================================================== -class PokeBattle_Move_190 < PokeBattle_Move - def pbAdditionalEffect(user, target) - return if user.fainted? || target.fainted? || target.damageState.substitute - return if Settings::MORE_TYPE_EFFECTS && target.pbHasType?(:GHOST) - return if user.trappedInBattle? || target.trappedInBattle? - target.effects[PBEffects::JawLock] = user.index - @battle.pbDisplay(_INTL("Neither Pokémon can run away!")) - end -end - -#=============================================================================== -# The user consumes its held berry and gains its effect. Also, increases the -# user's Defense by 2 stages. The berry can be consumed even if Unnerve/Magic -# Room apply. Fails if the user is not holding a berry. This move cannot be -# chosen to be used if the user is not holding a berry. (Stuff Cheeks) -#=============================================================================== -class PokeBattle_Move_191 < PokeBattle_StatUpMove - def initialize(battle, move) - super - @statUp = [:DEFENSE, 2] - end - - def pbCanChooseMove?(user, commandPhase, showMessages) - item = user.item - if !item || !item.is_berry? || !user.itemActive? - if showMessages - msg = _INTL("{1} can't use that move because it doesn't have a Berry!", user.pbThis) - (commandPhase) ? @battle.pbDisplayPaused(msg) : @battle.pbDisplay(msg) - end - return false - end - return true - end - - def pbMoveFailed?(user, targets) - # NOTE: Unnerve does not stop a Pokémon using this move. - item = user.item - if !item || !item.is_berry? || !user.itemActive? - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return super - end - - def pbEffectGeneral(user) - super - @battle.pbDisplay(_INTL("{1} ate its {2}!", user.pbThis, user.itemName)) - item = user.item - user.pbConsumeItem(true, false) # Don't trigger Symbiosis yet - user.pbHeldItemTriggerCheck(item, false) - end -end - -#=============================================================================== -# All Pokémon (except semi-invulnerable ones) consume their held berries and -# gain their effects. Berries can be consumed even if Unnerve/Magic Room apply. -# Fails if no Pokémon have a held berry. If this move would trigger an ability -# that negates the move, e.g. Lightning Rod, the bearer of that ability will -# have their ability triggered regardless of whether they are holding a berry, -# and they will not consume their berry. (Teatime) -# TODO: This isn't quite right for the messages shown when a berry is consumed. -#=============================================================================== -class PokeBattle_Move_192 < PokeBattle_Move - def pbMoveFailed?(user, targets) - failed = true - targets.each do |b| - next if !b.item || !b.item.is_berry? - next if b.semiInvulnerable? - failed = false - break - end - if failed - @battle.pbDisplay(_INTL("But nothing happened!")) - return true - end - return false - end - - def pbOnStartUse(user, targets) - @battle.pbDisplay(_INTL("It's teatime! Everyone dug in to their Berries!")) - end - - def pbFailsAgainstTarget?(user, target, show_message) - return true if !target.item || !target.item.is_berry? || target.semiInvulnerable? - return false - end - - def pbEffectAgainstTarget(user, target) - @battle.pbCommonAnimation("EatBerry", target) - item = target.item - target.pbConsumeItem(true, false) # Don't trigger Symbiosis yet - target.pbHeldItemTriggerCheck(item, false) - end -end - -#=============================================================================== -# Negates the effect and usability of the target's held item for the rest of the -# battle (even if it is switched out). Fails if the target doesn't have a held -# item, the item is unlosable, the target has Sticky Hold, or the target is -# behind a substitute. (Corrosive Gas) -#=============================================================================== -class PokeBattle_Move_193 < PokeBattle_Move - def canMagicCoat?; return true; end - - def pbFailsAgainstTarget?(user, target, show_message) - if !target.item || target.unlosableItem?(target.item) || - target.effects[PBEffects::Substitute] > 0 - @battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis)) if show_message - return true - end - if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker - if show_message - @battle.pbShowAbilitySplash(target) - if PokeBattle_SceneConstants::USE_ABILITY_SPLASH - @battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis)) - else - @battle.pbDisplay(_INTL("{1} is unaffected because of its {2}!", - target.pbThis(true), target.abilityName)) - end - @battle.pbHideAbilitySplash(target) - end - return true - end - if @battle.corrosiveGas[target.index % 2][target.pokemonIndex] - @battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis)) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user, target) - @battle.corrosiveGas[target.index % 2][target.pokemonIndex] = true - @battle.pbDisplay(_INTL("{1} corroded {2}'s {3}!", - user.pbThis, target.pbThis(true), target.itemName)) - end -end - -#=============================================================================== -# The user takes damage equal to 1/2 of its total HP, even if the target is -# unaffected (this is not recoil damage). (Steel Beam) -#=============================================================================== -class PokeBattle_Move_194 < PokeBattle_Move - def pbEffectAfterAllHits(user, target) - return if !user.takesIndirectDamage? - amt = (user.totalhp / 2.0).ceil - amt = 1 if amt < 1 - user.pbReduceHP(amt, false) - @battle.pbDisplay(_INTL("{1} is damaged by recoil!", user.pbThis)) - user.pbItemHPHealCheck - end -end - -#=============================================================================== -# Decreases the PP of the last attack used by the target by 3 (or as much as -# possible). (Eerie Spell) -#=============================================================================== -class PokeBattle_Move_195 < PokeBattle_Move - def pbFailsAgainstTarget?(user, target, show_message) - last_move = target.pbGetMoveWithID(target.lastRegularMoveUsed) - if !last_move || last_move.pp == 0 || last_move.total_pp <= 0 - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - return false - end - - def pbEffectAgainstTarget(user, target) - last_move = target.pbGetMoveWithID(target.lastRegularMoveUsed) - reduction = [3, last_move.pp].min - target.pbSetPP(last_move, last_move.pp - reduction) - @battle.pbDisplay(_INTL("It reduced the PP of {1}'s {2} by {3}!", - target.pbThis(true), last_move.name, reduction)) - end -end - -#=============================================================================== -# Fails if the target is not holding an item, or if the target is affected by -# Magic Room/Klutz. (Poltergeist) -#=============================================================================== -class PokeBattle_Move_196 < PokeBattle_Move - def pbFailsAgainstTarget?(user, target, show_message) - if !target.item || !target.itemActive? - @battle.pbDisplay(_INTL("But it failed!")) if show_message - return true - end - @battle.pbDisplay(_INTL("{1} is about to be attacked by its {2}!", target.pbThis, target.itemName)) - return false - end -end - -#=============================================================================== -# The user's Defense (and its Defense stat stages) are used instead of the -# user's Attack (and Attack stat stages) to calculate damage. All other effects -# are applied normally, applying the user's Attack modifiers and not the user's -# Defence modifiers. (Body Press) -#=============================================================================== -class PokeBattle_Move_197 < PokeBattle_Move - def pbGetAttackStats(user, target) - return user.defense, user.stages[:DEFENSE] + 6 - end -end - -#=============================================================================== -# All effects that apply to one side of the field are swapped to the opposite -# side. (Court Change) -#=============================================================================== -class PokeBattle_Move_198 < PokeBattle_Move - def initialize(battle, move) - super - @number_effects = [ - PBEffects::AuroraVeil, - PBEffects::LightScreen, - PBEffects::Mist, - PBEffects::Rainbow, - PBEffects::Reflect, - PBEffects::Safeguard, - PBEffects::SeaOfFire, - PBEffects::Spikes, - PBEffects::Swamp, - PBEffects::Tailwind, - PBEffects::ToxicSpikes - ] - @boolean_effects = [ - PBEffects::StealthRock, - PBEffects::StickyWeb - ] - end - - def pbMoveFailed?(user, targets) - has_effect = false - for side in 0...2 - effects = @battle.sides[side].effects - @number_effects.each do |e| - next if effects[e] == 0 - has_effect = true - break - end - break if has_effect - @boolean_effects.each do |e| - next if !effects[e] - has_effect = true - break - end - break if has_effect - end - if !has_effect - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - side0 = @battle.sides[0] - side1 = @battle.sides[1] - @number_effects.each do |e| - side0.effects[e], side1.effects[e] = side1.effects[e], side0.effects[e] - end - @boolean_effects.each do |e| - side0.effects[e], side1.effects[e] = side1.effects[e], side0.effects[e] - end - @battle.pbDisplay(_INTL("{1} swapped the battle effects affecting each side of the field!", user.pbThis)) - end -end - -#=============================================================================== -# Removes the current terrain. Fails if there is no terrain in effect. -# (Steel Roller) -#=============================================================================== -class PokeBattle_Move_199 < PokeBattle_Move - def pbMoveFailed?(user, targets) - if @battle.field.terrain == :None - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbEffectGeneral(user) - case @battle.field.terrain - when :Electric - @battle.pbDisplay(_INTL("The electricity disappeared from the battlefield.")) - when :Grassy - @battle.pbDisplay(_INTL("The grass disappeared from the battlefield.")) - when :Misty - @battle.pbDisplay(_INTL("The mist disappeared from the battlefield.")) - when :Psychic - @battle.pbDisplay(_INTL("The weirdness disappeared from the battlefield.")) - end - @battle.field.terrain = :None - end -end - -#=============================================================================== -# Increases the user's and allies' Attack by 1 stage. (Howl in Gen 8+) -#=============================================================================== -class PokeBattle_Move_19A < PokeBattle_Move - def canSnatch?; return true; end - - def pbMoveFailed?(user, targets) - return false if damagingMove? - failed = true - targets.each do |b| - next if b.pbCanRaiseStatStage?(:ATTACK, user, self) - failed = false - break - end - if failed - @battle.pbDisplay(_INTL("But it failed!")) - return true - end - return false - end - - def pbFailsAgainstTarget?(user, target, show_message) - return false if damagingMove? - return !target.pbCanRaiseStatStage?(:ATTACK, user, self, show_message) - end - - def pbEffectAgainstTarget(user, target) - return if damagingMove? - target.pbRaiseStatStage(:ATTACK, 1, user) - end - - def pbAdditionalEffect(user, target) - return if !target.pbCanRaiseStatStage?(:ATTACK, user, self) - target.pbRaiseStatStage(:ATTACK, 1, user) - end -end diff --git a/Data/Scripts/011_Battle/002_Move/009_MoveEffects_MultiHit.rb b/Data/Scripts/011_Battle/002_Move/009_MoveEffects_MultiHit.rb new file mode 100644 index 000000000..8baa9d564 --- /dev/null +++ b/Data/Scripts/011_Battle/002_Move/009_MoveEffects_MultiHit.rb @@ -0,0 +1,621 @@ +#=============================================================================== +# Hits twice. +#=============================================================================== +class PokeBattle_Move_HitTwoTimes < PokeBattle_Move + def multiHitMove?; return true; end + def pbNumHits(user,targets); return 2; end +end + +#=============================================================================== +# Hits twice. May poison the target on each hit. (Twineedle) +#=============================================================================== +class PokeBattle_Move_HitTwoTimesPoisonTarget < PokeBattle_PoisonMove + def multiHitMove?; return true; end + def pbNumHits(user,targets); return 2; end +end + +#=============================================================================== +# Hits twice. Causes the target to flinch. Does double damage and has perfect +# accuracy if the target is Minimized. (Double Iron Bash) +#=============================================================================== +class PokeBattle_Move_HitTwoTimesFlinchTarget < PokeBattle_FlinchMove + def multiHitMove?; return true; end + def pbNumHits(user,targets); return 2; end + def tramplesMinimize?(param=1); return Settings::MECHANICS_GENERATION <= 7; end +end + +#=============================================================================== +# Hits in 2 volleys. The second volley targets the original target's ally if it +# has one (that can be targeted), or the original target if not. A battler +# cannot be targeted if it is is immune to or protected from this move somehow, +# or if this move will miss it. (Dragon Darts) +# NOTE: This move sometimes shows a different failure message compared to the +# official games. This is because of the order in which failure checks are +# done (all checks for each target in turn, versus all targets for each +# check in turn). This is considered unimportant, and since correcting it +# would involve extensive code rewrites, it is being ignored. +#=============================================================================== +class PokeBattle_Move_HitTwoTimesTargetThenTargetAlly < PokeBattle_Move + def pbNumHits(user, targets); return 1; end + def pbRepeatHit?; return true; end + + def pbModifyTargets(targets, user) + return if targets.length != 1 + choices = [] + targets[0].eachAlly { |b| user.pbAddTarget(choices, user, b, self) } + return if choices.length == 0 + idxChoice = (choices.length > 1) ? @battle.pbRandom(choices.length) : 0 + user.pbAddTarget(targets, user, choices[idxChoice], self, !pbTarget(user).can_choose_distant_target?) + end + + def pbShowFailMessages?(targets) + if targets.length > 1 + valid_targets = targets.select { |b| !b.fainted? && !b.damageState.unaffected } + return valid_targets.length <= 1 + end + return super + end + + def pbDesignateTargetsForHit(targets, hitNum) + valid_targets = [] + targets.each { |b| valid_targets.push(b) if !b.damageState.unaffected } + return [valid_targets[1]] if valid_targets[1] && hitNum == 1 + return [valid_targets[0]] + end +end + +#=============================================================================== +# Hits 3 times. Power is multiplied by the hit number. (Triple Kick) +# An accuracy check is performed for each hit. +#=============================================================================== +class PokeBattle_Move_HitThreeTimesPowersUpWithEachHit < PokeBattle_Move + def multiHitMove?; return true; end + def pbNumHits(user,targets); return 3; end + + def successCheckPerHit? + return @accCheckPerHit + end + + def pbOnStartUse(user,targets) + @calcBaseDmg = 0 + @accCheckPerHit = !user.hasActiveAbility?(:SKILLLINK) + end + + def pbBaseDamage(baseDmg,user,target) + @calcBaseDmg += baseDmg + return @calcBaseDmg + end +end + +#=============================================================================== +# Hits 3 times in a row. If each hit could be a critical hit, it will definitely +# be a critical hit. (Surging Strikes) +#=============================================================================== +class PokeBattle_Move_HitThreeTimesAlwaysCriticalHit < PokeBattle_Move + def multiHitMove?; return true; end + def pbNumHits(user, targets); return 3; end + def pbCritialOverride(user, target); return 1; end +end + +#=============================================================================== +# Hits 2-5 times. +#=============================================================================== +class PokeBattle_Move_HitTwoToFiveTimes < PokeBattle_Move + def multiHitMove?; return true; end + + def pbNumHits(user,targets) + hitChances = [ + 2, 2, 2, 2, 2, 2, 2, + 3, 3, 3, 3, 3, 3, 3, + 4, 4, 4, + 5, 5, 5 + ] + r = @battle.pbRandom(hitChances.length) + r = hitChances.length-1 if user.hasActiveAbility?(:SKILLLINK) + return hitChances[r] + end +end + +#=============================================================================== +# Hits 2-5 times. If the user is Ash Greninja, powers up and hits 3 times. +# (Water Shuriken) +#=============================================================================== +class PokeBattle_Move_HitTwoToFiveTimesOrThreeForAshGreninja < PokeBattle_Move_HitTwoToFiveTimes + def pbNumHits(user,targets) + return 3 if user.isSpecies?(:GRENINJA) && user.form == 2 + return super + end + + def pbBaseDamage(baseDmg,user,target) + return 20 if user.isSpecies?(:GRENINJA) && user.form == 2 + return super + end +end + +#=============================================================================== +# Hits 2-5 times in a row. If the move does not fail, increases the user's Speed +# by 1 stage and decreases the user's Defense by 1 stage. (Scale Shot) +#=============================================================================== +class PokeBattle_Move_HitTwoToFiveTimesRaiseUserSpd1LowerUserDef1 < PokeBattle_Move + def multiHitMove?; return true; end + + def pbNumHits(user, targets) + hitChances = [ + 2, 2, 2, 2, 2, 2, 2, + 3, 3, 3, 3, 3, 3, 3, + 4, 4, 4, + 5, 5, 5] + r = @battle.pbRandom(hitChances.length) + r = hitChances.length - 1 if user.hasActiveAbility?(:SKILLLINK) + return hitChances[r] + end + + def pbEffectAfterAllHits(user, target) + return if target.damageState.unaffected + if user.pbCanLowerStatStage?(:DEFENSE, user, self) + user.pbLowerStatStage(:DEFENSE, 1, user) + end + if user.pbCanRaiseStatStage?(:SPEED, user, self) + user.pbRaiseStatStage(:SPEED, 1, user) + end + end +end + +#=============================================================================== +# Hits X times, where X is the number of non-user unfainted status-free Pokémon +# in the user's party (not including partner trainers). Fails if X is 0. +# Base power of each hit depends on the base Attack stat for the species of that +# hit's participant. (Beat Up) +#=============================================================================== +class PokeBattle_Move_HitOncePerUserTeamMember < PokeBattle_Move + def multiHitMove?; return true; end + + def pbMoveFailed?(user,targets) + @beatUpList = [] + @battle.eachInTeamFromBattlerIndex(user.index) do |pkmn,i| + next if !pkmn.able? || pkmn.status != :NONE + @beatUpList.push(i) + end + if @beatUpList.length==0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbNumHits(user,targets) + return @beatUpList.length + end + + def pbBaseDamage(baseDmg,user,target) + i = @beatUpList.shift # First element in array, and removes it from array + atk = @battle.pbParty(user.index)[i].baseStats[:ATTACK] + return 5+(atk/10) + end +end + +#=============================================================================== +# Attacks first turn, skips second turn (if successful). +#=============================================================================== +class PokeBattle_Move_AttackAndSkipNextTurn < PokeBattle_Move + def pbEffectGeneral(user) + user.effects[PBEffects::HyperBeam] = 2 + user.currentMove = @id + end +end + +#=============================================================================== +# Two turn attack. Skips first turn, attacks second turn. (Razor Wind) +#=============================================================================== +class PokeBattle_Move_TwoTurnAttack < PokeBattle_TwoTurnMove + def pbChargingTurnMessage(user,targets) + @battle.pbDisplay(_INTL("{1} whipped up a whirlwind!",user.pbThis)) + end +end + +#=============================================================================== +# Two turn attack. Skips first turn, attacks second turn. (Solar Beam, Solar Blade) +# Power halved in all weather except sunshine. In sunshine, takes 1 turn instead. +#=============================================================================== +class PokeBattle_Move_TwoTurnAttackOneTurnInSun < PokeBattle_TwoTurnMove + def pbIsChargingTurn?(user) + ret = super + if !user.effects[PBEffects::TwoTurnAttack] + if [:Sun, :HarshSun].include?(user.effectiveWeather) + @powerHerb = false + @chargingTurn = true + @damagingTurn = true + return false + end + end + return ret + end + + def pbChargingTurnMessage(user,targets) + @battle.pbDisplay(_INTL("{1} took in sunlight!",user.pbThis)) + end + + def pbBaseDamageMultiplier(damageMult,user,target) + damageMult /= 2 if ![:None, :Sun, :HarshSun].include?(user.effectiveWeather) + return damageMult + end +end + +#=============================================================================== +# Two turn attack. Skips first turn, attacks second turn. (Freeze Shock) +# May paralyze the target. +#=============================================================================== +class PokeBattle_Move_TwoTurnAttackParalyzeTarget < PokeBattle_TwoTurnMove + def pbChargingTurnMessage(user,targets) + @battle.pbDisplay(_INTL("{1} became cloaked in a freezing light!",user.pbThis)) + end + + def pbAdditionalEffect(user,target) + return if target.damageState.substitute + target.pbParalyze(user) if target.pbCanParalyze?(user,false,self) + end +end + +#=============================================================================== +# Two turn attack. Skips first turn, attacks second turn. (Ice Burn) +# May burn the target. +#=============================================================================== +class PokeBattle_Move_TwoTurnAttackBurnTarget < PokeBattle_TwoTurnMove + def pbChargingTurnMessage(user,targets) + @battle.pbDisplay(_INTL("{1} became cloaked in freezing air!",user.pbThis)) + end + + def pbAdditionalEffect(user,target) + return if target.damageState.substitute + target.pbBurn(user) if target.pbCanBurn?(user,false,self) + end +end + +#=============================================================================== +# Two turn attack. Skips first turn, attacks second turn. (Sky Attack) +# May make the target flinch. +#=============================================================================== +class PokeBattle_Move_TwoTurnAttackFlinchTarget < PokeBattle_TwoTurnMove + def flinchingMove?; return true; end + + def pbChargingTurnMessage(user,targets) + @battle.pbDisplay(_INTL("{1} became cloaked in a harsh light!",user.pbThis)) + end + + def pbAdditionalEffect(user,target) + return if target.damageState.substitute + target.pbFlinch(user) + end +end + +#=============================================================================== +# Two turn attack. Skips first turn, and increases the user's Special Attack, +# Special Defense and Speed by 2 stages each in the second turn. (Geomancy) +#=============================================================================== +class PokeBattle_Move_TwoTurnAttackRaiseUserSpAtkSpDefSpd2 < PokeBattle_TwoTurnMove + def pbMoveFailed?(user,targets) + return false if user.effects[PBEffects::TwoTurnAttack] # Charging turn + if !user.pbCanRaiseStatStage?(:SPECIAL_ATTACK,user,self) && + !user.pbCanRaiseStatStage?(:SPECIAL_DEFENSE,user,self) && + !user.pbCanRaiseStatStage?(:SPEED,user,self) + @battle.pbDisplay(_INTL("{1}'s stats won't go any higher!",user.pbThis)) + return true + end + return false + end + + def pbChargingTurnMessage(user,targets) + @battle.pbDisplay(_INTL("{1} is absorbing power!",user.pbThis)) + end + + def pbEffectGeneral(user) + return if !@damagingTurn + showAnim = true + [:SPECIAL_ATTACK,:SPECIAL_DEFENSE,:SPEED].each do |s| + next if !user.pbCanRaiseStatStage?(s,user,self) + if user.pbRaiseStatStage(s,2,user,showAnim) + showAnim = false + end + end + end +end + +#=============================================================================== +# Two turn attack. Ups user's Defense by 1 stage first turn, attacks second turn. +# (Skull Bash) +#=============================================================================== +class PokeBattle_Move_TwoTurnAttackChargeRaiseUserDefense1 < PokeBattle_TwoTurnMove + def pbChargingTurnMessage(user,targets) + @battle.pbDisplay(_INTL("{1} tucked in its head!",user.pbThis)) + end + + def pbChargingTurnEffect(user,target) + if user.pbCanRaiseStatStage?(:DEFENSE,user,self) + user.pbRaiseStatStage(:DEFENSE,1,user) + end + end +end + +#=============================================================================== +# Two-turn attack. On the first turn, increases the user's Special Attack by 1 +# stage. On the second turn, does damage. (Meteor Beam) +#=============================================================================== +class PokeBattle_Move_TwoTurnAttackChargeRaiseUserSpAtk1 < PokeBattle_TwoTurnMove + def pbChargingTurnMessage(user, targets) + @battle.pbDisplay(_INTL("{1} is overflowing with space power!", user.pbThis)) + end + + def pbChargingTurnEffect(user, target) + if user.pbCanRaiseStatStage?(:SPECIAL_ATTACK, user, self) + user.pbRaiseStatStage(:SPECIAL_ATTACK, 1, user) + end + end +end + +#=============================================================================== +# Two turn attack. Skips first turn, attacks second turn. (Dig) +# (Handled in Battler's pbSuccessCheckPerHit): Is semi-invulnerable during use. +#=============================================================================== +class PokeBattle_Move_TwoTurnAttackInvulnerableUnderground < PokeBattle_TwoTurnMove + def pbChargingTurnMessage(user,targets) + @battle.pbDisplay(_INTL("{1} burrowed its way under the ground!",user.pbThis)) + end +end + +#=============================================================================== +# Two turn attack. Skips first turn, attacks second turn. (Dive) +# (Handled in Battler's pbSuccessCheckPerHit): Is semi-invulnerable during use. +#=============================================================================== +class PokeBattle_Move_TwoTurnAttackInvulnerableUnderwater < PokeBattle_TwoTurnMove + def pbChargingTurnMessage(user,targets) + @battle.pbDisplay(_INTL("{1} hid underwater!",user.pbThis)) + end +end + +#=============================================================================== +# Two turn attack. Skips first turn, attacks second turn. (Fly) +# (Handled in Battler's pbSuccessCheckPerHit): Is semi-invulnerable during use. +#=============================================================================== +class PokeBattle_Move_TwoTurnAttackInvulnerableInSky < PokeBattle_TwoTurnMove + def unusableInGravity?; return true; end + + def pbChargingTurnMessage(user,targets) + @battle.pbDisplay(_INTL("{1} flew up high!",user.pbThis)) + end +end + +#=============================================================================== +# Two turn attack. Skips first turn, attacks second turn. (Bounce) +# May paralyze the target. +# (Handled in Battler's pbSuccessCheckPerHit): Is semi-invulnerable during use. +#=============================================================================== +class PokeBattle_Move_TwoTurnAttackInvulnerableInSkyParalyzeTarget < PokeBattle_TwoTurnMove + def unusableInGravity?; return true; end + + def pbChargingTurnMessage(user,targets) + @battle.pbDisplay(_INTL("{1} sprang up!",user.pbThis)) + end + + def pbAdditionalEffect(user,target) + return if target.damageState.substitute + target.pbParalyze(user) if target.pbCanParalyze?(user,false,self) + end +end + +#=============================================================================== +# Two turn attack. Skips first turn, attacks second turn. (Sky Drop) +# (Handled in Battler's pbSuccessCheckPerHit): Is semi-invulnerable during use. +# Target is also semi-invulnerable during use, and can't take any action. +# Doesn't damage airborne Pokémon (but still makes them unable to move during). +#=============================================================================== +class PokeBattle_Move_TwoTurnAttackInvulnerableInSkyTargetCannotAct < PokeBattle_TwoTurnMove + def unusableInGravity?; return true; end + + def pbIsChargingTurn?(user) + # NOTE: Sky Drop doesn't benefit from Power Herb, probably because it works + # differently (i.e. immobilises the target during use too). + @powerHerb = false + @chargingTurn = (user.effects[PBEffects::TwoTurnAttack].nil?) + @damagingTurn = (!user.effects[PBEffects::TwoTurnAttack].nil?) + return !@damagingTurn + end + + def pbFailsAgainstTarget?(user, target, show_message) + if !target.opposes?(user) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + if target.effects[PBEffects::Substitute]>0 && !ignoresSubstitute?(user) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + if Settings::MECHANICS_GENERATION >= 6 && target.pbWeight>=2000 # 200.0kg + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + if target.semiInvulnerable? || + (target.effects[PBEffects::SkyDrop]>=0 && @chargingTurn) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + if target.effects[PBEffects::SkyDrop]!=user.index && @damagingTurn + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbCalcTypeMod(movetype,user,target) + return Effectiveness::INEFFECTIVE if target.pbHasType?(:FLYING) + return super + end + + def pbChargingTurnMessage(user,targets) + @battle.pbDisplay(_INTL("{1} took {2} into the sky!",user.pbThis,targets[0].pbThis(true))) + end + + def pbAttackingTurnMessage(user,targets) + @battle.pbDisplay(_INTL("{1} was freed from the Sky Drop!",targets[0].pbThis)) + end + + def pbChargingTurnEffect(user,target) + target.effects[PBEffects::SkyDrop] = user.index + end + + def pbAttackingTurnEffect(user,target) + target.effects[PBEffects::SkyDrop] = -1 + end +end + +#=============================================================================== +# Two turn attack. Skips first turn, attacks second turn. Is invulnerable during +# use. Ends target's protections upon hit. (Shadow Force, Phantom Force) +#=============================================================================== +class PokeBattle_Move_TwoTurnAttackInvulnerableRemoveProtections < PokeBattle_TwoTurnMove + def pbChargingTurnMessage(user,targets) + @battle.pbDisplay(_INTL("{1} vanished instantly!",user.pbThis)) + end + + def pbAttackingTurnEffect(user,target) + target.effects[PBEffects::BanefulBunker] = false + target.effects[PBEffects::KingsShield] = false + target.effects[PBEffects::Obstruct] = false + target.effects[PBEffects::Protect] = false + target.effects[PBEffects::SpikyShield] = false + target.pbOwnSide.effects[PBEffects::CraftyShield] = false + target.pbOwnSide.effects[PBEffects::MatBlock] = false + target.pbOwnSide.effects[PBEffects::QuickGuard] = false + target.pbOwnSide.effects[PBEffects::WideGuard] = false + end +end + +#=============================================================================== +# User must use this move for 2 more rounds. No battlers can sleep. (Uproar) +# NOTE: Bulbapedia claims that an uproar will wake up Pokémon even if they have +# Soundproof, and will not allow Pokémon to fall asleep even if they have +# Soundproof. I think this is an oversight, so I've let Soundproof Pokémon +# be unaffected by Uproar waking/non-sleeping effects. +#=============================================================================== +class PokeBattle_Move_MultiTurnAttackPreventSleeping < PokeBattle_Move + def pbEffectGeneral(user) + return if user.effects[PBEffects::Uproar]>0 + user.effects[PBEffects::Uproar] = 3 + user.currentMove = @id + @battle.pbDisplay(_INTL("{1} caused an uproar!",user.pbThis)) + @battle.pbPriority(true).each do |b| + next if b.fainted? || b.status != :SLEEP + next if b.hasActiveAbility?(:SOUNDPROOF) + b.pbCureStatus + end + end +end + +#=============================================================================== +# User must use this move for 1 or 2 more rounds. At end, user becomes confused. +# (Outrage, Petal Dange, Thrash) +#=============================================================================== +class PokeBattle_Move_MultiTurnAttackConfuseUserAtEnd < PokeBattle_Move + def pbEffectAfterAllHits(user,target) + if !target.damageState.unaffected && user.effects[PBEffects::Outrage]==0 + user.effects[PBEffects::Outrage] = 2+@battle.pbRandom(2) + user.currentMove = @id + end + if user.effects[PBEffects::Outrage]>0 + user.effects[PBEffects::Outrage] -= 1 + if user.effects[PBEffects::Outrage]==0 && user.pbCanConfuseSelf?(false) + user.pbConfuse(_INTL("{1} became confused due to fatigue!",user.pbThis)) + end + end + end +end + +#=============================================================================== +# User must use this move for 4 more rounds. Power doubles each round. +# Power is also doubled if user has curled up. (Ice Ball, Rollout) +#=============================================================================== +class PokeBattle_Move_MultiTurnAttackPowersUpEachTurn < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + shift = (5 - user.effects[PBEffects::Rollout]) # 0-4, where 0 is most powerful + shift = 0 if user.effects[PBEffects::Rollout] == 0 # For first turn + shift += 1 if user.effects[PBEffects::DefenseCurl] + baseDmg *= 2**shift + return baseDmg + end + + def pbEffectAfterAllHits(user,target) + if !target.damageState.unaffected && user.effects[PBEffects::Rollout] == 0 + user.effects[PBEffects::Rollout] = 5 + user.currentMove = @id + end + user.effects[PBEffects::Rollout] -= 1 if user.effects[PBEffects::Rollout] > 0 + end +end + +#=============================================================================== +# User bides its time this round and next round. The round after, deals 2x the +# total direct damage it took while biding to the last battler that damaged it. +# (Bide) +#=============================================================================== +class PokeBattle_Move_MultiTurnAttackBideThenReturnDoubleDamage < PokeBattle_FixedDamageMove + def pbAddTarget(targets,user) + return if user.effects[PBEffects::Bide]!=1 # Not the attack turn + idxTarget = user.effects[PBEffects::BideTarget] + t = (idxTarget>=0) ? @battle.battlers[idxTarget] : nil + if !user.pbAddTarget(targets,user,t,self,false) + user.pbAddTargetRandomFoe(targets,user,self,false) + end + end + + def pbMoveFailed?(user,targets) + return false if user.effects[PBEffects::Bide]!=1 # Not the attack turn + if user.effects[PBEffects::BideDamage]==0 + @battle.pbDisplay(_INTL("But it failed!")) + user.effects[PBEffects::Bide] = 0 # No need to reset other Bide variables + return true + end + if targets.length==0 + @battle.pbDisplay(_INTL("But there was no target...")) + user.effects[PBEffects::Bide] = 0 # No need to reset other Bide variables + return true + end + return false + end + + def pbOnStartUse(user,targets) + @damagingTurn = (user.effects[PBEffects::Bide]==1) # If attack turn + end + + def pbDisplayUseMessage(user) + if @damagingTurn # Attack turn + @battle.pbDisplayBrief(_INTL("{1} unleashed energy!",user.pbThis)) + elsif user.effects[PBEffects::Bide]>1 # Charging turns + @battle.pbDisplayBrief(_INTL("{1} is storing energy!",user.pbThis)) + else + super # Start using Bide + end + end + + def pbDamagingMove? # Stops damage being dealt in the charging turns + return false if !@damagingTurn + return super + end + + def pbFixedDamage(user,target) + return user.effects[PBEffects::BideDamage]*2 + end + + def pbEffectGeneral(user) + if user.effects[PBEffects::Bide]==0 # Starting using Bide + user.effects[PBEffects::Bide] = 3 + user.effects[PBEffects::BideDamage] = 0 + user.effects[PBEffects::BideTarget] = -1 + user.currentMove = @id + end + user.effects[PBEffects::Bide] -= 1 + end + + def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) + hitNum = 1 if !@damagingTurn # Charging anim + super + end +end diff --git a/Data/Scripts/011_Battle/002_Move/010_MoveEffects_Healing.rb b/Data/Scripts/011_Battle/002_Move/010_MoveEffects_Healing.rb new file mode 100644 index 000000000..c5d668025 --- /dev/null +++ b/Data/Scripts/011_Battle/002_Move/010_MoveEffects_Healing.rb @@ -0,0 +1,698 @@ +#=============================================================================== +# Heals user to full HP. User falls asleep for 2 more rounds. (Rest) +#=============================================================================== +class PokeBattle_Move_HealUserFullyAndFallAsleep < PokeBattle_HealingMove + def pbMoveFailed?(user,targets) + if user.asleep? + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return true if !user.pbCanSleep?(user,true,self,true) + return true if super + return false + end + + def pbHealAmount(user) + return user.totalhp-user.hp + end + + def pbEffectGeneral(user) + user.pbSleepSelf(_INTL("{1} slept and became healthy!",user.pbThis),3) + super + end +end + +#=============================================================================== +# Heals user by 1/2 of its max HP. +#=============================================================================== +class PokeBattle_Move_HealUserHalfOfTotalHP < PokeBattle_HealingMove + def pbHealAmount(user) + return (user.totalhp/2.0).round + end +end + +#=============================================================================== +# Heals user by an amount depending on the weather. (Moonlight, Morning Sun, +# Synthesis) +#=============================================================================== +class PokeBattle_Move_HealUserDependingOnWeather < PokeBattle_HealingMove + def pbOnStartUse(user,targets) + case user.effectiveWeather + when :Sun, :HarshSun + @healAmount = (user.totalhp*2/3.0).round + when :None, :StrongWinds + @healAmount = (user.totalhp/2.0).round + else + @healAmount = (user.totalhp/4.0).round + end + end + + def pbHealAmount(user) + return @healAmount + end +end + +#=============================================================================== +# Heals user by 1/2 of its max HP, or 2/3 of its max HP in a sandstorm. (Shore Up) +#=============================================================================== +class PokeBattle_Move_HealUserDependingOnSandstorm < PokeBattle_HealingMove + def pbHealAmount(user) + return (user.totalhp * 2 / 3.0).round if user.effectiveWeather == :Sandstorm + return (user.totalhp / 2.0).round + end +end + +#=============================================================================== +# Heals user by 1/2 of its max HP. (Roost) +# User roosts, and its Flying type is ignored for attacks used against it. +#=============================================================================== +class PokeBattle_Move_HealUserHalfOfTotalHPLoseFlyingTypeThisTurn < PokeBattle_HealingMove + def pbHealAmount(user) + return (user.totalhp/2.0).round + end + + def pbEffectGeneral(user) + super + user.effects[PBEffects::Roost] = true + end +end + +#=============================================================================== +# Cures the target's permanent status problems. Heals user by 1/2 of its max HP. +# (Purify) +#=============================================================================== +class PokeBattle_Move_CureTargetStatusHealUserHalfOfTotalHP < PokeBattle_HealingMove + def canSnatch?; return false; end # Because it affects a target + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.status == :NONE + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbHealAmount(user) + return (user.totalhp/2.0).round + end + + def pbEffectAgainstTarget(user,target) + target.pbCureStatus + super + end +end + +#=============================================================================== +# Decreases the target's Attack by 1 stage. Heals user by an amount equal to the +# target's Attack stat (after applying stat stages, before this move decreases +# it). (Strength Sap) +#=============================================================================== +class PokeBattle_Move_HealUserByTargetAttackLowerTargetAttack1 < PokeBattle_Move + def healingMove?; return true; end + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + # NOTE: The official games appear to just check whether the target's Attack + # stat stage is -6 and fail if so, but I've added the "fail if target + # has Contrary and is at +6" check too for symmetry. This move still + # works even if the stat stage cannot be changed due to an ability or + # other effect. + if !@battle.moldBreaker && target.hasActiveAbility?(:CONTRARY) && + target.statStageAtMax?(:ATTACK) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + elsif target.statStageAtMin?(:ATTACK) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + # Calculate target's effective attack value + stageMul = [2,2,2,2,2,2, 2, 3,4,5,6,7,8] + stageDiv = [8,7,6,5,4,3, 2, 2,2,2,2,2,2] + atk = target.attack + atkStage = target.stages[:ATTACK]+6 + healAmt = (atk.to_f*stageMul[atkStage]/stageDiv[atkStage]).floor + # Reduce target's Attack stat + if target.pbCanLowerStatStage?(:ATTACK,user,self) + target.pbLowerStatStage(:ATTACK,1,user) + end + # Heal user + if target.hasActiveAbility?(:LIQUIDOOZE) + @battle.pbShowAbilitySplash(target) + user.pbReduceHP(healAmt) + @battle.pbDisplay(_INTL("{1} sucked up the liquid ooze!",user.pbThis)) + @battle.pbHideAbilitySplash(target) + user.pbItemHPHealCheck + elsif user.canHeal? + healAmt = (healAmt*1.3).floor if user.hasActiveItem?(:BIGROOT) + user.pbRecoverHP(healAmt) + @battle.pbDisplay(_INTL("{1}'s HP was restored.",user.pbThis)) + end + end +end + +#=============================================================================== +# User gains half the HP it inflicts as damage. +#=============================================================================== +class PokeBattle_Move_HealUserByHalfOfDamageDone < PokeBattle_Move + def healingMove?; return Settings::MECHANICS_GENERATION >= 6; end + + def pbEffectAgainstTarget(user,target) + return if target.damageState.hpLost<=0 + hpGain = (target.damageState.hpLost/2.0).round + user.pbRecoverHPFromDrain(hpGain,target) + end +end + +#=============================================================================== +# User gains half the HP it inflicts as damage. Fails if target is not asleep. +# (Dream Eater) +#=============================================================================== +class PokeBattle_Move_HealUserByHalfOfDamageDoneIfTargetAsleep < PokeBattle_Move + def healingMove?; return Settings::MECHANICS_GENERATION >= 6; end + + def pbFailsAgainstTarget?(user, target, show_message) + if !target.asleep? + @battle.pbDisplay(_INTL("{1} wasn't affected!", target.pbThis)) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + return if target.damageState.hpLost<=0 + hpGain = (target.damageState.hpLost/2.0).round + user.pbRecoverHPFromDrain(hpGain,target) + end +end + +#=============================================================================== +# User gains 3/4 the HP it inflicts as damage. (Draining Kiss, Oblivion Wing) +#=============================================================================== +class PokeBattle_Move_HealUserByThreeQuartersOfDamageDone < PokeBattle_Move + def healingMove?; return Settings::MECHANICS_GENERATION >= 6; end + + def pbEffectAgainstTarget(user,target) + return if target.damageState.hpLost<=0 + hpGain = (target.damageState.hpLost*0.75).round + user.pbRecoverHPFromDrain(hpGain,target) + end +end + +#=============================================================================== +# The user and its allies gain 25% of their total HP. (Life Dew) +#=============================================================================== +class PokeBattle_Move_HealUserAndAlliesQuarterOfTotalHP < PokeBattle_Move + def healingMove?; return true; end + + def pbMoveFailed?(user, targets) + failed = true + @battle.eachSameSideBattler(user) do |b| + next if !b.canHeal? + failed = false + break + end + if failed + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + return !target.canHeal? + end + + def pbEffectAgainstTarget(user, target) + target.pbRecoverHP(target.totalhp / 4) + @battle.pbDisplay(_INTL("{1}'s HP was restored.", target.pbThis)) + end +end + +#=============================================================================== +# The user and its allies gain 25% of their total HP and are cured of their +# permanent status problems. (Jungle Healing) +#=============================================================================== +class PokeBattle_Move_HealUserAndAlliesQuarterOfTotalHPCureStatus < PokeBattle_Move + def healingMove?; return true; end + + def pbMoveFailed?(user, targets) + failed = true + @battle.eachSameSideBattler(user) do |b| + next if b.status == :NONE && !b.canHeal? + failed = false + break + end + if failed + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + return target.status == :NONE && !target.canHeal? + end + + def pbEffectAgainstTarget(user, target) + if target.canHeal? + target.pbRecoverHP(target.totalhp / 4) + @battle.pbDisplay(_INTL("{1}'s HP was restored.", target.pbThis)) + end + if target.status != :NONE + old_status = target.status + target.pbCureStatus(false) + case old_status + when :SLEEP + @battle.pbDisplay(_INTL("{1} was woken from sleep.", target.pbThis)) + when :POISON + @battle.pbDisplay(_INTL("{1} was cured of its poisoning.", target.pbThis)) + when :BURN + @battle.pbDisplay(_INTL("{1}'s burn was healed.", target.pbThis)) + when :PARALYSIS + @battle.pbDisplay(_INTL("{1} was cured of paralysis.", target.pbThis)) + when :FROZEN + @battle.pbDisplay(_INTL("{1} was thawed out.", target.pbThis)) + end + end + end +end + +#=============================================================================== +# Heals target by 1/2 of its max HP. (Heal Pulse) +#=============================================================================== +class PokeBattle_Move_HealTargetHalfOfTotalHP < PokeBattle_Move + def healingMove?; return true; end + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.hp==target.totalhp + @battle.pbDisplay(_INTL("{1}'s HP is full!", target.pbThis)) if show_message + return true + elsif !target.canHeal? + @battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis)) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + hpGain = (target.totalhp/2.0).round + if pulseMove? && user.hasActiveAbility?(:MEGALAUNCHER) + hpGain = (target.totalhp*3/4.0).round + end + target.pbRecoverHP(hpGain) + @battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis)) + end +end + +#=============================================================================== +# Heals target by 1/2 of its max HP, or 2/3 of its max HP in Grassy Terrain. +# (Floral Healing) +#=============================================================================== +class PokeBattle_Move_HealTargetDependingOnGrassyTerrain < PokeBattle_Move + def healingMove?; return true; end + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.hp==target.totalhp + @battle.pbDisplay(_INTL("{1}'s HP is full!", target.pbThis)) if show_message + return true + elsif !target.canHeal? + @battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis)) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + hpGain = (target.totalhp/2.0).round + hpGain = (target.totalhp*2/3.0).round if @battle.field.terrain == :Grassy + target.pbRecoverHP(hpGain) + @battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis)) + end +end + +#=============================================================================== +# Battler in user's position is healed by 1/2 of its max HP, at the end of the +# next round. (Wish) +#=============================================================================== +class PokeBattle_Move_HealUserPositionNextTurn < PokeBattle_Move + def healingMove?; return true; end + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if @battle.positions[user.index].effects[PBEffects::Wish]>0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + @battle.positions[user.index].effects[PBEffects::Wish] = 2 + @battle.positions[user.index].effects[PBEffects::WishAmount] = (user.totalhp/2.0).round + @battle.positions[user.index].effects[PBEffects::WishMaker] = user.pokemonIndex + end +end + +#=============================================================================== +# Rings the user. Ringed Pokémon gain 1/16 of max HP at the end of each round. +# (Aqua Ring) +#=============================================================================== +class PokeBattle_Move_StartHealUserEachTurn < PokeBattle_Move + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if user.effects[PBEffects::AquaRing] + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.effects[PBEffects::AquaRing] = true + @battle.pbDisplay(_INTL("{1} surrounded itself with a veil of water!",user.pbThis)) + end +end + +#=============================================================================== +# Ingrains the user. Ingrained Pokémon gain 1/16 of max HP at the end of each +# round, and cannot flee or switch out. (Ingrain) +#=============================================================================== +class PokeBattle_Move_StartHealUserEachTurnTrapUserInBattle < PokeBattle_Move + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if user.effects[PBEffects::Ingrain] + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.effects[PBEffects::Ingrain] = true + @battle.pbDisplay(_INTL("{1} planted its roots!",user.pbThis)) + end +end + +#=============================================================================== +# Target will lose 1/4 of max HP at end of each round, while asleep. (Nightmare) +#=============================================================================== +class PokeBattle_Move_StartDamageTargetEachTurnIfTargetAsleep < PokeBattle_Move + def pbFailsAgainstTarget?(user, target, show_message) + if !target.asleep? || target.effects[PBEffects::Nightmare] + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::Nightmare] = true + @battle.pbDisplay(_INTL("{1} began having a nightmare!",target.pbThis)) + end +end + +#=============================================================================== +# Seeds the target. Seeded Pokémon lose 1/8 of max HP at the end of each round, +# and the Pokémon in the user's position gains the same amount. (Leech Seed) +#=============================================================================== +class PokeBattle_Move_StartLeechSeedTarget < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.effects[PBEffects::LeechSeed]>=0 + @battle.pbDisplay(_INTL("{1} evaded the attack!", target.pbThis)) if show_message + return true + end + if target.pbHasType?(:GRASS) + @battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true))) if show_message + return true + end + return false + end + + def pbMissMessage(user,target) + @battle.pbDisplay(_INTL("{1} evaded the attack!",target.pbThis)) + return true + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::LeechSeed] = user.index + @battle.pbDisplay(_INTL("{1} was seeded!",target.pbThis)) + end +end + +#=============================================================================== +# The user takes damage equal to 1/2 of its total HP, even if the target is +# unaffected (this is not recoil damage). (Steel Beam) +#=============================================================================== +class PokeBattle_Move_UserLosesHalfOfTotalHP < PokeBattle_Move + def pbEffectAfterAllHits(user, target) + return if !user.takesIndirectDamage? + amt = (user.totalhp / 2.0).ceil + amt = 1 if amt < 1 + user.pbReduceHP(amt, false) + @battle.pbDisplay(_INTL("{1} is damaged by recoil!", user.pbThis)) + user.pbItemHPHealCheck + end +end + +#=============================================================================== +# Damages user by 1/2 of its max HP, even if this move misses. (Mind Blown) +#=============================================================================== +class PokeBattle_Move_UserLosesHalfOfTotalHPExplosive < PokeBattle_Move + def worksWithNoTargets?; return true; end + + def pbMoveFailed?(user,targets) + if !@battle.moldBreaker + bearer = @battle.pbCheckGlobalAbility(:DAMP) + if bearer!=nil + @battle.pbShowAbilitySplash(bearer) + if PokeBattle_SceneConstants::USE_ABILITY_SPLASH + @battle.pbDisplay(_INTL("{1} cannot use {2}!",user.pbThis,@name)) + else + @battle.pbDisplay(_INTL("{1} cannot use {2} because of {3}'s {4}!", + user.pbThis,@name,bearer.pbThis(true),bearer.abilityName)) + end + @battle.pbHideAbilitySplash(bearer) + return true + end + end + return false + end + + def pbSelfKO(user) + return if !user.takesIndirectDamage? + user.pbReduceHP((user.totalhp/2.0).round,false) + user.pbItemHPHealCheck + end +end + +#=============================================================================== +# User faints, even if the move does nothing else. (Explosion, Self-Destruct) +#=============================================================================== +class PokeBattle_Move_UserFaintsExplosive < PokeBattle_Move + def worksWithNoTargets?; return true; end + def pbNumHits(user,targets); return 1; end + + def pbMoveFailed?(user,targets) + if !@battle.moldBreaker + bearer = @battle.pbCheckGlobalAbility(:DAMP) + if bearer!=nil + @battle.pbShowAbilitySplash(bearer) + if PokeBattle_SceneConstants::USE_ABILITY_SPLASH + @battle.pbDisplay(_INTL("{1} cannot use {2}!",user.pbThis,@name)) + else + @battle.pbDisplay(_INTL("{1} cannot use {2} because of {3}'s {4}!", + user.pbThis,@name,bearer.pbThis(true),bearer.abilityName)) + end + @battle.pbHideAbilitySplash(bearer) + return true + end + end + return false + end + + def pbSelfKO(user) + return if user.fainted? + user.pbReduceHP(user.hp,false) + user.pbItemHPHealCheck + end +end + +#=============================================================================== +# User faints. If Misty Terrain applies, base power is multiplied by 1.5. +# (Misty Explosion) +#=============================================================================== +class PokeBattle_Move_UserFaintsPowersUpInMistyTerrainExplosive < PokeBattle_Move_UserFaintsExplosive + def pbBaseDamage(baseDmg, user, target) + baseDmg = baseDmg * 3 / 2 if @battle.field.terrain == :Misty + return baseDmg + end +end + +#=============================================================================== +# Inflicts fixed damage equal to user's current HP. (Final Gambit) +# User faints (if successful). +#=============================================================================== +class PokeBattle_Move_UserFaintsFixedDamageUserHP < PokeBattle_FixedDamageMove + def pbNumHits(user,targets); return 1; end + + def pbOnStartUse(user,targets) + @finalGambitDamage = user.hp + end + + def pbFixedDamage(user,target) + return @finalGambitDamage + end + + def pbSelfKO(user) + return if user.fainted? + user.pbReduceHP(user.hp,false) + user.pbItemHPHealCheck + end +end + +#=============================================================================== +# Decreases the target's Attack and Special Attack by 2 stages each. (Memento) +# User faints (if successful). +#=============================================================================== +class PokeBattle_Move_UserFaintsLowerTargetAtkSpAtk2 < PokeBattle_TargetMultiStatDownMove + def canMagicCoat?; return false; end + + def initialize(battle,move) + super + @statDown = [:ATTACK,2,:SPECIAL_ATTACK,2] + end + + # NOTE: The user faints even if the target's stats cannot be changed, so this + # method must always return false to allow the move's usage to continue. + def pbFailsAgainstTarget?(user, target, show_message) + return false + end + + def pbSelfKO(user) + return if user.fainted? + user.pbReduceHP(user.hp,false) + user.pbItemHPHealCheck + end +end + +#=============================================================================== +# User faints. The Pokémon that replaces the user is fully healed (HP and +# status). Fails if user won't be replaced. (Healing Wish) +#=============================================================================== +class PokeBattle_Move_UserFaintsHealAndCureReplacement < PokeBattle_Move + def healingMove?; return true; end + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if !@battle.pbCanChooseNonActive?(user.index) + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbSelfKO(user) + return if user.fainted? + user.pbReduceHP(user.hp,false) + user.pbItemHPHealCheck + @battle.positions[user.index].effects[PBEffects::HealingWish] = true + end +end + +#=============================================================================== +# User faints. The Pokémon that replaces the user is fully healed (HP, PP and +# status). Fails if user won't be replaced. (Lunar Dance) +#=============================================================================== +class PokeBattle_Move_UserFaintsHealAndCureReplacementRestorePP < PokeBattle_Move + def healingMove?; return true; end + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if !@battle.pbCanChooseNonActive?(user.index) + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbSelfKO(user) + return if user.fainted? + user.pbReduceHP(user.hp,false) + user.pbItemHPHealCheck + @battle.positions[user.index].effects[PBEffects::LunarDance] = true + end +end + +#=============================================================================== +# All current battlers will perish after 3 more rounds. (Perish Song) +#=============================================================================== +class PokeBattle_Move_StartPerishCountsForAllBattlers < PokeBattle_Move + def pbMoveFailed?(user,targets) + failed = true + targets.each do |b| + next if b.effects[PBEffects::PerishSong]>0 # Heard it before + failed = false + break + end + if failed + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + return target.effects[PBEffects::PerishSong]>0 # Heard it before + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::PerishSong] = 4 + target.effects[PBEffects::PerishSongUser] = user.index + end + + def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) + super + @battle.pbDisplay(_INTL("All Pokémon that hear the song will faint in three turns!")) + end +end + +#=============================================================================== +# If user is KO'd before it next moves, the battler that caused it also faints. +# (Destiny Bond) +#=============================================================================== +class PokeBattle_Move_AttackerFaintsIfUserFaints < PokeBattle_Move + def pbMoveFailed?(user,targets) + if Settings::MECHANICS_GENERATION >= 7 && user.effects[PBEffects::DestinyBondPrevious] + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.effects[PBEffects::DestinyBond] = true + @battle.pbDisplay(_INTL("{1} is hoping to take its attacker down with it!",user.pbThis)) + end +end + +#=============================================================================== +# If user is KO'd before it next moves, the attack that caused it loses all PP. +# (Grudge) +#=============================================================================== +class PokeBattle_Move_SetAttackerMovePPTo0IfUserFaints < PokeBattle_Move + def pbEffectGeneral(user) + user.effects[PBEffects::Grudge] = true + @battle.pbDisplay(_INTL("{1} wants its target to bear a grudge!",user.pbThis)) + end +end diff --git a/Data/Scripts/011_Battle/002_Move/011_MoveEffects_Items.rb b/Data/Scripts/011_Battle/002_Move/011_MoveEffects_Items.rb new file mode 100644 index 000000000..d79c0415a --- /dev/null +++ b/Data/Scripts/011_Battle/002_Move/011_MoveEffects_Items.rb @@ -0,0 +1,603 @@ +#=============================================================================== +# User steals the target's item, if the user has none itself. (Covet, Thief) +# Items stolen from wild Pokémon are kept after the battle. +#=============================================================================== +class PokeBattle_Move_UserTakesTargetItem < PokeBattle_Move + def pbEffectAfterAllHits(user,target) + return if @battle.wildBattle? && user.opposes? # Wild Pokémon can't thieve + return if user.fainted? + return if target.damageState.unaffected || target.damageState.substitute + return if !target.item || user.item + return if target.unlosableItem?(target.item) + return if user.unlosableItem?(target.item) + return if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker + itemName = target.itemName + user.item = target.item + # Permanently steal the item from wild Pokémon + if @battle.wildBattle? && target.opposes? && !user.initialItem && + target.item == target.initialItem + user.setInitialItem(target.item) + target.pbRemoveItem + else + target.pbRemoveItem(false) + end + @battle.pbDisplay(_INTL("{1} stole {2}'s {3}!",user.pbThis,target.pbThis(true),itemName)) + user.pbHeldItemTriggerCheck + end +end + +#=============================================================================== +# User gives its item to the target. The item remains given after wild battles. +# (Bestow) +#=============================================================================== +class PokeBattle_Move_TargetTakesUserItem < PokeBattle_Move + def ignoresSubstitute?(user) + return true if Settings::MECHANICS_GENERATION >= 6 + return super + end + + def pbMoveFailed?(user,targets) + if !user.item || user.unlosableItem?(user.item) + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.item || target.unlosableItem?(user.item) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + itemName = user.itemName + target.item = user.item + # Permanently steal the item from wild Pokémon + if @battle.wildBattle? && user.opposes? && !target.initialItem && + user.item == user.initialItem + target.setInitialItem(user.item) + user.pbRemoveItem + else + user.pbRemoveItem(false) + end + @battle.pbDisplay(_INTL("{1} received {2} from {3}!",target.pbThis,itemName,user.pbThis(true))) + target.pbHeldItemTriggerCheck + end +end + +#=============================================================================== +# User and target swap items. They remain swapped after wild battles. +# (Switcheroo, Trick) +#=============================================================================== +class PokeBattle_Move_UserTargetSwapItems < PokeBattle_Move + def pbMoveFailed?(user,targets) + if @battle.wildBattle? && user.opposes? + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + if !user.item && !target.item + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + if target.unlosableItem?(target.item) || + target.unlosableItem?(user.item) || + user.unlosableItem?(user.item) || + user.unlosableItem?(target.item) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker + if show_message + @battle.pbShowAbilitySplash(target) + if PokeBattle_SceneConstants::USE_ABILITY_SPLASH + @battle.pbDisplay(_INTL("But it failed to affect {1}!", target.pbThis(true))) + else + @battle.pbDisplay(_INTL("But it failed to affect {1} because of its {2}!", + target.pbThis(true), target.abilityName)) + end + @battle.pbHideAbilitySplash(target) + end + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + oldUserItem = user.item + oldUserItemName = user.itemName + oldTargetItem = target.item + oldTargetItemName = target.itemName + user.item = oldTargetItem + user.effects[PBEffects::ChoiceBand] = nil if user.ability_id != :GORILLATACTICS + user.effects[PBEffects::Unburden] = (!user.item && oldUserItem) + target.item = oldUserItem + target.effects[PBEffects::ChoiceBand] = nil if target.ability_id != :GORILLATACTICS + target.effects[PBEffects::Unburden] = (!target.item && oldTargetItem) + # Permanently steal the item from wild Pokémon + if @battle.wildBattle? && target.opposes? && !user.initialItem && + oldTargetItem == target.initialItem + user.setInitialItem(oldTargetItem) + end + @battle.pbDisplay(_INTL("{1} switched items with its opponent!",user.pbThis)) + @battle.pbDisplay(_INTL("{1} obtained {2}.",user.pbThis,oldTargetItemName)) if oldTargetItem + @battle.pbDisplay(_INTL("{1} obtained {2}.",target.pbThis,oldUserItemName)) if oldUserItem + user.pbHeldItemTriggerCheck + target.pbHeldItemTriggerCheck + end +end + +#=============================================================================== +# User recovers the last item it held and consumed. (Recycle) +#=============================================================================== +class PokeBattle_Move_RestoreUserConsumedItem < PokeBattle_Move + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if !user.recycleItem + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + item = user.recycleItem + user.item = item + user.setInitialItem(item) if @battle.wildBattle? && !user.initialItem + user.setRecycleItem(nil) + user.effects[PBEffects::PickupItem] = nil + user.effects[PBEffects::PickupUse] = 0 + itemName = GameData::Item.get(item).name + if itemName.starts_with_vowel? + @battle.pbDisplay(_INTL("{1} found an {2}!",user.pbThis,itemName)) + else + @battle.pbDisplay(_INTL("{1} found a {2}!",user.pbThis,itemName)) + end + user.pbHeldItemTriggerCheck + end +end + +#=============================================================================== +# Target drops its item. It regains the item at the end of the battle. (Knock Off) +# If target has a losable item, damage is multiplied by 1.5. +#=============================================================================== +class PokeBattle_Move_RemoveTargetItem < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + if Settings::MECHANICS_GENERATION >= 6 && + target.item && !target.unlosableItem?(target.item) + # NOTE: Damage is still boosted even if target has Sticky Hold or a + # substitute. + baseDmg = (baseDmg*1.5).round + end + return baseDmg + end + + def pbEffectAfterAllHits(user,target) + return if @battle.wildBattle? && user.opposes? # Wild Pokémon can't knock off + return if user.fainted? + return if target.damageState.unaffected || target.damageState.substitute + return if !target.item || target.unlosableItem?(target.item) + return if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker + itemName = target.itemName + target.pbRemoveItem(false) + @battle.pbDisplay(_INTL("{1} dropped its {2}!",target.pbThis,itemName)) + end +end + +#=============================================================================== +# Target's berry/Gem is destroyed. (Incinerate) +#=============================================================================== +class PokeBattle_Move_DestroyTargetBerryOrGem < PokeBattle_Move + def pbEffectWhenDealingDamage(user,target) + return if target.damageState.substitute || target.damageState.berryWeakened + return if !target.item || (!target.item.is_berry? && + !(Settings::MECHANICS_GENERATION >= 6 && target.item.is_gem?)) + target.pbRemoveItem + @battle.pbDisplay(_INTL("{1}'s {2} was incinerated!",target.pbThis,target.itemName)) + end +end + +#=============================================================================== +# Negates the effect and usability of the target's held item for the rest of the +# battle (even if it is switched out). Fails if the target doesn't have a held +# item, the item is unlosable, the target has Sticky Hold, or the target is +# behind a substitute. (Corrosive Gas) +#=============================================================================== +class PokeBattle_Move_CorrodeTargetItem < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if !target.item || target.unlosableItem?(target.item) || + target.effects[PBEffects::Substitute] > 0 + @battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis)) if show_message + return true + end + if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker + if show_message + @battle.pbShowAbilitySplash(target) + if PokeBattle_SceneConstants::USE_ABILITY_SPLASH + @battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis)) + else + @battle.pbDisplay(_INTL("{1} is unaffected because of its {2}!", + target.pbThis(true), target.abilityName)) + end + @battle.pbHideAbilitySplash(target) + end + return true + end + if @battle.corrosiveGas[target.index % 2][target.pokemonIndex] + @battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis)) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user, target) + @battle.corrosiveGas[target.index % 2][target.pokemonIndex] = true + @battle.pbDisplay(_INTL("{1} corroded {2}'s {3}!", + user.pbThis, target.pbThis(true), target.itemName)) + end +end + +#=============================================================================== +# For 5 rounds, the target cannnot use its held item, its held item has no +# effect, and no items can be used on it. (Embargo) +#=============================================================================== +class PokeBattle_Move_StartTargetCannotUseItem < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.effects[PBEffects::Embargo]>0 + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::Embargo] = 5 + @battle.pbDisplay(_INTL("{1} can't use items anymore!",target.pbThis)) + end +end + +#=============================================================================== +# For 5 rounds, all held items cannot be used in any way and have no effect. +# Held items can still change hands, but can't be thrown. (Magic Room) +#=============================================================================== +class PokeBattle_Move_StartNegateHeldItems < PokeBattle_Move + def pbEffectGeneral(user) + if @battle.field.effects[PBEffects::MagicRoom]>0 + @battle.field.effects[PBEffects::MagicRoom] = 0 + @battle.pbDisplay(_INTL("The area returned to normal!")) + else + @battle.field.effects[PBEffects::MagicRoom] = 5 + @battle.pbDisplay(_INTL("It created a bizarre area in which Pokémon's held items lose their effects!")) + end + end + + def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) + return if @battle.field.effects[PBEffects::MagicRoom]>0 # No animation + super + end +end + +#=============================================================================== +# The user consumes its held berry and gains its effect. Also, increases the +# user's Defense by 2 stages. The berry can be consumed even if Unnerve/Magic +# Room apply. Fails if the user is not holding a berry. This move cannot be +# chosen to be used if the user is not holding a berry. (Stuff Cheeks) +#=============================================================================== +class PokeBattle_Move_UserConsumeBerryRaiseDefense2 < PokeBattle_StatUpMove + def initialize(battle, move) + super + @statUp = [:DEFENSE, 2] + end + + def pbCanChooseMove?(user, commandPhase, showMessages) + item = user.item + if !item || !item.is_berry? || !user.itemActive? + if showMessages + msg = _INTL("{1} can't use that move because it doesn't have a Berry!", user.pbThis) + (commandPhase) ? @battle.pbDisplayPaused(msg) : @battle.pbDisplay(msg) + end + return false + end + return true + end + + def pbMoveFailed?(user, targets) + # NOTE: Unnerve does not stop a Pokémon using this move. + item = user.item + if !item || !item.is_berry? || !user.itemActive? + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return super + end + + def pbEffectGeneral(user) + super + @battle.pbDisplay(_INTL("{1} ate its {2}!", user.pbThis, user.itemName)) + item = user.item + user.pbConsumeItem(true, false) # Don't trigger Symbiosis yet + user.pbHeldItemTriggerCheck(item, false) + end +end + +#=============================================================================== +# All Pokémon (except semi-invulnerable ones) consume their held berries and +# gain their effects. Berries can be consumed even if Unnerve/Magic Room apply. +# Fails if no Pokémon have a held berry. If this move would trigger an ability +# that negates the move, e.g. Lightning Rod, the bearer of that ability will +# have their ability triggered regardless of whether they are holding a berry, +# and they will not consume their berry. (Teatime) +# TODO: This isn't quite right for the messages shown when a berry is consumed. +#=============================================================================== +class PokeBattle_Move_AllBattlersConsumeBerry < PokeBattle_Move + def pbMoveFailed?(user, targets) + failed = true + targets.each do |b| + next if !b.item || !b.item.is_berry? + next if b.semiInvulnerable? + failed = false + break + end + if failed + @battle.pbDisplay(_INTL("But nothing happened!")) + return true + end + return false + end + + def pbOnStartUse(user, targets) + @battle.pbDisplay(_INTL("It's teatime! Everyone dug in to their Berries!")) + end + + def pbFailsAgainstTarget?(user, target, show_message) + return true if !target.item || !target.item.is_berry? || target.semiInvulnerable? + return false + end + + def pbEffectAgainstTarget(user, target) + @battle.pbCommonAnimation("EatBerry", target) + item = target.item + target.pbConsumeItem(true, false) # Don't trigger Symbiosis yet + target.pbHeldItemTriggerCheck(item, false) + end +end + +#=============================================================================== +# User consumes target's berry and gains its effect. (Bug Bite, Pluck) +#=============================================================================== +class PokeBattle_Move_UserConsumeTargetBerry < PokeBattle_Move + def pbEffectAfterAllHits(user,target) + return if user.fainted? || target.fainted? + return if target.damageState.unaffected || target.damageState.substitute + return if !target.item || !target.item.is_berry? + return if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker + item = target.item + itemName = target.itemName + target.pbRemoveItem + @battle.pbDisplay(_INTL("{1} stole and ate its target's {2}!",user.pbThis,itemName)) + user.pbHeldItemTriggerCheck(item,false) + end +end + +#=============================================================================== +# User flings its item at the target. Power/effect depend on the item. (Fling) +#=============================================================================== +class PokeBattle_Move_ThrowUserItemAtTarget < PokeBattle_Move + def initialize(battle,move) + super + # 80 => all Mega Stones + # 10 => all Berries + @flingPowers = { + 130 => [:IRONBALL + ], + 100 => [:HARDSTONE,:RAREBONE, + # Fossils + :ARMORFOSSIL,:CLAWFOSSIL,:COVERFOSSIL,:DOMEFOSSIL,:HELIXFOSSIL, + :JAWFOSSIL,:OLDAMBER,:PLUMEFOSSIL,:ROOTFOSSIL,:SAILFOSSIL, + :SKULLFOSSIL + ], + 90 => [:DEEPSEATOOTH,:GRIPCLAW,:THICKCLUB, + # Plates + :DRACOPLATE,:DREADPLATE,:EARTHPLATE,:FISTPLATE,:FLAMEPLATE, + :ICICLEPLATE,:INSECTPLATE,:IRONPLATE,:MEADOWPLATE,:MINDPLATE, + :PIXIEPLATE,:SKYPLATE,:SPLASHPLATE,:SPOOKYPLATE,:STONEPLATE, + :TOXICPLATE,:ZAPPLATE + ], + 80 => [:ASSAULTVEST,:CHIPPEDPOT,:CRACKEDPOT,:DAWNSTONE,:DUSKSTONE, + :ELECTIRIZER,:HEAVYDUTYBOOTS,:MAGMARIZER,:ODDKEYSTONE,:OVALSTONE, + :PROTECTOR,:QUICKCLAW,:RAZORCLAW,:SACHET,:SAFETYGOGGLES, + :SHINYSTONE,:STICKYBARB,:WEAKNESSPOLICY,:WHIPPEDDREAM + ], + 70 => [:DRAGONFANG,:POISONBARB, + # EV-training items (Macho Brace is 60) + :POWERANKLET,:POWERBAND,:POWERBELT,:POWERBRACER,:POWERLENS, + :POWERWEIGHT, + # Drives + :BURNDRIVE,:CHILLDRIVE,:DOUSEDRIVE,:SHOCKDRIVE + ], + 60 => [:ADAMANTORB,:DAMPROCK,:GRISEOUSORB,:HEATROCK,:LEEK,:LUSTROUSORB, + :MACHOBRACE,:ROCKYHELMET,:STICK,:TERRAINEXTENDER + ], + 50 => [:DUBIOUSDISC,:SHARPBEAK, + # Memories + :BUGMEMORY,:DARKMEMORY,:DRAGONMEMORY,:ELECTRICMEMORY,:FAIRYMEMORY, + :FIGHTINGMEMORY,:FIREMEMORY,:FLYINGMEMORY,:GHOSTMEMORY, + :GRASSMEMORY,:GROUNDMEMORY,:ICEMEMORY,:POISONMEMORY, + :PSYCHICMEMORY,:ROCKMEMORY,:STEELMEMORY,:WATERMEMORY + ], + 40 => [:EVIOLITE,:ICYROCK,:LUCKYPUNCH + ], + 30 => [:ABSORBBULB,:ADRENALINEORB,:AMULETCOIN,:BINDINGBAND,:BLACKBELT, + :BLACKGLASSES,:BLACKSLUDGE,:BOTTLECAP,:CELLBATTERY,:CHARCOAL, + :CLEANSETAG,:DEEPSEASCALE,:DRAGONSCALE,:EJECTBUTTON,:ESCAPEROPE, + :EXPSHARE,:FLAMEORB,:FLOATSTONE,:FLUFFYTAIL,:GOLDBOTTLECAP, + :HEARTSCALE,:HONEY,:KINGSROCK,:LIFEORB,:LIGHTBALL,:LIGHTCLAY, + :LUCKYEGG,:LUMINOUSMOSS,:MAGNET,:METALCOAT,:METRONOME, + :MIRACLESEED,:MYSTICWATER,:NEVERMELTICE,:PASSORB,:POKEDOLL, + :POKETOY,:PRISMSCALE,:PROTECTIVEPADS,:RAZORFANG,:SACREDASH, + :SCOPELENS,:SHELLBELL,:SHOALSALT,:SHOALSHELL,:SMOKEBALL,:SNOWBALL, + :SOULDEW,:SPELLTAG,:TOXICORB,:TWISTEDSPOON,:UPGRADE, + # Healing items + :ANTIDOTE,:AWAKENING,:BERRYJUICE,:BIGMALASADA,:BLUEFLUTE, + :BURNHEAL,:CASTELIACONE,:ELIXIR,:ENERGYPOWDER,:ENERGYROOT,:ETHER, + :FRESHWATER,:FULLHEAL,:FULLRESTORE,:HEALPOWDER,:HYPERPOTION, + :ICEHEAL,:LAVACOOKIE,:LEMONADE,:LUMIOSEGALETTE,:MAXELIXIR, + :MAXETHER,:MAXHONEY,:MAXPOTION,:MAXREVIVE,:MOOMOOMILK,:OLDGATEAU, + :PARALYZEHEAL,:PARLYZHEAL,:PEWTERCRUNCHIES,:POTION,:RAGECANDYBAR, + :REDFLUTE,:REVIVALHERB,:REVIVE,:SHALOURSABLE,:SODAPOP, + :SUPERPOTION,:SWEETHEART,:YELLOWFLUTE, + # Battle items + :XACCURACY,:XACCURACY2,:XACCURACY3,:XACCURACY6, + :XATTACK,:XATTACK2,:XATTACK3,:XATTACK6, + :XDEFEND,:XDEFEND2,:XDEFEND3,:XDEFEND6, + :XDEFENSE,:XDEFENSE2,:XDEFENSE3,:XDEFENSE6, + :XSPATK,:XSPATK2,:XSPATK3,:XSPATK6, + :XSPECIAL,:XSPECIAL2,:XSPECIAL3,:XSPECIAL6, + :XSPDEF,:XSPDEF2,:XSPDEF3,:XSPDEF6, + :XSPEED,:XSPEED2,:XSPEED3,:XSPEED6, + :DIREHIT,:DIREHIT2,:DIREHIT3, + :ABILITYURGE,:GUARDSPEC,:ITEMDROP,:ITEMURGE,:RESETURGE, + :MAXMUSHROOMS, + # Vitamins + :CALCIUM,:CARBOS,:HPUP,:IRON,:PPUP,:PPMAX,:PROTEIN,:ZINC, + :RARECANDY, + # Most evolution stones (see also 80) + :EVERSTONE,:FIRESTONE,:ICESTONE,:LEAFSTONE,:MOONSTONE,:SUNSTONE, + :THUNDERSTONE,:WATERSTONE,:SWEETAPPLE,:TARTAPPLE, :GALARICACUFF, + :GALARICAWREATH, + # Repels + :MAXREPEL,:REPEL,:SUPERREPEL, + # Mulches + :AMAZEMULCH,:BOOSTMULCH,:DAMPMULCH,:GOOEYMULCH,:GROWTHMULCH, + :RICHMULCH,:STABLEMULCH,:SURPRISEMULCH, + # Shards + :BLUESHARD,:GREENSHARD,:REDSHARD,:YELLOWSHARD, + # Valuables + :BALMMUSHROOM,:BIGMUSHROOM,:BIGNUGGET,:BIGPEARL,:COMETSHARD, + :NUGGET,:PEARL,:PEARLSTRING,:RELICBAND,:RELICCOPPER,:RELICCROWN, + :RELICGOLD,:RELICSILVER,:RELICSTATUE,:RELICVASE,:STARDUST, + :STARPIECE,:STRANGESOUVENIR,:TINYMUSHROOM, + # Exp Candies + :EXPCANDYXS, :EXPCANDYS, :EXPCANDYM, :EXPCANDYL, :EXPCANDYXL + ], + 20 => [# Feathers + :CLEVERFEATHER,:GENIUSFEATHER,:HEALTHFEATHER,:MUSCLEFEATHER, + :PRETTYFEATHER,:RESISTFEATHER,:SWIFTFEATHER, + :CLEVERWING,:GENIUSWING,:HEALTHWING,:MUSCLEWING,:PRETTYWING, + :RESISTWING,:SWIFTWING + ], + 10 => [:AIRBALLOON,:BIGROOT,:BRIGHTPOWDER,:CHOICEBAND,:CHOICESCARF, + :CHOICESPECS,:DESTINYKNOT,:DISCOUNTCOUPON,:EXPERTBELT,:FOCUSBAND, + :FOCUSSASH,:LAGGINGTAIL,:LEFTOVERS,:MENTALHERB,:METALPOWDER, + :MUSCLEBAND,:POWERHERB,:QUICKPOWDER,:REAPERCLOTH,:REDCARD, + :RINGTARGET,:SHEDSHELL,:SILKSCARF,:SILVERPOWDER,:SMOOTHROCK, + :SOFTSAND,:SOOTHEBELL,:WHITEHERB,:WIDELENS,:WISEGLASSES,:ZOOMLENS, + # Terrain seeds + :ELECTRICSEED,:GRASSYSEED,:MISTYSEED,:PSYCHICSEED, + # Nectar + :PINKNECTAR,:PURPLENECTAR,:REDNECTAR,:YELLOWNECTAR, + # Incenses + :FULLINCENSE,:LAXINCENSE,:LUCKINCENSE,:ODDINCENSE,:PUREINCENSE, + :ROCKINCENSE,:ROSEINCENSE,:SEAINCENSE,:WAVEINCENSE, + # Scarves + :BLUESCARF,:GREENSCARF,:PINKSCARF,:REDSCARF,:YELLOWSCARF, + # Mints + :LONELYMINT, :ADAMANTMINT, :NAUGHTYMINT, :BRAVEMINT, :BOLDMINT, + :IMPISHMINT, :LAXMINT, :RELAXEDMINT, :MODESTMINT, :MILDMINT, + :RASHMINT, :QUIETMINT, :CALMMINT, :GENTLEMINT, :CAREFULMINT, + :SASSYMINT, :TIMIDMINT, :HASTYMINT, :JOLLYMINT, :NAIVEMINT, + :SERIOUSMINT, + # Sweets + :STRAWBERRYSWEET, :LOVESWEET, :BERRYSWEET, :CLOVERSWEET, + :FLOWERSWEET, :STARSWEET, :RIBBONSWEET + ] + } + end + + def pbCheckFlingSuccess(user) + @willFail = false + @willFail = true if !user.item || !user.itemActive? || user.unlosableItem?(user.item) + return if @willFail + @willFail = true if user.item.is_berry? && !user.canConsumeBerry? + return if @willFail + return if user.item.is_mega_stone? || user.item.is_TR? + flingableItem = false + @flingPowers.each do |_power, items| + next if !items.include?(user.item_id) + flingableItem = true + break + end + @willFail = true if !flingableItem + end + + def pbMoveFailed?(user,targets) + if @willFail + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbDisplayUseMessage(user) + super + pbCheckFlingSuccess(user) + if !@willFail + @battle.pbDisplay(_INTL("{1} flung its {2}!",user.pbThis,user.itemName)) + end + end + + def pbNumHits(user,targets); return 1; end + + def pbBaseDamage(baseDmg,user,target) + return 0 if !user.item + return 10 if user.item.is_berry? + return 80 if user.item.is_mega_stone? + if user.item.is_TR? + ret = GameData::Move.get(user.item.move).base_damage + ret = 10 if ret < 10 + return ret + end + @flingPowers.each do |power,items| + return power if items.include?(user.item_id) + end + return 10 + end + + def pbEffectAgainstTarget(user,target) + return if target.damageState.substitute + return if target.hasActiveAbility?(:SHIELDDUST) && !@battle.moldBreaker + case user.item_id + when :POISONBARB + target.pbPoison(user) if target.pbCanPoison?(user,false,self) + when :TOXICORB + target.pbPoison(user,nil,true) if target.pbCanPoison?(user,false,self) + when :FLAMEORB + target.pbBurn(user) if target.pbCanBurn?(user,false,self) + when :LIGHTBALL + target.pbParalyze(user) if target.pbCanParalyze?(user,false,self) + when :KINGSROCK, :RAZORFANG + target.pbFlinch(user) + else + target.pbHeldItemTriggerCheck(user.item,true) + end + end + + def pbEndOfMoveUsageEffect(user,targets,numHits,switchedBattlers) + # NOTE: The item is consumed even if this move was Protected against or it + # missed. The item is not consumed if the target was switched out by + # an effect like a target's Red Card. + # NOTE: There is no item consumption animation. + user.pbConsumeItem(true,true,false) if user.item + end +end diff --git a/Data/Scripts/011_Battle/002_Move/012_MoveEffects_ChangeMoveEffect.rb b/Data/Scripts/011_Battle/002_Move/012_MoveEffects_ChangeMoveEffect.rb new file mode 100644 index 000000000..c1c512450 --- /dev/null +++ b/Data/Scripts/011_Battle/002_Move/012_MoveEffects_ChangeMoveEffect.rb @@ -0,0 +1,1311 @@ +#=============================================================================== +# This round, user becomes the target of attacks that have single targets. +# (Follow Me, Rage Powder) +#=============================================================================== +class PokeBattle_Move_RedirectAllMovesToUser < PokeBattle_Move + def pbEffectGeneral(user) + user.effects[PBEffects::FollowMe] = 1 + user.eachAlly do |b| + next if b.effects[PBEffects::FollowMe]0 = damage + r = @battle.pbRandom(100) + if r<40 + @presentDmg = 40 + elsif r<70 + @presentDmg = 80 + elsif r<80 + @presentDmg = 120 + end + end + + def pbFailsAgainstTarget?(user, target, show_message) + return false if @presentDmg>0 + if !target.canHeal? + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbDamagingMove? + return false if @presentDmg==0 + return super + end + + def pbBaseDamage(baseDmg,user,target) + return @presentDmg + end + + def pbEffectAgainstTarget(user,target) + return if @presentDmg>0 + target.pbRecoverHP(target.totalhp/4) + @battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis)) + end + + def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) + hitNum = 1 if @presentDmg==0 # Healing anim + super + end +end + +#=============================================================================== +# Damages target if target is a foe, or heals target by 1/2 of its max HP if +# target is an ally. (Pollen Puff) +#=============================================================================== +class PokeBattle_Move_HealAllyOrDamageFoe < PokeBattle_Move + def pbTarget(user) + return GameData::Target.get(:NearFoe) if user.effects[PBEffects::HealBlock]>0 + return super + end + + def pbOnStartUse(user,targets) + @healing = false + @healing = !user.opposes?(targets[0]) if targets.length>0 + end + + def pbFailsAgainstTarget?(user, target, show_message) + return false if !@healing + if target.effects[PBEffects::Substitute]>0 && !ignoresSubstitute?(user) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + if !target.canHeal? + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbDamagingMove? + return false if @healing + return super + end + + def pbEffectAgainstTarget(user,target) + return if !@healing + target.pbRecoverHP(target.totalhp/2) + @battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis)) + end + + def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) + hitNum = 1 if @healing # Healing anim + super + end +end + +#=============================================================================== +# User is Ghost: User loses 1/2 of max HP, and curses the target. +# Cursed Pokémon lose 1/4 of their max HP at the end of each round. +# User is not Ghost: Decreases the user's Speed by 1 stage, and increases the +# user's Attack and Defense by 1 stage each. (Curse) +#=============================================================================== +class PokeBattle_Move_CurseTargetOrLowerUserSpd1RaiseUserAtkDef1 < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + + def pbTarget(user) + if user.pbHasType?(:GHOST) + ghost_target = (Settings::MECHANICS_GENERATION >= 8) ? :RandomNearFoe : :NearFoe + return GameData::Target.get(ghost_target) + end + return super + end + + def pbMoveFailed?(user,targets) + return false if user.pbHasType?(:GHOST) + if !user.pbCanLowerStatStage?(:SPEED,user,self) && + !user.pbCanRaiseStatStage?(:ATTACK,user,self) && + !user.pbCanRaiseStatStage?(:DEFENSE,user,self) + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbFailsAgainstTarget?(user, target, show_message) + if user.pbHasType?(:GHOST) && target.effects[PBEffects::Curse] + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectGeneral(user) + return if user.pbHasType?(:GHOST) + # Non-Ghost effect + if user.pbCanLowerStatStage?(:SPEED,user,self) + user.pbLowerStatStage(:SPEED,1,user) + end + showAnim = true + if user.pbCanRaiseStatStage?(:ATTACK,user,self) + if user.pbRaiseStatStage(:ATTACK,1,user,showAnim) + showAnim = false + end + end + if user.pbCanRaiseStatStage?(:DEFENSE,user,self) + user.pbRaiseStatStage(:DEFENSE,1,user,showAnim) + end + end + + def pbEffectAgainstTarget(user,target) + return if !user.pbHasType?(:GHOST) + # Ghost effect + @battle.pbDisplay(_INTL("{1} cut its own HP and laid a curse on {2}!",user.pbThis,target.pbThis(true))) + target.effects[PBEffects::Curse] = true + user.pbReduceHP(user.totalhp/2,false) + user.pbItemHPHealCheck + end + + def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) + hitNum = 1 if !user.pbHasType?(:GHOST) # Non-Ghost anim + super + end +end + +#=============================================================================== +# Effect depends on the environment. (Secret Power) +#=============================================================================== +class PokeBattle_Move_EffectDependsOnEnvironment < PokeBattle_Move + def flinchingMove?; return [6,10,12].include?(@secretPower); end + + def pbOnStartUse(user,targets) + # NOTE: This is Gen 7's list plus some of Gen 6 plus a bit of my own. + @secretPower = 0 # Body Slam, paralysis + case @battle.field.terrain + when :Electric + @secretPower = 1 # Thunder Shock, paralysis + when :Grassy + @secretPower = 2 # Vine Whip, sleep + when :Misty + @secretPower = 3 # Fairy Wind, lower Sp. Atk by 1 + when :Psychic + @secretPower = 4 # Confusion, lower Speed by 1 + else + case @battle.environment + when :Grass, :TallGrass, :Forest, :ForestGrass + @secretPower = 2 # (Same as Grassy Terrain) + when :MovingWater, :StillWater, :Underwater + @secretPower = 5 # Water Pulse, lower Attack by 1 + when :Puddle + @secretPower = 6 # Mud Shot, lower Speed by 1 + when :Cave + @secretPower = 7 # Rock Throw, flinch + when :Rock, :Sand + @secretPower = 8 # Mud-Slap, lower Acc by 1 + when :Snow, :Ice + @secretPower = 9 # Ice Shard, freeze + when :Volcano + @secretPower = 10 # Incinerate, burn + when :Graveyard + @secretPower = 11 # Shadow Sneak, flinch + when :Sky + @secretPower = 12 # Gust, lower Speed by 1 + when :Space + @secretPower = 13 # Swift, flinch + when :UltraSpace + @secretPower = 14 # Psywave, lower Defense by 1 + end + end + end + + # NOTE: This intentionally doesn't use def pbAdditionalEffect, because that + # method is called per hit and this move's additional effect only occurs + # once per use, after all the hits have happened (two hits are possible + # via Parental Bond). + def pbEffectAfterAllHits(user,target) + return if target.fainted? + return if target.damageState.unaffected || target.damageState.substitute + chance = pbAdditionalEffectChance(user,target) + return if @battle.pbRandom(100)>=chance + case @secretPower + when 2 + target.pbSleep if target.pbCanSleep?(user,false,self) + when 10 + target.pbBurn(user) if target.pbCanBurn?(user,false,self) + when 0, 1 + target.pbParalyze(user) if target.pbCanParalyze?(user,false,self) + when 9 + target.pbFreeze if target.pbCanFreeze?(user,false,self) + when 5 + if target.pbCanLowerStatStage?(:ATTACK,user,self) + target.pbLowerStatStage(:ATTACK,1,user) + end + when 14 + if target.pbCanLowerStatStage?(:DEFENSE,user,self) + target.pbLowerStatStage(:DEFENSE,1,user) + end + when 3 + if target.pbCanLowerStatStage?(:SPECIAL_ATTACK,user,self) + target.pbLowerStatStage(:SPECIAL_ATTACK,1,user) + end + when 4, 6, 12 + if target.pbCanLowerStatStage?(:SPEED,user,self) + target.pbLowerStatStage(:SPEED,1,user) + end + when 8 + if target.pbCanLowerStatStage?(:ACCURACY,user,self) + target.pbLowerStatStage(:ACCURACY,1,user) + end + when 7, 11, 13 + target.pbFlinch(user) + end + end + + def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) + id = :BODYSLAM # Environment-specific anim + case @secretPower + when 1 then id = :THUNDERSHOCK if GameData::Move.exists?(:THUNDERSHOCK) + when 2 then id = :VINEWHIP if GameData::Move.exists?(:VINEWHIP) + when 3 then id = :FAIRYWIND if GameData::Move.exists?(:FAIRYWIND) + when 4 then id = :CONFUSIO if GameData::Move.exists?(:CONFUSION) + when 5 then id = :WATERPULSE if GameData::Move.exists?(:WATERPULSE) + when 6 then id = :MUDSHOT if GameData::Move.exists?(:MUDSHOT) + when 7 then id = :ROCKTHROW if GameData::Move.exists?(:ROCKTHROW) + when 8 then id = :MUDSLAP if GameData::Move.exists?(:MUDSLAP) + when 9 then id = :ICESHARD if GameData::Move.exists?(:ICESHARD) + when 10 then id = :INCINERATE if GameData::Move.exists?(:INCINERATE) + when 11 then id = :SHADOWSNEAK if GameData::Move.exists?(:SHADOWSNEAK) + when 12 then id = :GUST if GameData::Move.exists?(:GUST) + when 13 then id = :SWIFT if GameData::Move.exists?(:SWIFT) + when 14 then id = :PSYWAVE if GameData::Move.exists?(:PSYWAVE) + end + super + end +end + +#=============================================================================== +# If Psychic Terrain applies and the user is grounded, power is multiplied by +# 1.5 (in addition to Psychic Terrain's multiplier) and it targets all opposing +# Pokémon. (Expanding Force) +#=============================================================================== +class PokeBattle_Move_HitsAllFoesAndPowersUpInPsychicTerrain < PokeBattle_Move + def pbTarget(user) + if @battle.field.terrain == :Psychic && user.affectedByTerrain? + return GameData::Target.get(:AllNearFoes) + end + return super + end + + def pbBaseDamage(baseDmg, user, target) + if @battle.field.terrain == :Psychic && user.affectedByTerrain? + baseDmg = baseDmg * 3 / 2 + end + return baseDmg + end +end + +#=============================================================================== +# Powders the foe. This round, if it uses a Fire move, it loses 1/4 of its max +# HP instead. (Powder) +#=============================================================================== +class PokeBattle_Move_TargetNextFireMoveDamagesTarget < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.effects[PBEffects::Powder] + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::Powder] = true + @battle.pbDisplay(_INTL("{1} is covered in powder!",user.pbThis)) + end +end + +#=============================================================================== +# Power is doubled if Fusion Flare has already been used this round. (Fusion Bolt) +#=============================================================================== +class PokeBattle_Move_DoublePowerAfterFusionFlare < PokeBattle_Move + def pbChangeUsageCounters(user,specialUsage) + @doublePower = @battle.field.effects[PBEffects::FusionFlare] + super + end + + def pbBaseDamageMultiplier(damageMult,user,target) + damageMult *= 2 if @doublePower + return damageMult + end + + def pbEffectGeneral(user) + @battle.field.effects[PBEffects::FusionBolt] = true + end + + def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) + hitNum = 1 if (targets.length>0 && targets[0].damageState.critical) || + @doublePower # Charged anim + super + end +end + +#=============================================================================== +# Power is doubled if Fusion Bolt has already been used this round. (Fusion Flare) +#=============================================================================== +class PokeBattle_Move_DoublePowerAfterFusionBolt < PokeBattle_Move + def pbChangeUsageCounters(user,specialUsage) + @doublePower = @battle.field.effects[PBEffects::FusionBolt] + super + end + + def pbBaseDamageMultiplier(damageMult,user,target) + damageMult *= 2 if @doublePower + return damageMult + end + + def pbEffectGeneral(user) + @battle.field.effects[PBEffects::FusionFlare] = true + end + + def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) + hitNum = 1 if (targets.length>0 && targets[0].damageState.critical) || + @doublePower # Charged anim + super + end +end + +#=============================================================================== +# Powers up the ally's attack this round by 1.5. (Helping Hand) +#=============================================================================== +class PokeBattle_Move_PowerUpAllyMove < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.fainted? || target.effects[PBEffects::HelpingHand] + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return true if pbMoveFailedTargetAlreadyMoved?(target, show_message) + return false + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::HelpingHand] = true + @battle.pbDisplay(_INTL("{1} is ready to help {2}!",user.pbThis,target.pbThis(true))) + end +end + +#=============================================================================== +# Counters a physical move used against the user this round, with 2x the power. +# (Counter) +#=============================================================================== +class PokeBattle_Move_CounterPhysicalDamage < PokeBattle_FixedDamageMove + def pbAddTarget(targets,user) + t = user.effects[PBEffects::CounterTarget] + return if t<0 || !user.opposes?(t) + user.pbAddTarget(targets,user,@battle.battlers[t],self,false) + end + + def pbMoveFailed?(user,targets) + if targets.length==0 + @battle.pbDisplay(_INTL("But there was no target...")) + return true + end + return false + end + + def pbFixedDamage(user,target) + dmg = user.effects[PBEffects::Counter]*2 + dmg = 1 if dmg==0 + return dmg + end +end + +#=============================================================================== +# Counters a specical move used against the user this round, with 2x the power. +# (Mirror Coat) +#=============================================================================== +class PokeBattle_Move_CounterSpecialDamage < PokeBattle_FixedDamageMove + def pbAddTarget(targets,user) + t = user.effects[PBEffects::MirrorCoatTarget] + return if t<0 || !user.opposes?(t) + user.pbAddTarget(targets,user,@battle.battlers[t],self,false) + end + + def pbMoveFailed?(user,targets) + if targets.length==0 + @battle.pbDisplay(_INTL("But there was no target...")) + return true + end + return false + end + + def pbFixedDamage(user,target) + dmg = user.effects[PBEffects::MirrorCoat]*2 + dmg = 1 if dmg==0 + return dmg + end +end + +#=============================================================================== +# Counters the last damaging move used against the user this round, with 1.5x +# the power. (Metal Burst) +#=============================================================================== +class PokeBattle_Move_CounterDamagePlusHalf < PokeBattle_FixedDamageMove + def pbAddTarget(targets,user) + return if user.lastFoeAttacker.length==0 + lastAttacker = user.lastFoeAttacker.last + return if lastAttacker<0 || !user.opposes?(lastAttacker) + user.pbAddTarget(targets,user,@battle.battlers[lastAttacker],self,false) + end + + def pbMoveFailed?(user,targets) + if targets.length==0 + @battle.pbDisplay(_INTL("But there was no target...")) + return true + end + return false + end + + def pbFixedDamage(user,target) + dmg = (user.lastHPLostFromFoe*1.5).floor + dmg = 1 if dmg==0 + return dmg + end +end + +#=============================================================================== +# Increases the user's Defense and Special Defense by 1 stage each. Ups the +# user's stockpile by 1 (max. 3). (Stockpile) +#=============================================================================== +class PokeBattle_Move_UserAddStockpileRaiseDefSpDef1 < PokeBattle_Move + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if user.effects[PBEffects::Stockpile]>=3 + @battle.pbDisplay(_INTL("{1} can't stockpile any more!",user.pbThis)) + return true + end + return false + end + + def pbEffectGeneral(user) + user.effects[PBEffects::Stockpile] += 1 + @battle.pbDisplay(_INTL("{1} stockpiled {2}!", + user.pbThis,user.effects[PBEffects::Stockpile])) + showAnim = true + if user.pbCanRaiseStatStage?(:DEFENSE,user,self) + if user.pbRaiseStatStage(:DEFENSE,1,user,showAnim) + user.effects[PBEffects::StockpileDef] += 1 + showAnim = false + end + end + if user.pbCanRaiseStatStage?(:SPECIAL_DEFENSE,user,self) + if user.pbRaiseStatStage(:SPECIAL_DEFENSE,1,user,showAnim) + user.effects[PBEffects::StockpileSpDef] += 1 + end + end + end +end + +#=============================================================================== +# Power is 100 multiplied by the user's stockpile (X). Resets the stockpile to +# 0. Decreases the user's Defense and Special Defense by X stages each. (Spit Up) +#=============================================================================== +class PokeBattle_Move_PowerDependsOnUserStockpile < PokeBattle_Move + def pbMoveFailed?(user,targets) + if user.effects[PBEffects::Stockpile]==0 + @battle.pbDisplay(_INTL("But it failed to spit up a thing!")) + return true + end + return false + end + + def pbBaseDamage(baseDmg,user,target) + return 100*user.effects[PBEffects::Stockpile] + end + + def pbEffectAfterAllHits(user,target) + return if user.fainted? || user.effects[PBEffects::Stockpile]==0 + return if target.damageState.unaffected + @battle.pbDisplay(_INTL("{1}'s stockpiled effect wore off!",user.pbThis)) + return if @battle.pbAllFainted?(target.idxOwnSide) + showAnim = true + if user.effects[PBEffects::StockpileDef]>0 && + user.pbCanLowerStatStage?(:DEFENSE,user,self) + if user.pbLowerStatStage(:DEFENSE,user.effects[PBEffects::StockpileDef],user,showAnim) + showAnim = false + end + end + if user.effects[PBEffects::StockpileSpDef]>0 && + user.pbCanLowerStatStage?(:SPECIAL_DEFENSE,user,self) + user.pbLowerStatStage(:SPECIAL_DEFENSE,user.effects[PBEffects::StockpileSpDef],user,showAnim) + end + user.effects[PBEffects::Stockpile] = 0 + user.effects[PBEffects::StockpileDef] = 0 + user.effects[PBEffects::StockpileSpDef] = 0 + end +end + +#=============================================================================== +# Heals user depending on the user's stockpile (X). Resets the stockpile to 0. +# Decreases the user's Defense and Special Defense by X stages each. (Swallow) +#=============================================================================== +class PokeBattle_Move_HealUserDependingOnUserStockpile < PokeBattle_Move + def healingMove?; return true; end + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if user.effects[PBEffects::Stockpile]==0 + @battle.pbDisplay(_INTL("But it failed to swallow a thing!")) + return true + end + if !user.canHeal? && + user.effects[PBEffects::StockpileDef]==0 && + user.effects[PBEffects::StockpileSpDef]==0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + hpGain = 0 + case [user.effects[PBEffects::Stockpile],1].max + when 1 then hpGain = user.totalhp/4 + when 2 then hpGain = user.totalhp/2 + when 3 then hpGain = user.totalhp + end + if user.pbRecoverHP(hpGain)>0 + @battle.pbDisplay(_INTL("{1}'s HP was restored.",user.pbThis)) + end + @battle.pbDisplay(_INTL("{1}'s stockpiled effect wore off!",user.pbThis)) + showAnim = true + if user.effects[PBEffects::StockpileDef]>0 && + user.pbCanLowerStatStage?(:DEFENSE,user,self) + if user.pbLowerStatStage(:DEFENSE,user.effects[PBEffects::StockpileDef],user,showAnim) + showAnim = false + end + end + if user.effects[PBEffects::StockpileSpDef]>0 && + user.pbCanLowerStatStage?(:SPECIAL_DEFENSE,user,self) + user.pbLowerStatStage(:SPECIAL_DEFENSE,user.effects[PBEffects::StockpileSpDef],user,showAnim) + end + user.effects[PBEffects::Stockpile] = 0 + user.effects[PBEffects::StockpileDef] = 0 + user.effects[PBEffects::StockpileSpDef] = 0 + end +end + +#=============================================================================== +# Combos with another Pledge move used by the ally. (Grass Pledge) +# If the move is a combo, power is doubled and causes either a sea of fire or a +# swamp on the opposing side. +#=============================================================================== +class PokeBattle_Move_GrassPledge < PokeBattle_PledgeMove + def initialize(battle,move) + super + # [Function code to combo with, effect, override type, override animation] + @combos = [["FirePledge", :SeaOfFire, :FIRE, :FIREPLEDGE], + ["WaterPledge", :Swamp, nil, nil]] + end +end + +#=============================================================================== +# Combos with another Pledge move used by the ally. (Fire Pledge) +# If the move is a combo, power is doubled and causes either a rainbow on the +# user's side or a sea of fire on the opposing side. +#=============================================================================== +class PokeBattle_Move_FirePledge < PokeBattle_PledgeMove + def initialize(battle,move) + super + # [Function code to combo with, effect, override type, override animation] + @combos = [["WaterPledge", :Rainbow, :WATER, :WATERPLEDGE], + ["GrassPledge", :SeaOfFire, nil, nil]] + end +end + +#=============================================================================== +# Combos with another Pledge move used by the ally. (Water Pledge) +# If the move is a combo, power is doubled and causes either a swamp on the +# opposing side or a rainbow on the user's side. +#=============================================================================== +class PokeBattle_Move_WaterPledge < PokeBattle_PledgeMove + def initialize(battle,move) + super + # [Function code to combo with, effect, override type, override animation] + @combos = [["GrassPledge", :Swamp, :GRASS, :GRASSPLEDGE], + ["FirePledge", :Rainbow, nil, nil]] + end +end + +#=============================================================================== +# Uses the last move that was used. (Copycat) +#=============================================================================== +class PokeBattle_Move_UseLastMoveUsed < PokeBattle_Move + def callsAnotherMove?; return true; end + + def initialize(battle,move) + super + @moveBlacklist = [ + # Struggle, Belch + "Struggle", + "FailsIfUserNotConsumedBerry", # Belch # Not listed on Bulbapedia + # Moves that affect the moveset + "ReplaceMoveThisBattleWithTargetLastMoveUsed", # Mimic + "ReplaceMoveWithTargetLastMoveUsed", # Sketch + "TransformUserIntoTarget", # Transform + # Counter moves + "CounterPhysicalDamage", # Counter + "CounterSpecialDamage", # Mirror Coat + "CounterDamagePlusHalf", # Metal Burst # Not listed on Bulbapedia + # Helping Hand, Feint (always blacklisted together, don't know why) + "PowerUpAllyMove", # Helping Hand + "RemoveProtections", # Feint + # Protection moves + "ProtectUser", # Detect, Protect + "ProtectUserSideFromPriorityMoves", # Quick Guard # Not listed on Bulbapedia + "ProtectUserSideFromMultiTargetDamagingMoves", # Wide Guard # Not listed on Bulbapedia + "UserEnduresFaintingThisTurn", # Endure + "ProtectUserSideFromDamagingMovesIfUserFirstTurn", # Mat Block + "ProtectUserSideFromStatusMoves", # Crafty Shield # Not listed on Bulbapedia + "ProtectUserFromDamagingMovesKingsShield", # King's Shield + "ProtectUserFromTargetingMovesSpikyShield", # Spiky Shield + "ProtectUserBanefulBunker", # Baneful Bunker + # Moves that call other moves + "UseLastMoveUsedByTarget", # Mirror Move + "UseLastMoveUsed", # Copycat (this move) + "UseMoveTargetIsAboutToUse", # Me First + "UseMoveDependingOnEnvironment", # Nature Power # Not listed on Bulbapedia + "UseRandomUserMoveIfAsleep", # Sleep Talk + "UseRandomMoveFromUserParty", # Assist + "UseRandomMove", # Metronome + # Move-redirecting and stealing moves + "BounceBackProblemCausingStatusMoves", # Magic Coat # Not listed on Bulbapedia + "StealAndUseBeneficialStatusMove", # Snatch + "RedirectAllMovesToUser", # Follow Me, Rage Powder + "RedirectAllMovesToTarget", # Spotlight + # Set up effects that trigger upon KO + "ReduceAttackerMovePPTo0IfUserFaints", # Grudge # Not listed on Bulbapedia + "AttackerFaintsIfUserFaints", # Destiny Bond + # Held item-moving moves + "UserTakesTargetItem", # Covet, Thief + "UserTargetSwapItems", # Switcheroo, Trick + "TargetTakesUserItem", # Bestow + # Moves that start focussing at the start of the round + "FailsIfUserDamagedThisTurn", # Focus Punch + "UsedAfterUserTakesPhysicalDamage", # Shell Trap + "BurnAttackerBeforeUserActs", # Beak Blast + # Event moves that do nothing + "DoesNothingFailsIfNoAlly", # Hold Hands + "DoesNothingCongratuations" # Celebrate + ] + if Settings::MECHANICS_GENERATION >= 6 + @moveBlacklist += [ + # Target-switching moves + "SwitchOutTargetStatusMove", # Roar, Whirlwind + "SwitchOutTargetDamagingMove" # Circle Throw, Dragon Tail + ] + end + end + + def pbChangeUsageCounters(user,specialUsage) + super + @copied_move = @battle.lastMoveUsed + end + + def pbMoveFailed?(user,targets) + if !@copied_move || + @moveBlacklist.include?(GameData::Move.get(@copied_move).function_code) + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.pbUseMoveSimple(@copied_move) + end +end + +#=============================================================================== +# Uses the last move that the target used. (Mirror Move) +#=============================================================================== +class PokeBattle_Move_UseLastMoveUsedByTarget < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + def callsAnotherMove?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if !target.lastRegularMoveUsed || + !GameData::Move.get(target.lastRegularMoveUsed).flags.any? { |f| f[/^CanMirrorMove$/i] } + @battle.pbDisplay(_INTL("The mirror move failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + user.pbUseMoveSimple(target.lastRegularMoveUsed,target.index) + end + + def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) + # No animation + end +end + +#=============================================================================== +# Uses the move the target was about to use this round, with 1.5x power. +# (Me First) +#=============================================================================== +class PokeBattle_Move_UseMoveTargetIsAboutToUse < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + def callsAnotherMove?; return true; end + + def initialize(battle,move) + super + @moveBlacklist = [ + "UserTakesTargetItem", # Covet, Thief + # Struggle, Belch + "Struggle", # Struggle + "FailsIfUserNotConsumedBerry", # Belch + # Counter moves + "CounterPhysicalDamage", # Counter + "CounterSpecialDamage", # Mirror Coat + "CounterDamagePlusHalf", # Metal Burst + # Moves that start focussing at the start of the round + "FailsIfUserDamagedThisTurn", # Focus Punch + "UsedAfterUserTakesPhysicalDamage", # Shell Trap + "BurnAttackerBeforeUserActs" # Beak Blast + ] + end + + def pbFailsAgainstTarget?(user, target, show_message) + return true if pbMoveFailedTargetAlreadyMoved?(target, show_message) + oppMove = @battle.choices[target.index][2] + if !oppMove || oppMove.statusMove? || @moveBlacklist.include?(oppMove.function) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + user.effects[PBEffects::MeFirst] = true + user.pbUseMoveSimple(@battle.choices[target.index][2].id) + user.effects[PBEffects::MeFirst] = false + end +end + +#=============================================================================== +# Uses a different move depending on the environment. (Nature Power) +# NOTE: This code does not support the Gen 5 and older definition of the move +# where it targets the user. It makes more sense for it to target another +# Pokémon. +#=============================================================================== +class PokeBattle_Move_UseMoveDependingOnEnvironment < PokeBattle_Move + def callsAnotherMove?; return true; end + + def pbOnStartUse(user,targets) + # NOTE: It's possible in theory to not have the move Nature Power wants to + # turn into, but what self-respecting game wouldn't at least have Tri + # Attack in it? + @npMove = :TRIATTACK + case @battle.field.terrain + when :Electric + @npMove = :THUNDERBOLT if GameData::Move.exists?(:THUNDERBOLT) + when :Grassy + @npMove = :ENERGYBALL if GameData::Move.exists?(:ENERGYBALL) + when :Misty + @npMove = :MOONBLAST if GameData::Move.exists?(:MOONBLAST) + when :Psychic + @npMove = :PSYCHIC if GameData::Move.exists?(:PSYCHIC) + else + try_move = nil + case @battle.environment + when :Grass, :TallGrass, :Forest, :ForestGrass + try_move = (Settings::MECHANICS_GENERATION >= 6) ? :ENERGYBALL : :SEEDBOMB + when :MovingWater, :StillWater, :Underwater + try_move = :HYDROPUMP + when :Puddle + try_move = :MUDBOMB + when :Cave + try_move = (Settings::MECHANICS_GENERATION >= 6) ? :POWERGEM : :ROCKSLIDE + when :Rock, :Sand + try_move = (Settings::MECHANICS_GENERATION >= 6) ? :EARTHPOWER : :EARTHQUAKE + when :Snow + try_move = :BLIZZARD + try_move = :FROSTBREATH if Settings::MECHANICS_GENERATION == 6 + try_move = :ICEBEAM if Settings::MECHANICS_GENERATION >= 7 + when :Ice + try_move = :ICEBEAM + when :Volcano + try_move = :LAVAPLUME + when :Graveyard + try_move = :SHADOWBALL + when :Sky + try_move = :AIRSLASH + when :Space + try_move = :DRACOMETEOR + when :UltraSpace + try_move = :PSYSHOCK + end + @npMove = try_move if GameData::Move.exists?(try_move) + end + end + + def pbEffectAgainstTarget(user,target) + @battle.pbDisplay(_INTL("{1} turned into {2}!", @name, GameData::Move.get(@npMove).name)) + user.pbUseMoveSimple(@npMove, target.index) + end +end + +#=============================================================================== +# Uses a random move that exists. (Metronome) +#=============================================================================== +class PokeBattle_Move_UseRandomMove < PokeBattle_Move + def callsAnotherMove?; return true; end + + def initialize(battle,move) + super + @moveBlacklist = [ + "FlinchTargetFailsIfUserNotAsleep", # Snore + "TargetActsNext", # After You + "TargetActsLast", # Quash + "TargetUsesItsLastUsedMoveAgain", # Instruct + # Struggle, Belch + "Struggle", # Struggle + "FailsIfUserNotConsumedBerry", # Belch + # Moves that affect the moveset + "ReplaceMoveThisBattleWithTargetLastMoveUsed", # Mimic + "ReplaceMoveWithTargetLastMoveUsed", # Sketch + "TransformUserIntoTarget", # Transform + # Counter moves + "CounterPhysicalDamage", # Counter + "CounterSpecialDamage", # Mirror Coat + "CounterDamagePlusHalf", # Metal Burst # Not listed on Bulbapedia + # Helping Hand, Feint (always blacklisted together, don't know why) + "PowerUpAllyMove", # Helping Hand + "RemoveProtections", # Feint + # Protection moves + "ProtectUser", # Detect, Protect + "ProtectUserSideFromPriorityMoves", # Quick Guard + "ProtectUserSideFromMultiTargetDamagingMoves", # Wide Guard + "UserEnduresFaintingThisTurn", # Endure + "ProtectUserSideFromDamagingMovesIfUserFirstTurn", # Mat Block + "ProtectUserSideFromStatusMoves", # Crafty Shield + "ProtectUserFromDamagingMovesKingsShield", # King's Shield + "ProtectUserFromTargetingMovesSpikyShield", # Spiky Shield + "ProtectUserBanefulBunker", # Baneful Bunker + # Moves that call other moves + "UseLastMoveUsedByTarget", # Mirror Move + "UseLastMoveUsed", # Copycat + "UseMoveTargetIsAboutToUse", # Me First + "UseMoveDependingOnEnvironment", # Nature Power + "UseRandomUserMoveIfAsleep", # Sleep Talk + "UseRandomMoveFromUserParty", # Assist + "UseRandomMove", # Metronome + # Move-redirecting and stealing moves + "BounceBackProblemCausingStatusMoves", # Magic Coat # Not listed on Bulbapedia + "StealAndUseBeneficialStatusMove", # Snatch + "RedirectAllMovesToUser", # Follow Me, Rage Powder + "RedirectAllMovesToTarget", # Spotlight + # Set up effects that trigger upon KO + "ReduceAttackerMovePPTo0IfUserFaints", # Grudge # Not listed on Bulbapedia + "AttackerFaintsIfUserFaints", # Destiny Bond + # Held item-moving moves + "UserTakesTargetItem", # Covet, Thief + "UserTargetSwapItems", # Switcheroo, Trick + "TargetTakesUserItem", # Bestow + # Moves that start focussing at the start of the round + "FailsIfUserDamagedThisTurn", # Focus Punch + "UsedAfterUserTakesPhysicalDamage", # Shell Trap + "BurnAttackerBeforeUserActs", # Beak Blast + # Event moves that do nothing + "DoesNothingFailsIfNoAlly", # Hold Hands + "DoesNothingCongratuations" # Celebrate + ] + @moveBlacklistSignatures = [ + :SNARL, + # Signature moves + :DIAMONDSTORM, # Diancie (Gen 6) + :FLEURCANNON, # Magearna (Gen 7) + :FREEZESHOCK, # Black Kyurem (Gen 5) + :HYPERSPACEFURY, # Hoopa Unbound (Gen 6) + :HYPERSPACEHOLE, # Hoopa Confined (Gen 6) + :ICEBURN, # White Kyurem (Gen 5) + :LIGHTOFRUIN, # Eternal Flower Floette (Gen 6) + :MINDBLOWN, # Blacephalon (Gen 7) + :PHOTONGEYSER, # Necrozma (Gen 7) + :PLASMAFISTS, # Zeraora (Gen 7) + :RELICSONG, # Meloetta (Gen 5) + :SECRETSWORD, # Keldeo (Gen 5) + :SPECTRALTHIEF, # Marshadow (Gen 7) + :STEAMERUPTION, # Volcanion (Gen 6) + :TECHNOBLAST, # Genesect (Gen 5) + :THOUSANDARROWS, # Zygarde (Gen 6) + :THOUSANDWAVES, # Zygarde (Gen 6) + :VCREATE # Victini (Gen 5) + ] + end + + def pbMoveFailed?(user,targets) + @metronomeMove = nil + move_keys = GameData::Move.keys + # NOTE: You could be really unlucky and roll blacklisted moves 1000 times in + # a row. This is too unlikely to care about, though. + 1000.times do + move_id = move_keys[@battle.pbRandom(move_keys.length)] + move_data = GameData::Move.get(move_id) + next if @moveBlacklist.include?(move_data.function_code) + next if @moveBlacklistSignatures.include?(move_data.id) + next if move_data.type == :SHADOW + @metronomeMove = move_data.id + break + end + if !@metronomeMove + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.pbUseMoveSimple(@metronomeMove) + end +end + +#=============================================================================== +# Uses a random move known by any non-user Pokémon in the user's party. (Assist) +#=============================================================================== +class PokeBattle_Move_UseRandomMoveFromUserParty < PokeBattle_Move + def callsAnotherMove?; return true; end + + def initialize(battle,move) + super + @moveBlacklist = [ + # Struggle, Belch + "Struggle", # Struggle + "FailsIfUserNotConsumedBerry", # Belch + # Moves that affect the moveset + "ReplaceMoveThisBattleWithTargetLastMoveUsed", # Mimic + "ReplaceMoveWithTargetLastMoveUsed", # Sketch + "TransformUserIntoTarget", # Transform + # Counter moves + "CounterPhysicalDamage", # Counter + "CounterSpecialDamage", # Mirror Coat + "CounterDamagePlusHalf", # Metal Burst # Not listed on Bulbapedia + # Helping Hand, Feint (always blacklisted together, don't know why) + "PowerUpAllyMove", # Helping Hand + "RemoveProtections", # Feint + # Protection moves + "ProtectUser", # Detect, Protect + "ProtectUserSideFromPriorityMoves", # Quick Guard # Not listed on Bulbapedia + "ProtectUserSideFromMultiTargetDamagingMoves", # Wide Guard # Not listed on Bulbapedia + "UserEnduresFaintingThisTurn", # Endure + "ProtectUserSideFromDamagingMovesIfUserFirstTurn", # Mat Block + "ProtectUserSideFromStatusMoves", # Crafty Shield # Not listed on Bulbapedia + "ProtectUserFromDamagingMovesKingsShield", # King's Shield + "ProtectUserFromTargetingMovesSpikyShield", # Spiky Shield + "ProtectUserBanefulBunker", # Baneful Bunker + # Moves that call other moves + "UseLastMoveUsedByTarget", # Mirror Move + "UseLastMoveUsed", # Copycat + "UseMoveTargetIsAboutToUse", # Me First +# "UseMoveDependingOnEnvironment", # Nature Power # See below + "UseRandomUserMoveIfAsleep", # Sleep Talk + "UseRandomMoveFromUserParty", # Assist + "UseRandomMove", # Metronome + # Move-redirecting and stealing moves + "BounceBackProblemCausingStatusMoves", # Magic Coat # Not listed on Bulbapedia + "StealAndUseBeneficialStatusMove", # Snatch + "RedirectAllMovesToUser", # Follow Me, Rage Powder + "RedirectAllMovesToTarget", # Spotlight + # Set up effects that trigger upon KO + "ReduceAttackerMovePPTo0IfUserFaints", # Grudge # Not listed on Bulbapedia + "AttackerFaintsIfUserFaints", # Destiny Bond + # Target-switching moves +# "SwitchOutTargetStatusMove", # Roar, Whirlwind # See below + "SwitchOutTargetDamagingMove", # Circle Throw, Dragon Tail + # Held item-moving moves + "UserTakesTargetItem", # Covet, Thief + "UserTargetSwapItems", # Switcheroo, Trick + "TargetTakesUserItem", # Bestow + # Moves that start focussing at the start of the round + "FailsIfUserDamagedThisTurn", # Focus Punch + "UsedAfterUserTakesPhysicalDamage", # Shell Trap + "BurnAttackerBeforeUserActs", # Beak Blast + # Event moves that do nothing + "DoesNothingFailsIfNoAlly", # Hold Hands + "DoesNothingCongratuations" # Celebrate + ] + if Settings::MECHANICS_GENERATION >= 6 + @moveBlacklist += [ + # Moves that call other moves + "UseMoveDependingOnEnvironment", # Nature Power + # Two-turn attacks + "TwoTurnAttack", # Razor Wind # Not listed on Bulbapedia + "TwoTurnAttackOneTurnInSun", # Solar Beam, Solar Blade # Not listed on Bulbapedia + "TwoTurnAttackParalyzeTarget", # Freeze Shock # Not listed on Bulbapedia + "TwoTurnAttackBurnTarget", # Ice Burn # Not listed on Bulbapedia + "TwoTurnAttackFlinchTarget", # Sky Attack # Not listed on Bulbapedia + "TwoTurnAttackChargeRaiseUserDefense1", # Skull Bash # Not listed on Bulbapedia + "TwoTurnAttackInvulnerableInSky", # Fly + "TwoTurnAttackInvulnerableUnderground", # Dig + "TwoTurnAttackInvulnerableUnderwater", # Dive + "TwoTurnAttackInvulnerableInSkyParalyzeTarget", # Bounce + "TwoTurnAttackInvulnerableRemoveProtections", # Shadow Force/Phantom Force + "TwoTurnAttackInvulnerableInSkyTargetCannotAct", # Sky Drop + "AllBattlersLoseHalfHPUserSkipsNextTurn", # Shadow Half + "TwoTurnAttackRaiseUserSpAtkSpDefSpd2", # Geomancy # Not listed on Bulbapedia + # Target-switching moves + "SwitchOutTargetStatusMove" # Roar, Whirlwind + ] + end + end + + def pbMoveFailed?(user,targets) + @assistMoves = [] + # NOTE: This includes the Pokémon of ally trainers in multi battles. + @battle.pbParty(user.index).each_with_index do |pkmn,i| + next if !pkmn || i==user.pokemonIndex + next if Settings::MECHANICS_GENERATION >= 6 && pkmn.egg? + pkmn.moves.each do |move| + next if @moveBlacklist.include?(move.function_code) + next if move.type == :SHADOW + @assistMoves.push(move.id) + end + end + if @assistMoves.length==0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + move = @assistMoves[@battle.pbRandom(@assistMoves.length)] + user.pbUseMoveSimple(move) + end +end + +#=============================================================================== +# Uses a random move the user knows. Fails if user is not asleep. (Sleep Talk) +#=============================================================================== +class PokeBattle_Move_UseRandomUserMoveIfAsleep < PokeBattle_Move + def usableWhenAsleep?; return true; end + def callsAnotherMove?; return true; end + + def initialize(battle,move) + super + @moveBlacklist = [ + "MultiTurnAttackPreventSleeping", # Uproar + "MultiTurnAttackBideThenReturnDoubleDamage", # Bide + # Struggle, Belch + "Struggle", # Struggle # Not listed on Bulbapedia + "FailsIfUserNotConsumedBerry", # Belch + # Moves that affect the moveset (except Transform) + "ReplaceMoveThisBattleWithTargetLastMoveUsed", # Mimic + "ReplaceMoveWithTargetLastMoveUsed", # Sketch + # Moves that call other moves + "UseLastMoveUsedByTarget", # Mirror Move + "UseLastMoveUsed", # Copycat + "UseMoveTargetIsAboutToUse", # Me First + "UseMoveDependingOnEnvironment", # Nature Power # Not listed on Bulbapedia + "UseRandomUserMoveIfAsleep", # Sleep Talk + "UseRandomMoveFromUserParty", # Assist + "UseRandomMove", # Metronome + # Two-turn attacks + "TwoTurnAttack", # Razor Wind + "TwoTurnAttackOneTurnInSun", # Solar Beam, Solar Blade + "TwoTurnAttackParalyzeTarget", # Freeze Shock + "TwoTurnAttackBurnTarget", # Ice Burn + "TwoTurnAttackFlinchTarget", # Sky Attack + "TwoTurnAttackChargeRaiseUserDefense1", # Skull Bash + "TwoTurnAttackInvulnerableInSky", # Fly + "TwoTurnAttackInvulnerableUnderground", # Dig + "TwoTurnAttackInvulnerableUnderwater", # Dive + "TwoTurnAttackInvulnerableInSkyParalyzeTarget", # Bounce + "TwoTurnAttackInvulnerableRemoveProtections", # Shadow Force/Phantom Force + "TwoTurnAttackInvulnerableInSkyTargetCannotAct", # Sky Drop + "AllBattlersLoseHalfHPUserSkipsNextTurn", # Shadow Half + "TwoTurnAttackRaiseUserSpAtkSpDefSpd2", # Geomancy + # Moves that start focussing at the start of the round + "FailsIfUserDamagedThisTurn", # Focus Punch + "UsedAfterUserTakesPhysicalDamage", # Shell Trap + "BurnAttackerBeforeUserActs" # Beak Blast + ] + end + + def pbMoveFailed?(user,targets) + @sleepTalkMoves = [] + user.eachMoveWithIndex do |m,i| + next if @moveBlacklist.include?(m.function) + next if !@battle.pbCanChooseMove?(user.index,i,false,true) + @sleepTalkMoves.push(i) + end + if !user.asleep? || @sleepTalkMoves.length==0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + choice = @sleepTalkMoves[@battle.pbRandom(@sleepTalkMoves.length)] + user.pbUseMoveSimple(user.moves[choice].id,user.pbDirectOpposing.index) + end +end + +#=============================================================================== +# This round, reflects all moves with the "C" flag targeting the user back at +# their origin. (Magic Coat) +#=============================================================================== +class PokeBattle_Move_BounceBackProblemCausingStatusMoves < PokeBattle_Move + def pbEffectGeneral(user) + user.effects[PBEffects::MagicCoat] = true + @battle.pbDisplay(_INTL("{1} shrouded itself with Magic Coat!",user.pbThis)) + end +end + +#=============================================================================== +# This round, snatches all used moves with the "D" flag. (Snatch) +#=============================================================================== +class PokeBattle_Move_StealAndUseBeneficialStatusMove < PokeBattle_Move + def pbEffectGeneral(user) + user.effects[PBEffects::Snatch] = 1 + @battle.eachBattler do |b| + next if b.effects[PBEffects::Snatch]user.level + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + if @battle.trainerBattle? + canSwitch = false + @battle.eachInTeamFromBattlerIndex(target.index) do |_pkmn,i| + next if !@battle.pbCanSwitchLax?(target.index,i) + canSwitch = true + break + end + if !canSwitch + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + end + return false + end + + def pbEffectGeneral(user) + @battle.decision = 3 if @battle.wildBattle? # Escaped from battle + end + + def pbSwitchOutTargetsEffect(user,targets,numHits,switchedBattlers) + return if @battle.wildBattle? + return if user.fainted? || numHits==0 + roarSwitched = [] + targets.each do |b| + next if b.fainted? || b.damageState.unaffected || switchedBattlers.include?(b.index) + newPkmn = @battle.pbGetReplacementPokemonIndex(b.index,true) # Random + next if newPkmn<0 + @battle.pbRecallAndReplace(b.index, newPkmn, true) + @battle.pbDisplay(_INTL("{1} was dragged out!",b.pbThis)) + @battle.pbClearChoice(b.index) # Replacement Pokémon does nothing this round + switchedBattlers.push(b.index) + roarSwitched.push(b.index) + end + if roarSwitched.length>0 + @battle.moldBreaker = false if roarSwitched.include?(user.index) + @battle.pbPriority(true).each do |b| + b.pbEffectsOnSwitchIn(true) if roarSwitched.include?(b.index) + end + end + end +end + +#=============================================================================== +# In wild battles, makes target flee. Fails if target is a higher level than the +# user. +# In trainer battles, target switches out. +# For damaging moves. (Circle Throw, Dragon Tail) +#=============================================================================== +class PokeBattle_Move_SwitchOutTargetDamagingMove < PokeBattle_Move + def pbEffectAgainstTarget(user,target) + if @battle.wildBattle? && target.level<=user.level && @battle.canRun && + (target.effects[PBEffects::Substitute]==0 || ignoresSubstitute?(user)) + @battle.decision = 3 + end + end + + def pbSwitchOutTargetsEffect(user,targets,numHits,switchedBattlers) + return if @battle.wildBattle? + return if user.fainted? || numHits==0 + roarSwitched = [] + targets.each do |b| + next if b.fainted? || b.damageState.unaffected || b.damageState.substitute + next if switchedBattlers.include?(b.index) + next if b.effects[PBEffects::Ingrain] + next if b.hasActiveAbility?(:SUCTIONCUPS) && !@battle.moldBreaker + newPkmn = @battle.pbGetReplacementPokemonIndex(b.index,true) # Random + next if newPkmn<0 + @battle.pbRecallAndReplace(b.index, newPkmn, true) + @battle.pbDisplay(_INTL("{1} was dragged out!",b.pbThis)) + @battle.pbClearChoice(b.index) # Replacement Pokémon does nothing this round + switchedBattlers.push(b.index) + roarSwitched.push(b.index) + end + if roarSwitched.length>0 + @battle.moldBreaker = false if roarSwitched.include?(user.index) + @battle.pbPriority(true).each do |b| + b.pbEffectsOnSwitchIn(true) if roarSwitched.include?(b.index) + end + end + end +end + +#=============================================================================== +# Trapping move. Traps for 5 or 6 rounds. Trapped Pokémon lose 1/16 of max HP +# at end of each round. +#=============================================================================== +class PokeBattle_Move_BindTarget < PokeBattle_Move + def pbEffectAgainstTarget(user,target) + return if target.fainted? || target.damageState.substitute + return if target.effects[PBEffects::Trapping]>0 + # Set trapping effect duration and info + if user.hasActiveItem?(:GRIPCLAW) + target.effects[PBEffects::Trapping] = (Settings::MECHANICS_GENERATION >= 5) ? 8 : 6 + else + target.effects[PBEffects::Trapping] = 5+@battle.pbRandom(2) + end + target.effects[PBEffects::TrappingMove] = @id + target.effects[PBEffects::TrappingUser] = user.index + # Message + msg = _INTL("{1} was trapped in the vortex!",target.pbThis) + case @id + when :BIND + msg = _INTL("{1} was squeezed by {2}!",target.pbThis,user.pbThis(true)) + when :CLAMP + msg = _INTL("{1} clamped {2}!",user.pbThis,target.pbThis(true)) + when :FIRESPIN + msg = _INTL("{1} was trapped in the fiery vortex!",target.pbThis) + when :INFESTATION + msg = _INTL("{1} has been afflicted with an infestation by {2}!",target.pbThis,user.pbThis(true)) + when :MAGMASTORM + msg = _INTL("{1} became trapped by Magma Storm!",target.pbThis) + when :SANDTOMB + msg = _INTL("{1} became trapped by Sand Tomb!",target.pbThis) + when :WHIRLPOOL + msg = _INTL("{1} became trapped in the vortex!",target.pbThis) + when :WRAP + msg = _INTL("{1} was wrapped by {2}!",target.pbThis,user.pbThis(true)) + end + @battle.pbDisplay(msg) + end +end + +#=============================================================================== +# Trapping move. Traps for 5 or 6 rounds. Trapped Pokémon lose 1/16 of max HP +# at end of each round. (Whirlpool) +# Power is doubled if target is using Dive. Hits some semi-invulnerable targets. +#=============================================================================== +class PokeBattle_Move_BindTargetDoublePowerIfTargetUnderwater < PokeBattle_Move_BindTarget + def hitsDivingTargets?; return true; end + + def pbModifyDamage(damageMult,user,target) + damageMult *= 2 if target.inTwoTurnAttack?("TwoTurnAttackInvulnerableUnderwater") + return damageMult + end +end + +#=============================================================================== +# Target can no longer switch out or flee, as long as the user remains active. +# (Anchor Shot, Block, Mean Look, Spider Web, Spirit Shackle, Thousand Waves) +#=============================================================================== +class PokeBattle_Move_TrapTargetInBattle < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + return false if damagingMove? + if target.effects[PBEffects::MeanLook]>=0 + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + if Settings::MORE_TYPE_EFFECTS && target.pbHasType?(:GHOST) + @battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true))) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + return if damagingMove? + target.effects[PBEffects::MeanLook] = user.index + @battle.pbDisplay(_INTL("{1} can no longer escape!",target.pbThis)) + end + + def pbAdditionalEffect(user,target) + return if target.fainted? || target.damageState.substitute + return if target.effects[PBEffects::MeanLook]>=0 + return if Settings::MORE_TYPE_EFFECTS && target.pbHasType?(:GHOST) + target.effects[PBEffects::MeanLook] = user.index + @battle.pbDisplay(_INTL("{1} can no longer escape!",target.pbThis)) + end +end + +#=============================================================================== +# The target can no longer switch out or flee, while the user remains in battle. +# At the end of each round, the target's Defense and Special Defense are lowered +# by 1 stage each. (Octolock) +#=============================================================================== +class PokeBattle_Move_TrapTargetInBattleLowerTargetDefSpDef1EachTurn < PokeBattle_Move + def pbFailsAgainstTarget?(user, target, show_message) + return false if damagingMove? + if target.effects[PBEffects::Octolock] >= 0 + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + if Settings::MORE_TYPE_EFFECTS && target.pbHasType?(:GHOST) + @battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true))) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user, target) + target.effects[PBEffects::Octolock] = user.index + @battle.pbDisplay(_INTL("{1} can no longer escape because of {2}!", target.pbThis, @name)) + end +end + +#=============================================================================== +# Prevents the user and the target from switching out or fleeing. This effect +# isn't applied if either Pokémon is already prevented from switching out or +# fleeing. (Jaw Lock) +#=============================================================================== +class PokeBattle_Move_TrapUserAndTargetInBattle < PokeBattle_Move + def pbAdditionalEffect(user, target) + return if user.fainted? || target.fainted? || target.damageState.substitute + return if Settings::MORE_TYPE_EFFECTS && target.pbHasType?(:GHOST) + return if user.trappedInBattle? || target.trappedInBattle? + target.effects[PBEffects::JawLock] = user.index + @battle.pbDisplay(_INTL("Neither Pokémon can run away!")) + end +end + +#=============================================================================== +# No Pokémon can switch out or flee until the end of the next round, as long as +# the user remains active. (Fairy Lock) +#=============================================================================== +class PokeBattle_Move_TrapAllBattlersInBattleForOneTurn < PokeBattle_Move + def pbMoveFailed?(user,targets) + if @battle.field.effects[PBEffects::FairyLock]>0 + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + @battle.field.effects[PBEffects::FairyLock] = 2 + @battle.pbDisplay(_INTL("No one will be able to run away during the next turn!")) + end +end + +#=============================================================================== +# Interrupts a foe switching out or using U-turn/Volt Switch/Parting Shot. Power +# is doubled in that case. (Pursuit) +# (Handled in Battle's pbAttackPhase): Makes this attack happen before switching. +#=============================================================================== +class PokeBattle_Move_PursueSwitchingFoe < PokeBattle_Move + def pbAccuracyCheck(user,target) + return true if @battle.switching + return super + end + + def pbBaseDamage(baseDmg,user,target) + baseDmg *= 2 if @battle.switching + return baseDmg + end +end + +#=============================================================================== +# Fails if user has not been hit by an opponent's physical move this round. +# (Shell Trap) +#=============================================================================== +class PokeBattle_Move_UsedAfterUserTakesPhysicalDamage < PokeBattle_Move + def pbDisplayChargeMessage(user) + user.effects[PBEffects::ShellTrap] = true + @battle.pbCommonAnimation("ShellTrap",user) + @battle.pbDisplay(_INTL("{1} set a shell trap!",user.pbThis)) + end + + def pbDisplayUseMessage(user) + super if user.tookPhysicalHit + end + + def pbMoveFailed?(user,targets) + if !user.effects[PBEffects::ShellTrap] + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + if !user.tookPhysicalHit + @battle.pbDisplay(_INTL("{1}'s shell trap didn't work!",user.pbThis)) + return true + end + return false + end +end + +#=============================================================================== +# Power is doubled if a user's ally has already used this move this round. (Round) +# If an ally is about to use the same move, make it go next, ignoring priority. +#=============================================================================== +class PokeBattle_Move_UsedAfterAllyRoundWithDoublePower < PokeBattle_Move + def pbBaseDamage(baseDmg,user,target) + baseDmg *= 2 if user.pbOwnSide.effects[PBEffects::Round] + return baseDmg + end + + def pbEffectGeneral(user) + user.pbOwnSide.effects[PBEffects::Round] = true + user.eachAlly do |b| + next if @battle.choices[b.index][0]!=:UseMove || b.movedThisRound? + next if @battle.choices[b.index][2].function!=@function + b.effects[PBEffects::MoveNext] = true + b.effects[PBEffects::Quash] = 0 + break + end + end +end + +#=============================================================================== +# Target moves immediately after the user, ignoring priority/speed. (After You) +#=============================================================================== +class PokeBattle_Move_TargetActsNext < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + # Target has already moved this round + return true if pbMoveFailedTargetAlreadyMoved?(target, show_message) + # Target was going to move next anyway (somehow) + if target.effects[PBEffects::MoveNext] + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + # Target didn't choose to use a move this round + oppMove = @battle.choices[target.index][2] + if !oppMove + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::MoveNext] = true + target.effects[PBEffects::Quash] = 0 + @battle.pbDisplay(_INTL("{1} took the kind offer!",target.pbThis)) + end +end + +#=============================================================================== +# Target moves last this round, ignoring priority/speed. (Quash) +#=============================================================================== +class PokeBattle_Move_TargetActsLast < PokeBattle_Move + def pbFailsAgainstTarget?(user, target, show_message) + return true if pbMoveFailedTargetAlreadyMoved?(target, show_message) + # Target isn't going to use a move + oppMove = @battle.choices[target.index][2] + if !oppMove + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + # Target is already maximally Quashed and will move last anyway + highestQuash = 0 + @battle.battlers.each do |b| + next if b.effects[PBEffects::Quash]<=highestQuash + highestQuash = b.effects[PBEffects::Quash] + end + if highestQuash>0 && target.effects[PBEffects::Quash]==highestQuash + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + # Target was already going to move last + if highestQuash==0 && @battle.pbPriority.last.index==target.index + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + highestQuash = 0 + @battle.battlers.each do |b| + next if b.effects[PBEffects::Quash]<=highestQuash + highestQuash = b.effects[PBEffects::Quash] + end + target.effects[PBEffects::Quash] = highestQuash+1 + target.effects[PBEffects::MoveNext] = false + @battle.pbDisplay(_INTL("{1}'s move was postponed!",target.pbThis)) + end +end + +#=============================================================================== +# The target uses its most recent move again. (Instruct) +#=============================================================================== +class PokeBattle_Move_TargetUsesItsLastUsedMoveAgain < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + + def initialize(battle,move) + super + @moveBlacklist = [ + "MultiTurnAttackBideThenReturnDoubleDamage", # Bide + "ProtectUserFromDamagingMovesKingsShield", # King's Shield + "TargetUsesItsLastUsedMoveAgain", # Instruct (this move) + # Struggle + "Struggle", # Struggle + # Moves that affect the moveset + "ReplaceMoveThisBattleWithTargetLastMoveUsed", # Mimic + "ReplaceMoveWithTargetLastMoveUsed", # Sketch + "TransformUserIntoTarget", # Transform + # Moves that call other moves + "UseLastMoveUsedByTarget", # Mirror Move + "UseLastMoveUsed", # Copycat + "UseMoveTargetIsAboutToUse", # Me First + "UseMoveDependingOnEnvironment", # Nature Power + "UseRandomUserMoveIfAsleep", # Sleep Talk + "UseRandomMoveFromUserParty", # Assist + "UseRandomMove", # Metronome + # Moves that require a recharge turn + "AttackAndSkipNextTurn", # Hyper Beam + # Two-turn attacks + "TwoTurnAttack", # Razor Wind + "TwoTurnAttackOneTurnInSun", # Solar Beam, Solar Blade + "TwoTurnAttackParalyzeTarget", # Freeze Shock + "TwoTurnAttackBurnTarget", # Ice Burn + "TwoTurnAttackFlinchTarget", # Sky Attack + "TwoTurnAttackChargeRaiseUserDefense1", # Skull Bash + "TwoTurnAttackInvulnerableInSky", # Fly + "TwoTurnAttackInvulnerableUnderground", # Dig + "TwoTurnAttackInvulnerableUnderwater", # Dive + "TwoTurnAttackInvulnerableInSkyParalyzeTarget", # Bounce + "TwoTurnAttackInvulnerableRemoveProtections", # Shadow Force, Phantom Force + "TwoTurnAttackInvulnerableInSkyTargetCannotAct", # Sky Drop + "AllBattlersLoseHalfHPUserSkipsNextTurn", # Shadow Half + "TwoTurnAttackRaiseUserSpAtkSpDefSpd2", # Geomancy + # Moves that start focussing at the start of the round + "FailsIfUserDamagedThisTurn", # Focus Punch + "UsedAfterUserTakesPhysicalDamage", # Shell Trap + "BurnAttackerBeforeUserActs" # Beak Blast + ] + end + + def pbFailsAgainstTarget?(user, target, show_message) + if !target.lastRegularMoveUsed || !target.pbHasMove?(target.lastRegularMoveUsed) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + if target.usingMultiTurnAttack? + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + targetMove = @battle.choices[target.index][2] + if targetMove && (targetMove.function=="FailsIfUserDamagedThisTurn" || # Focus Punch + targetMove.function=="UsedAfterUserTakesPhysicalDamage" || # Shell Trap + targetMove.function=="BurnAttackerBeforeUserActs") # Beak Blast + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + if @moveBlacklist.include?(GameData::Move.get(target.lastRegularMoveUsed).function_code) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + idxMove = -1 + target.eachMoveWithIndex do |m,i| + idxMove = i if m.id==target.lastRegularMoveUsed + end + if target.moves[idxMove].pp==0 && target.moves[idxMove].total_pp>0 + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::Instruct] = true + end +end + +#=============================================================================== +# For 5 rounds, for each priority bracket, slow Pokémon move before fast ones. +# (Trick Room) +#=============================================================================== +class PokeBattle_Move_StartSlowerBattlersActFirst < PokeBattle_Move + def pbEffectGeneral(user) + if @battle.field.effects[PBEffects::TrickRoom]>0 + @battle.field.effects[PBEffects::TrickRoom] = 0 + @battle.pbDisplay(_INTL("{1} reverted the dimensions!",user.pbThis)) + else + @battle.field.effects[PBEffects::TrickRoom] = 5 + @battle.pbDisplay(_INTL("{1} twisted the dimensions!",user.pbThis)) + end + end + + def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) + return if @battle.field.effects[PBEffects::TrickRoom]>0 # No animation + super + end +end + +#=============================================================================== +# If Grassy Terrain applies, priority is increased by 1. (Grassy Glide) +#=============================================================================== +class PokeBattle_Move_HigherPriorityInGrassyTerrain < PokeBattle_Move + def pbPriority(user) + ret = super + ret += 1 if @battle.field.terrain == :Grass && user.affectedByTerrain? + return ret + end +end + +#=============================================================================== +# Decreases the PP of the last attack used by the target by 3 (or as much as +# possible). (Eerie Spell) +#=============================================================================== +class PokeBattle_Move_LowerPPOfTargetLastMoveBy3 < PokeBattle_Move + def pbFailsAgainstTarget?(user, target, show_message) + last_move = target.pbGetMoveWithID(target.lastRegularMoveUsed) + if !last_move || last_move.pp == 0 || last_move.total_pp <= 0 + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user, target) + last_move = target.pbGetMoveWithID(target.lastRegularMoveUsed) + reduction = [3, last_move.pp].min + target.pbSetPP(last_move, last_move.pp - reduction) + @battle.pbDisplay(_INTL("It reduced the PP of {1}'s {2} by {3}!", + target.pbThis(true), last_move.name, reduction)) + end +end + +#=============================================================================== +# Target's last move used loses 4 PP. (Spite) +#=============================================================================== +class PokeBattle_Move_LowerPPOfTargetLastMoveBy4 < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + last_move = target.pbGetMoveWithID(target.lastRegularMoveUsed) + if !last_move || last_move.pp == 0 || last_move.total_pp <= 0 + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user, target) + last_move = target.pbGetMoveWithID(target.lastRegularMoveUsed) + reduction = [4, last_move.pp].min + target.pbSetPP(last_move, last_move.pp - reduction) + @battle.pbDisplay(_INTL("It reduced the PP of {1}'s {2} by {3}!", + target.pbThis(true), last_move.name, reduction)) + end +end + +#=============================================================================== +# For 5 rounds, disables the last move the target used. (Disable) +#=============================================================================== +class PokeBattle_Move_DisableTargetLastMoveUsed < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.effects[PBEffects::Disable]>0 || !target.lastRegularMoveUsed + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return true if pbMoveFailedAromaVeil?(user, target, show_message) + canDisable = false + target.eachMove do |m| + next if m.id!=target.lastRegularMoveUsed + next if m.pp==0 && m.total_pp>0 + canDisable = true + break + end + if !canDisable + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::Disable] = 5 + target.effects[PBEffects::DisableMove] = target.lastRegularMoveUsed + @battle.pbDisplay(_INTL("{1}'s {2} was disabled!",target.pbThis, + GameData::Move.get(target.lastRegularMoveUsed).name)) + target.pbItemStatusCureCheck + end +end + +#=============================================================================== +# The target can no longer use the same move twice in a row. (Torment) +#=============================================================================== +class PokeBattle_Move_DisableTargetUsingSameMoveConsecutively < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.effects[PBEffects::Torment] + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return true if pbMoveFailedAromaVeil?(user, target, show_message) + return false + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::Torment] = true + @battle.pbDisplay(_INTL("{1} was subjected to torment!",target.pbThis)) + target.pbItemStatusCureCheck + end +end + +#=============================================================================== +# For 4 rounds, the target must use the same move each round. (Encore) +#=============================================================================== +class PokeBattle_Move_DisableTargetUsingDifferentMove < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + def canMagicCoat?; return true; end + + def initialize(battle,move) + super + @moveBlacklist = [ + "DisableTargetUsingDifferentMove", # Encore + # Struggle + "Struggle", # Struggle + # Moves that affect the moveset + "ReplaceMoveThisBattleWithTargetLastMoveUsed", # Mimic + "ReplaceMoveWithTargetLastMoveUsed", # Sketch + "TransformUserIntoTarget", # Transform + # Moves that call other moves (see also below) + "UseLastMoveUsedByTarget" # Mirror Move + ] + if Settings::MECHANICS_GENERATION >= 7 + @moveBlacklist += [ + # Moves that call other moves +# "UseLastMoveUsedByTarget", # Mirror Move # See above + "UseLastMoveUsed", # Copycat + "UseMoveTargetIsAboutToUse", # Me First + "UseMoveDependingOnEnvironment", # Nature Power + "UseRandomUserMoveIfAsleep", # Sleep Talk + "UseRandomMoveFromUserParty", # Assist + "UseRandomMove" # Metronome + ] + end + end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.effects[PBEffects::Encore]>0 + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + if !target.lastRegularMoveUsed || + @moveBlacklist.include?(GameData::Move.get(target.lastRegularMoveUsed).function_code) + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + if target.effects[PBEffects::ShellTrap] + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return true if pbMoveFailedAromaVeil?(user, target, show_message) + canEncore = false + target.eachMove do |m| + next if m.id!=target.lastRegularMoveUsed + next if m.pp==0 && m.total_pp>0 + canEncore = true + break + end + if !canEncore + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::Encore] = 4 + target.effects[PBEffects::EncoreMove] = target.lastRegularMoveUsed + @battle.pbDisplay(_INTL("{1} received an encore!",target.pbThis)) + target.pbItemStatusCureCheck + end +end + +#=============================================================================== +# For 4 rounds, disables the target's non-damaging moves. (Taunt) +#=============================================================================== +class PokeBattle_Move_DisableTargetStatusMoves < PokeBattle_Move + def ignoresSubstitute?(user); return true; end + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.effects[PBEffects::Taunt]>0 + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return true if pbMoveFailedAromaVeil?(user, target, show_message) + if Settings::MECHANICS_GENERATION >= 6 && target.hasActiveAbility?(:OBLIVIOUS) && + !@battle.moldBreaker + if show_message + @battle.pbShowAbilitySplash(target) + if PokeBattle_SceneConstants::USE_ABILITY_SPLASH + @battle.pbDisplay(_INTL("But it failed!")) + else + @battle.pbDisplay(_INTL("But it failed because of {1}'s {2}!", + target.pbThis(true), target.abilityName)) + end + @battle.pbHideAbilitySplash(target) + end + return true + end + return false + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::Taunt] = 4 + @battle.pbDisplay(_INTL("{1} fell for the taunt!",target.pbThis)) + target.pbItemStatusCureCheck + end +end + +#=============================================================================== +# For 5 rounds, disables the target's healing moves. (Heal Block) +#=============================================================================== +class PokeBattle_Move_DisableTargetHealingMoves < PokeBattle_Move + def canMagicCoat?; return true; end + + def pbFailsAgainstTarget?(user, target, show_message) + if target.effects[PBEffects::HealBlock]>0 + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return true if pbMoveFailedAromaVeil?(user, target, show_message) + return false + end + + def pbEffectAgainstTarget(user,target) + target.effects[PBEffects::HealBlock] = 5 + @battle.pbDisplay(_INTL("{1} was prevented from healing!",target.pbThis)) + target.pbItemStatusCureCheck + end +end + +#=============================================================================== +# Target cannot use sound-based moves for 2 more rounds. (Throat Chop) +#=============================================================================== +class PokeBattle_Move_DisableTargetSoundMoves < PokeBattle_Move + def pbAdditionalEffect(user,target) + return if target.fainted? || target.damageState.substitute + @battle.pbDisplay(_INTL("The effects of {1} prevent {2} from using certain moves!", + @name,target.pbThis(true))) if target.effects[PBEffects::ThroatChop]==0 + target.effects[PBEffects::ThroatChop] = 3 + end +end + +#=============================================================================== +# Disables all target's moves that the user also knows. (Imprison) +#=============================================================================== +class PokeBattle_Move_DisableTargetMovesKnownByUser < PokeBattle_Move + def canSnatch?; return true; end + + def pbMoveFailed?(user,targets) + if user.effects[PBEffects::Imprison] + @battle.pbDisplay(_INTL("But it failed!")) + return true + end + return false + end + + def pbEffectGeneral(user) + user.effects[PBEffects::Imprison] = true + @battle.pbDisplay(_INTL("{1} sealed any moves its target shares with it!",user.pbThis)) + end +end diff --git a/Data/Scripts/011_Battle/003_Battle/011_Battle_Phase_Attack.rb b/Data/Scripts/011_Battle/003_Battle/011_Battle_Phase_Attack.rb index b2dbe3dc8..4632f399c 100644 --- a/Data/Scripts/011_Battle/003_Battle/011_Battle_Phase_Attack.rb +++ b/Data/Scripts/011_Battle/003_Battle/011_Battle_Phase_Attack.rb @@ -25,7 +25,7 @@ class PokeBattle_Battle @switching = true pbPriority.each do |b| next if b.fainted? || !b.opposes?(idxSwitcher) # Shouldn't hit an ally - next if b.movedThisRound? || !pbChoseMoveFunctionCode?(b.index,"088") # Pursuit + next if b.movedThisRound? || !pbChoseMoveFunctionCode?(b.index,"PursueSwitchingFoe") # Check whether Pursuit can be used next unless pbMoveCanTarget?(b.index,idxSwitcher,@choices[b.index][2].pbTarget(b)) next unless pbCanChooseMove?(b.index,@choices[b.index][1],false) @@ -182,7 +182,7 @@ class PokeBattle_Battle b.effects[PBEffects::DestinyBond] = false b.effects[PBEffects::Grudge] = false end - b.effects[PBEffects::Rage] = false if !pbChoseMoveFunctionCode?(i,"093") # Rage + b.effects[PBEffects::Rage] = false if !pbChoseMoveFunctionCode?(i,"StartRaiseUserAtk1WhenDamaged") end PBDebug.log("") # Calculate move order for this round diff --git a/Data/Scripts/011_Battle/003_BattleHandlers_Abilities.rb b/Data/Scripts/011_Battle/003_BattleHandlers_Abilities.rb index 1fe266d0e..f32f4758a 100644 --- a/Data/Scripts/011_Battle/003_BattleHandlers_Abilities.rb +++ b/Data/Scripts/011_Battle/003_BattleHandlers_Abilities.rb @@ -72,7 +72,8 @@ BattleHandlers::WeightCalcAbility.add(:LIGHTMETAL, BattleHandlers::AbilityOnHPDroppedBelowHalf.add(:EMERGENCYEXIT, proc { |ability,battler,battle| - next false if battler.effects[PBEffects::SkyDrop]>=0 || battler.inTwoTurnAttack?("0CE") # Sky Drop + next false if battler.effects[PBEffects::SkyDrop]>=0 || + battler.inTwoTurnAttack?("TwoTurnAttackInvulnerableInSkyTargetCannotAct") # Sky Drop # In wild battles if battle.wildBattle? next false if battler.opposes? && battle.pbSideBattlerCount(battler.index)>1 @@ -1174,7 +1175,8 @@ BattleHandlers::DamageCalcTargetAbility.add(:FLUFFY, BattleHandlers::DamageCalcTargetAbility.add(:FURCOAT, proc { |ability,user,target,move,mults,baseDmg,type| - mults[:defense_multiplier] *= 2 if move.physicalMove? || move.function == "122" # Psyshock + mults[:defense_multiplier] *= 2 if move.physicalMove? || + move.function == "UseTargetDefenseInsteadOfTargetSpDef" # Psyshock } ) @@ -2096,14 +2098,15 @@ BattleHandlers::AbilityOnSwitchIn.add(:ANTICIPATION, next if m.statusMove? if type1 moveType = m.type - if Settings::MECHANICS_GENERATION >= 6 && m.function == "090" # Hidden Power + if Settings::MECHANICS_GENERATION >= 6 && m.function == "TypeDependsOnUserIVs" # Hidden Power moveType = pbHiddenPower(b.pokemon)[0] end eff = Effectiveness.calculate(moveType,type1,type2,type3) next if Effectiveness.ineffective?(eff) - next if !Effectiveness.super_effective?(eff) && m.function != "070" # OHKO + next if !Effectiveness.super_effective?(eff) && + !["OHKO", "OHKOIce", "OHKOHitsTargetUnderground"].include?(m.function) else - next if m.function != "070" # OHKO + next if !["OHKO", "OHKOIce", "OHKOHitsTargetUnderground"].include?(m.function) end found = true break @@ -2203,16 +2206,29 @@ BattleHandlers::AbilityOnSwitchIn.add(:FOREWARN, battle.eachOtherSideBattler(battler.index) do |b| b.eachMove do |m| power = m.baseDamage - power = 160 if ["070"].include?(m.function) # OHKO - power = 150 if ["08B"].include?(m.function) # Eruption + power = 160 if ["OHKO", "OHKOIce", "OHKOHitsTargetUnderground"].include?(m.function) + power = 150 if ["PowerHigherWithUserHP"].include?(m.function) # Eruption # Counter, Mirror Coat, Metal Burst - power = 120 if ["071","072","073"].include?(m.function) + power = 120 if ["CounterPhysicalDamage", + "CounterSpecialDamage", + "CounterDamagePlusHalf"].include?(m.function) # Sonic Boom, Dragon Rage, Night Shade, Endeavor, Psywave, # Return, Frustration, Crush Grip, Gyro Ball, Hidden Power, # Natural Gift, Trump Card, Flail, Grass Knot - power = 80 if ["06A","06B","06D","06E","06F", - "089","08A","08C","08D","090", - "096","097","098","09A"].include?(m.function) + power = 80 if ["FixedDamage20", + "FixedDamage40", + "FixedDamageUserLevel", + "LowerTargetHPToUserHP", + "FixedDamageUserLevelRandom", + "PowerHigherWithUserHappiness", + "PowerLowerWithUserHappiness", + "PowerHigherWithUserHP", + "PowerHigherWithTargetFasterThanUser", + "TypeDependsOnUserIVs", + "TypeAndPowerDependOnUserBerry", + "PowerHigherWithLessPP", + "PowerLowerWithUserHP", + "PowerHigherWithTargetWeight"].include?(m.function) next if powerhighestPower forewarnMoves.push(m.name) diff --git a/Data/Scripts/011_Battle/004_AI/003_AI_Switch.rb b/Data/Scripts/011_Battle/004_AI/003_AI_Switch.rb index a980b24e2..6d0638293 100644 --- a/Data/Scripts/011_Battle/004_AI/003_AI_Switch.rb +++ b/Data/Scripts/011_Battle/004_AI/003_AI_Switch.rb @@ -36,7 +36,7 @@ class PokeBattle_AI # Pokémon is Perish Songed and has Baton Pass if skill>=PBTrainerAI.highSkill && battler.effects[PBEffects::PerishSong]==1 battler.eachMoveWithIndex do |m,i| - next if m.function!="0ED" # Baton Pass + next if m.function!="SwitchOutUserPassOnEffects" # Baton Pass next if !@battle.pbCanChooseMove?(idxBattler,i,false) batonPass = i break diff --git a/Data/Scripts/011_Battle/004_AI/004_AI_Move.rb b/Data/Scripts/011_Battle/004_AI/004_AI_Move.rb index dcc7d5dd8..6df0427e1 100644 --- a/Data/Scripts/011_Battle/004_AI/004_AI_Move.rb +++ b/Data/Scripts/011_Battle/004_AI/004_AI_Move.rb @@ -179,11 +179,13 @@ class PokeBattle_AI if target.effects[PBEffects::SkyDrop]>=0 miss = false if move.hitsFlyingTargets? else - if target.inTwoTurnAttack?("0C9","0CC","0CE") # Fly, Bounce, Sky Drop + if target.inTwoTurnAttack?("TwoTurnAttackInvulnerableInSky", + "TwoTurnAttackInvulnerableInSkyParalyzeTarget", + "TwoTurnAttackInvulnerableInSkyTargetCannotAct") miss = false if move.hitsFlyingTargets? - elsif target.inTwoTurnAttack?("0CA") # Dig + elsif target.inTwoTurnAttack?("TwoTurnAttackInvulnerableUnderground") miss = false if move.hitsDiggingTargets? - elsif target.inTwoTurnAttack?("0CB") # Dive + elsif target.inTwoTurnAttack?("TwoTurnAttackInvulnerableUnderwater") miss = false if move.hitsDivingTargets? end end @@ -197,7 +199,7 @@ class PokeBattle_AI score += 60 elsif move.damagingMove? score += 30 - elsif move.function=="0F2" + elsif move.function=="UserTargetSwapItems" score += 70 # Trick else score -= 60 @@ -262,7 +264,7 @@ class PokeBattle_AI accuracy = pbRoughAccuracy(move,user,target,skill) realDamage *= accuracy/100.0 # Two-turn attacks waste 2 turns to deal one lot of damage - if move.chargingTurnMove? || move.function=="0C2" # Hyper Beam + if move.chargingTurnMove? || move.function=="AttackAndSkipNextTurn" # Hyper Beam realDamage *= 2/3 # Not halved because semi-invulnerable during use or hits first turn end # Prefer flinching external effects (note that move effects which cause diff --git a/Data/Scripts/011_Battle/004_AI/005_AI_Move_EffectScores.rb b/Data/Scripts/011_Battle/004_AI/005_AI_Move_EffectScores.rb index 685961f5c..8c3da93d8 100644 --- a/Data/Scripts/011_Battle/004_AI/005_AI_Move_EffectScores.rb +++ b/Data/Scripts/011_Battle/004_AI/005_AI_Move_EffectScores.rb @@ -5,15 +5,15 @@ class PokeBattle_AI def pbGetMoveScoreFunctionCode(score,move,user,target,skill=100) case move.function #--------------------------------------------------------------------------- - when "000" # No extra effect + when "None" # No extra effect #--------------------------------------------------------------------------- - when "001" + when "DoesNothingUnusableInGravity" score -= 95 score = 0 if skill>=PBTrainerAI.highSkill #--------------------------------------------------------------------------- - when "002" # Struggle + when "Struggle" # Struggle #--------------------------------------------------------------------------- - when "003" + when "SleepTarget", "SleepTargetChangeUserMeloettaForm" if target.pbCanSleep?(user,false) score += 30 if skill>=PBTrainerAI.mediumSkill @@ -23,7 +23,8 @@ class PokeBattle_AI score -= 30 if target.hasActiveAbility?(:MARVELSCALE) end if skill>=PBTrainerAI.bestSkill - if target.pbHasMoveFunction?("011","0B4") # Snore, Sleep Talk + if target.pbHasMoveFunction?("FlinchTargetFailsIfUserNotAsleep", + "UseRandomUserMoveIfAsleep") # Snore, Sleep Talk score -= 50 end end @@ -33,7 +34,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "004" + when "SleepTargetNextTurn" if target.effects[PBEffects::Yawn]>0 || !target.pbCanSleep?(user,false) score -= 90 if skill>=PBTrainerAI.mediumSkill else @@ -42,13 +43,14 @@ class PokeBattle_AI score -= 30 if target.hasActiveAbility?(:MARVELSCALE) end if skill>=PBTrainerAI.bestSkill - if target.pbHasMoveFunction?("011","0B4") # Snore, Sleep Talk + if target.pbHasMoveFunction?("FlinchTargetFailsIfUserNotAsleep", + "UseRandomUserMoveIfAsleep") # Snore, Sleep Talk score -= 50 end end end #--------------------------------------------------------------------------- - when "005", "006", "0BE" + when "PoisonTarget", "BadPoisonTarget", "HitTwoTimesPoisonTarget" if target.pbCanPoison?(user,false) score += 30 if skill>=PBTrainerAI.mediumSkill @@ -67,7 +69,9 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "007", "008", "009", "0C5" + when "ParalyzeTarget", "ParalyzeTargetIfNotTypeImmune", + "ParalyzeTargetTrampleMinimize", "ParalyzeTargetAlwaysHitsInRainHitsTargetInSky", + "ParalyzeFlinchTarget", "TwoTurnAttackParalyzeTarget" if target.pbCanParalyze?(user,false) && !(skill>=PBTrainerAI.mediumSkill && move.id == :THUNDERWAVE && @@ -91,7 +95,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "00A", "00B", "0C6" + when "BurnTarget", "BurnFlinchTarget", "TwoTurnAttackBurnTarget" if target.pbCanBurn?(user,false) score += 30 if skill>=PBTrainerAI.highSkill @@ -103,7 +107,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "00C", "00D", "00E" + when "FreezeTarget", "FreezeTargetAlwaysHitsInHail", "FreezeFlinchTarget" if target.pbCanFreeze?(user,false) score += 30 if skill>=PBTrainerAI.highSkill @@ -115,21 +119,21 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "00F" + when "FlinchTarget" score += 30 if skill>=PBTrainerAI.highSkill score += 30 if !target.hasActiveAbility?(:INNERFOCUS) && target.effects[PBEffects::Substitute]==0 end #--------------------------------------------------------------------------- - when "010" + when "FlinchTargetTrampleMinimize" if skill>=PBTrainerAI.highSkill score += 30 if !target.hasActiveAbility?(:INNERFOCUS) && target.effects[PBEffects::Substitute]==0 end score += 30 if target.effects[PBEffects::Minimize] #--------------------------------------------------------------------------- - when "011" + when "FlinchTargetFailsIfUserNotAsleep" if user.asleep? score += 100 # Because it can only be used while asleep if skill>=PBTrainerAI.highSkill @@ -141,7 +145,7 @@ class PokeBattle_AI score = 0 if skill>=PBTrainerAI.bestSkill end #--------------------------------------------------------------------------- - when "012" + when "FlinchTargetFailsIfNotUserFirstTurn" if user.turnCount==0 if skill>=PBTrainerAI.highSkill score += 30 if !target.hasActiveAbility?(:INNERFOCUS) && @@ -152,7 +156,7 @@ class PokeBattle_AI score = 0 if skill>=PBTrainerAI.bestSkill end #--------------------------------------------------------------------------- - when "013", "014", "015" + when "ConfuseTarget", "ConfuseTargetAlwaysHitsInRainHitsTargetInSky" if target.pbCanConfuse?(user,false) score += 30 else @@ -161,7 +165,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "016" + when "AttractTarget" canattract = true agender = user.gender ogender = target.gender @@ -182,10 +186,10 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "017" + when "ParalyzeBurnOrFreezeTarget" score += 30 if target.status == :NONE #--------------------------------------------------------------------------- - when "018" + when "CureUserBurnPoisonParalysis" case user.status when :POISON score += 40 @@ -203,7 +207,7 @@ class PokeBattle_AI score -= 90 end #--------------------------------------------------------------------------- - when "019" + when "CureUserPartyStatus" statuses = 0 @battle.pbParty(user.index).each do |pkmn| statuses += 1 if pkmn && pkmn.status != :NONE @@ -214,7 +218,7 @@ class PokeBattle_AI score += 20*statuses end #--------------------------------------------------------------------------- - when "01A" + when "StartUserSideImmunityToInflictedStatus" if user.pbOwnSide.effects[PBEffects::Safeguard]>0 score -= 80 elsif user.status != :NONE @@ -223,14 +227,14 @@ class PokeBattle_AI score += 30 end #--------------------------------------------------------------------------- - when "01B" + when "GiveUserStatusToTarget" if user.status == :NONE score -= 90 else score += 40 end #--------------------------------------------------------------------------- - when "01C" + when "RaiseUserAttack1" if move.statusMove? if user.statStageAtMax?(:ATTACK) score -= 90 @@ -263,7 +267,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "01D", "01E", "0C8" + when "RaiseUserDefense1", "RaiseUserDefense1CurlUpUser", "TwoTurnAttackChargeRaiseUserDefense1" if move.statusMove? if user.statStageAtMax?(:DEFENSE) score -= 90 @@ -274,7 +278,7 @@ class PokeBattle_AI score += 20 if user.stages[:DEFENSE]<0 end #--------------------------------------------------------------------------- - when "01F" + when "RaiseUserSpeed1" if move.statusMove? if user.statStageAtMax?(:SPEED) score -= 90 @@ -290,7 +294,7 @@ class PokeBattle_AI score += 20 if user.stages[:SPEED]<0 end #--------------------------------------------------------------------------- - when "020" + when "RaiseUserSpAtk1" if move.statusMove? if user.statStageAtMax?(:SPECIAL_ATTACK) score -= 90 @@ -323,7 +327,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "021" + when "RaiseUserSpDef1PowerUpElectricMove" foundMove = false user.eachMove do |m| next if m.type != :ELECTRIC || !m.damagingMove? @@ -341,7 +345,7 @@ class PokeBattle_AI score += 20 if user.stages[:SPECIAL_DEFENSE]<0 end #--------------------------------------------------------------------------- - when "022" + when "RaiseUserEvasion1" if move.statusMove? if user.statStageAtMax?(:EVASION) score -= 90 @@ -352,7 +356,7 @@ class PokeBattle_AI score += 20 if user.stages[:EVASION]<0 end #--------------------------------------------------------------------------- - when "023" + when "RaiseUserCriticalHitRate2" if move.statusMove? if user.effects[PBEffects::FocusEnergy]>=2 score -= 80 @@ -363,7 +367,7 @@ class PokeBattle_AI score += 30 if user.effects[PBEffects::FocusEnergy]<2 end #--------------------------------------------------------------------------- - when "024" + when "RaiseUserAtkDef1" if user.statStageAtMax?(:ATTACK) && user.statStageAtMax?(:DEFENSE) score -= 90 @@ -385,7 +389,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "025" + when "RaiseUserAtkDefAcc1" if user.statStageAtMax?(:ATTACK) && user.statStageAtMax?(:DEFENSE) && user.statStageAtMax?(:ACCURACY) @@ -409,7 +413,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "026" + when "RaiseUserAtkSpd1" score += 40 if user.turnCount==0 # Dragon Dance tends to be popular if user.statStageAtMax?(:ATTACK) && user.statStageAtMax?(:SPEED) @@ -437,7 +441,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "027", "028" + when "RaiseUserAtkSpAtk1", "RaiseUserAtkSpAtk1Or2InSun" if user.statStageAtMax?(:ATTACK) && user.statStageAtMax?(:SPECIAL_ATTACK) score -= 90 @@ -457,12 +461,12 @@ class PokeBattle_AI score -= 90 end end - if move.function=="028" # Growth + if move.function=="RaiseUserAtkSpAtk1Or2InSun" # Growth score += 20 if [:Sun, :HarshSun].include?(user.effectiveWeather) end end #--------------------------------------------------------------------------- - when "029" + when "RaiseUserAtkAcc1" if user.statStageAtMax?(:ATTACK) && user.statStageAtMax?(:ACCURACY) score -= 90 @@ -484,7 +488,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "02A" + when "RaiseUserDefSpDef1" if user.statStageAtMax?(:DEFENSE) && user.statStageAtMax?(:SPECIAL_DEFENSE) score -= 90 @@ -493,7 +497,7 @@ class PokeBattle_AI score -= user.stages[:SPECIAL_DEFENSE]*10 end #--------------------------------------------------------------------------- - when "02B" + when "RaiseUserSpAtkSpDefSpd1" if user.statStageAtMax?(:SPEED) && user.statStageAtMax?(:SPECIAL_ATTACK) && user.statStageAtMax?(:SPECIAL_DEFENSE) @@ -524,7 +528,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "02C" + when "RaiseUserSpAtkSpDef1" if user.statStageAtMax?(:SPECIAL_ATTACK) && user.statStageAtMax?(:SPECIAL_DEFENSE) score -= 90 @@ -547,7 +551,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "02D" + when "RaiseUserMainStats1" GameData::Stat.each_main_battle { |s| score += 10 if user.stages[s.id] < 0 } if skill>=PBTrainerAI.mediumSkill hasDamagingAttack = false @@ -559,7 +563,7 @@ class PokeBattle_AI score += 20 if hasDamagingAttack end #--------------------------------------------------------------------------- - when "02E" + when "RaiseUserAttack2" if move.statusMove? if user.statStageAtMax?(:ATTACK) score -= 90 @@ -594,7 +598,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "02F" + when "RaiseUserDefense2" if move.statusMove? if user.statStageAtMax?(:DEFENSE) score -= 90 @@ -607,7 +611,7 @@ class PokeBattle_AI score += 20 if user.stages[:DEFENSE]<0 end #--------------------------------------------------------------------------- - when "030", "031" + when "RaiseUserSpeed2", "RaiseUserSpeed2LowerUserWeight" if move.statusMove? if user.statStageAtMax?(:SPEED) score -= 90 @@ -625,7 +629,7 @@ class PokeBattle_AI score += 20 if user.stages[:SPEED]<0 end #--------------------------------------------------------------------------- - when "032" + when "RaiseUserSpAtk2" if move.statusMove? if user.statStageAtMax?(:SPECIAL_ATTACK) score -= 90 @@ -660,7 +664,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "033" + when "RaiseUserSpDef2" if move.statusMove? if user.statStageAtMax?(:SPECIAL_DEFENSE) score -= 90 @@ -673,7 +677,7 @@ class PokeBattle_AI score += 20 if user.stages[:SPECIAL_DEFENSE]<0 end #--------------------------------------------------------------------------- - when "034" + when "RaiseUserEvasion2MinimizeUser" if move.statusMove? if user.statStageAtMax?(:EVASION) score -= 90 @@ -686,7 +690,7 @@ class PokeBattle_AI score += 20 if user.stages[:EVASION]<0 end #--------------------------------------------------------------------------- - when "035" + when "LowerUserDefSpDef1RaiseUserAtkSpAtkSpd2" score -= user.stages[:ATTACK]*20 score -= user.stages[:SPEED]*20 score -= user.stages[:SPECIAL_ATTACK]*20 @@ -702,7 +706,7 @@ class PokeBattle_AI score += 20 if hasDamagingAttack end #--------------------------------------------------------------------------- - when "036" + when "RaiseUserAtk1Spd2" if user.statStageAtMax?(:ATTACK) && user.statStageAtMax?(:SPEED) score -= 90 @@ -729,7 +733,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "037" + when "RaiseTargetRandomStat2" avgStat = 0 canChangeStat = false GameData::Stat.each_battle do |s| @@ -744,7 +748,7 @@ class PokeBattle_AI score -= 90 end #--------------------------------------------------------------------------- - when "038" + when "RaiseUserDefense3" if move.statusMove? if user.statStageAtMax?(:DEFENSE) score -= 90 @@ -757,7 +761,7 @@ class PokeBattle_AI score += 30 if user.stages[:DEFENSE]<0 end #--------------------------------------------------------------------------- - when "039" + when "RaiseUserSpAtk3" if move.statusMove? if user.statStageAtMax?(:SPECIAL_ATTACK) score -= 90 @@ -792,7 +796,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "03A" + when "MaxUserAttackLoseHalfOfTotalHP" if user.statStageAtMax?(:ATTACK) || user.hp<=user.totalhp/2 score -= 100 @@ -813,43 +817,43 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "03B" + when "LowerUserAtkDef1" avg = user.stages[:ATTACK]*10 avg += user.stages[:DEFENSE]*10 score += avg/2 #--------------------------------------------------------------------------- - when "03C" + when "LowerUserDefSpDef1" avg = user.stages[:DEFENSE]*10 avg += user.stages[:SPECIAL_DEFENSE]*10 score += avg/2 #--------------------------------------------------------------------------- - when "03D" + when "LowerUserDefSpDefSpd1" avg = user.stages[:DEFENSE]*10 avg += user.stages[:SPEED]*10 avg += user.stages[:SPECIAL_DEFENSE]*10 score += (avg/3).floor #--------------------------------------------------------------------------- - when "03E" + when "LowerUserSpeed1" score += user.stages[:SPEED]*10 #--------------------------------------------------------------------------- - when "03F" + when "LowerUserSpAtk2" score += user.stages[:SPECIAL_ATTACK]*10 #--------------------------------------------------------------------------- - when "040" + when "RaiseTargetSpAtk1ConfuseTarget" if !target.pbCanConfuse?(user,false) score -= 90 else score += 30 if target.stages[:SPECIAL_ATTACK]<0 end #--------------------------------------------------------------------------- - when "041" + when "RaiseTargetAttack2ConfuseTarget" if !target.pbCanConfuse?(user,false) score -= 90 else score += 30 if target.stages[:ATTACK]<0 end #--------------------------------------------------------------------------- - when "042" + when "LowerTargetAttack1" if move.statusMove? if !target.pbCanLowerStatStage?(:ATTACK,user) score -= 90 @@ -882,7 +886,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "043" + when "LowerTargetDefense1" if move.statusMove? if !target.pbCanLowerStatStage?(:DEFENSE,user) score -= 90 @@ -893,7 +897,7 @@ class PokeBattle_AI score += 20 if target.stages[:DEFENSE]>0 end #--------------------------------------------------------------------------- - when "044" + when "LowerTargetSpeed1", "LowerTargetSpeed1WeakerInGrassyTerrain" if move.statusMove? if !target.pbCanLowerStatStage?(:SPEED,user) score -= 90 @@ -909,7 +913,7 @@ class PokeBattle_AI score += 20 if user.stages[:SPEED]>0 end #--------------------------------------------------------------------------- - when "045" + when "LowerTargetSpAtk1" if move.statusMove? if !target.pbCanLowerStatStage?(:SPECIAL_ATTACK,user) score -= 90 @@ -942,7 +946,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "046" + when "LowerTargetSpDef1" if move.statusMove? if !target.pbCanLowerStatStage?(:SPECIAL_DEFENSE,user) score -= 90 @@ -953,7 +957,7 @@ class PokeBattle_AI score += 20 if target.stages[:SPECIAL_DEFENSE]>0 end #--------------------------------------------------------------------------- - when "047" + when "LowerTargetAccuracy1" if move.statusMove? if !target.pbCanLowerStatStage?(:ACCURACY,user) score -= 90 @@ -964,7 +968,7 @@ class PokeBattle_AI score += 20 if target.stages[:ACCURACY]>0 end #--------------------------------------------------------------------------- - when "048" + when "LowerTargetEvasion1", "LowerTargetEvasion2" if move.statusMove? if !target.pbCanLowerStatStage?(:EVASION,user) score -= 90 @@ -975,7 +979,7 @@ class PokeBattle_AI score += 20 if target.stages[:EVASION]>0 end #--------------------------------------------------------------------------- - when "049" + when "LowerTargetEvasion1RemoveSideEffects" if move.statusMove? if !target.pbCanLowerStatStage?(:EVASION,user) score -= 90 @@ -994,12 +998,12 @@ class PokeBattle_AI target.pbOwnSide.effects[PBEffects::ToxicSpikes]>0 || target.pbOwnSide.effects[PBEffects::StealthRock] #--------------------------------------------------------------------------- - when "04A" + when "LowerTargetAtkDef" avg = target.stages[:ATTACK]*10 avg += target.stages[:DEFENSE]*10 score += avg/2 #--------------------------------------------------------------------------- - when "04B" + when "LowerTargetAttack2" if move.statusMove? if !target.pbCanLowerStatStage?(:ATTACK,user) score -= 90 @@ -1034,7 +1038,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "04C" + when "LowerTargetDefense2" if move.statusMove? if !target.pbCanLowerStatStage?(:DEFENSE,user) score -= 90 @@ -1047,7 +1051,7 @@ class PokeBattle_AI score += 20 if target.stages[:DEFENSE]>0 end #--------------------------------------------------------------------------- - when "04D" + when "LowerTargetSpeed2" if move.statusMove? if !target.pbCanLowerStatStage?(:SPEED,user) score -= 90 @@ -1065,7 +1069,7 @@ class PokeBattle_AI score += 30 if target.stages[:SPEED]>0 end #--------------------------------------------------------------------------- - when "04E" + when "LowerTargetSpAtk2IfCanAttract" if user.gender==2 || target.gender==2 || user.gender==target.gender || target.hasActiveAbility?(:OBLIVIOUS) score -= 90 @@ -1103,7 +1107,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "04F" + when "LowerTargetSpDef2" if move.statusMove? if !target.pbCanLowerStatStage?(:SPECIAL_DEFENSE,user) score -= 90 @@ -1116,7 +1120,7 @@ class PokeBattle_AI score += 20 if target.stages[:SPECIAL_DEFENSE]>0 end #--------------------------------------------------------------------------- - when "050" + when "ResetTargetStatStages" if target.effects[PBEffects::Substitute]>0 score -= 90 else @@ -1134,7 +1138,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "051" + when "ResetAllBattlersStatStages" if skill>=PBTrainerAI.mediumSkill stages = 0 @battle.eachBattler do |b| @@ -1149,7 +1153,7 @@ class PokeBattle_AI score += stages*10 end #--------------------------------------------------------------------------- - when "052" + when "UserTargetSwapAtkSpAtkStages" if skill>=PBTrainerAI.mediumSkill aatk = user.stages[:ATTACK] aspa = user.stages[:SPECIAL_ATTACK] @@ -1165,7 +1169,7 @@ class PokeBattle_AI score -= 50 end #--------------------------------------------------------------------------- - when "053" + when "UserTargetSwapDefSpDefStages" if skill>=PBTrainerAI.mediumSkill adef = user.stages[:DEFENSE] aspd = user.stages[:SPECIAL_DEFENSE] @@ -1181,7 +1185,7 @@ class PokeBattle_AI score -= 50 end #--------------------------------------------------------------------------- - when "054" + when "UserTargetSwapStatStages" if skill>=PBTrainerAI.mediumSkill userStages = 0 targetStages = 0 @@ -1194,7 +1198,7 @@ class PokeBattle_AI score -= 50 end #--------------------------------------------------------------------------- - when "055" + when "UserCopyTargetStatStages" if skill>=PBTrainerAI.mediumSkill equal = true GameData::Stat.each_battle do |s| @@ -1207,10 +1211,10 @@ class PokeBattle_AI score -= 50 end #--------------------------------------------------------------------------- - when "056" + when "StartUserSideImmunityToStatStageLowering" score -= 80 if user.pbOwnSide.effects[PBEffects::Mist]>0 #--------------------------------------------------------------------------- - when "057" + when "UserSwapBaseAtkDef" if skill>=PBTrainerAI.mediumSkill aatk = pbRoughStat(user,:ATTACK,skill) adef = pbRoughStat(user,:DEFENSE,skill) @@ -1226,7 +1230,7 @@ class PokeBattle_AI score -= 30 end #--------------------------------------------------------------------------- - when "058" + when "UserTargetAverageBaseAtkSpAtk" if skill>=PBTrainerAI.mediumSkill aatk = pbRoughStat(user,:ATTACK,skill) aspatk = pbRoughStat(user,:SPECIAL_ATTACK,skill) @@ -1243,7 +1247,7 @@ class PokeBattle_AI score -= 30 end #--------------------------------------------------------------------------- - when "059" + when "UserTargetAverageBaseDefSpDef" if skill>=PBTrainerAI.mediumSkill adef = pbRoughStat(user,:DEFENSE,skill) aspdef = pbRoughStat(user,:SPECIAL_DEFENSE,skill) @@ -1260,7 +1264,7 @@ class PokeBattle_AI score -= 30 end #--------------------------------------------------------------------------- - when "05A" + when "UserTargetAverageHP" if target.effects[PBEffects::Substitute]>0 score -= 90 elsif user.hp>=(user.hp+target.hp)/2 @@ -1269,16 +1273,15 @@ class PokeBattle_AI score += 40 end #--------------------------------------------------------------------------- - when "05B" + when "StartUserSideDoubleSpeed" score -= 90 if user.pbOwnSide.effects[PBEffects::Tailwind]>0 #--------------------------------------------------------------------------- - when "05C" + when "ReplaceMoveThisBattleWithTargetLastMoveUsed" moveBlacklist = [ - "002", # Struggle - "014", # Chatter - "05C", # Mimic - "05D", # Sketch - "0B6" # Metronome + "Struggle", # Struggle + "ReplaceMoveThisBattleWithTargetLastMoveUsed", # Mimic + "ReplaceMoveWithTargetLastMoveUsed", # Sketch + "UseRandomMove" # Metronome ] if user.effects[PBEffects::Transform] || !target.lastRegularMoveUsed score -= 90 @@ -1295,11 +1298,10 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "05D" + when "ReplaceMoveWithTargetLastMoveUsed" moveBlacklist = [ - "002", # Struggle - "014", # Chatter - "05D" # Sketch + "Struggle", # Struggle + "ReplaceMoveWithTargetLastMoveUsed" # Sketch ] if user.effects[PBEffects::Transform] || !target.lastRegularMoveUsed score -= 90 @@ -1316,7 +1318,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "05E" + when "SetUserTypesToUserMoveType" if !user.canChangeType? score -= 90 else @@ -1331,7 +1333,7 @@ class PokeBattle_AI score -= 90 if !has_possible_type end #--------------------------------------------------------------------------- - when "05F" + when "SetUserTypesToResistLastAttack" if !user.canChangeType? score -= 90 elsif !target.lastMoveUsed || !target.lastMoveUsedType || @@ -1358,7 +1360,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "060" + when "SetUserTypesBasedOnEnvironment" if !user.canChangeType? score -= 90 elsif skill>=PBTrainerAI.mediumSkill @@ -1402,14 +1404,14 @@ class PokeBattle_AI score -= 90 if !user.pbHasOtherType?(new_type) end #--------------------------------------------------------------------------- - when "061" + when "SetTargetTypesToWater" if target.effects[PBEffects::Substitute]>0 || !target.canChangeType? score -= 90 elsif !target.pbHasOtherType?(:WATER) score -= 90 end #--------------------------------------------------------------------------- - when "062" + when "SetUserTypesToTargetTypes" if !user.canChangeType? || target.pbTypes(true).length == 0 score -= 90 elsif user.pbTypes == target.pbTypes && @@ -1417,7 +1419,7 @@ class PokeBattle_AI score -= 90 end #--------------------------------------------------------------------------- - when "063" + when "SetTargetAbilityToSimple" if target.effects[PBEffects::Substitute]>0 score -= 90 elsif skill>=PBTrainerAI.mediumSkill @@ -1426,7 +1428,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "064" + when "SetTargetAbilityToInsomnia" if target.effects[PBEffects::Substitute]>0 score -= 90 elsif skill>=PBTrainerAI.mediumSkill @@ -1435,7 +1437,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "065" + when "SetUserAbilityToTargetAbility" score -= 40 # don't prefer this move if skill>=PBTrainerAI.mediumSkill if !target.ability || user.ability==target.ability || @@ -1453,7 +1455,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "066" + when "SetTargetAbilityToUserAbility" score -= 40 # don't prefer this move if target.effects[PBEffects::Substitute]>0 score -= 90 @@ -1473,7 +1475,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "067" + when "UserTargetSwapAbilities" score -= 40 # don't prefer this move if skill>=PBTrainerAI.mediumSkill if (!user.ability && !target.ability) || @@ -1491,7 +1493,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "068" + when "NegateTargetAbility" if target.effects[PBEffects::Substitute]>0 || target.effects[PBEffects::GastroAcid] score -= 90 @@ -1499,41 +1501,41 @@ class PokeBattle_AI score -= 90 if [:MULTITYPE, :RKSSYSTEM, :SLOWSTART, :TRUANT].include?(target.ability_id) end #--------------------------------------------------------------------------- - when "069" + when "TransformUserIntoTarget" score -= 70 #--------------------------------------------------------------------------- - when "06A" + when "FixedDamage20" if target.hp<=20 score += 80 elsif target.level>=25 score -= 60 # Not useful against high-level Pokemon end #--------------------------------------------------------------------------- - when "06B" + when "FixedDamage40" score += 80 if target.hp<=40 #--------------------------------------------------------------------------- - when "06C" + when "FixedDamageHalfTargetHP" score -= 50 score += target.hp*100/target.totalhp #--------------------------------------------------------------------------- - when "06D" + when "FixedDamageUserLevel" score += 80 if target.hp<=user.level #--------------------------------------------------------------------------- - when "06E" + when "LowerTargetHPToUserHP" if user.hp>=target.hp score -= 90 elsif user.hpuser.level #--------------------------------------------------------------------------- - when "071" + when "CounterPhysicalDamage" if target.effects[PBEffects::HyperBeam]>0 score -= 90 else @@ -1547,7 +1549,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "072" + when "CounterSpecialDamage" if target.effects[PBEffects::HyperBeam]>0 score -= 90 else @@ -1561,55 +1563,55 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "073" + when "CounterDamagePlusHalf" score -= 90 if target.effects[PBEffects::HyperBeam]>0 #--------------------------------------------------------------------------- - when "074" + when "DamageTargetAlly" target.eachAlly do |b| next if !b.near?(target) score += 10 end #--------------------------------------------------------------------------- - when "075" + when "DoublePowerIfTargetUnderwater" #--------------------------------------------------------------------------- - when "076" + when "DoublePowerIfTargetUnderground" #--------------------------------------------------------------------------- - when "077" + when "DoublePowerIfTargetInSky" #--------------------------------------------------------------------------- - when "078" + when "FlinchTargetDoublePowerIfTargetInSky" if skill>=PBTrainerAI.highSkill score += 30 if !target.hasActiveAbility?(:INNERFOCUS) && target.effects[PBEffects::Substitute]==0 end #--------------------------------------------------------------------------- - when "079" + when "DoublePowerAfterFusionFlare" #--------------------------------------------------------------------------- - when "07A" + when "DoublePowerAfterFusionBolt" #--------------------------------------------------------------------------- - when "07B" + when "DoublePowerIfTargetPoisoned" #--------------------------------------------------------------------------- - when "07C" + when "DoublePowerIfTargetParalyzedCureTarget" score -= 20 if target.status == :PARALYSIS # Will cure status #--------------------------------------------------------------------------- - when "07D" + when "DoublePowerIfTargetAsleepCureTarget" score -= 20 if target.status == :SLEEP && # Will cure status target.statusCount > 1 #--------------------------------------------------------------------------- - when "07E" + when "DoublePowerIfUserPoisonedBurnedParalyzed" #--------------------------------------------------------------------------- - when "07F" + when "DoublePowerIfTargetStatusProblem" #--------------------------------------------------------------------------- - when "080" + when "DoublePowerIfTargetHPLessThanHalf" #--------------------------------------------------------------------------- - when "081" + when "DoublePowerIfUserLostHPThisTurn" attspeed = pbRoughStat(user,:SPEED,skill) oppspeed = pbRoughStat(target,:SPEED,skill) score += 30 if oppspeed>attspeed #--------------------------------------------------------------------------- - when "082" + when "DoublePowerIfTargetLostHPThisTurn" score += 20 if @battle.pbOpposingBattlerCount(user)>1 #--------------------------------------------------------------------------- - when "083" + when "UsedAfterAllyRoundWithDoublePower" if skill>=PBTrainerAI.mediumSkill user.eachAlly do |b| next if !b.pbHasMove?(move.id) @@ -1617,60 +1619,60 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "084" + when "DoublePowerIfTargetActed" attspeed = pbRoughStat(user,:SPEED,skill) oppspeed = pbRoughStat(target,:SPEED,skill) score += 30 if oppspeed>attspeed #--------------------------------------------------------------------------- - when "085" + when "DoublePowerIfAllyFaintedLastTurn" #--------------------------------------------------------------------------- - when "086" + when "DoublePowerIfUserHasNoItem" #--------------------------------------------------------------------------- - when "087" + when "TypeAndPowerDependOnWeather" #--------------------------------------------------------------------------- - when "088" + when "PursueSwitchingFoe" #--------------------------------------------------------------------------- - when "089" + when "PowerHigherWithUserHappiness" #--------------------------------------------------------------------------- - when "08A" + when "PowerLowerWithUserHappiness" #--------------------------------------------------------------------------- - when "08B" + when "PowerHigherWithUserHP" #--------------------------------------------------------------------------- - when "08C" + when "PowerHigherWithTargetHP" #--------------------------------------------------------------------------- - when "08D" + when "PowerHigherWithTargetFasterThanUser" #--------------------------------------------------------------------------- - when "08E" + when "PowerHigherWithUserPositiveStatStages" #--------------------------------------------------------------------------- - when "08F" + when "PowerHigherWithTargetPositiveStatStages" #--------------------------------------------------------------------------- - when "090" + when "TypeDependsOnUserIVs" #--------------------------------------------------------------------------- - when "091" + when "PowerHigherWithConsecutiveUse" #--------------------------------------------------------------------------- - when "092" + when "PowerHigherWithConsecutiveUseOnUserSide" #--------------------------------------------------------------------------- - when "093" + when "StartRaiseUserAtk1WhenDamaged" score += 25 if user.effects[PBEffects::Rage] #--------------------------------------------------------------------------- - when "094" + when "RandomlyDamageOrHealTarget" #--------------------------------------------------------------------------- - when "095" + when "RandomPowerDoublePowerIfTargetUnderground" #--------------------------------------------------------------------------- - when "096" + when "TypeAndPowerDependOnUserBerry" score -= 90 if !user.item || !user.item.is_berry? || !user.itemActive? #--------------------------------------------------------------------------- - when "097" + when "PowerHigherWithLessPP" #--------------------------------------------------------------------------- - when "098" + when "PowerLowerWithUserHP" #--------------------------------------------------------------------------- - when "099" + when "PowerHigherWithUserFasterThanTarget" #--------------------------------------------------------------------------- - when "09A" + when "PowerHigherWithTargetWeight" #--------------------------------------------------------------------------- - when "09B" + when "PowerHigherWithUserHeavierThanTarget" #--------------------------------------------------------------------------- - when "09C" + when "PowerUpAllyMove" hasAlly = false user.eachAlly do |b| hasAlly = true @@ -1679,34 +1681,32 @@ class PokeBattle_AI end score -= 90 if !hasAlly #--------------------------------------------------------------------------- - when "09D" + when "StartWeakenElectricMoves" score -= 90 if user.effects[PBEffects::MudSport] #--------------------------------------------------------------------------- - when "09E" + when "StartWeakenFireMoves" score -= 90 if user.effects[PBEffects::WaterSport] #--------------------------------------------------------------------------- - when "09F" + when "TypeDependsOnUserPlate", "TypeDependsOnUserMemory", "TypeDependsOnUserDrive" #--------------------------------------------------------------------------- - when "0A0" + when "AlwaysCriticalHit" #--------------------------------------------------------------------------- - when "0A1" + when "StartPreventCriticalHitsAgainstUserSide" score -= 90 if user.pbOwnSide.effects[PBEffects::LuckyChant]>0 #--------------------------------------------------------------------------- - when "0A2" + when "StartWeakenPhysicalDamageAgainstUserSide" score -= 90 if user.pbOwnSide.effects[PBEffects::Reflect]>0 #--------------------------------------------------------------------------- - when "0A3" + when "StartWeakenSpecialDamageAgainstUserSide" score -= 90 if user.pbOwnSide.effects[PBEffects::LightScreen]>0 #--------------------------------------------------------------------------- - when "0A4" + when "EffectDependsOnEnvironment" #--------------------------------------------------------------------------- - when "0A5" - #--------------------------------------------------------------------------- - when "0A6" + when "EnsureNextMoveAlwaysHits" score -= 90 if target.effects[PBEffects::Substitute]>0 score -= 90 if user.effects[PBEffects::LockOn]>0 #--------------------------------------------------------------------------- - when "0A7" + when "StartNegateTargetEvasionStatStageAndGhostImmunity" if target.effects[PBEffects::Foresight] score -= 90 elsif target.pbHasType?(:GHOST) @@ -1715,7 +1715,7 @@ class PokeBattle_AI score -= 60 end #--------------------------------------------------------------------------- - when "0A8" + when "StartNegateTargetEvasionStatStageAndDarkImmunity" if target.effects[PBEffects::MiracleEye] score -= 90 elsif target.pbHasType?(:DARK) @@ -1724,9 +1724,9 @@ class PokeBattle_AI score -= 60 end #--------------------------------------------------------------------------- - when "0A9" + when "IgnoreTargetDefSpDefEvaStatStages" #--------------------------------------------------------------------------- - when "0AA" + when "ProtectUser" if user.effects[PBEffects::ProtectRate]>1 || target.effects[PBEffects::HyperBeam]>0 score -= 90 @@ -1738,56 +1738,56 @@ class PokeBattle_AI score += 30 if target.effects[PBEffects::TwoTurnAttack] end #--------------------------------------------------------------------------- - when "0AB" + when "ProtectUserSideFromPriorityMoves" #--------------------------------------------------------------------------- - when "0AC" + when "ProtectUserSideFromMultiTargetDamagingMoves" #--------------------------------------------------------------------------- - when "0AD" + when "RemoveProtections" #--------------------------------------------------------------------------- - when "0AE" + when "UseLastMoveUsedByTarget" score -= 40 if skill>=PBTrainerAI.highSkill score -= 100 if !target.lastRegularMoveUsed || !GameData::Move.get(target.lastRegularMoveUsed).flags.any? { |f| f[/^CanMirrorMove$/i] } end #--------------------------------------------------------------------------- - when "0AF" + when "UseLastMoveUsed" #--------------------------------------------------------------------------- - when "0B0" + when "UseMoveTargetIsAboutToUse" #--------------------------------------------------------------------------- - when "0B1" + when "BounceBackProblemCausingStatusMoves" #--------------------------------------------------------------------------- - when "0B2" + when "StealAndUseBeneficialStatusMove" #--------------------------------------------------------------------------- - when "0B3" + when "UseMoveDependingOnEnvironment" #--------------------------------------------------------------------------- - when "0B4" + when "UseRandomUserMoveIfAsleep" if user.asleep? score += 100 # Because it can only be used while asleep else score -= 90 end #--------------------------------------------------------------------------- - when "0B5" + when "UseRandomMoveFromUserParty" #--------------------------------------------------------------------------- - when "0B6" + when "UseRandomMove" #--------------------------------------------------------------------------- - when "0B7" + when "DisableTargetUsingSameMoveConsecutively" score -= 90 if target.effects[PBEffects::Torment] #--------------------------------------------------------------------------- - when "0B8" + when "DisableTargetMovesKnownByUser" score -= 90 if user.effects[PBEffects::Imprison] #--------------------------------------------------------------------------- - when "0B9" + when "DisableTargetLastMoveUsed" score -= 90 if target.effects[PBEffects::Disable]>0 #--------------------------------------------------------------------------- - when "0BA" + when "DisableTargetStatusMoves" score -= 90 if target.effects[PBEffects::Taunt]>0 #--------------------------------------------------------------------------- - when "0BB" + when "DisableTargetHealingMoves" score -= 90 if target.effects[PBEffects::HealBlock]>0 #--------------------------------------------------------------------------- - when "0BC" + when "DisableTargetUsingDifferentMove" aspeed = pbRoughStat(user,:SPEED,skill) ospeed = pbRoughStat(target,:SPEED,skill) if target.effects[PBEffects::Encore]>0 @@ -1808,59 +1808,61 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "0BD" + when "HitTwoTimes" #--------------------------------------------------------------------------- - when "0BF" + when "HitTwoTimesPoisonTarget" #--------------------------------------------------------------------------- - when "0C0" + when "HitThreeTimesPowersUpWithEachHit" #--------------------------------------------------------------------------- - when "0C1" + when "HitTwoToFiveTimes" #--------------------------------------------------------------------------- - when "0C2" + when "HitTwoToFiveTimesOrThreeForAshGreninja" #--------------------------------------------------------------------------- - when "0C3" + when "HitOncePerUserTeamMember" #--------------------------------------------------------------------------- - when "0C4" + when "AttackAndSkipNextTurn" #--------------------------------------------------------------------------- - when "0C7" + when "TwoTurnAttack" + #--------------------------------------------------------------------------- + when "TwoTurnAttackFlinchTarget" score += 20 if user.effects[PBEffects::FocusEnergy]>0 if skill>=PBTrainerAI.highSkill score += 20 if !target.hasActiveAbility?(:INNERFOCUS) && target.effects[PBEffects::Substitute]==0 end #--------------------------------------------------------------------------- - when "0C9" + when "TwoTurnAttackInvulnerableInSky" #--------------------------------------------------------------------------- - when "0CA" + when "TwoTurnAttackInvulnerableUnderground" #--------------------------------------------------------------------------- - when "0CB" + when "TwoTurnAttackInvulnerableUnderwater" #--------------------------------------------------------------------------- - when "0CC" + when "TwoTurnAttackInvulnerableInSkyParalyzeTarget" #--------------------------------------------------------------------------- - when "0CD" + when "TwoTurnAttackInvulnerableRemoveProtections" #--------------------------------------------------------------------------- - when "0CE" + when "TwoTurnAttackInvulnerableInSkyTargetCannotAct" #--------------------------------------------------------------------------- - when "0CF" + when "BindTarget" score += 40 if target.effects[PBEffects::Trapping]==0 #--------------------------------------------------------------------------- - when "0D0" + when "BindTargetDoublePowerIfTargetUnderwater" score += 40 if target.effects[PBEffects::Trapping]==0 #--------------------------------------------------------------------------- - when "0D1" + when "MultiTurnAttackPreventSleeping" #--------------------------------------------------------------------------- - when "0D2" + when "MultiTurnAttackConfuseUserAtEnd" #--------------------------------------------------------------------------- - when "0D3" + when "MultiTurnAttackPowersUpEachTurn" #--------------------------------------------------------------------------- - when "0D4" + when "MultiTurnAttackBideThenReturnDoubleDamage" if user.hp<=user.totalhp/4 score -= 90 elsif user.hp<=user.totalhp/2 score -= 50 end #--------------------------------------------------------------------------- - when "0D5", "0D6" + when "HealUserHalfOfTotalHP", "HealUserHalfOfTotalHPLoseFlyingTypeThisTurn" if user.hp==user.totalhp || (skill>=PBTrainerAI.mediumSkill && !user.canHeal?) score -= 90 else @@ -1868,10 +1870,10 @@ class PokeBattle_AI score -= user.hp*100/user.totalhp end #--------------------------------------------------------------------------- - when "0D7" + when "HealUserPositionNextTurn" score -= 90 if @battle.positions[user.index].effects[PBEffects::Wish]>0 #--------------------------------------------------------------------------- - when "0D8" + when "HealUserDependingOnWeather" if user.hp==user.totalhp || (skill>=PBTrainerAI.mediumSkill && !user.canHeal?) score -= 90 else @@ -1886,7 +1888,7 @@ class PokeBattle_AI score -= user.hp*100/user.totalhp end #--------------------------------------------------------------------------- - when "0D9" + when "HealUserFullyAndFallAsleep" if user.hp==user.totalhp || !user.pbCanSleep?(user,false,nil,true) score -= 90 else @@ -1895,13 +1897,13 @@ class PokeBattle_AI score += 30 if user.status != :NONE end #--------------------------------------------------------------------------- - when "0DA" + when "StartHealUserEachTurn" score -= 90 if user.effects[PBEffects::AquaRing] #--------------------------------------------------------------------------- - when "0DB" + when "StartHealUserEachTurnTrapUserInBattle" score -= 90 if user.effects[PBEffects::Ingrain] #--------------------------------------------------------------------------- - when "0DC" + when "StartLeechSeedTarget" if target.effects[PBEffects::LeechSeed]>=0 score -= 90 elsif skill>=PBTrainerAI.mediumSkill && target.pbHasType?(:GRASS) @@ -1910,14 +1912,14 @@ class PokeBattle_AI score += 60 if user.turnCount==0 end #--------------------------------------------------------------------------- - when "0DD" + when "HealUserByHalfOfDamageDone" if skill>=PBTrainerAI.highSkill && target.hasActiveAbility?(:LIQUIDOOZE) score -= 70 else score += 20 if user.hp<=user.totalhp/2 end #--------------------------------------------------------------------------- - when "0DE" + when "HealUserByHalfOfDamageDoneIfTargetAsleep" if !target.asleep? score -= 100 elsif skill>=PBTrainerAI.highSkill && target.hasActiveAbility?(:LIQUIDOOZE) @@ -1926,7 +1928,7 @@ class PokeBattle_AI score += 20 if user.hp<=user.totalhp/2 end #--------------------------------------------------------------------------- - when "0DF" + when "HealTargetHalfOfTotalHP" if user.opposes?(target) score -= 100 else @@ -1934,7 +1936,7 @@ class PokeBattle_AI target.effects[PBEffects::Substitute]==0 end #--------------------------------------------------------------------------- - when "0E0" + when "UserFaintsExplosive" reserves = @battle.pbAbleNonActiveCount(user.idxOwnSide) foes = @battle.pbAbleNonActiveCount(user.idxOpposingSide) if @battle.pbCheckGlobalAbility(:DAMP) @@ -1947,9 +1949,9 @@ class PokeBattle_AI score -= user.hp*100/user.totalhp end #--------------------------------------------------------------------------- - when "0E1" + when "UserFaintsFixedDamageUserHP" #--------------------------------------------------------------------------- - when "0E2" + when "UserFaintsLowerTargetAtkSpAtk2" if !target.pbCanLowerStatStage?(:ATTACK,user) && !target.pbCanLowerStatStage?(:SPECIAL_ATTACK,user) score -= 100 @@ -1961,27 +1963,27 @@ class PokeBattle_AI score -= user.hp*100/user.totalhp end #--------------------------------------------------------------------------- - when "0E3", "0E4" + when "UserFaintsHealAndCureReplacement", "UserFaintsHealAndCureReplacementRestorePP" score -= 70 #--------------------------------------------------------------------------- - when "0E5" + when "StartPerishCountsForAllBattlers" if @battle.pbAbleNonActiveCount(user.idxOwnSide)==0 score -= 90 else score -= 90 if target.effects[PBEffects::PerishSong]>0 end #--------------------------------------------------------------------------- - when "0E6" + when "ReduceAttackerMovePPTo0IfUserFaints" score += 50 score -= user.hp*100/user.totalhp score += 30 if user.hp<=user.totalhp/10 #--------------------------------------------------------------------------- - when "0E7" + when "AttackerFaintsIfUserFaints" score += 50 score -= user.hp*100/user.totalhp score += 30 if user.hp<=user.totalhp/10 #--------------------------------------------------------------------------- - when "0E8" + when "UserEnduresFaintingThisTurn" score -= 25 if user.hp>user.totalhp/2 if skill>=PBTrainerAI.mediumSkill score -= 90 if user.effects[PBEffects::ProtectRate]>1 @@ -1990,7 +1992,7 @@ class PokeBattle_AI score -= user.effects[PBEffects::ProtectRate]*40 end #--------------------------------------------------------------------------- - when "0E9" + when "CannotMakeTargetFaint" if target.hp==1 score -= 90 elsif target.hp<=target.totalhp/8 @@ -1999,10 +2001,32 @@ class PokeBattle_AI score -= 30 end #--------------------------------------------------------------------------- - when "0EA" + when "FleeFromBattle" score -= 100 if @battle.trainerBattle? #--------------------------------------------------------------------------- - when "0EB" + when "SwitchOutUserStatusMove" + if !@battle.pbCanChooseNonActive?(user.index) + score -= 80 + else + score += 40 if user.effects[PBEffects::Confusion]>0 + total = 0 + GameData::Stat.each_battle { |s| total += user.stages[s.id] } + if total<=0 || user.turnCount==0 + score += 60 + else + score -= total*10 + # special case: user has no damaging moves + hasDamagingMove = false + user.eachMove do |m| + next if !m.damagingMove? + hasDamagingMove = true + break + end + score += 75 if !hasDamagingMove + end + end + #--------------------------------------------------------------------------- + when "SwitchOutTargetStatusMove" if target.effects[PBEffects::Ingrain] || (skill>=PBTrainerAI.highSkill && target.hasActiveAbility?(:SUCTIONCUPS)) score -= 90 @@ -2019,7 +2043,7 @@ class PokeBattle_AI score += 50 if target.pbOwnSide.effects[PBEffects::StealthRock] end #--------------------------------------------------------------------------- - when "0EC" + when "SwitchOutTargetDamagingMove" if !target.effects[PBEffects::Ingrain] && !(skill>=PBTrainerAI.highSkill && target.hasActiveAbility?(:SUCTIONCUPS)) score += 40 if target.pbOwnSide.effects[PBEffects::Spikes]>0 @@ -2027,7 +2051,7 @@ class PokeBattle_AI score += 40 if target.pbOwnSide.effects[PBEffects::StealthRock] end #--------------------------------------------------------------------------- - when "0ED" + when "SwitchOutUserPassOnEffects" if !@battle.pbCanChooseNonActive?(user.index) score -= 80 else @@ -2049,17 +2073,17 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "0EE" + when "SwitchOutUserDamagingMove" #--------------------------------------------------------------------------- - when "0EF" + when "TrapTargetInBattle" score -= 90 if target.effects[PBEffects::MeanLook]>=0 #--------------------------------------------------------------------------- - when "0F0" + when "RemoveTargetItem" if skill>=PBTrainerAI.highSkill score += 20 if target.item end #--------------------------------------------------------------------------- - when "0F1" + when "UserTakesTargetItem" if skill>=PBTrainerAI.highSkill if !user.item && target.item score += 40 @@ -2070,7 +2094,7 @@ class PokeBattle_AI score -= 80 end #--------------------------------------------------------------------------- - when "0F2" + when "UserTargetSwapItems" if !user.item && !target.item score -= 90 elsif skill>=PBTrainerAI.highSkill && target.hasActiveAbility?(:STICKYHOLD) @@ -2080,10 +2104,10 @@ class PokeBattle_AI score += 50 elsif !user.item && target.item score -= 30 if user.lastMoveUsed && - GameData::Move.get(user.lastMoveUsed).function_code == "0F2" # Trick/Switcheroo + GameData::Move.get(user.lastMoveUsed).function_code == "UserTargetSwapItems" end #--------------------------------------------------------------------------- - when "0F3" + when "TargetTakesUserItem" if !user.item || target.item score -= 90 else @@ -2095,46 +2119,46 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "0F4", "0F5" + when "UserConsumeTargetBerry", "DestroyTargetBerryOrGem" if target.effects[PBEffects::Substitute]==0 if skill>=PBTrainerAI.highSkill && target.item && target.item.is_berry? score += 30 end end #--------------------------------------------------------------------------- - when "0F6" + when "RestoreUserConsumedItem" if !user.recycleItem || user.item score -= 80 elsif user.recycleItem score += 30 end #--------------------------------------------------------------------------- - when "0F7" + when "ThrowUserItemAtTarget" if !user.item || !user.itemActive? || user.unlosableItem?(user.item) || user.item.is_poke_ball? score -= 90 end #--------------------------------------------------------------------------- - when "0F8" + when "StartTargetCannotUseItem" score -= 90 if target.effects[PBEffects::Embargo]>0 #--------------------------------------------------------------------------- - when "0F9" + when "StartNegateHeldItems" if @battle.field.effects[PBEffects::MagicRoom]>0 score -= 90 else score += 30 if !user.item && target.item end #--------------------------------------------------------------------------- - when "0FA" + when "RecoilQuarterOfDamageDealt" score -= 25 #--------------------------------------------------------------------------- - when "0FB" + when "RecoilThirdOfDamageDealt" score -= 30 #--------------------------------------------------------------------------- - when "0FC" + when "RecoilHalfOfDamageDealt" score -= 40 #--------------------------------------------------------------------------- - when "0FD" + when "RecoilThirdOfDamageDealtParalyzeTarget" score -= 30 if target.pbCanParalyze?(user,false) score += 30 @@ -2152,7 +2176,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "0FE" + when "RecoilThirdOfDamageDealtBurnTarget" score -= 30 if target.pbCanBurn?(user,false) score += 30 @@ -2161,7 +2185,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "0FF" + when "StartSunWeather" if @battle.pbCheckGlobalAbility(:AIRLOCK) || @battle.pbCheckGlobalAbility(:CLOUDNINE) score -= 90 @@ -2174,7 +2198,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "100" + when "StartRainWeather" if @battle.pbCheckGlobalAbility(:AIRLOCK) || @battle.pbCheckGlobalAbility(:CLOUDNINE) score -= 90 @@ -2187,7 +2211,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "101" + when "StartSandstormWeather" if @battle.pbCheckGlobalAbility(:AIRLOCK) || @battle.pbCheckGlobalAbility(:CLOUDNINE) score -= 90 @@ -2195,7 +2219,7 @@ class PokeBattle_AI score -= 90 end #--------------------------------------------------------------------------- - when "102" + when "StartHailWeather" if @battle.pbCheckGlobalAbility(:AIRLOCK) || @battle.pbCheckGlobalAbility(:CLOUDNINE) score -= 90 @@ -2203,7 +2227,7 @@ class PokeBattle_AI score -= 90 end #--------------------------------------------------------------------------- - when "103" + when "AddSpikesToFoeSide" if user.pbOpposingSide.effects[PBEffects::Spikes]>=3 score -= 90 else @@ -2222,7 +2246,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "104" + when "AddToxicSpikesToFoeSide" if user.pbOpposingSide.effects[PBEffects::ToxicSpikes]>=2 score -= 90 else @@ -2241,7 +2265,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "105" + when "AddStealthRocksToFoeSide" if user.pbOpposingSide.effects[PBEffects::StealthRock] score -= 90 else @@ -2259,30 +2283,30 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "106" + when "GrassPledge" #--------------------------------------------------------------------------- - when "107" + when "FirePledge" #--------------------------------------------------------------------------- - when "108" + when "WaterPledge" #--------------------------------------------------------------------------- - when "109" + when "AddMoneyGainedFromBattle" #--------------------------------------------------------------------------- - when "10A" + when "RemoveScreens" score += 20 if user.pbOpposingSide.effects[PBEffects::AuroraVeil]>0 score += 20 if user.pbOpposingSide.effects[PBEffects::Reflect]>0 score += 20 if user.pbOpposingSide.effects[PBEffects::LightScreen]>0 #--------------------------------------------------------------------------- - when "10B" + when "CrashDamageIfFailsUnusableInGravity" score += 10*(user.stages[:ACCURACY]-target.stages[:EVASION]) #--------------------------------------------------------------------------- - when "10C" + when "UserMakeSubstitute" if user.effects[PBEffects::Substitute]>0 score -= 90 elsif user.hp<=user.totalhp/4 score -= 90 end #--------------------------------------------------------------------------- - when "10D" + when "CurseTargetOrLowerUserSpd1RaiseUserAtkDef1" if user.pbHasType?(:GHOST) if target.effects[PBEffects::Curse] score -= 90 @@ -2301,10 +2325,10 @@ class PokeBattle_AI score += avg/3 end #--------------------------------------------------------------------------- - when "10E" + when "LowerPPOfTargetLastMoveBy4" score -= 40 #--------------------------------------------------------------------------- - when "10F" + when "StartDamageTargetEachTurnIfTargetAsleep" if target.effects[PBEffects::Nightmare] || target.effects[PBEffects::Substitute]>0 score -= 90 @@ -2315,7 +2339,7 @@ class PokeBattle_AI score += 50 if target.statusCount>3 end #--------------------------------------------------------------------------- - when "110" + when "RemoveUserBindingAndEntryHazards" score += 30 if user.effects[PBEffects::Trapping]>0 score += 30 if user.effects[PBEffects::LeechSeed]>=0 if @battle.pbAbleNonActiveCount(user.idxOwnSide)>0 @@ -2324,7 +2348,7 @@ class PokeBattle_AI score += 80 if user.pbOwnSide.effects[PBEffects::StealthRock] end #--------------------------------------------------------------------------- - when "111" + when "AttackTwoTurnsLater" if @battle.positions[target.index].effects[PBEffects::FutureSightCounter]>0 score -= 100 elsif @battle.pbAbleNonActiveCount(user.idxOwnSide)==0 @@ -2332,7 +2356,7 @@ class PokeBattle_AI score -= 70 end #--------------------------------------------------------------------------- - when "112" + when "UserAddStockpileRaiseDefSpDef1" avg = 0 avg -= user.stages[:DEFENSE]*10 avg -= user.stages[:SPECIAL_DEFENSE]*10 @@ -2341,13 +2365,14 @@ class PokeBattle_AI score -= 80 else # More preferable if user also has Spit Up/Swallow - score += 20 if user.pbHasMoveFunction?("113","114") # Spit Up, Swallow + score += 20 if user.pbHasMoveFunction?("PowerDependsOnUserStockpile", + "HealUserDependingOnUserStockpile") # Spit Up, Swallow end #--------------------------------------------------------------------------- - when "113" + when "PowerDependsOnUserStockpile" score -= 100 if user.effects[PBEffects::Stockpile]==0 #--------------------------------------------------------------------------- - when "114" + when "HealUserDependingOnUserStockpile" if user.effects[PBEffects::Stockpile]==0 score -= 90 elsif user.hp==user.totalhp @@ -2358,14 +2383,14 @@ class PokeBattle_AI score -= user.hp*mult*2/user.totalhp end #--------------------------------------------------------------------------- - when "115" + when "FailsIfUserDamagedThisTurn" score += 50 if target.effects[PBEffects::HyperBeam]>0 score -= 35 if target.hp<=target.totalhp/2 # If target is weak, no score -= 70 if target.hp<=target.totalhp/4 # need to risk this move #--------------------------------------------------------------------------- - when "116" + when "FailsIfTargetActed" #--------------------------------------------------------------------------- - when "117" + when "RedirectAllMovesToUser" hasAlly = false user.eachAlly do |b| hasAlly = true @@ -2373,7 +2398,7 @@ class PokeBattle_AI end score -= 90 if !hasAlly #--------------------------------------------------------------------------- - when "118" + when "StartGravity" if @battle.field.effects[PBEffects::Gravity]>0 score -= 90 elsif skill>=PBTrainerAI.mediumSkill @@ -2387,143 +2412,73 @@ class PokeBattle_AI score += 20 if target.effects[PBEffects::SkyDrop]>=0 score += 20 if target.effects[PBEffects::MagnetRise]>0 score += 20 if target.effects[PBEffects::Telekinesis]>0 - score += 20 if target.inTwoTurnAttack?("0C9","0CC","0CE") # Fly, Bounce, Sky Drop + score += 20 if target.inTwoTurnAttack?("TwoTurnAttackInvulnerableInSky", + "TwoTurnAttackInvulnerableInSkyParalyzeTarget", + "TwoTurnAttackInvulnerableInSkyTargetCannotAct") score += 20 if target.pbHasType?(:FLYING) score += 20 if target.hasActiveAbility?(:LEVITATE) score += 20 if target.hasActiveItem?(:AIRBALLOON) end #--------------------------------------------------------------------------- - when "119" + when "StartUserAirborne" if user.effects[PBEffects::MagnetRise]>0 || user.effects[PBEffects::Ingrain] || user.effects[PBEffects::SmackDown] score -= 90 end #--------------------------------------------------------------------------- - when "11A" + when "StartTargetAirborneAndAlwaysHitByMoves" if target.effects[PBEffects::Telekinesis]>0 || target.effects[PBEffects::Ingrain] || target.effects[PBEffects::SmackDown] score -= 90 end #--------------------------------------------------------------------------- - when "11B" + when "HitsTargetInSky" #--------------------------------------------------------------------------- - when "11C" + when "HitsTargetInSkyGroundsTarget" if skill>=PBTrainerAI.mediumSkill score += 20 if target.effects[PBEffects::MagnetRise]>0 score += 20 if target.effects[PBEffects::Telekinesis]>0 - score += 20 if target.inTwoTurnAttack?("0C9","0CC") # Fly, Bounce + score += 20 if target.inTwoTurnAttack?("TwoTurnAttackInvulnerableInSky", + "TwoTurnAttackInvulnerableInSkyParalyzeTarget") score += 20 if target.pbHasType?(:FLYING) score += 20 if target.hasActiveAbility?(:LEVITATE) score += 20 if target.hasActiveItem?(:AIRBALLOON) end #--------------------------------------------------------------------------- - when "11D" + when "TargetActsNext" #--------------------------------------------------------------------------- - when "11E" + when "TargetActsLast" #--------------------------------------------------------------------------- - when "11F" + when "StartSlowerBattlersActFirst" #--------------------------------------------------------------------------- - when "120" + when "UserSwapsPositionsWithAlly" #--------------------------------------------------------------------------- - when "121" + when "UseTargetAttackInsteadOfUserAttack" #--------------------------------------------------------------------------- - when "122" + when "UseTargetDefenseInsteadOfTargetSpDef" #--------------------------------------------------------------------------- - when "123" + when "FailsUnlessTargetSharesTypeWithUser" if !target.pbHasType?(user.type1) && !target.pbHasType?(user.type2) score -= 90 end #--------------------------------------------------------------------------- - when "124" + when "StartSwapAllBattlersBaseDefensiveStats" #--------------------------------------------------------------------------- - when "125" + when "FailsIfUserHasUnusedMove" #--------------------------------------------------------------------------- - when "126" - score += 20 # Shadow moves are more preferable - #--------------------------------------------------------------------------- - when "127" - score += 20 # Shadow moves are more preferable - if target.pbCanParalyze?(user,false) - score += 30 - if skill>=PBTrainerAI.mediumSkill - aspeed = pbRoughStat(user,:SPEED,skill) - ospeed = pbRoughStat(target,:SPEED,skill) - if aspeedospeed - score -= 40 - end - end - if skill>=PBTrainerAI.highSkill - score -= 40 if target.hasActiveAbility?([:GUTS,:MARVELSCALE,:QUICKFEET]) - end - end - #--------------------------------------------------------------------------- - when "128" - score += 20 # Shadow moves are more preferable - if target.pbCanBurn?(user,false) - score += 30 - if skill>=PBTrainerAI.highSkill - score -= 40 if target.hasActiveAbility?([:GUTS,:MARVELSCALE,:QUICKFEET,:FLAREBOOST]) - end - end - #--------------------------------------------------------------------------- - when "129" - score += 20 # Shadow moves are more preferable - if target.pbCanFreeze?(user,false) - score += 30 - if skill>=PBTrainerAI.highSkill - score -= 20 if target.hasActiveAbility?(:MARVELSCALE) - end - end - #--------------------------------------------------------------------------- - when "12A" - score += 20 # Shadow moves are more preferable - if target.pbCanConfuse?(user,false) - score += 30 - else - if skill>=PBTrainerAI.mediumSkill - score -= 90 - end - end - #--------------------------------------------------------------------------- - when "12B" - score += 20 # Shadow moves are more preferable - if !target.pbCanLowerStatStage?(:DEFENSE,user) - score -= 90 - else - score += 40 if user.turnCount==0 - score += target.stages[:DEFENSE]*20 - end - #--------------------------------------------------------------------------- - when "12C" - score += 20 # Shadow moves are more preferable - if !target.pbCanLowerStatStage?(:EVASION,user) - score -= 90 - else - score += target.stages[:EVASION]*15 - end - #--------------------------------------------------------------------------- - when "12D" - score += 20 # Shadow moves are more preferable - #--------------------------------------------------------------------------- - when "12E" + when "AllBattlersLoseHalfHPUserSkipsNextTurn" score += 20 # Shadow moves are more preferable score += 20 if target.hp>=target.totalhp/2 score -= 20 if user.hp=0 - #--------------------------------------------------------------------------- - when "130" + when "UserLosesHalfHP" score += 20 # Shadow moves are more preferable score -= 40 #--------------------------------------------------------------------------- - when "131" + when "StartShadowSkyWeather" score += 20 # Shadow moves are more preferable if @battle.pbCheckGlobalAbility(:AIRLOCK) || @battle.pbCheckGlobalAbility(:CLOUDNINE) @@ -2532,7 +2487,7 @@ class PokeBattle_AI score -= 90 end #--------------------------------------------------------------------------- - when "132" + when "RemoveAllScreens" score += 20 # Shadow moves are more preferable if target.pbOwnSide.effects[PBEffects::AuroraVeil]>0 || target.pbOwnSide.effects[PBEffects::Reflect]>0 || @@ -2547,11 +2502,11 @@ class PokeBattle_AI score -= 110 end #--------------------------------------------------------------------------- - when "133", "134" + when "DoesNothingFailsIfNoAlly", "DoesNothingCongratuations" score -= 95 score = 0 if skill>=PBTrainerAI.highSkill #--------------------------------------------------------------------------- - when "135" + when "FreezeTargetSuperEffectiveAgainstWater" if target.pbCanFreeze?(user,false) score += 30 if skill>=PBTrainerAI.highSkill @@ -2559,10 +2514,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "136" - score += 20 if user.stages[:DEFENSE]<0 - #--------------------------------------------------------------------------- - when "137" + when "RaisePlusMinusUserAndAlliesDefSpDef1" hasEffect = user.statStageAtMax?(:DEFENSE) && user.statStageAtMax?(:SPECIAL_DEFENSE) user.eachAlly do |b| @@ -2578,14 +2530,14 @@ class PokeBattle_AI score -= 90 end #--------------------------------------------------------------------------- - when "138" + when "RaiseAllySpDef1" if target.statStageAtMax?(:SPECIAL_DEFENSE) score -= 90 else score -= target.stages[:SPECIAL_DEFENSE]*10 end #--------------------------------------------------------------------------- - when "139" + when "LowerTargetAttack1BypassSubstitute" if !target.pbCanLowerStatStage?(:ATTACK,user) score -= 90 else @@ -2605,22 +2557,19 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "13A" + when "LowerTargetAtkSpAtk1" avg = target.stages[:ATTACK]*10 avg += target.stages[:SPECIAL_ATTACK]*10 score += avg/2 #--------------------------------------------------------------------------- - when "13B" + when "HoopaRemoveProtectionsBypassSubstituteLowerUserDef1" if !user.isSpecies?(:HOOPA) || user.form!=1 score -= 100 else score += 20 if target.stages[:DEFENSE]>0 end #--------------------------------------------------------------------------- - when "13C" - score += 20 if target.stages[:SPECIAL_ATTACK]>0 - #--------------------------------------------------------------------------- - when "13D" + when "LowerTargetSpAtk2" if !target.pbCanLowerStatStage?(:SPECIAL_ATTACK,user) score -= 90 else @@ -2628,7 +2577,7 @@ class PokeBattle_AI score += target.stages[:SPECIAL_ATTACK]*20 end #--------------------------------------------------------------------------- - when "13E" + when "RaiseGroundedGrassBattlersAtkSpAtk1" count = 0 @battle.eachBattler do |b| if b.pbHasType?(:GRASS) && !b.airborne? && @@ -2644,7 +2593,7 @@ class PokeBattle_AI end score -= 95 if count==0 #--------------------------------------------------------------------------- - when "13F" + when "RaiseGrassBattlersDef1" count = 0 @battle.eachBattler do |b| if b.pbHasType?(:GRASS) && !b.statStageAtMax?(:DEFENSE) @@ -2658,7 +2607,7 @@ class PokeBattle_AI end score -= 95 if count==0 #--------------------------------------------------------------------------- - when "140" + when "LowerPoisonedTargetAtkSpAtkSpd1" count=0 @battle.eachBattler do |b| if b.poisoned? && @@ -2677,7 +2626,7 @@ class PokeBattle_AI end score -= 95 if count==0 #--------------------------------------------------------------------------- - when "141" + when "InvertTargetStatStages" if target.effects[PBEffects::Substitute]>0 score -= 90 else @@ -2694,24 +2643,24 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "142" + when "AddGhostTypeToTarget" score -= 90 if target.pbHasType?(:GHOST) #--------------------------------------------------------------------------- - when "143" + when "AddGrassTypeToTarget" score -= 90 if target.pbHasType?(:GRASS) #--------------------------------------------------------------------------- - when "144" + when "EffectivenessIncludesFlyingType" #--------------------------------------------------------------------------- - when "145" + when "TargetMovesBecomeElectric" aspeed = pbRoughStat(user,:SPEED,skill) ospeed = pbRoughStat(target,:SPEED,skill) score -= 90 if aspeed>ospeed #--------------------------------------------------------------------------- - when "146" + when "NormalMovesBecomeElectric" #--------------------------------------------------------------------------- - when "147" + when "RemoveProtectionsBypassSubstitute" #--------------------------------------------------------------------------- - when "148" + when "TargetNextFireMoveDamagesTarget" aspeed = pbRoughStat(user,:SPEED,skill) ospeed = pbRoughStat(target,:SPEED,skill) if aspeed>ospeed @@ -2720,7 +2669,7 @@ class PokeBattle_AI score += 30 if target.pbHasMoveType?(:FIRE) end #--------------------------------------------------------------------------- - when "149" + when "ProtectUserSideFromDamagingMovesIfUserFirstTurn" if user.turnCount==0 score += 30 else @@ -2728,9 +2677,9 @@ class PokeBattle_AI score = 0 if skill>=PBTrainerAI.bestSkill end #--------------------------------------------------------------------------- - when "14A" + when "ProtectUserSideFromStatusMoves" #--------------------------------------------------------------------------- - when "14B", "14C" + when "ProtectUserFromDamagingMovesKingsShield", "ProtectUserFromTargetingMovesSpikyShield" if user.effects[PBEffects::ProtectRate]>1 || target.effects[PBEffects::HyperBeam]>0 score -= 90 @@ -2742,9 +2691,7 @@ class PokeBattle_AI score += 30 if target.effects[PBEffects::TwoTurnAttack] end #--------------------------------------------------------------------------- - when "14D" - #--------------------------------------------------------------------------- - when "14E" + when "TwoTurnAttackRaiseUserSpAtkSpDefSpd2" if user.statStageAtMax?(:SPECIAL_ATTACK) && user.statStageAtMax?(:SPECIAL_DEFENSE) && user.statStageAtMax?(:SPEED) @@ -2773,39 +2720,39 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "14F" + when "HealUserByThreeQuartersOfDamageDone" if skill>=PBTrainerAI.highSkill && target.hasActiveAbility?(:LIQUIDOOZE) score -= 80 else score += 40 if user.hp<=user.totalhp/2 end #--------------------------------------------------------------------------- - when "150" + when "RaiseUserAttack3IfKOTarget" score += 20 if !user.statStageAtMax?(:ATTACK) && target.hp<=target.totalhp/4 #--------------------------------------------------------------------------- - when "151" + when "LowerTargetAtkSpAtk1SwitchOutUser" avg = target.stages[:ATTACK]*10 avg += target.stages[:SPECIAL_ATTACK]*10 score += avg/2 #--------------------------------------------------------------------------- - when "152" + when "TrapAllBattlersInBattleForOneTurn" #--------------------------------------------------------------------------- - when "153" + when "AddStickyWebToFoeSide" score -= 95 if user.pbOpposingSide.effects[PBEffects::StickyWeb] #--------------------------------------------------------------------------- - when "154" + when "StartElectricTerrain" #--------------------------------------------------------------------------- - when "155" + when "StartGrassyTerrain" #--------------------------------------------------------------------------- - when "156" + when "StartMistyTerrain" #--------------------------------------------------------------------------- - when "157" + when "DoubleMoneyGainedFromBattle" score -= 90 #--------------------------------------------------------------------------- - when "158" + when "FailsIfUserNotConsumedBerry" score -= 90 if !user.belched? #--------------------------------------------------------------------------- - when "159" + when "PoisonTargetLowerTargetSpeed1" if !target.pbCanPoison?(user,false) && !target.pbCanLowerStatStage?(:SPEED,user) score -= 90 else @@ -2832,14 +2779,14 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "15A" + when "CureTargetBurn" if target.opposes?(user) score -= 40 if target.status == :BURN else score += 40 if target.status == :BURN end #--------------------------------------------------------------------------- - when "15B" + when "CureTargetStatusHealUserHalfOfTotalHP" if target.status == :NONE score -= 90 elsif user.hp==user.totalhp && target.opposes?(user) @@ -2849,7 +2796,7 @@ class PokeBattle_AI score -= 30 if target.opposes?(user) end #--------------------------------------------------------------------------- - when "15C" + when "RaisePlusMinusUserAndAlliesAtkSpAtk1" hasEffect = user.statStageAtMax?(:ATTACK) && user.statStageAtMax?(:SPECIAL_ATTACK) user.eachAlly do |b| @@ -2865,7 +2812,7 @@ class PokeBattle_AI score -= 90 end #--------------------------------------------------------------------------- - when "15D" + when "UserStealTargetPositiveStatStages" numStages = 0 GameData::Stat.each_battle do |s| next if target.stages[s.id] <= 0 @@ -2873,17 +2820,17 @@ class PokeBattle_AI end score += numStages*20 #--------------------------------------------------------------------------- - when "15E" + when "EnsureNextCriticalHit" if user.effects[PBEffects::LaserFocus]>0 score -= 90 else score += 40 end #--------------------------------------------------------------------------- - when "15F" + when "LowerUserDefense1" score += user.stages[:DEFENSE]*10 #--------------------------------------------------------------------------- - when "160" + when "HealUserByTargetAttackLowerTargetAttack1" if target.statStageAtMin?(:ATTACK) score -= 90 else @@ -2906,7 +2853,7 @@ class PokeBattle_AI score += (user.totalhp-user.hp)*50/user.totalhp end #--------------------------------------------------------------------------- - when "161" + when "UserTargetSwapBaseSpeed" if skill>=PBTrainerAI.mediumSkill if user.speed>target.speed score += 50 @@ -2915,14 +2862,14 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "162" + when "UserLosesFireType" score -= 90 if !user.pbHasType?(:FIRE) #--------------------------------------------------------------------------- - when "163" + when "IgnoreTargetAbility" #--------------------------------------------------------------------------- - when "164" + when "CategoryDependsOnHigherDamageIgnoreTargetAbility" #--------------------------------------------------------------------------- - when "165" + when "NegateTargetAbilityIfTargetActed" if skill>=PBTrainerAI.mediumSkill userSpeed = pbRoughStat(user,:SPEED,skill) targetSpeed = pbRoughStat(target,:SPEED,skill) @@ -2933,16 +2880,16 @@ class PokeBattle_AI score += 30 end #--------------------------------------------------------------------------- - when "166" + when "DoublePowerIfUserLastMoveFailed" #--------------------------------------------------------------------------- - when "167" + when "StartWeakenDamageAgainstUserSideIfHail" if user.pbOwnSide.effects[PBEffects::AuroraVeil]>0 || user.effectiveWeather != :Hail score -= 90 else score += 40 end #--------------------------------------------------------------------------- - when "168" + when "ProtectUserBanefulBunker" if user.effects[PBEffects::ProtectRate]>1 || target.effects[PBEffects::HyperBeam]>0 score -= 90 @@ -2955,9 +2902,9 @@ class PokeBattle_AI score += 20 # Because of possible poisoning end #--------------------------------------------------------------------------- - when "169" + when "TypeIsUserFirstType" #--------------------------------------------------------------------------- - when "16A" + when "RedirectAllMovesToTarget" hasAlly = false target.eachAlly do |b| hasAlly = true @@ -2965,7 +2912,7 @@ class PokeBattle_AI end score -= 90 if !hasAlly #--------------------------------------------------------------------------- - when "16B" + when "TargetUsesItsLastUsedMoveAgain" if skill>=PBTrainerAI.mediumSkill if !target.lastRegularMoveUsed || !target.pbHasMove?(target.lastRegularMoveUsed) || @@ -2978,7 +2925,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "16C" + when "DisableTargetSoundMoves" if target.effects[PBEffects::ThroatChop]==0 && skill>=PBTrainerAI.highSkill hasSoundMove = false user.eachMove do |m| @@ -2989,7 +2936,7 @@ class PokeBattle_AI score += 40 if hasSoundMove end #--------------------------------------------------------------------------- - when "16D" + when "HealUserDependingOnSandstorm" if user.hp==user.totalhp || (skill>=PBTrainerAI.mediumSkill && !user.canHeal?) score -= 90 else @@ -2998,7 +2945,7 @@ class PokeBattle_AI score += 30 if user.effectiveWeather == :Sandstorm end #--------------------------------------------------------------------------- - when "16E" + when "HealTargetDependingOnGrassyTerrain" if user.hp==user.totalhp || (skill>=PBTrainerAI.mediumSkill && !user.canHeal?) score -= 90 else @@ -3009,7 +2956,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "16F" + when "HealAllyOrDamageFoe" if !target.opposes?(user) if target.hp==target.totalhp || (skill>=PBTrainerAI.mediumSkill && !target.canHeal?) score -= 90 @@ -3019,7 +2966,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "170" + when "UserLosesHalfOfTotalHPExplosive" reserves = @battle.pbAbleNonActiveCount(user.idxOwnSide) foes = @battle.pbAbleNonActiveCount(user.idxOpposingSide) if @battle.pbCheckGlobalAbility(:DAMP) @@ -3032,7 +2979,7 @@ class PokeBattle_AI score -= (user.totalhp-user.hp)*75/user.totalhp end #--------------------------------------------------------------------------- - when "171" + when "UsedAfterUserTakesPhysicalDamage" if skill>=PBTrainerAI.mediumSkill hasPhysicalAttack = false target.eachMove do |m| @@ -3043,21 +2990,21 @@ class PokeBattle_AI score -= 80 if !hasPhysicalAttack end #--------------------------------------------------------------------------- - when "172" + when "BurnAttackerBeforeUserActs" score += 20 # Because of possible burning #--------------------------------------------------------------------------- - when "173" + when "StartPsychicTerrain" #--------------------------------------------------------------------------- - when "174" + when "FailsIfNotUserFirstTurn" score -= 90 if user.turnCount > 0 #--------------------------------------------------------------------------- - when "175" + when "HitTwoTimesFlinchTarget" score += 30 if target.effects[PBEffects::Minimize] #--------------------------------------------------------------------------- - when "176" + when "CategoryDependsOnHigherDamagePoisonTarget" score += 5 if target.pbCanPoison?(user, false) #--------------------------------------------------------------------------- - when "177" + when "BurnTargetIfTargetStatsRaisedThisTurn" if target.pbCanBurn?(user, false) score += 40 if skill >= PBTrainerAI.highSkill @@ -3067,10 +3014,10 @@ class PokeBattle_AI score -= 90 end #--------------------------------------------------------------------------- - when "178" + when "TypeDependsOnUserMorpekoFormRaiseUserSpeed1" score += 20 if user.stages[:SPEED] <= 0 #--------------------------------------------------------------------------- - when "179" + when "RaiseUserMainStats1TrapUserInBattle" if user.effects[PBEffects::NoRetreat] score -= 100 elsif user.hasActiveAbility?(:CONTRARY) @@ -3097,7 +3044,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "17A" + when "RaiseUserMainStats1LoseThirdOfTotalHP" if user.hp <= user.totalhp / 2 score -= 100 elsif user.hasActiveAbility?(:CONTRARY) @@ -3123,7 +3070,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "17B" + when "RaiseUserAndAlliesAtkDef1" has_ally = false user.eachAlly do |b| next if !b.pbCanLowerStatStage?(:ATTACK, user) && @@ -3139,7 +3086,7 @@ class PokeBattle_AI end score = 0 if !has_ally #--------------------------------------------------------------------------- - when "17C" + when "RaiseTargetAtkSpAtk2" if target.opposes?(user) score -= 100 elsif skill >= PBTrainerAI.mediumSkill && target.hasActiveAbility?(:CONTRARY) @@ -3149,7 +3096,7 @@ class PokeBattle_AI score -= target.stages[:SPECIAL_ATTACK] * 20 end #--------------------------------------------------------------------------- - when "17D" + when "LowerTargetDefense1DoublePowerInGravity" if !target.pbCanLowerStatStage?(:DEFENSE, user) score -= 90 else @@ -3158,7 +3105,7 @@ class PokeBattle_AI end score += 30 if @battle.field.effects[PBEffects::Gravity] > 0 #--------------------------------------------------------------------------- - when "17E" + when "LowerTargetSpeed1MakeTargetWeakerToFire" if !target.pbCanLowerStatStage?(:SPEED, user) && target.effects[PBEffects::TarShot] score -= 100 else @@ -3171,34 +3118,34 @@ class PokeBattle_AI end score += 20 if user.moves.any? { |m| m.damagingMove? && m.pbCalcType(user) == :FIRE } #--------------------------------------------------------------------------- - when "17F" + when "SetTargetTypesToPsychic" if target.pbHasOtherType?(:PSYCHIC) score -= 90 elsif !target.canChangeType? score -= 90 end #--------------------------------------------------------------------------- - when "180" + when "DoublePowerInElectricTerrain" score += 40 if @battle.field.terrain == :Electric && target.affectedByTerrain? #--------------------------------------------------------------------------- - when "181" + when "HitsAllFoesAndPowersUpInPsychicTerrain" score += 40 if @battle.field.terrain == :Psychic && user.affectedByTerrain? #--------------------------------------------------------------------------- - when "182" + when "TypeAndPowerDependOnTerrain" score += 40 if @battle.field.terrain != :None #--------------------------------------------------------------------------- - when "183" + when "DoublePowerIfTargetNotActed" #--------------------------------------------------------------------------- - when "184" + when "DoublePowerIfUserStatsLoweredThisTurn" #--------------------------------------------------------------------------- - when "185" + when "HigherPriorityInGrassyTerrain" if skill >= PBTrainerAI.mediumSkill && @battle.field.terrain == :Grassy aspeed = pbRoughStat(user, :SPEED, skill) ospeed = pbRoughStat(target, :SPEED, skill) score += 40 if aspeed < ospeed end #--------------------------------------------------------------------------- - when "186" + when "ProtectUserFromDamagingMovesObstruct" if user.effects[PBEffects::ProtectRate] > 1 || target.effects[PBEffects::HyperBeam] > 0 score -= 90 @@ -3210,7 +3157,7 @@ class PokeBattle_AI score += 30 if target.effects[PBEffects::TwoTurnAttack] end #--------------------------------------------------------------------------- - when "187" + when "CannotBeRedirected" redirection = false user.eachOpposing do |b| next if b.index == target.index @@ -3225,15 +3172,15 @@ class PokeBattle_AI end score += 50 if redirection && skill >= PBTrainerAI.mediumSkill #--------------------------------------------------------------------------- - when "188" + when "HitTwoTimesTargetThenTargetAlly" #--------------------------------------------------------------------------- - when "189" + when "HitThreeTimesAlwaysCriticalHit" if skill >= PBTrainerAI.highSkill stat = (move.physicalMove?)? :DEFENSE : :SPECIAL_DEFENSE score += 50 if targets.stages[stat] > 1 end #--------------------------------------------------------------------------- - when "18A" + when "HitTwoToFiveTimesRaiseUserSpd1LowerUserDef1" aspeed = pbRoughStat(user, :SPEED, skill) ospeed = pbRoughStat(target, :SPEED, skill) if aspeed > ospeed && aspeed * 2 / 3 < ospeed @@ -3243,7 +3190,7 @@ class PokeBattle_AI end score += user.stages[:DEFENSE] * 30 #--------------------------------------------------------------------------- - when "18B" + when "TwoTurnAttackChargeRaiseUserSpAtk1" aspeed = pbRoughStat(user, :SPEED, skill) ospeed = pbRoughStat(target, :SPEED, skill) if (aspeed > ospeed && user.hp > user.totalhp / 3) || user.hp > user.totalhp / 2 @@ -3253,7 +3200,7 @@ class PokeBattle_AI end score += user.stages[:SPECIAL_ATTACK] * 20 #--------------------------------------------------------------------------- - when "18C" + when "HealUserAndAlliesQuarterOfTotalHP" ally_amt = 30 @battle.eachSameSideBattler(user.index) do |b| if b.hp == b.totalhp || (skill >= PBTrainerAI.mediumSkill && !b.canHeal?) @@ -3263,7 +3210,7 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "18D" + when "HealUserAndAlliesQuarterOfTotalHPCureStatus" ally_amt = 80 / @battle.pbSideSize(user.index) @battle.eachSameSideBattler(user.index) do |b| if b.hp == b.totalhp || (skill >= PBTrainerAI.mediumSkill && !b.canHeal?) @@ -3274,7 +3221,7 @@ class PokeBattle_AI score += ally_amt / 2 if b.pbHasAnyStatus? end #--------------------------------------------------------------------------- - when "18E" + when "UserFaintsPowersUpInMistyTerrainExplosive" reserves = @battle.pbAbleNonActiveCount(user.idxOwnSide) foes = @battle.pbAbleNonActiveCount(user.idxOpposingSide) if @battle.pbCheckGlobalAbility(:DAMP) @@ -3289,7 +3236,7 @@ class PokeBattle_AI score += 20 if @battle.field.terrain == :Misty end #--------------------------------------------------------------------------- - when "18F" + when "TrapTargetInBattleLowerTargetDefSpDef1EachTurn" if target.effects[PBEffects::Octolock] >= 0 score -= 100 else @@ -3298,12 +3245,12 @@ class PokeBattle_AI !target.pbCanLowerStatStage?(:SPECIAL_DEFENSE, user, move) end #--------------------------------------------------------------------------- - when "190" + when "TrapUserAndTargetInBattle" if target.effects[PBEffects::JawLock] < 0 score += 40 if !user.trappedInBattle? && !target.trappedInBattle? end #--------------------------------------------------------------------------- - when "191" + when "UserConsumeBerryRaiseDefense2" if !user.item || !user.item.is_berry? || !user.itemActive? score -= 100 else @@ -3320,13 +3267,13 @@ class PokeBattle_AI if skill >= PBTrainerAI.mediumSkill score += 20 if user.canHeal? && user.hp < user.totalhp / 3 && user.hasActiveAbility?(:CHEEKPOUCH) score += 20 if user.hasActiveAbility?([:HARVEST, :RIPEN]) || - user.pbHasMoveFunction?("0F6") # Recycle + user.pbHasMoveFunction?("RestoreUserConsumedItem") # Recycle score += 20 if !user.canConsumeBerry? end score -= user.stages[:DEFENSE] * 20 end #--------------------------------------------------------------------------- - when "192" + when "AllBattlersConsumeBerry" useful_berries = [ :ORANBERRY, :SITRUSBERRY, :AGUAVBERRY, :APICOTBERRY, :CHERIBERRY, :CHESTOBERRY, :FIGYBERRY, :GANLONBERRY, :IAPAPABERRY, :KEEBERRY, @@ -3346,7 +3293,7 @@ class PokeBattle_AI amt = 20 / @battle.pbSideSize(user.index) score += amt if b.canHeal? && b.hp < b.totalhp / 3 && b.hasActiveAbility?(:CHEEKPOUCH) score += amt if b.hasActiveAbility?([:HARVEST, :RIPEN]) || - b.pbHasMoveFunction?("0F6") # Recycle + b.pbHasMoveFunction?("RestoreUserConsumedItem") # Recycle score += amt if !b.canConsumeBerry? end end @@ -3357,12 +3304,12 @@ class PokeBattle_AI score -= amt if b.hasActiveItem?(useful_berries) score -= amt if b.canHeal? && b.hp < b.totalhp / 3 && b.hasActiveAbility?(:CHEEKPOUCH) score -= amt if b.hasActiveAbility?([:HARVEST, :RIPEN]) || - b.pbHasMoveFunction?("0F6") # Recycle + b.pbHasMoveFunction?("RestoreUserConsumedItem") # Recycle score -= amt if !b.canConsumeBerry? end end #--------------------------------------------------------------------------- - when "193" + when "CorrodeTargetItem" if @battle.corrosiveGas[target.index % 2][target.pokemonIndex] score -= 100 elsif !target.item || !target.itemActive? || target.unlosableItem?(target.item) || @@ -3374,16 +3321,16 @@ class PokeBattle_AI score += 50 end #--------------------------------------------------------------------------- - when "194" + when "UserLosesHalfOfTotalHP" score -= 100 if user.hp <= user.totalhp / 2 #--------------------------------------------------------------------------- - when "195" + when "LowerPPOfTargetLastMoveBy3" last_move = target.pbGetMoveWithID(target.lastRegularMoveUsed) if last_move && last_move.total_pp > 0 && last_move.pp <= 3 score += 50 end #--------------------------------------------------------------------------- - when "196" + when "FailsIfTargetHasNoItem" if skill >= PBTrainerAI.mediumSkill if !target.item || !target.itemActive? score -= 90 @@ -3392,9 +3339,9 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "197" + when "UseUserBaseDefenseInsteadOfUserBaseAttack" #--------------------------------------------------------------------------- - when "198" + when "SwapSideEffects" if skill >= PBTrainerAI.mediumSkill good_effects = [:Reflect, :LightScreen, :AuroraVeil, :SeaOfFire, :Swamp, :Rainbow, :Mist, :Safeguard, @@ -3412,9 +3359,11 @@ class PokeBattle_AI end end #--------------------------------------------------------------------------- - when "199" + when "RemoveTerrain" score -= 100 if @battle.field.terrain == :None #--------------------------------------------------------------------------- + when "RaiseUserAndAlliesAttack1" + #--------------------------------------------------------------------------- end return score end diff --git a/Data/Scripts/011_Battle/004_AI/006_AI_Move_Utilities.rb b/Data/Scripts/011_Battle/004_AI/006_AI_Move_Utilities.rb index 1780a94ce..628fc78fc 100644 --- a/Data/Scripts/011_Battle/004_AI/006_AI_Move_Utilities.rb +++ b/Data/Scripts/011_Battle/004_AI/006_AI_Move_Utilities.rb @@ -172,69 +172,101 @@ class PokeBattle_AI return baseDmg if skill=PBTrainerAI.mediumSkill && target.effects[PBEffects::Minimize] # Sonic Boom, Dragon Rage, Super Fang, Night Shade, Endeavor - when "06A", "06B", "06C", "06D", "06E" + when "FixedDamage20", "FixedDamage40", "FixedDamageHalfTargetHP", + "FixedDamageUserLevel", "LowerTargetHPToUserHP" baseDmg = move.pbFixedDamage(user,target) - when "06F" # Psywave + when "FixedDamageUserLevelRandom" # Psywave baseDmg = user.level - when "070" # OHKO + when "OHKO", "OHKOIce", "OHKOHitsTargetUnderground" baseDmg = 200 - when "071", "072", "073" # Counter, Mirror Coat, Metal Burst + when "CounterPhysicalDamage", "CounterSpecialDamage", "CounterDamagePlusHalf" baseDmg = 60 - when "075", "076", "0D0", "12D" # Surf, Earthquake, Whirlpool, Shadow Storm + when "DoublePowerIfTargetUnderwater", "DoublePowerIfTargetUnderground", + "BindTargetDoublePowerIfTargetUnderwater" baseDmg = move.pbModifyDamage(baseDmg,user,target) # Gust, Twister, Venoshock, Smelling Salts, Wake-Up Slap, Facade, Hex, Brine, # Retaliate, Weather Ball, Return, Frustration, Eruption, Crush Grip, # Stored Power, Punishment, Hidden Power, Fury Cutter, Echoed Voice, # Trump Card, Flail, Electro Ball, Low Kick, Fling, Spit Up - when "077", "078", "07B", "07C", "07D", "07E", "07F", "080", "085", "087", - "089", "08A", "08B", "08C", "08E", "08F", "090", "091", "092", "097", - "098", "099", "09A", "0F7", "113" + when "DoublePowerIfTargetInSky", + "FlinchTargetDoublePowerIfTargetInSky", + "DoublePowerIfTargetPoisoned", + "DoublePowerIfTargetParalyzedCureTarget", + "DoublePowerIfTargetAsleepCureTarget", + "DoublePowerIfUserPoisonedBurnedParalyzed", + "DoublePowerIfTargetStatusProblem", + "DoublePowerIfTargetHPLessThanHalf", + "DoublePowerIfAllyFaintedLastTurn", + "TypeAndPowerDependOnWeather", + "PowerHigherWithUserHappiness", + "PowerLowerWithUserHappiness", + "PowerHigherWithUserHP", + "PowerHigherWithTargetHP", + "PowerHigherWithUserPositiveStatStages", + "PowerHigherWithTargetPositiveStatStages", + "TypeDependsOnUserIVs", + "PowerHigherWithConsecutiveUse", + "PowerHigherWithConsecutiveUseOnUserSide", + "PowerHigherWithLessPP", + "PowerLowerWithUserHP", + "PowerHigherWithUserFasterThanTarget", + "PowerHigherWithTargetWeight", + "ThrowUserItemAtTarget", + "PowerDependsOnUserStockpile" baseDmg = move.pbBaseDamage(baseDmg,user,target) - when "086" # Acrobatics + when "DoublePowerIfUserHasNoItem" # Acrobatics baseDmg *= 2 if !user.item || user.hasActiveItem?(:FLYINGGEM) - when "08D" # Gyro Ball + when "PowerHigherWithTargetFasterThanUser" # Gyro Ball targetSpeed = pbRoughStat(target,:SPEED,skill) userSpeed = pbRoughStat(user,:SPEED,skill) baseDmg = [[(25*targetSpeed/userSpeed).floor,150].min,1].max - when "094" # Present + when "RandomlyDamageOrHealTarget" # Present baseDmg = 50 - when "095" # Magnitude + when "RandomPowerDoublePowerIfTargetUnderground" # Magnitude baseDmg = 71 - baseDmg *= 2 if target.inTwoTurnAttack?("0CA") # Dig - when "096" # Natural Gift + baseDmg *= 2 if target.inTwoTurnAttack?("TwoTurnAttackInvulnerableUnderground") # Dig + when "TypeAndPowerDependOnUserBerry" # Natural Gift baseDmg = move.pbNaturalGiftBaseDamage(user.item_id) - when "09B" # Heavy Slam + when "PowerHigherWithUserHeavierThanTarget" # Heavy Slam baseDmg = move.pbBaseDamage(baseDmg,user,target) baseDmg *= 2 if Settings::MECHANICS_GENERATION >= 7 && skill>=PBTrainerAI.mediumSkill && target.effects[PBEffects::Minimize] - when "0A0", "0BD", "0BE" # Frost Breath, Double Kick, Twineedle + when "AlwaysCriticalHit", "HitTwoTimes", "HitTwoTimesPoisonTarget" # Frost Breath, Double Kick, Twineedle baseDmg *= 2 - when "0BF" # Triple Kick + when "HitThreeTimesPowersUpWithEachHit" # Triple Kick baseDmg *= 6 # Hits do x1, x2, x3 baseDmg in turn, for x6 in total - when "0C0" # Fury Attack + when "HitTwoToFiveTimes" # Fury Attack if user.hasActiveAbility?(:SKILLLINK) baseDmg *= 5 else baseDmg = (baseDmg * 31 / 10).floor # Average damage dealt end - when "0C1" # Beat Up + when "HitTwoToFiveTimesOrThreeForAshGreninja" + if user.isSpecies?(:GRENINJA) && user.form == 2 + baseDmg *= 4 # 3 hits at 20 power = 4 hits at 15 power + elsif user.hasActiveAbility?(:SKILLLINK) + baseDmg *= 5 + else + baseDmg = (baseDmg * 31 / 10).floor # Average damage dealt + end + when "HitOncePerUserTeamMember" # Beat Up mult = 0 @battle.eachInTeamFromBattlerIndex(user.index) do |pkmn,_i| mult += 1 if pkmn && pkmn.able? && pkmn.status == :NONE end baseDmg *= mult - when "0C4" # Solar Beam + when "TwoTurnAttackOneTurnInSun" # Solar Beam baseDmg = move.pbBaseDamageMultiplier(baseDmg,user,target) - when "0D3" # Rollout + when "MultiTurnAttackPowersUpEachTurn" # Rollout baseDmg *= 2 if user.effects[PBEffects::DefenseCurl] - when "0D4" # Bide + when "MultiTurnAttackBideThenReturnDoubleDamage" # Bide baseDmg = 40 - when "0E1" # Final Gambit + when "UserFaintsFixedDamageUserHP" # Final Gambit baseDmg = user.hp - when "144" # Flying Press + when "EffectivenessIncludesFlyingType" # Flying Press if GameData::Type.exists?(:FLYING) if skill>=PBTrainerAI.highSkill targetTypes = target.pbTypes(true) @@ -248,9 +280,9 @@ class PokeBattle_AI end end baseDmg *= 2 if skill>=PBTrainerAI.mediumSkill && target.effects[PBEffects::Minimize] - when "166" # Stomping Tantrum + when "DoublePowerIfUserLastMoveFailed" # Stomping Tantrum baseDmg *= 2 if user.lastRoundMoveFailed - when "175" # Double Iron Bash + when "HitTwoTimesFlinchTarget" # Double Iron Bash baseDmg *= 2 baseDmg *= 2 if skill>=PBTrainerAI.mediumSkill && target.effects[PBEffects::Minimize] end @@ -267,12 +299,12 @@ class PokeBattle_AI type = pbRoughType(move,user,skill) ##### Calculate user's attack stat ##### atk = pbRoughStat(user,:ATTACK,skill) - if move.function=="121" # Foul Play + if move.function=="UseTargetAttackInsteadOfUserAttack" # Foul Play atk = pbRoughStat(target,:ATTACK,skill) - elsif move.function=="197" # Body Press + elsif move.function=="UseUserBaseDefenseInsteadOfUserBaseAttack" # Body Press atk = pbRoughStat(user,:DEFENSE,skill) elsif move.specialMove?(type) - if move.function=="121" # Foul Play + if move.function=="UseTargetAttackInsteadOfUserAttack" # Foul Play atk = pbRoughStat(target,:SPECIAL_ATTACK,skill) else atk = pbRoughStat(user,:SPECIAL_ATTACK,skill) @@ -280,7 +312,7 @@ class PokeBattle_AI end ##### Calculate target's defense stat ##### defense = pbRoughStat(target,:DEFENSE,skill) - if move.specialMove?(type) && move.function!="122" # Psyshock + if move.specialMove?(type) && move.function!="UseTargetDefenseInsteadOfTargetSpDef" # Psyshock defense = pbRoughStat(target,:SPECIAL_DEFENSE,skill) end ##### Calculate all multiplier effects ##### @@ -455,7 +487,8 @@ class PokeBattle_AI multipliers[:final_damage_multiplier] *= 1.5 end when :Sandstorm - if target.pbHasType?(:ROCK) && move.specialMove?(type) && move.function != "122" # Psyshock + if target.pbHasType?(:ROCK) && move.specialMove?(type) && + move.function != "UseTargetDefenseInsteadOfTargetSpDef" # Psyshock multipliers[:defense_multiplier] *= 1.5 end end @@ -481,7 +514,7 @@ class PokeBattle_AI if skill>=PBTrainerAI.highSkill if user.status == :BURN && move.physicalMove?(type) && !user.hasActiveAbility?(:GUTS) && - !(Settings::MECHANICS_GENERATION >= 6 && move.function == "07E") # Facade + !(Settings::MECHANICS_GENERATION >= 6 && move.function == "DoublePowerIfUserPoisonedBurnedParalyzed") # Facade multipliers[:final_damage_multiplier] /= 2 end end @@ -650,18 +683,16 @@ class PokeBattle_AI end # "AI-specific calculations below" if skill>=PBTrainerAI.mediumSkill - modifiers[:evasion_stage] = 0 if move.function == "0A9" # Chip Away - modifiers[:base_accuracy] = 0 if ["0A5", "139", "13A", "13B", "13C", # "Always hit" - "147"].include?(move.function) + modifiers[:evasion_stage] = 0 if move.function == "IgnoreTargetDefSpDefEvaStatStages" # Chip Away modifiers[:base_accuracy] = 0 if user.effects[PBEffects::LockOn]>0 && user.effects[PBEffects::LockOnPos]==target.index end if skill>=PBTrainerAI.highSkill - if move.function=="006" # Toxic + if move.function=="BadPoisonTarget" # Toxic modifiers[:base_accuracy] = 0 if Settings::MORE_TYPE_EFFECTS && move.statusMove? && user.pbHasType?(:POISON) end - if move.function=="070" # OHKO moves + if ["OHKO", "OHKOIce", "OHKOHitsTargetUnderground"].include?(move.function) modifiers[:base_accuracy] = move.accuracy + user.level - target.level modifiers[:accuracy_multiplier] = 0 if target.level > user.level if skill>=PBTrainerAI.bestSkill diff --git a/Data/Scripts/011_Battle/006_Other battle types/004_PokeBattle_BattlePalace.rb b/Data/Scripts/011_Battle/006_Other battle types/004_PokeBattle_BattlePalace.rb index 14c81422c..b74223333 100644 --- a/Data/Scripts/011_Battle/006_Other battle types/004_PokeBattle_BattlePalace.rb +++ b/Data/Scripts/011_Battle/006_Other battle types/004_PokeBattle_BattlePalace.rb @@ -65,10 +65,10 @@ class PokeBattle_BattlePalace < PokeBattle_Battle end def pbMoveCategory(move) - if move.target == :User || move.function == "0D4" # Bide + if move.target == :User || move.function == "MultiTurnAttackBideThenReturnDoubleDamage" return 1 elsif move.statusMove? || - move.function == "071" || move.function == "072" # Counter, Mirror Coat + move.function == "CounterPhysicalDamage" || move.function == "CounterSpecialDamage" return 2 else return 0 diff --git a/Data/Scripts/011_Battle/006_Other battle types/005_PokeBattle_BattleArena.rb b/Data/Scripts/011_Battle/006_Other battle types/005_PokeBattle_BattleArena.rb index 22fb86269..30b11c98e 100644 --- a/Data/Scripts/011_Battle/006_Other battle types/005_PokeBattle_BattleArena.rb +++ b/Data/Scripts/011_Battle/006_Other battle types/005_PokeBattle_BattleArena.rb @@ -98,14 +98,14 @@ class PokeBattle_BattleArena < PokeBattle_Battle end def pbMindScore(move) - if move.function=="0AA" || # Detect/Protect - move.function=="0E8" || # Endure - move.function=="012" # Fake Out + if move.function=="ProtectUser" || # Detect/Protect + move.function=="UserEnduresFaintingThisTurn" || # Endure + move.function=="FlinchTargetFailsIfNotUserFirstTurn" # Fake Out return -1 end - if move.function=="071" || # Counter - move.function=="072" || # Mirror Coat - move.function=="0D4" # Bide + if move.function=="CounterPhysicalDamage" || # Counter + move.function=="CounterSpecialDamage" || # Mirror Coat + move.function=="MultiTurnAttackBideThenReturnDoubleDamage" # Bide return 0 end return 0 if move.statusMove? diff --git a/Data/Scripts/011_Battle/006_Other battle types/009_PokeBattle_Clauses.rb b/Data/Scripts/011_Battle/006_Other battle types/009_PokeBattle_Clauses.rb index 077c86e53..9fd8647af 100644 --- a/Data/Scripts/011_Battle/006_Other battle types/009_PokeBattle_Clauses.rb +++ b/Data/Scripts/011_Battle/006_Other battle types/009_PokeBattle_Clauses.rb @@ -25,11 +25,12 @@ class PokeBattle_Battle def pbJudgeCheckpoint(user,move=nil) if pbAllFainted?(0) && pbAllFainted?(1) if @rules["drawclause"] # NOTE: Also includes Life Orb (not implemented) - if !(move && move.function=="0DD") # Not a draw if fainting occurred due to Liquid Ooze + if !(move && move.function=="HealUserByHalfOfDamageDone") + # Not a draw if fainting occurred due to Liquid Ooze @decision = (user.opposes?) ? 1 : 2 # win / loss end elsif @rules["modifiedselfdestructclause"] - if move && move.function=="0E0" # Self-Destruct + if move && move.function=="UserFaintsExplosive" # Self-Destruct @decision = (user.opposes?) ? 1 : 2 # win / loss end end @@ -101,7 +102,7 @@ end -class PokeBattle_Move_022 # Double Team +class PokeBattle_Move_RaiseUserEvasion1 # Double Team alias __clauses__pbMoveFailed? pbMoveFailed? def pbMoveFailed?(user,targets) @@ -115,7 +116,7 @@ end -class PokeBattle_Move_034 # Minimize +class PokeBattle_Move_RaiseUserEvasion2MinimizeUser # Minimize alias __clauses__pbMoveFailed? pbMoveFailed? def pbMoveFailed?(user,targets) @@ -129,7 +130,7 @@ end -class PokeBattle_Move_067 # Skill Swap +class PokeBattle_Move_UserTargetSwapAbilities # Skill Swap alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget? def pbFailsAgainstTarget?(user, target, show_message) @@ -143,7 +144,7 @@ end -class PokeBattle_Move_06A # Sonic Boom +class PokeBattle_Move_FixedDamage20 # Sonic Boom alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget? def pbFailsAgainstTarget?(user, target, show_message) @@ -157,7 +158,7 @@ end -class PokeBattle_Move_06B # Dragon Rage +class PokeBattle_Move_FixedDamage40 # Dragon Rage alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget? def pbFailsAgainstTarget?(user, target, show_message) @@ -171,7 +172,7 @@ end -class PokeBattle_Move_070 # OHKO moves +class PokeBattle_Move_OHKO alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget? def pbFailsAgainstTarget?(user, target, show_message) @@ -185,7 +186,35 @@ end -class PokeBattle_Move_0E0 # Self-Destruct +class PokeBattle_Move_OHKOIce + alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget? + + def pbFailsAgainstTarget?(user, target, show_message) + if @battle.rules["ohkoclause"] + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return __clauses__pbFailsAgainstTarget?(user, target, show_message) + end +end + + + +class PokeBattle_Move_OHKOHitsTargetUnderground + alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget? + + def pbFailsAgainstTarget?(user, target, show_message) + if @battle.rules["ohkoclause"] + @battle.pbDisplay(_INTL("But it failed!")) if show_message + return true + end + return __clauses__pbFailsAgainstTarget?(user, target, show_message) + end +end + + + +class PokeBattle_Move_UserFaintsExplosive # Self-Destruct unless @__clauses__aliased alias __clauses__pbMoveFailed? pbMoveFailed? @__clauses__aliased = true @@ -217,7 +246,7 @@ end -class PokeBattle_Move_0E5 # Perish Song +class PokeBattle_Move_StartPerishCountsForAllBattlers # Perish Song alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget? def pbFailsAgainstTarget?(user, target, show_message) @@ -232,7 +261,7 @@ end -class PokeBattle_Move_0E7 # Destiny Bond +class PokeBattle_Move_AttackerFaintsIfUserFaints # Destiny Bond alias __clauses__pbFailsAgainstTarget? pbFailsAgainstTarget? def pbFailsAgainstTarget?(user, target, show_message) diff --git a/Data/Scripts/014_Pokemon/001_Pokemon-related/002_ShadowPokemon_Other.rb b/Data/Scripts/014_Pokemon/001_Pokemon-related/002_ShadowPokemon_Other.rb index d4fb95c5f..239770215 100644 --- a/Data/Scripts/014_Pokemon/001_Pokemon-related/002_ShadowPokemon_Other.rb +++ b/Data/Scripts/014_Pokemon/001_Pokemon-related/002_ShadowPokemon_Other.rb @@ -311,80 +311,11 @@ ItemHandlers::BattleUseOnBattler.add(:VIVIDSCENT,proc { |item,battler,scene| -#=============================================================================== -# No additional effect. (Shadow Blast, Shadow Blitz, Shadow Break, Shadow Rave, -# Shadow Rush, Shadow Wave) -#=============================================================================== -class PokeBattle_Move_126 < PokeBattle_Move_000 -end - - - -#=============================================================================== -# Paralyzes the target. (Shadow Bolt) -#=============================================================================== -class PokeBattle_Move_127 < PokeBattle_Move_007 -end - - - -#=============================================================================== -# Burns the target. (Shadow Fire) -#=============================================================================== -class PokeBattle_Move_128 < PokeBattle_Move_00A -end - - - -#=============================================================================== -# Freezes the target. (Shadow Chill) -#=============================================================================== -class PokeBattle_Move_129 < PokeBattle_Move_00C -end - - - -#=============================================================================== -# Confuses the target. (Shadow Panic) -#=============================================================================== -class PokeBattle_Move_12A < PokeBattle_Move_013 -end - - - -#=============================================================================== -# Decreases the target's Defense by 2 stages. (Shadow Down) -#=============================================================================== -class PokeBattle_Move_12B < PokeBattle_Move_04C -end - - - -#=============================================================================== -# Decreases the target's evasion by 2 stages. (Shadow Mist) -#=============================================================================== -class PokeBattle_Move_12C < PokeBattle_TargetStatDownMove - def initialize(battle,move) - super - @statDown = [:EVASION,2] - end -end - - - -#=============================================================================== -# Power is doubled if the target is using Dive. (Shadow Storm) -#=============================================================================== -class PokeBattle_Move_12D < PokeBattle_Move_075 -end - - - #=============================================================================== # Two turn attack. On first turn, halves the HP of all active Pokémon. # Skips second turn (if successful). (Shadow Half) #=============================================================================== -class PokeBattle_Move_12E < PokeBattle_Move +class PokeBattle_Move_AllBattlersLoseHalfHPUserSkipsNextTurn < PokeBattle_Move def pbMoveFailed?(user,targets) failed = true @battle.eachBattler do |b| @@ -413,19 +344,10 @@ end -#=============================================================================== -# Target can no longer switch out or flee, as long as the user remains active. -# (Shadow Hold) -#=============================================================================== -class PokeBattle_Move_12F < PokeBattle_Move_0EF -end - - - #=============================================================================== # User takes recoil damage equal to 1/2 of its current HP. (Shadow End) #=============================================================================== -class PokeBattle_Move_130 < PokeBattle_RecoilMove +class PokeBattle_Move_UserLosesHalfHP < PokeBattle_RecoilMove def pbRecoilDamage(user,target) return (target.damageState.totalHPLost/2.0).round end @@ -446,7 +368,7 @@ end #=============================================================================== # Starts shadow weather. (Shadow Sky) #=============================================================================== -class PokeBattle_Move_131 < PokeBattle_WeatherMove +class PokeBattle_Move_StartShadowSkyWeather < PokeBattle_WeatherMove def initialize(battle,move) super @weatherType = :ShadowSky @@ -459,7 +381,7 @@ end # Ends the effects of Light Screen, Reflect and Safeguard on both sides. # (Shadow Shed) #=============================================================================== -class PokeBattle_Move_132 < PokeBattle_Move +class PokeBattle_Move_RemoveAllScreens < PokeBattle_Move def pbEffectGeneral(user) for i in @battle.sides i.effects[PBEffects::AuroraVeil] = 0 diff --git a/Data/Scripts/018_Alternate battle modes/003_Battle Frontier generator/002_ChallengeGenerator_Pokemon.rb b/Data/Scripts/018_Alternate battle modes/003_Battle Frontier generator/002_ChallengeGenerator_Pokemon.rb index 05fc99282..0788bd286 100644 --- a/Data/Scripts/018_Alternate battle modes/003_Battle Frontier generator/002_ChallengeGenerator_Pokemon.rb +++ b/Data/Scripts/018_Alternate battle modes/003_Battle Frontier generator/002_ChallengeGenerator_Pokemon.rb @@ -76,7 +76,7 @@ def pbGetLegalMoves2(species, maxlevel) for move2 in movedatas # If we have a move that always hits, remove all other moves with no # effect of the same type and <= base power - if md.function_code == "0A5" && move2[1].function_code == "000" && # Always hits + if md.accuracy == 0 && move2[1].function_code == "None" && md.type == move2[1].type && md.base_damage >= move2[1].base_damage deleteAll.call(moves, move2[0]) # If we have two status moves that have the same function code, delete the @@ -85,7 +85,7 @@ def pbGetLegalMoves2(species, maxlevel) move2[1].base_damage == 0 && md.accuracy > move2[1].accuracy deleteAll.call(moves, move2[0]) # Delete poison-causing moves if we have a move that causes toxic - elsif md.function_code == "006" && move2[1].function_code == "005" + elsif md.function_code == "BadPoisonTarget" && move2[1].function_code == "PoisonTarget" deleteAll.call(moves, move2[0]) # If we have two moves with the same function code and type, and one of # them is damaging and has 10/15/the same PP as the other move and EITHER @@ -108,7 +108,7 @@ def addMove(moves, move, base) return if moves.include?(data.id) return if [:BUBBLE, :BUBBLEBEAM].include?(data.id) # Never add these moves count = base + 1 # Number of times to add move to moves - count = base if data.function_code == "000" && data.base_damage <= 40 + count = base if data.function_code == "None" && data.base_damage <= 40 if data.base_damage <= 30 || [:GROWL, :TAILWHIP, :LEER].include?(data.id) count = base end diff --git a/PBS/Gen 5/moves.txt b/PBS/Gen 5/moves.txt index b0e7f5470..a34ccf6a3 100644 --- a/PBS/Gen 5/moves.txt +++ b/PBS/Gen 5/moves.txt @@ -8,7 +8,7 @@ BaseDamage = 120 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = Using its tough and impressive horn, the user rams into the target with no letup. #------------------------------- @@ -20,7 +20,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user calls out its underlings to pummel the target. Critical hits land more easily. #------------------------------- @@ -32,7 +32,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove,Sound EffectChance = 10 Description = The user vibrates its wings to generate a damaging sound wave. It may also lower the target's Sp. Def stat. @@ -45,7 +45,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user slashes at the foe by crossing its scythes or claws as if they were a pair of scissors. #------------------------------- @@ -57,7 +57,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks with a sinister beam of light. It may also confuse the target. @@ -70,7 +70,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0EE +FunctionCode = SwitchOutUserDamagingMove Flags = Contact,CanProtect,CanMirrorMove Description = After making its attack, the user rushes back to switch places with a party Pokémon in waiting. #------------------------------- @@ -82,7 +82,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 010 +FunctionCode = FlinchTargetTrampleMinimize Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user crushes its foes by rolling over them. This attack may make the target flinch. @@ -95,7 +95,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0F4 +FunctionCode = UserConsumeTargetBerry Flags = Contact,CanProtect,CanMirrorMove Description = The user bites the target. If the target is holding a Berry, the user eats it and gains its effect. #------------------------------- @@ -107,7 +107,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 02D +FunctionCode = RaiseUserMainStats1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The foe is attacked with powdery scales blown by wind. It may also raise all the user's stats. @@ -120,7 +120,7 @@ BaseDamage = 30 Accuracy = 100 TotalPP = 20 Target = AllNearFoes -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = While resisting, the user attacks the opposing Pokémon. The targets' Sp. Atk stat is reduced. @@ -133,7 +133,7 @@ BaseDamage = 25 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0BE +FunctionCode = HitTwoTimesPoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The foe is stabbed twice by a pair of stingers. It may also poison the target. @@ -146,7 +146,7 @@ BaseDamage = 20 Accuracy = 95 TotalPP = 20 Target = NearOther -FunctionCode = 091 +FunctionCode = PowerHigherWithConsecutiveUse Flags = Contact,CanProtect,CanMirrorMove Description = The target is slashed with scythes or claws. Its power increases if it hits in succession. #------------------------------- @@ -158,7 +158,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = Contact,CanProtect,CanMirrorMove Description = The user drains the target's blood. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -170,7 +170,7 @@ BaseDamage = 14 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove Description = Sharp spikes are shot at the target in rapid succession. They hit two to five times in a row. #------------------------------- @@ -181,7 +181,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 02A +FunctionCode = RaiseUserDefSpDef1 Description = The user calls out its underlings to shield its body, raising its Defense and Sp. Def stats. #------------------------------- [HEALORDER] @@ -191,7 +191,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = The user calls out its underlings to heal it. The user regains up to half of its max HP. #------------------------------- [QUIVERDANCE] @@ -201,7 +201,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 02B +FunctionCode = RaiseUserSpAtkSpDefSpd1 Flags = Dance Description = The user performs a beautiful dance. It boosts the user's Sp. Atk, Sp. Def, and Speed stats. #------------------------------- @@ -213,7 +213,7 @@ Accuracy = 0 TotalPP = 20 Target = User Priority = 3 -FunctionCode = 117 +FunctionCode = RedirectAllMovesToUser Flags = Powder Description = The user scatters irritating powder to draw attention to itself. Opponents aim only at the user. #------------------------------- @@ -224,7 +224,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = CanProtect,CanMirrorMove Description = The user ensnares the target with thin, gooey silk so it can't flee from battle. #------------------------------- @@ -235,7 +235,7 @@ Category = Status Accuracy = 95 TotalPP = 40 Target = AllNearFoes -FunctionCode = 04D +FunctionCode = LowerTargetSpeed2 Flags = CanProtect,CanMirrorMove Description = The foe is bound with silk blown from the user's mouth. This silk reduces the target's Speed. #------------------------------- @@ -246,7 +246,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 039 +FunctionCode = RaiseUserSpAtk3 Description = The user stares at flashing lights to focus its mind, drastically raising its Sp. Atk stat. #------------------------------- [FOULPLAY] @@ -257,7 +257,7 @@ BaseDamage = 95 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 121 +FunctionCode = UseTargetAttackInsteadOfUserAttack Flags = Contact,CanProtect,CanMirrorMove Description = The user turns the foe's power against it. It does more damage the higher the target's Attack stat. #------------------------------- @@ -269,7 +269,7 @@ BaseDamage = 85 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 40 Description = The user lets loose a pitch-black shock wave at its target. It may also lower the target's accuracy. @@ -282,7 +282,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 20 Description = The user crunches up the target with sharp fangs. It may also lower the target's Defense stat. @@ -295,7 +295,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = Other -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove,Pulse EffectChance = 20 Description = The user releases a horrible aura imbued with dark thoughts. It may also make the target flinch. @@ -309,7 +309,7 @@ Accuracy = 100 TotalPP = 5 Target = NearOther Priority = 1 -FunctionCode = 116 +FunctionCode = FailsIfTargetActed Flags = Contact,CanProtect,CanMirrorMove Description = This move enables the user to attack first. It fails if the target is not readying an attack, however. #------------------------------- @@ -321,7 +321,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user slashes the target the instant an opportunity arises. Critical hits land more easily. #------------------------------- @@ -333,7 +333,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 30 Description = The target is bitten with viciously sharp fangs. It may make the target flinch. @@ -346,7 +346,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user draws up to the foe disarmingly, then throws a sucker punch. It hits without fail. #------------------------------- @@ -358,7 +358,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 15 Target = AllNearFoes -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = CanProtect,CanMirrorMove,Sound EffectChance = 100 Description = The user yells as if it is ranting about something, making the target's Sp. Atk stat decrease. @@ -371,7 +371,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 082 +FunctionCode = DoublePowerIfTargetLostHPThisTurn Flags = Contact,CanProtect,CanMirrorMove Description = If the target has already taken some damage in the same turn, this attack's power is doubled. #------------------------------- @@ -383,7 +383,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 084 +FunctionCode = DoublePowerIfTargetActed Flags = Contact,CanProtect,CanMirrorMove Description = If the user moves after the target, this attack's power will be doubled. #------------------------------- @@ -395,7 +395,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 088 +FunctionCode = PursueSwitchingFoe Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that inflicts double damage if used on a target that is switching out of battle. #------------------------------- @@ -407,7 +407,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0F1 +FunctionCode = UserTakesTargetItem Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks and steals the foe's held item simultaneously. It can't steal if the user holds an item. #------------------------------- @@ -419,7 +419,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0F0 +FunctionCode = RemoveTargetItem Flags = Contact,CanProtect,CanMirrorMove Description = The user slaps down the target's held item, preventing that item from being used in the battle. #------------------------------- @@ -431,7 +431,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0C1 +FunctionCode = HitOncePerUserTeamMember Flags = CanProtect,CanMirrorMove Description = The user gets all the party Pokémon to attack the foe. The more party Pokémon, the more damage. #------------------------------- @@ -443,7 +443,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0F7 +FunctionCode = ThrowUserItemAtTarget Flags = CanProtect,CanMirrorMove Description = The user flings its held item at the target to attack. Its power and effects depend on the item. #------------------------------- @@ -455,7 +455,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 08F +FunctionCode = PowerHigherWithTargetPositiveStatStages Flags = Contact,CanProtect,CanMirrorMove Description = This attack's power increases the more the target has powered up with stat changes. #------------------------------- @@ -466,7 +466,7 @@ Category = Status Accuracy = 80 TotalPP = 10 Target = AllNearFoes -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove Description = Opposing Pokémon are dragged into a world of total darkness that makes them sleep. #------------------------------- @@ -477,7 +477,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0F8 +FunctionCode = StartTargetCannotUseItem Flags = CanProtect,CanMirrorMove Description = It prevents the target from using its held item. Its Trainer is also prevented from using items on it. #------------------------------- @@ -488,7 +488,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 04F +FunctionCode = LowerTargetSpDef2 Flags = CanProtect,CanMirrorMove Description = The user feigns crying to fluster the target, harshly lowering its Sp. Def stat. #------------------------------- @@ -499,7 +499,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 040 +FunctionCode = RaiseTargetSpAtk1ConfuseTarget Flags = CanProtect,CanMirrorMove Description = Flattery is used to confuse the target. However, it also raises the target's Sp. Atk stat. #------------------------------- @@ -510,7 +510,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 029 +FunctionCode = RaiseUserAtkAcc1 Description = The user sharpens its claws to boost its Attack stat and accuracy. #------------------------------- [MEMENTO] @@ -520,7 +520,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0E2 +FunctionCode = UserFaintsLowerTargetAtkSpAtk2 Flags = CanProtect,CanMirrorMove Description = The user faints when using this move. In return, it harshly lowers the target's Attack and Sp. Atk. #------------------------------- @@ -531,7 +531,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 032 +FunctionCode = RaiseUserSpAtk2 Description = The user stimulates its brain by thinking bad thoughts. It sharply raises the user's Sp. Atk. #------------------------------- [QUASH] @@ -541,7 +541,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 11E +FunctionCode = TargetActsLast Flags = CanProtect,CanMirrorMove Description = The user suppresses the target and makes its move go last. #------------------------------- @@ -553,7 +553,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 0B2 +FunctionCode = StealAndUseBeneficialStatusMove Description = The user steals the effects of any healing or stat-changing move the foe attempts to use. #------------------------------- [SWITCHEROO] @@ -563,7 +563,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0F2 +FunctionCode = UserTargetSwapItems Flags = CanProtect,CanMirrorMove Description = The user trades held items with the target faster than the eye can follow. #------------------------------- @@ -574,7 +574,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0BA +FunctionCode = DisableTargetStatusMoves Flags = CanProtect,CanMirrorMove Description = The target is taunted into a rage that allows it to use only attack moves for three turns. #------------------------------- @@ -585,7 +585,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0B7 +FunctionCode = DisableTargetUsingSameMoveConsecutively Flags = CanProtect,CanMirrorMove Description = The user torments and enrages the foe, making it incapable of using the same move twice in a row. #------------------------------- @@ -597,7 +597,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The user blasts the target with power that distorts even time. The user must rest on the next turn. #------------------------------- @@ -609,7 +609,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 03F +FunctionCode = LowerUserSpAtk2 Flags = CanProtect,CanMirrorMove Description = Comets are summoned down from the sky. The attack's recoil harshly reduces the user's Sp. Atk stat. #------------------------------- @@ -621,7 +621,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = RandomNearFoe -FunctionCode = 0D2 +FunctionCode = MultiTurnAttackConfuseUserAtEnd Flags = Contact,CanProtect,CanMirrorMove Description = The user rampages and attacks for two to three turns. It then becomes confused, however. #------------------------------- @@ -633,7 +633,7 @@ BaseDamage = 100 Accuracy = 75 TotalPP = 10 Target = NearOther -FunctionCode = 010 +FunctionCode = FlinchTargetTrampleMinimize Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user tackles the foe while exhibiting overwhelming menace. It may also make the target flinch. @@ -646,7 +646,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user tears the target along with the space around it. Critical hits land more easily. #------------------------------- @@ -658,7 +658,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Pulse Description = The target is attacked with a shock wave generated by the user's gaping mouth. #------------------------------- @@ -670,7 +670,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user slashes the target with huge, sharp claws. #------------------------------- @@ -683,7 +683,7 @@ Accuracy = 90 TotalPP = 10 Target = NearOther Priority = -6 -FunctionCode = 0EC +FunctionCode = SwitchOutTargetDamagingMove Flags = Contact,CanProtect,CanMirrorMove Description = The user knocks away the target and drags out another Pokémon in its party. In the wild, the battle ends. #------------------------------- @@ -695,7 +695,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user exhales a mighty gust that inflicts damage. It may also leave the target with paralysis. @@ -708,7 +708,7 @@ BaseDamage = 40 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks its target by hitting it with brutal strikes. The target is hit twice in a row. #------------------------------- @@ -720,7 +720,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 20 Target = AllNearFoes -FunctionCode = 078 +FunctionCode = FlinchTargetDoublePowerIfTargetInSky Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The user whips up a vicious tornado to tear at the opposing team. It may also make targets flinch. @@ -733,7 +733,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 06B +FunctionCode = FixedDamage40 Flags = CanProtect,CanMirrorMove Description = This attack hits the target with a shock wave of pure rage. This attack always inflicts 40 HP damage. #------------------------------- @@ -744,7 +744,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 026 +FunctionCode = RaiseUserAtkSpd1 Flags = Dance Description = The user vigorously performs a mystic, powerful dance that boosts its Attack and Speed stats. #------------------------------- @@ -756,7 +756,7 @@ BaseDamage = 130 Accuracy = 85 TotalPP = 5 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user charges at its foe, surrounding itself with lightning. It may also leave the target paralyzed. @@ -769,7 +769,7 @@ BaseDamage = 120 Accuracy = 70 TotalPP = 10 Target = NearOther -FunctionCode = 008 +FunctionCode = ParalyzeTargetAlwaysHitsInRainHitsTargetInSky Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = A wicked thunderbolt is dropped on the foe to inflict damage. It may also leave the target paralyzed. @@ -782,7 +782,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FD +FunctionCode = RecoilThirdOfDamageDealtParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 10 Description = The user electrifies itself, then charges at the foe. It causes considerable damage to the user as well. @@ -795,7 +795,7 @@ BaseDamage = 120 Accuracy = 50 TotalPP = 5 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 100 Description = The user fires an electric blast like a cannon to inflict damage and cause paralysis. @@ -808,7 +808,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 079 +FunctionCode = DoublePowerAfterFusionFlare Flags = CanProtect,CanMirrorMove Description = The user throws down a giant thunderbolt. It does more damage if influenced by an enormous flame. #------------------------------- @@ -820,7 +820,7 @@ BaseDamage = 95 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A strong electric blast is loosed at the target. It may also leave the target with paralysis. @@ -833,7 +833,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FA +FunctionCode = RecoilQuarterOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user shrouds itself in electricity and smashes into its foe. It also damages the user a little. #------------------------------- @@ -845,7 +845,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = AllNearOthers -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = A flare of electricity is loosed to strike the area around the user. It may also cause paralysis. @@ -858,7 +858,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 10 Description = The target is punched with an electrified fist. It may also leave the target with paralysis. @@ -871,7 +871,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0EE +FunctionCode = SwitchOutUserDamagingMove Flags = CanProtect,CanMirrorMove Description = After making its attack, the user rushes back to switch places with a party Pokémon in waiting. #------------------------------- @@ -883,7 +883,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user throws an electrically charged tackle at the target. It may also leave the target with paralysis. @@ -896,7 +896,7 @@ BaseDamage = 65 Accuracy = 95 TotalPP = 15 Target = NearOther -FunctionCode = 009 +FunctionCode = ParalyzeFlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 100 Description = The user bites with electrified fangs. It may also make the target flinch or leave it with paralysis. @@ -909,7 +909,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user strikes the target with a quick jolt of electricity. This attack cannot be evaded. #------------------------------- @@ -921,7 +921,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 15 Target = AllNearFoes -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user captures and attacks foes by using an electric net, which lowers their Speed stat. @@ -934,7 +934,7 @@ BaseDamage = 50 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 020 +FunctionCode = RaiseUserSpAtk1 Flags = CanProtect,CanMirrorMove EffectChance = 70 Description = The user fires a concentrated bundle of electricity. It may also raise the user's Sp. Atk stat. @@ -947,7 +947,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A jolt of electricity is hurled at the foe to inflict damage. It may also leave the target with paralysis. @@ -960,7 +960,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 099 +FunctionCode = PowerHigherWithUserFasterThanTarget Flags = CanProtect,CanMirrorMove,Bomb Description = The user hurls an electric orb at the foe. It does more damage the faster the user is. #------------------------------- @@ -971,7 +971,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 021 +FunctionCode = RaiseUserSpDef1PowerUpElectricMove Description = The user boosts the power of the Electric move it uses next. It also raises the user's Sp. Def stat. #------------------------------- [MAGNETRISE] @@ -981,7 +981,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 119 +FunctionCode = StartUserAirborne Description = The user levitates using electrically generated magnetism for five turns. #------------------------------- [THUNDERWAVE] @@ -991,7 +991,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTargetIfNotTypeImmune Flags = CanProtect,CanMirrorMove Description = A weak electric charge is launched at the target. It causes paralysis if it hits. #------------------------------- @@ -1004,7 +1004,7 @@ Accuracy = 100 TotalPP = 20 Target = NearOther Priority = -3 -FunctionCode = 115 +FunctionCode = FailsIfUserDamagedThisTurn Flags = Contact,CanProtect,Punching Description = The user focuses its mind before launching a punch. It will fail if the user is hit before it is used. #------------------------------- @@ -1016,7 +1016,7 @@ BaseDamage = 130 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 10B +FunctionCode = CrashDamageIfFailsUnusableInGravity Flags = Contact,CanProtect,CanMirrorMove Description = The target is attacked with a knee kick from a jump. If it misses, the user is hurt instead. #------------------------------- @@ -1028,7 +1028,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 03C +FunctionCode = LowerUserDefSpDef1 Flags = Contact,CanProtect,CanMirrorMove Description = The user fights the foe up close without guarding itself. It also cuts the user's Defense and Sp. Def. #------------------------------- @@ -1040,7 +1040,7 @@ BaseDamage = 120 Accuracy = 70 TotalPP = 5 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 10 Description = The user heightens its mental focus and unleashes its power. It may also lower the target's Sp. Def. @@ -1053,7 +1053,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 03B +FunctionCode = LowerUserAtkDef1 Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks the target with great power. However, it also lowers the user's Attack and Defense. #------------------------------- @@ -1065,7 +1065,7 @@ BaseDamage = 100 Accuracy = 80 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user delivers a double chop with its forearms crossed. Critical hits land more easily. #------------------------------- @@ -1077,7 +1077,7 @@ BaseDamage = 100 Accuracy = 50 TotalPP = 5 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 100 Description = The user punches the target with full, concentrated power. It confuses the target if it hits. @@ -1090,7 +1090,7 @@ BaseDamage = 100 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 03E +FunctionCode = LowerUserSpeed1 Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user swings and hits with its strong and heavy fist. It lowers the user's Speed, however. #------------------------------- @@ -1102,7 +1102,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 10B +FunctionCode = CrashDamageIfFailsUnusableInGravity Flags = Contact,CanProtect,CanMirrorMove Description = The user jumps up high, then strikes with a kick. If the kick misses, the user hurts itself. #------------------------------- @@ -1114,7 +1114,7 @@ BaseDamage = 90 Accuracy = 0 TotalPP = 20 Target = Other -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Pulse,Bomb Description = The user looses a blast of aura power from deep within its body. This move is certain to hit. #------------------------------- @@ -1126,7 +1126,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0A9 +FunctionCode = IgnoreTargetDefSpDefEvaStatStages Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks by slicing with its long horns. The target's stat changes don't affect the damage. #------------------------------- @@ -1138,7 +1138,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 122 +FunctionCode = UseTargetDefenseInsteadOfTargetSpDef Flags = CanProtect,CanMirrorMove Description = The user cuts with its long horn. The odd power contained in it does physical damage to the foe. #------------------------------- @@ -1150,7 +1150,7 @@ BaseDamage = 85 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 11B +FunctionCode = HitsTargetInSky Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user attacks the target with an uppercut thrown skyward with force. #------------------------------- @@ -1162,7 +1162,7 @@ BaseDamage = 80 Accuracy = 80 TotalPP = 25 Target = NearOther -FunctionCode = 0FA +FunctionCode = RecoilQuarterOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user grabs the target and recklessly dives for the ground. It also hurts the user slightly. #------------------------------- @@ -1174,7 +1174,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 10A +FunctionCode = RemoveScreens Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks with a swift chop. It can also break any barrier such as Light Screen and Reflect. #------------------------------- @@ -1186,7 +1186,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = Contact,CanProtect,CanMirrorMove,Punching Description = An energy-draining punch. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -1199,7 +1199,7 @@ Accuracy = 0 TotalPP = 10 Target = NearOther Priority = -1 -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks last. In return, this throw move is guaranteed not to miss. #------------------------------- @@ -1212,7 +1212,7 @@ Accuracy = 90 TotalPP = 10 Target = NearOther Priority = -6 -FunctionCode = 0EC +FunctionCode = SwitchOutTargetDamagingMove Flags = Contact,CanProtect,CanMirrorMove Description = The user throws the target and drags out another Pokémon in its party. In the wild, the battle ends. #------------------------------- @@ -1224,7 +1224,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is attacked with a shock wave. It may also leave the target with paralysis. @@ -1237,7 +1237,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks the target's legs swiftly, reducing the target's Speed stat. @@ -1251,7 +1251,7 @@ Accuracy = 100 TotalPP = 10 Target = NearOther Priority = -4 -FunctionCode = 081 +FunctionCode = DoublePowerIfUserLostHPThisTurn Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that inflicts double the damage if the user has been hurt by the foe in the same turn. #------------------------------- @@ -1263,7 +1263,7 @@ BaseDamage = 60 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user lashes out with a quick, spinning kick. It may also make the target flinch. @@ -1276,7 +1276,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 07D +FunctionCode = DoublePowerIfTargetAsleepCureTarget Flags = Contact,CanProtect,CanMirrorMove Description = This attack inflicts big damage on a sleeping target. It also wakes the target up, however. #------------------------------- @@ -1288,7 +1288,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The target is attacked with a sharp chop. Critical hits land more easily. #------------------------------- @@ -1301,7 +1301,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user throws a punch at blinding speed. It is certain to strike first. #------------------------------- @@ -1313,7 +1313,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 50 Description = The user attacks with a punch that can shatter a rock. It may also lower the foe's Defense stat. @@ -1326,7 +1326,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0A0 +FunctionCode = AlwaysCriticalHit Flags = Contact,CanProtect,CanMirrorMove Description = The user strikes the target with a fierce blow. This attack always results in a critical hit. #------------------------------- @@ -1339,7 +1339,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user whirls its fists to send a wave of pure vacuum at the target. This move always goes first. #------------------------------- @@ -1351,7 +1351,7 @@ BaseDamage = 30 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = Contact,CanProtect,CanMirrorMove Description = The target is quickly kicked twice in succession using both feet. #------------------------------- @@ -1363,7 +1363,7 @@ BaseDamage = 15 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user looses a flurry of open-palmed arm thrusts that hit two to five times in a row. #------------------------------- @@ -1375,7 +1375,7 @@ BaseDamage = 10 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0BF +FunctionCode = HitThreeTimesPowersUpWithEachHit Flags = Contact,CanProtect,CanMirrorMove Description = A consecutive three-kick attack that becomes more powerful with each successive hit. #------------------------------- @@ -1388,7 +1388,7 @@ Accuracy = 100 TotalPP = 20 Target = None Priority = -5 -FunctionCode = 071 +FunctionCode = CounterPhysicalDamage Flags = Contact,CanProtect Description = A retaliation move that counters any physical attack, inflicting double the damage taken. #------------------------------- @@ -1400,7 +1400,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 0E1 +FunctionCode = UserFaintsFixedDamageUserHP Flags = CanProtect Description = The user risks all to attack the foe. The user faints but does damage equal to its HP. #------------------------------- @@ -1412,7 +1412,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 09A +FunctionCode = PowerHigherWithTargetWeight Flags = Contact,CanProtect,CanMirrorMove Description = A powerful low kick that makes the foe fall over. It inflicts greater damage on heavier foes. #------------------------------- @@ -1424,7 +1424,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 098 +FunctionCode = PowerLowerWithUserHP Flags = Contact,CanProtect,CanMirrorMove Description = An all-out attack that becomes more powerful the less HP the user has. #------------------------------- @@ -1436,7 +1436,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 06D +FunctionCode = FixedDamageUserLevel Flags = Contact,CanProtect,CanMirrorMove Description = The target is thrown using the power of gravity. It inflicts damage equal to the user's level. #------------------------------- @@ -1447,7 +1447,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 024 +FunctionCode = RaiseUserAtkDef1 Description = The user tenses its muscles to bulk up its body, boosting both its Attack and Defense stats. #------------------------------- [DETECT] @@ -1458,7 +1458,7 @@ Accuracy = 0 TotalPP = 5 Target = User Priority = 4 -FunctionCode = 0AA +FunctionCode = ProtectUser Description = It enables the user to evade all attacks. Its chance of failing rises if it is used in succession. #------------------------------- [QUICKGUARD] @@ -1469,7 +1469,7 @@ Accuracy = 0 TotalPP = 15 Target = UserSide Priority = 3 -FunctionCode = 0AB +FunctionCode = ProtectUserSideFromPriorityMoves Description = The user protects itself and its allies from priority moves. If may fail if used in succession. #------------------------------- [VCREATE] @@ -1480,7 +1480,7 @@ BaseDamage = 180 Accuracy = 95 TotalPP = 5 Target = NearOther -FunctionCode = 03D +FunctionCode = LowerUserDefSpDefSpd1 Flags = Contact,CanProtect,CanMirrorMove Description = With a fiery forehead, the user hurls itself at the foe. It lowers the user's Defense, Sp. Def, and Speed. #------------------------------- @@ -1492,7 +1492,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The target is razed by a fiery explosion. The user must rest on the next turn, however. #------------------------------- @@ -1504,7 +1504,7 @@ BaseDamage = 150 Accuracy = 100 TotalPP = 5 Target = AllNearFoes -FunctionCode = 08B +FunctionCode = PowerHigherWithUserHP Flags = CanProtect,CanMirrorMove Description = The user attacks in an explosive fury. The lower the user's HP, the less powerful this attack becomes. #------------------------------- @@ -1516,7 +1516,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 03F +FunctionCode = LowerUserSpAtk2 Flags = CanProtect,CanMirrorMove Description = The user attacks the target at full power. The attack's recoil sharply reduces the user's Sp. Atk stat. #------------------------------- @@ -1528,7 +1528,7 @@ BaseDamage = 130 Accuracy = 85 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The user attacks by engulfing the foe in a beautiful, yet intense, blue flame. It may also burn the foe. @@ -1541,7 +1541,7 @@ BaseDamage = 120 Accuracy = 85 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The foe is attacked with an intense blast of all-consuming fire. It may also leave the target with a burn. @@ -1554,7 +1554,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FE +FunctionCode = RecoilThirdOfDamageDealtBurnTarget Flags = Contact,CanProtect,CanMirrorMove,ThawsUser EffectChance = 10 Description = The user cloaks itself in fire and charges at the foe. The user also takes damage and may burn the target. @@ -1567,7 +1567,7 @@ BaseDamage = 120 Accuracy = 75 TotalPP = 5 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = CanProtect,CanMirrorMove Description = The target becomes trapped within a maelstrom of fire that rages for four to five turns. #------------------------------- @@ -1579,7 +1579,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 07A +FunctionCode = DoublePowerAfterFusionBolt Flags = CanProtect,CanMirrorMove,ThawsUser Description = The user brings down a giant flame. It does more damage if influenced by an enormous thunderbolt. #------------------------------- @@ -1591,7 +1591,7 @@ BaseDamage = 100 Accuracy = 90 TotalPP = 10 Target = AllNearFoes -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks by exhaling hot breath on the opposing team. It may also leave targets with a burn. @@ -1604,7 +1604,7 @@ BaseDamage = 100 Accuracy = 50 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks by engulfing the target in an intense fire. It leaves the target with a burn. @@ -1617,7 +1617,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove,ThawsUser EffectChance = 50 Description = The target is razed with a mystical fire of great intensity. It may also leave the target with a burn. @@ -1630,7 +1630,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = AllNearOthers -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 30 Description = An inferno of scarlet flames torches everything around the user. It may leave the foe with a burn. @@ -1643,7 +1643,7 @@ BaseDamage = 95 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is scorched with an intense blast of fire. It may also leave the target with a burn. @@ -1656,7 +1656,7 @@ BaseDamage = 85 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate EffectChance = 10 Description = The user launches a kick with a high critical-hit ratio. It may also leave the target with a burn. @@ -1669,7 +1669,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 020 +FunctionCode = RaiseUserSpAtk1 Flags = CanProtect,CanMirrorMove,Dance EffectChance = 50 Description = Cloaked in flames, the user dances and flaps its wings. It may also raise the user's Sp. Atk stat. @@ -1682,7 +1682,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = AllNearOthers -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = An inferno of scarlet flames torches everything around the user. It may leave targets with a burn. @@ -1695,7 +1695,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 10 Description = The target is punched with a fiery fist. It may leave the target with a burn. @@ -1708,7 +1708,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 074 +FunctionCode = DamageTargetAlly Flags = CanProtect,CanMirrorMove Description = The user attacks the foe with a bursting flame. It also damages Pokémon next to the target. #------------------------------- @@ -1720,7 +1720,7 @@ BaseDamage = 65 Accuracy = 95 TotalPP = 15 Target = NearOther -FunctionCode = 00B +FunctionCode = BurnFlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 100 Description = The user bites with flame-cloaked fangs. It may also make the target flinch or leave it burned. @@ -1733,7 +1733,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = Contact,CanProtect,CanMirrorMove,ThawsUser EffectChance = 10 Description = The user cloaks itself in fire and charges at the target. It may also leave the target with a burn. @@ -1746,7 +1746,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 107 +FunctionCode = FirePledge Flags = CanProtect,CanMirrorMove Description = A column of fire hits opposing Pokémon. When used with its Grass equivalent, it makes a sea of fire. #------------------------------- @@ -1758,7 +1758,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 01F +FunctionCode = RaiseUserSpeed1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user cloaks itself in flame and attacks. Building up more power, it raises the user's Speed stat. @@ -1771,7 +1771,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is attacked with small flames. It may also leave the target with a burn. @@ -1784,7 +1784,7 @@ BaseDamage = 35 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = CanProtect,CanMirrorMove Description = The target becomes trapped within a fierce vortex of fire that rages for four to five turns. #------------------------------- @@ -1796,7 +1796,7 @@ BaseDamage = 30 Accuracy = 100 TotalPP = 15 Target = AllNearFoes -FunctionCode = 0F5 +FunctionCode = DestroyTargetBerryOrGem Flags = CanProtect,CanMirrorMove Description = The user attacks the foe with fire. The target's held Berry becomes burnt up and unusable. #------------------------------- @@ -1808,7 +1808,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 09B +FunctionCode = PowerHigherWithUserHeavierThanTarget Flags = Contact,CanProtect,CanMirrorMove Description = The user slams the foe with its flaming body. The heavier the user is, the greater the damage. #------------------------------- @@ -1819,7 +1819,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = BothSides -FunctionCode = 0FF +FunctionCode = StartSunWeather Description = The user intensifies the sun for five turns, powering up Fire-type moves. #------------------------------- [WILLOWISP] @@ -1829,7 +1829,7 @@ Category = Status Accuracy = 75 TotalPP = 15 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove Description = The user shoots a sinister, bluish-white flame at the target to inflict a burn. #------------------------------- @@ -1841,7 +1841,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = Other -FunctionCode = 0C7 +FunctionCode = TwoTurnAttackFlinchTarget Flags = CanProtect,CanMirrorMove,HighCriticalHitRate EffectChance = 30 Description = A second-turn attack move where critical hits land more easily. It may also make the target flinch. @@ -1854,7 +1854,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = Other -FunctionCode = 0FB +FunctionCode = RecoilThirdOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user tucks in its wings and charges from a low altitude. The user also takes serious damage. #------------------------------- @@ -1866,7 +1866,7 @@ BaseDamage = 120 Accuracy = 70 TotalPP = 10 Target = Other -FunctionCode = 015 +FunctionCode = ConfuseTargetAlwaysHitsInRainHitsTargetInSky Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user wraps its foe in a fierce wind that flies up into the sky. It may also confuse the foe. @@ -1879,7 +1879,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 5 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = A vortex of air is shot at the target to inflict damage. Critical hits land more easily. #------------------------------- @@ -1891,7 +1891,7 @@ BaseDamage = 90 Accuracy = 95 TotalPP = 15 Target = Other -FunctionCode = 0C9 +FunctionCode = TwoTurnAttackInvulnerableInSky Flags = Contact,CanProtect,CanMirrorMove Description = The user soars, then strikes on the second turn. It can also be used for flying to any familiar town. #------------------------------- @@ -1903,7 +1903,7 @@ BaseDamage = 85 Accuracy = 85 TotalPP = 5 Target = Other -FunctionCode = 0CC +FunctionCode = TwoTurnAttackInvulnerableInSkyParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user bounces up high, then drops on the foe on the second turn. It may also paralyze the foe. @@ -1916,7 +1916,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 20 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = A corkscrewing attack with the sharp beak acting as a drill. #------------------------------- @@ -1928,7 +1928,7 @@ BaseDamage = 75 Accuracy = 95 TotalPP = 20 Target = Other -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks with a blade of air that slices even the sky. It may also make the target flinch. @@ -1941,7 +1941,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = Other -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user confounds the foe with speed, then slashes. The attack lands without fail. #------------------------------- @@ -1953,7 +1953,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = Other -FunctionCode = 014 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove,Sound EffectChance = 100 Description = The user attacks using a sound wave based on words it has learned. It may also confuse the target. @@ -1966,7 +1966,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = Other -FunctionCode = 0F4 +FunctionCode = UserConsumeTargetBerry Flags = Contact,CanProtect,CanMirrorMove Description = The user pecks the target. If the target is holding a Berry, the user eats it and gains its effect. #------------------------------- @@ -1978,7 +1978,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 10 Target = Other -FunctionCode = 0CE +FunctionCode = TwoTurnAttackInvulnerableInSkyTargetCannotAct Flags = Contact,CanProtect,CanMirrorMove Description = The user takes the foe into the sky, then drops it on the next turn. The foe cannot attack while airborne. #------------------------------- @@ -1990,7 +1990,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 35 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is struck with large, imposing wings spread wide to inflict damage. #------------------------------- @@ -2002,7 +2002,7 @@ BaseDamage = 55 Accuracy = 100 TotalPP = 15 Target = Other -FunctionCode = 086 +FunctionCode = DoublePowerIfUserHasNoItem Flags = Contact,CanProtect,CanMirrorMove Description = The user nimbly strikes the foe. This attack does more damage if the user is not holding an item. #------------------------------- @@ -2014,7 +2014,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 25 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user launches razor-like wind to slash the opposing team. Critical hits land more easily. #------------------------------- @@ -2026,7 +2026,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 35 Target = Other -FunctionCode = 077 +FunctionCode = DoublePowerIfTargetInSky Flags = CanProtect,CanMirrorMove Description = A gust of wind is whipped up by wings and launched at the target to inflict damage. #------------------------------- @@ -2038,7 +2038,7 @@ BaseDamage = 35 Accuracy = 100 TotalPP = 35 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is jabbed with a sharply pointed beak or horn. #------------------------------- @@ -2049,7 +2049,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 049 +FunctionCode = LowerTargetEvasion1RemoveSideEffects Flags = CanProtect,CanMirrorMove Description = A strong wind blows away the foe's obstacles such as Light Screen. It also lowers their evasion. #------------------------------- @@ -2060,7 +2060,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 04B +FunctionCode = LowerTargetAttack2 Flags = CanProtect,CanMirrorMove,Dance Description = The user covers the target's body with a mass of down that harshly lowers its Attack stat. #------------------------------- @@ -2071,7 +2071,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0AE +FunctionCode = UseLastMoveUsedByTarget Description = The user counters the target by mimicking the target's last move. #------------------------------- [ROOST] @@ -2081,7 +2081,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D6 +FunctionCode = HealUserHalfOfTotalHPLoseFlyingTypeThisTurn Description = The user lands and rests its body. It restores the user's HP by up to half of its max HP. #------------------------------- [TAILWIND] @@ -2091,7 +2091,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserSide -FunctionCode = 05B +FunctionCode = StartUserSideDoubleSpeed Description = The user whips up a turbulent whirlwind that ups the Speed of all party Pokémon for four turns. #------------------------------- [SHADOWFORCE] @@ -2102,7 +2102,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 0CD +FunctionCode = TwoTurnAttackInvulnerableRemoveProtections Flags = Contact,CanMirrorMove Description = The user disappears, then strikes the foe on the second turn. It hits even if the foe protects itself. #------------------------------- @@ -2114,7 +2114,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 20 Description = The user hurls a shadowy blob at the target. It may also lower the target's Sp. Def stat. @@ -2127,7 +2127,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user slashes with a sharp claw made from shadows. Critical hits land more easily. #------------------------------- @@ -2139,7 +2139,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 02D +FunctionCode = RaiseUserMainStats1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user blasts the target with a gust of repulsive wind. It may also raise all the user's stats at once. @@ -2152,7 +2152,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user throws a punch from the shadows. The punch lands without fail. #------------------------------- @@ -2164,7 +2164,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 07F +FunctionCode = DoublePowerIfTargetStatusProblem Flags = CanProtect,CanMirrorMove Description = This relentless attack does massive damage to a target affected by status problems. #------------------------------- @@ -2177,7 +2177,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user extends its shadow and attacks the target from behind. This move always goes first. #------------------------------- @@ -2189,7 +2189,7 @@ BaseDamage = 30 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks the target while shouting in a startling fashion. It may also make the target flinch. @@ -2202,7 +2202,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is licked with a long tongue, causing damage. It may also leave the target with paralysis. @@ -2215,7 +2215,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 06D +FunctionCode = FixedDamageUserLevel Flags = CanProtect,CanMirrorMove Description = The user makes the foe see a frightening mirage. It inflicts damage matching the user's level. #------------------------------- @@ -2226,7 +2226,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove Description = The target is exposed to a sinister ray that triggers confusion. #------------------------------- @@ -2237,7 +2237,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 10D +FunctionCode = CurseTargetOrLowerUserSpd1RaiseUserAtkDef1 Description = A move that works differently for the Ghost type than for all the other types. #------------------------------- [DESTINYBOND] @@ -2247,7 +2247,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0E7 +FunctionCode = AttackerFaintsIfUserFaints Description = When this move is used, if the user faints, the foe that landed the knockout hit also faints. #------------------------------- [GRUDGE] @@ -2257,7 +2257,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0E6 +FunctionCode = SetAttackerMovePPTo0IfUserFaints Description = If the user faints, the user's grudge fully depletes the PP of the foe's move that knocked it out. #------------------------------- [NIGHTMARE] @@ -2267,7 +2267,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 10F +FunctionCode = StartDamageTargetEachTurnIfTargetAsleep Flags = CanProtect,CanMirrorMove Description = A sleeping target sees a nightmare that inflicts some damage every turn. #------------------------------- @@ -2278,7 +2278,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 10E +FunctionCode = LowerPPOfTargetLastMoveBy4 Flags = CanProtect,CanMirrorMove Description = The user unleashes its grudge on the move last used by the target by cutting 4 PP from it. #------------------------------- @@ -2290,7 +2290,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The user slams the target with an enormous tree. The user can't move on the next turn. #------------------------------- @@ -2302,7 +2302,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 03F +FunctionCode = LowerUserSpAtk2 Flags = CanProtect,CanMirrorMove Description = A storm of sharp is whipped up. The attack's recoil harshly reduces the user's Sp. Atk stat. #------------------------------- @@ -2314,7 +2314,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = RandomNearFoe -FunctionCode = 0D2 +FunctionCode = MultiTurnAttackConfuseUserAtEnd Flags = Contact,CanProtect,CanMirrorMove,Dance Description = The user attacks by scattering petals for two to three turns. The user then becomes confused. #------------------------------- @@ -2326,7 +2326,7 @@ BaseDamage = 120 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user violently whirls its vines or tentacles to harshly lash the target. #------------------------------- @@ -2338,7 +2338,7 @@ BaseDamage = 120 Accuracy = 85 TotalPP = 5 Target = NearOther -FunctionCode = 04F +FunctionCode = LowerTargetSpDef2 Flags = CanProtect,CanMirrorMove EffectChance = 40 Description = The user generates a shock wave from within its body. It may harshly lower the target's Sp. Def. @@ -2351,7 +2351,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0C4 +FunctionCode = TwoTurnAttackOneTurnInSun Flags = CanProtect,CanMirrorMove Description = A two-turn attack. The user gathers light, then blasts a bundled beam on the second turn. #------------------------------- @@ -2363,7 +2363,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FB +FunctionCode = RecoilThirdOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user slams its rugged body into the target to attack. The user also sustains serious damage. #------------------------------- @@ -2375,7 +2375,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user handles a sharp leaf like a sword and attacks by slashing. It has a high critical-hit ratio. #------------------------------- @@ -2387,7 +2387,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 10 Description = The user draws power from nature and fires it at the target. It may also lower the target's Sp. Def. @@ -2400,7 +2400,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Bomb Description = The user slams a barrage of hard-shelled seeds down on the target from above. #------------------------------- @@ -2412,7 +2412,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = CanProtect,CanMirrorMove Description = A nutrient-draining attack. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -2424,7 +2424,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = Contact,CanProtect,CanMirrorMove Description = The user drains the foe's energy with its horns. The user's HP is restored by half the damage inflicted. #------------------------------- @@ -2436,7 +2436,7 @@ BaseDamage = 65 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 50 Description = The user attacks its foe by encircling it in sharp leaves. This attack may also lower the foe's accuracy. @@ -2449,7 +2449,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user scatters curious leaves that chase the target. This attack will not miss. #------------------------------- @@ -2461,7 +2461,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks by wildly swinging its thorny arms. It may also make the target flinch. @@ -2474,7 +2474,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 25 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = Sharp-edged leaves are launched to slash at the opposing team. Critical hits land more easily. #------------------------------- @@ -2486,7 +2486,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 106 +FunctionCode = GrassPledge Flags = CanProtect,CanMirrorMove Description = A column of grass hits the foes. When used with its water equivalent, it creates a vast swamp. #------------------------------- @@ -2498,7 +2498,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = CanProtect,CanMirrorMove Description = A nutrient-draining attack. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -2510,7 +2510,7 @@ BaseDamage = 35 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is struck with slender, whiplike vines to inflict damage. #------------------------------- @@ -2522,7 +2522,7 @@ BaseDamage = 25 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove,Bomb Description = The user forcefully shoots seeds at the target. Two to five seeds are shot in rapid succession. #------------------------------- @@ -2534,7 +2534,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = CanProtect,CanMirrorMove Description = A nutrient-draining attack. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -2546,7 +2546,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 09A +FunctionCode = PowerHigherWithTargetWeight Flags = Contact,CanProtect,CanMirrorMove Description = The user snares the target with grass and trips it. The heavier the target, the greater the damage. #------------------------------- @@ -2557,7 +2557,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = UserSide -FunctionCode = 019 +FunctionCode = CureUserPartyStatus Description = The user releases a soothing scent that heals all status problems affecting the user's party. #------------------------------- [COTTONGUARD] @@ -2567,7 +2567,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 038 +FunctionCode = RaiseUserDefense3 Description = The user protects itself by wrapping its body in soft cotton, drastically raising its Defense stat. #------------------------------- [COTTONSPORE] @@ -2577,7 +2577,7 @@ Category = Status Accuracy = 100 TotalPP = 40 Target = NearOther -FunctionCode = 04D +FunctionCode = LowerTargetSpeed2 Flags = CanProtect,CanMirrorMove,Powder Description = The user releases cotton-like spores that cling to the foe, harshly reducing its Speed stat. #------------------------------- @@ -2588,7 +2588,7 @@ Category = Status Accuracy = 55 TotalPP = 15 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove,Sound Description = The user plays a pleasant melody that lulls the target into a deep sleep. #------------------------------- @@ -2599,7 +2599,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 0DB +FunctionCode = StartHealUserEachTurnTrapUserInBattle Description = The user lays roots that restore its HP on every turn. Because it is rooted, it can't switch out. #------------------------------- [LEECHSEED] @@ -2609,7 +2609,7 @@ Category = Status Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0DC +FunctionCode = StartLeechSeedTarget Flags = CanProtect,CanMirrorMove Description = A seed is planted on the target. It steals some HP from the target every turn. #------------------------------- @@ -2620,7 +2620,7 @@ Category = Status Accuracy = 75 TotalPP = 15 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove,Powder Description = The user scatters a big cloud of sleep-inducing dust around the target. #------------------------------- @@ -2631,7 +2631,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove,Powder Description = The user scatters bursts of spores that induce sleep. #------------------------------- @@ -2642,7 +2642,7 @@ Category = Status Accuracy = 75 TotalPP = 30 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove,Powder Description = The user scatters a cloud of paralyzing powder. It may leave the target with paralysis. #------------------------------- @@ -2653,7 +2653,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0D8 +FunctionCode = HealUserDependingOnWeather Description = The user restores its own HP. The amount of HP regained varies with the weather. #------------------------------- [WORRYSEED] @@ -2663,7 +2663,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 064 +FunctionCode = SetTargetAbilityToInsomnia Flags = CanProtect,CanMirrorMove Description = A seed that causes worry is planted on the foe. It prevents sleep by making its Ability Insomnia. #------------------------------- @@ -2675,7 +2675,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 10 Target = AllNearOthers -FunctionCode = 076 +FunctionCode = DoublePowerIfTargetUnderground Flags = CanProtect,CanMirrorMove Description = The user sets off an earthquake that strikes every Pokémon around it. #------------------------------- @@ -2687,7 +2687,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user makes the ground under the foe erupt with power. It may also lower the target's Sp. Def. @@ -2700,7 +2700,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0CA +FunctionCode = TwoTurnAttackInvulnerableUnderground Flags = Contact,CanProtect,CanMirrorMove Description = The user burrows, then attacks on the second turn. It can also be used to exit dungeons. #------------------------------- @@ -2712,7 +2712,7 @@ BaseDamage = 80 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user crashes into its target while rotating its body like a drill. Critical hits land more easily. #------------------------------- @@ -2724,7 +2724,7 @@ BaseDamage = 65 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user clubs the target with a bone. It may also make the target flinch. @@ -2737,7 +2737,7 @@ BaseDamage = 65 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 30 Description = The user launches a hard-packed mud ball to attack. It may also lower the target's accuracy. @@ -2750,7 +2750,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = AllNearOthers -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1WeakerInGrassyTerrain Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user strikes everything around it by stomping on the ground. It reduces hit Pokémon's Speed. @@ -2763,7 +2763,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 15 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks by hurling a blob of mud at the target. It also reduces the target's Speed. @@ -2776,7 +2776,7 @@ BaseDamage = 50 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = CanProtect,CanMirrorMove Description = The user throws the bone it holds. The bone loops to hit the target twice, coming and going. #------------------------------- @@ -2788,7 +2788,7 @@ BaseDamage = 35 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = CanProtect,CanMirrorMove Description = The user traps the target inside a harshly raging sandstorm for four to five turns. #------------------------------- @@ -2800,7 +2800,7 @@ BaseDamage = 25 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove Description = The user strikes the target with a hard bone two to five times in a row. #------------------------------- @@ -2812,7 +2812,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user hurls mud in the target's face to inflict damage and lower its accuracy. @@ -2825,7 +2825,7 @@ BaseDamage = 1 Accuracy = 30 TotalPP = 5 Target = NearOther -FunctionCode = 070 +FunctionCode = OHKOHitsTargetUnderground Flags = CanProtect,CanMirrorMove Description = The user opens up a fissure in the ground and drops the foe in. The target instantly faints if it hits. #------------------------------- @@ -2837,7 +2837,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 30 Target = AllNearOthers -FunctionCode = 095 +FunctionCode = RandomPowerDoublePowerIfTargetUnderground Flags = CanProtect,CanMirrorMove Description = The user looses a ground-shaking quake affecting everyone around the user. Its power varies. #------------------------------- @@ -2848,7 +2848,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = BothSides -FunctionCode = 09D +FunctionCode = StartWeakenElectricMoves Description = The user covers itself with mud. It weakens Electric-type moves while the user is in the battle. #------------------------------- [SANDATTACK] @@ -2858,7 +2858,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove Description = Sand is hurled in the target's face, reducing its accuracy. #------------------------------- @@ -2869,7 +2869,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = FoeSide -FunctionCode = 103 +FunctionCode = AddSpikesToFoeSide Description = The user lays a trap of spikes at the foe's feet. The trap hurts foes that switch into battle. #------------------------------- [FREEZESHOCK] @@ -2880,7 +2880,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C5 +FunctionCode = TwoTurnAttackParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = On the second turn, the user hits the foe with electrically charged ice. It may also paralyze the foe. @@ -2893,7 +2893,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C6 +FunctionCode = TwoTurnAttackBurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = On the second turn, an ultracold, freezing wind surrounds the foe. This may leave it with a burn. @@ -2906,7 +2906,7 @@ BaseDamage = 120 Accuracy = 70 TotalPP = 5 Target = AllNearFoes -FunctionCode = 00D +FunctionCode = FreezeTargetAlwaysHitsInHail Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A howling blizzard is summoned to strike the opposing team. It may also freeze them solid. @@ -2919,7 +2919,7 @@ BaseDamage = 95 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 00C +FunctionCode = FreezeTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is struck with an icy-cold beam of energy. It may also freeze the target solid. @@ -2932,7 +2932,7 @@ BaseDamage = 85 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks by harshly dropping an icicle onto the foe. It may also make the target flinch. @@ -2945,7 +2945,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00C +FunctionCode = FreezeTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 10 Description = The target is punched with an icy fist. It may also leave the target frozen. @@ -2958,7 +2958,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is hit with a rainbow-colored beam. This may also lower the target's Attack stat. @@ -2971,7 +2971,7 @@ BaseDamage = 65 Accuracy = 95 TotalPP = 10 Target = AllNearFoes -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks by blowing freezing cold air at the foe. This attack reduces the targets' Speed stat. @@ -2984,7 +2984,7 @@ BaseDamage = 65 Accuracy = 95 TotalPP = 15 Target = NearOther -FunctionCode = 00E +FunctionCode = FreezeFlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 100 Description = The user bites with cold-infused fangs. It may also make the target flinch or leave it frozen. @@ -2998,7 +2998,7 @@ Accuracy = 100 TotalPP = 10 Target = NearOther Priority = -4 -FunctionCode = 081 +FunctionCode = DoublePowerIfUserLostHPThisTurn Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that inflicts double the damage if the user has been hurt by the foe in the same turn. #------------------------------- @@ -3010,7 +3010,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 15 Target = AllNearFoes -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks with a gust of chilled air. It also lowers the targets' Speed stat. @@ -3023,7 +3023,7 @@ BaseDamage = 40 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0A0 +FunctionCode = AlwaysCriticalHit Flags = CanProtect,CanMirrorMove Description = The user blows a cold breath on the target. This attack always results in a critical hit. #------------------------------- @@ -3036,7 +3036,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user flash freezes chunks of ice and hurls them at the target. This move always goes first. #------------------------------- @@ -3048,7 +3048,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 25 Target = AllNearFoes -FunctionCode = 00C +FunctionCode = FreezeTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks with a chilling gust of powdery snow. It may also freeze the targets. @@ -3061,7 +3061,7 @@ BaseDamage = 30 Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 0D3 +FunctionCode = MultiTurnAttackPowersUpEachTurn Flags = Contact,CanProtect,CanMirrorMove,Bomb Description = The user continually rolls into the target over five turns. It becomes stronger each time it hits. #------------------------------- @@ -3073,7 +3073,7 @@ BaseDamage = 25 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove Description = The user launches sharp icicles at the target. It strikes two to five times in a row. #------------------------------- @@ -3085,7 +3085,7 @@ BaseDamage = 1 Accuracy = 30 TotalPP = 5 Target = NearOther -FunctionCode = 070 +FunctionCode = OHKO Flags = CanProtect,CanMirrorMove Description = The foe is attacked with a blast of absolute-zero cold. The target instantly faints if it hits. #------------------------------- @@ -3096,7 +3096,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 102 +FunctionCode = StartHailWeather Description = The user summons a hail storm lasting five turns. It damages all Pokémon except the Ice type. #------------------------------- [HAZE] @@ -3106,7 +3106,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = BothSides -FunctionCode = 051 +FunctionCode = ResetAllBattlersStatStages Description = The user creates a haze that eliminates every stat change among all the Pokémon engaged in battle. #------------------------------- [MIST] @@ -3116,7 +3116,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserSide -FunctionCode = 056 +FunctionCode = StartUserSideImmunityToStatStageLowering Description = The user cloaks its body with a white mist that prevents any of its stats from being cut for five turns. #------------------------------- [EXPLOSION] @@ -3127,7 +3127,7 @@ BaseDamage = 250 Accuracy = 100 TotalPP = 5 Target = AllNearOthers -FunctionCode = 0E0 +FunctionCode = UserFaintsExplosive Flags = CanProtect,CanMirrorMove Description = The user explodes to inflict damage on those around it. The user faints upon using this move. #------------------------------- @@ -3139,7 +3139,7 @@ BaseDamage = 200 Accuracy = 100 TotalPP = 5 Target = AllNearOthers -FunctionCode = 0E0 +FunctionCode = UserFaintsExplosive Flags = CanProtect,CanMirrorMove Description = The user blows up to inflict damage on all Pokémon in battle. The user faints upon using this move. #------------------------------- @@ -3151,7 +3151,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = Contact,CanProtect,CanMirrorMove Description = The user charges at the target using every bit of its power. The user must rest on the next turn. #------------------------------- @@ -3163,7 +3163,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The foe is attacked with a powerful beam. The user must rest on the next turn to regain its energy. #------------------------------- @@ -3175,7 +3175,7 @@ BaseDamage = 140 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 125 +FunctionCode = FailsIfUserHasUnusedMove Flags = Contact,CanProtect,CanMirrorMove Description = This move can be used only after the user has used all the other moves it knows in the battle. #------------------------------- @@ -3187,7 +3187,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FB +FunctionCode = RecoilThirdOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = A reckless, life-risking tackle. It also damages the user by a fairly large amount, however. #------------------------------- @@ -3199,7 +3199,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FA +FunctionCode = RecoilQuarterOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user charges its head into the foe, using its powerful guard hair. The user also takes damage. #------------------------------- @@ -3211,7 +3211,7 @@ BaseDamage = 120 Accuracy = 75 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is attacked by a kick launched with muscle-packed power. #------------------------------- @@ -3223,7 +3223,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = RandomNearFoe -FunctionCode = 0D2 +FunctionCode = MultiTurnAttackConfuseUserAtEnd Flags = Contact,CanProtect,CanMirrorMove Description = The user rampages and attacks for two to three turns. It then becomes confused, however. #------------------------------- @@ -3235,7 +3235,7 @@ BaseDamage = 100 Accuracy = 75 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Bomb Description = A large egg is hurled at the target with maximum force to inflict damage. #------------------------------- @@ -3247,7 +3247,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 09F +FunctionCode = TypeDependsOnUserPlate Flags = CanProtect,CanMirrorMove Description = The user releases countless shots of light. Its type varies with the kind of Plate the user is holding. #------------------------------- @@ -3259,7 +3259,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0C8 +FunctionCode = TwoTurnAttackChargeRaiseUserDefense1 Flags = Contact,CanProtect,CanMirrorMove Description = The user tucks in its head to raise its Defense in the first turn, then rams the foe on the next turn. #------------------------------- @@ -3271,7 +3271,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Sound Description = The user lets loose a horribly echoing shout with the power to inflict damage. #------------------------------- @@ -3283,7 +3283,7 @@ BaseDamage = 90 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user attacks the target by smashing into it with incredible force. It may also confuse the target. @@ -3296,7 +3296,7 @@ BaseDamage = 90 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 0FA +FunctionCode = RecoilQuarterOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = A reckless, full-body charge attack for slamming into the foe. It also damages the user a little. #------------------------------- @@ -3308,7 +3308,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = RandomNearFoe -FunctionCode = 0D1 +FunctionCode = MultiTurnAttackPreventSleeping Flags = CanProtect,CanMirrorMove,Sound Description = The user attacks in an uproar for three turns. Over that time, no one can fall asleep. #------------------------------- @@ -3320,7 +3320,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user drops onto the target with its full body weight. It may leave the target with paralysis. @@ -3333,7 +3333,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 09F +FunctionCode = TypeDependsOnUserDrive Flags = CanProtect,CanMirrorMove Description = The user fires a beam of light at its target. The type changes depending on the Drive the user holds. #------------------------------- @@ -3346,7 +3346,7 @@ Accuracy = 100 TotalPP = 5 Target = NearOther Priority = 2 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user charges the target at blinding speed. This attack always goes before any other move. #------------------------------- @@ -3358,7 +3358,7 @@ BaseDamage = 80 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 10 Description = The user bites hard on the target with its sharp front fangs. It may also make the target flinch. @@ -3371,7 +3371,7 @@ BaseDamage = 80 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The target is slugged by a punch thrown with muscle-packed power. #------------------------------- @@ -3383,7 +3383,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 0C3 +FunctionCode = TwoTurnAttack Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = A two-turn attack. Blades of wind hit the foe on the second turn. Critical hits land more easily. #------------------------------- @@ -3395,7 +3395,7 @@ BaseDamage = 80 Accuracy = 75 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is slammed with a long tail, vines, etc., to inflict damage. #------------------------------- @@ -3407,7 +3407,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is slugged with a punch thrown at maximum power. It can also be used to move heavy boulders. #------------------------------- @@ -3419,7 +3419,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 017 +FunctionCode = ParalyzeBurnOrFreezeTarget Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The user strikes with a simultaneous three-beam attack. May also paralyze, burn, or freeze the target. @@ -3432,7 +3432,7 @@ BaseDamage = 75 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 50 Description = The user slashes the target with hard and sharp claws. It may also lower the target's Defense. @@ -3445,7 +3445,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 003 +FunctionCode = SleepTargetChangeUserMeloettaForm Flags = CanProtect,CanMirrorMove,Sound EffectChance = 10 Description = An ancient song appeals to the hearts of those listening. It may also induce sleep. @@ -3458,7 +3458,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0A9 +FunctionCode = IgnoreTargetDefSpDefEvaStatStages Flags = Contact,CanProtect,CanMirrorMove Description = Seeking an opening, the user strikes continually. The foe's stat changes don't affect the damage. #------------------------------- @@ -3470,7 +3470,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 20 Description = The target is hit with rhythmically launched punches that may also leave it confused. @@ -3483,7 +3483,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 07E +FunctionCode = DoublePowerIfUserPoisonedBurnedParalyzed Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that doubles its power if the user is poisoned, burned, or has paralysis. #------------------------------- @@ -3495,7 +3495,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user sticks out its head and attacks by charging into the foe. It may also make the target flinch. @@ -3508,7 +3508,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 085 +FunctionCode = DoublePowerIfAllyFaintedLastTurn Flags = Contact,CanProtect,CanMirrorMove Description = Gets revenge for a fainted ally. If an ally fainted in the last turn, this attack's damage increases. #------------------------------- @@ -3520,7 +3520,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0A4 +FunctionCode = EffectDependsOnEnvironment Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks with a secret power. Its added effects vary depending on the user's environment. @@ -3533,7 +3533,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The target is attacked with a slash of claws or blades. Critical hits land more easily. #------------------------------- @@ -3545,7 +3545,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is jabbed with a sharply pointed horn to inflict damage. #------------------------------- @@ -3557,7 +3557,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 010 +FunctionCode = FlinchTargetTrampleMinimize Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is stomped with a big foot. It may also make the target flinch. @@ -3570,7 +3570,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 40 Target = NearOther -FunctionCode = 0F1 +FunctionCode = UserTakesTargetItem Flags = Contact,CanProtect,CanMirrorMove Description = The user endearingly approaches the target, then steals the target's held item. #------------------------------- @@ -3582,7 +3582,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 083 +FunctionCode = UsedAfterAllyRoundWithDoublePower Flags = CanProtect,CanMirrorMove,Sound Description = The user attacks with a song. Others can join in the Round and make the attack do greater damage. #------------------------------- @@ -3594,7 +3594,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 07C +FunctionCode = DoublePowerIfTargetParalyzedCureTarget Flags = Contact,CanProtect,CanMirrorMove Description = This attack inflicts double damage on a paralyzed foe. It also cures the target's paralysis, however. #------------------------------- @@ -3606,7 +3606,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = AllNearFoes -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = Star-shaped rays are shot at the opposing team. This attack never misses. #------------------------------- @@ -3618,7 +3618,7 @@ BaseDamage = 55 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is gripped and squeezed from both sides to inflict damage. #------------------------------- @@ -3630,7 +3630,7 @@ BaseDamage = 50 Accuracy = 95 TotalPP = 30 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is cut with a scythe or a claw. It can also be used to cut down thin trees. #------------------------------- @@ -3642,7 +3642,7 @@ BaseDamage = 50 Accuracy = 0 TotalPP = 1 Target = RandomNearFoe -FunctionCode = 002 +FunctionCode = Struggle Flags = Contact,CanProtect Description = An attack that is used in desperation only if the user has no PP. It also hurts the user slightly. #------------------------------- @@ -3654,7 +3654,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = A physical attack in which the user charges and slams into the target with its whole body. #------------------------------- @@ -3666,7 +3666,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 087 +FunctionCode = TypeAndPowerDependOnWeather Flags = CanProtect,CanMirrorMove,Bomb Description = An attack move that varies in power and type depending on the weather. #------------------------------- @@ -3678,7 +3678,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 092 +FunctionCode = PowerHigherWithConsecutiveUseOnUserSide Flags = CanProtect,CanMirrorMove,Sound Description = The user attacks the foe with an echoing voice. If this move is used every turn, it does greater damage. #------------------------------- @@ -3691,7 +3691,7 @@ Accuracy = 100 TotalPP = 10 Target = NearOther Priority = 3 -FunctionCode = 012 +FunctionCode = FlinchTargetFailsIfNotUserFirstTurn Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = An attack that hits first and makes the target flinch. It only works the first turn the user is in battle. @@ -3704,7 +3704,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 40 Target = NearOther -FunctionCode = 0E9 +FunctionCode = CannotMakeTargetFaint Flags = Contact,CanProtect,CanMirrorMove Description = A restrained attack that prevents the target from fainting. The target is left with at least 1 HP. #------------------------------- @@ -3716,7 +3716,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 109 +FunctionCode = AddMoneyGainedFromBattle Flags = CanProtect,CanMirrorMove Description = Numerous coins are hurled at the target to inflict damage. Money is earned after battle. #------------------------------- @@ -3728,7 +3728,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is physically pounded with a long tail or a foreleg, etc. #------------------------------- @@ -3741,7 +3741,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user lunges at the target at a speed that makes it almost invisible. It is sure to strike first. #------------------------------- @@ -3753,7 +3753,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = Hard, pointed, and sharp claws rake the target to inflict damage. #------------------------------- @@ -3765,7 +3765,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 011 +FunctionCode = FlinchTargetFailsIfUserNotAsleep Flags = CanProtect,CanMirrorMove,Sound EffectChance = 30 Description = An attack that can be used only if the user is asleep. The harsh noise may also make the target flinch. @@ -3778,7 +3778,7 @@ BaseDamage = 35 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user slams the target with a long tail, vines, or tentacle. The target is hit twice in a row. #------------------------------- @@ -3791,7 +3791,7 @@ Accuracy = 100 TotalPP = 10 Target = NearOther Priority = 2 -FunctionCode = 0AD +FunctionCode = RemoveProtections Flags = CanMirrorMove Description = An attack that hits a target using Protect or Detect. It also lifts the effects of those moves. #------------------------------- @@ -3803,7 +3803,7 @@ BaseDamage = 25 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks by striking the target with its hard tail. It hits the Pokémon two to five times in a row. #------------------------------- @@ -3815,7 +3815,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 093 +FunctionCode = StartRaiseUserAtk1WhenDamaged Flags = Contact,CanProtect,CanMirrorMove Description = As long as this move is in use, the user's Attack rises each time the user is hit in battle. #------------------------------- @@ -3827,7 +3827,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 40 Target = NearOther -FunctionCode = 110 +FunctionCode = RemoveUserBindingAndEntryHazards Flags = Contact,CanProtect,CanMirrorMove Description = A spin attack that can also eliminate such moves as Bind, Wrap, Leech Seed, and Spikes. #------------------------------- @@ -3839,7 +3839,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove Description = Sharp spikes are shot at the target in rapid succession. They hit two to five times in a row. #------------------------------- @@ -3851,7 +3851,7 @@ BaseDamage = 18 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The target is hit with a flurry of punches that strike two to five times in a row. #------------------------------- @@ -3863,7 +3863,7 @@ BaseDamage = 18 Accuracy = 80 TotalPP = 15 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The target is raked with sharp claws or scythes for two to five times in quick succession. #------------------------------- @@ -3875,7 +3875,7 @@ BaseDamage = 15 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove,Bomb Description = Round objects are hurled at the target to strike two to five times in a row. #------------------------------- @@ -3887,7 +3887,7 @@ BaseDamage = 15 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = Contact,CanProtect,CanMirrorMove Description = Things such as long bodies or tentacles are used to bind and squeeze the foe for four to five turns. #------------------------------- @@ -3899,7 +3899,7 @@ BaseDamage = 15 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The target is slapped repeatedly, back and forth, two to five times in a row. #------------------------------- @@ -3911,7 +3911,7 @@ BaseDamage = 15 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The target is jabbed repeatedly with a horn or beak two to five times in a row. #------------------------------- @@ -3923,7 +3923,7 @@ BaseDamage = 15 Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = Contact,CanProtect,CanMirrorMove Description = A long body or vines are used to wrap and squeeze the target for four to five turns. #------------------------------- @@ -3935,7 +3935,7 @@ BaseDamage = 10 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 10 Description = The foe is attacked with long, creeping tentacles or vines. It may also lower the target's Speed. @@ -3949,7 +3949,7 @@ Accuracy = 0 TotalPP = 10 Target = None Priority = 1 -FunctionCode = 0D4 +FunctionCode = MultiTurnAttackBideThenReturnDoubleDamage Flags = Contact,CanProtect Description = The user endures attacks for two turns, then strikes back to cause double the damage taken. #------------------------------- @@ -3961,7 +3961,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 08C +FunctionCode = PowerHigherWithTargetHP Flags = Contact,CanProtect,CanMirrorMove Description = The target is crushed with great force. The attack is more powerful the more HP the target has left. #------------------------------- @@ -3973,7 +3973,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 06E +FunctionCode = LowerTargetHPToUserHP Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that cuts down the target's HP to equal the user's HP. #------------------------------- @@ -3985,7 +3985,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 098 +FunctionCode = PowerLowerWithUserHP Flags = Contact,CanProtect,CanMirrorMove Description = The user flails about aimlessly to attack. It becomes more powerful the less HP the user has. #------------------------------- @@ -3997,7 +3997,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 08A +FunctionCode = PowerLowerWithUserHappiness Flags = Contact,CanProtect,CanMirrorMove Description = A full-power attack that grows more powerful the less the user likes its Trainer. #------------------------------- @@ -4009,7 +4009,7 @@ BaseDamage = 1 Accuracy = 30 TotalPP = 5 Target = NearOther -FunctionCode = 070 +FunctionCode = OHKO Flags = Contact,CanProtect,CanMirrorMove Description = A vicious, tearing attack with big pincers. The target will faint instantly if this attack hits. #------------------------------- @@ -4021,7 +4021,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 090 +FunctionCode = TypeDependsOnUserIVs Flags = CanProtect,CanMirrorMove Description = A unique attack that varies in type and intensity depending on the Pokémon using it. #------------------------------- @@ -4033,7 +4033,7 @@ BaseDamage = 1 Accuracy = 30 TotalPP = 5 Target = NearOther -FunctionCode = 070 +FunctionCode = OHKO Flags = Contact,CanProtect,CanMirrorMove Description = The user stabs the foe with a horn that rotates like a drill. If it hits, the target faints instantly. #------------------------------- @@ -4045,7 +4045,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 096 +FunctionCode = TypeAndPowerDependOnUserBerry Flags = CanProtect,CanMirrorMove Description = The user draws power to attack by using its held Berry. The Berry determines its type and power. #------------------------------- @@ -4057,7 +4057,7 @@ BaseDamage = 1 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 094 +FunctionCode = RandomlyDamageOrHealTarget Flags = CanProtect,CanMirrorMove Description = The user attacks by giving the target a gift with a hidden trap. It restores HP sometimes, however. #------------------------------- @@ -4069,7 +4069,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 089 +FunctionCode = PowerHigherWithUserHappiness Flags = Contact,CanProtect,CanMirrorMove Description = A full-power attack that grows more powerful the more the user likes its Trainer. #------------------------------- @@ -4081,7 +4081,7 @@ BaseDamage = 1 Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 06A +FunctionCode = FixedDamage20 Flags = CanProtect,CanMirrorMove Description = The target is hit with a destructive shock wave that always inflicts 20 HP damage. #------------------------------- @@ -4093,7 +4093,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 113 +FunctionCode = PowerDependsOnUserStockpile Flags = CanProtect Description = The power stored using the move Stockpile is released all at once in an attack. #------------------------------- @@ -4105,7 +4105,7 @@ BaseDamage = 1 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 06C +FunctionCode = FixedDamageHalfTargetHP Flags = Contact,CanProtect,CanMirrorMove Description = The user chomps hard on the target with its sharp front fangs. It cuts the target's HP to half. #------------------------------- @@ -4117,7 +4117,7 @@ BaseDamage = 1 Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 097 +FunctionCode = PowerHigherWithLessPP Flags = Contact,CanProtect,CanMirrorMove Description = The fewer PP this move has, the greater its attack power. #------------------------------- @@ -4129,7 +4129,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 08C +FunctionCode = PowerHigherWithTargetHP Flags = Contact,CanProtect,CanMirrorMove Description = The user powerfully wrings the foe. The more HP the foe has, the greater this attack's power. #------------------------------- @@ -4140,7 +4140,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserOrNearAlly -FunctionCode = 037 +FunctionCode = RaiseTargetRandomStat2 Description = The user applies pressure to stress points, sharply boosting one of its stats. #------------------------------- [AFTERYOU] @@ -4150,7 +4150,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 11D +FunctionCode = TargetActsNext Description = The user helps the target and makes it use its move right after the user. #------------------------------- [ASSIST] @@ -4160,7 +4160,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 0B5 +FunctionCode = UseRandomMoveFromUserParty Description = The user hurriedly and randomly uses a move among those known by other Pokémon in the party. #------------------------------- [ATTRACT] @@ -4170,7 +4170,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 016 +FunctionCode = AttractTarget Flags = CanProtect,CanMirrorMove Description = If it is the opposite gender of the user, the target becomes infatuated and less likely to attack. #------------------------------- @@ -4181,7 +4181,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 0ED +FunctionCode = SwitchOutUserPassOnEffects Description = The user switches places with a party Pokémon in waiting, passing along any stat changes. #------------------------------- [BELLYDRUM] @@ -4191,7 +4191,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 03A +FunctionCode = MaxUserAttackLoseHalfOfTotalHP Description = The user maximizes its Attack stat in exchange for HP equal to half its max HP. #------------------------------- [BESTOW] @@ -4201,7 +4201,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 0F3 +FunctionCode = TargetTakesUserItem Flags = CanProtect,CanMirrorMove Description = The user passes its held item to the target when the target isn't holding an item. #------------------------------- @@ -4212,7 +4212,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = CanProtect,CanMirrorMove Description = The user blocks the target's way with arms spread wide to prevent escape. #------------------------------- @@ -4223,7 +4223,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 060 +FunctionCode = SetUserTypesBasedOnEnvironment Description = The user's type is changed depending on its environment, such as at water's edge, in grass, or in a cave. #------------------------------- [CAPTIVATE] @@ -4233,7 +4233,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = AllNearFoes -FunctionCode = 04E +FunctionCode = LowerTargetSpAtk2IfCanAttract Flags = CanProtect,CanMirrorMove Description = If it is the opposite gender of the user, the target is charmed into harshly lowering its Sp. Atk stat. #------------------------------- @@ -4244,7 +4244,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 04B +FunctionCode = LowerTargetAttack2 Flags = CanProtect,CanMirrorMove Description = The user charmingly gazes at the foe, making it less wary. The target's Attack is harshly lowered. #------------------------------- @@ -4255,7 +4255,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 05E +FunctionCode = SetUserTypesToUserMoveType Description = The user changes its type to become the same type as one of its moves. #------------------------------- [CONVERSION2] @@ -4265,7 +4265,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = NearOther -FunctionCode = 05F +FunctionCode = SetUserTypesToResistLastAttack Description = The user changes its type to make itself resistant to the type of the attack the opponent used last. #------------------------------- [COPYCAT] @@ -4275,7 +4275,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 0AF +FunctionCode = UseLastMoveUsed Description = The user mimics the move used immediately before it. The move fails if no other move has been used yet. #------------------------------- [DEFENSECURL] @@ -4285,7 +4285,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 01E +FunctionCode = RaiseUserDefense1CurlUpUser Description = The user curls up to conceal weak spots and raise its Defense stat. #------------------------------- [DISABLE] @@ -4295,7 +4295,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0B9 +FunctionCode = DisableTargetLastMoveUsed Flags = CanProtect,CanMirrorMove Description = For four turns, this move prevents the target from using the move it last used. #------------------------------- @@ -4306,7 +4306,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 022 +FunctionCode = RaiseUserEvasion1 Description = By moving rapidly, the user makes illusory copies of itself to raise its evasiveness. #------------------------------- [ENCORE] @@ -4316,7 +4316,7 @@ Category = Status Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 0BC +FunctionCode = DisableTargetUsingDifferentMove Flags = CanProtect,CanMirrorMove Description = The user compels the target to keep using only the move it last used for three turns. #------------------------------- @@ -4328,7 +4328,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 0E8 +FunctionCode = UserEnduresFaintingThisTurn Description = The user endures any attack with at least 1 HP. Its chance of failing rises if it is used in succession. #------------------------------- [ENTRAINMENT] @@ -4338,7 +4338,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 066 +FunctionCode = SetTargetAbilityToUserAbility Flags = CanProtect,CanMirrorMove Description = The user dances to compel the target to mimic it, making the target's Ability the same as the user's. #------------------------------- @@ -4349,7 +4349,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove Description = The user flashes a light that cuts the target's accuracy. It can also be used to illuminate caves. #------------------------------- @@ -4360,7 +4360,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 023 +FunctionCode = RaiseUserCriticalHitRate2 Description = The user takes a deep breath and focuses so that critical hits land more easily. #------------------------------- [FOLLOWME] @@ -4371,7 +4371,7 @@ Accuracy = 0 TotalPP = 20 Target = User Priority = 3 -FunctionCode = 117 +FunctionCode = RedirectAllMovesToUser Description = The user draws attention to itself, making all targets take aim only at the user. #------------------------------- [FORESIGHT] @@ -4381,7 +4381,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = NearOther -FunctionCode = 0A7 +FunctionCode = StartNegateTargetEvasionStatStageAndGhostImmunity Flags = CanProtect,CanMirrorMove Description = Enables the user to hit a Ghost type with any kind of move. It also enables the user to hit an evasive foe. #------------------------------- @@ -4392,7 +4392,7 @@ Category = Status Accuracy = 90 TotalPP = 30 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove Description = The user intimidates the target with the pattern on its belly to cause paralysis. #------------------------------- @@ -4403,7 +4403,7 @@ Category = Status Accuracy = 100 TotalPP = 40 Target = AllNearFoes -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = CanProtect,CanMirrorMove,Sound Description = The user growls in an endearing way, making the foe less wary. The foe's Attack stat is lowered. #------------------------------- @@ -4414,7 +4414,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 028 +FunctionCode = RaiseUserAtkSpAtk1Or2InSun Description = The user's body grows all at once, raising the Atk and Sp. Atk stats. #------------------------------- [HARDEN] @@ -4424,7 +4424,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 01D +FunctionCode = RaiseUserDefense1 Description = The user stiffens all the muscles in its body to raise its Defense stat. #------------------------------- [HEALBELL] @@ -4434,7 +4434,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = UserSide -FunctionCode = 019 +FunctionCode = CureUserPartyStatus Description = The user makes a soothing bell chime to heal the status problems of all the party Pokémon. #------------------------------- [HELPINGHAND] @@ -4445,7 +4445,7 @@ Accuracy = 0 TotalPP = 20 Target = NearAlly Priority = 5 -FunctionCode = 09C +FunctionCode = PowerUpAllyMove Description = The user assists an ally by boosting the power of its attack. #------------------------------- [HOWL] @@ -4455,7 +4455,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Description = The user howls loudly to raise its spirit, boosting its Attack stat. #------------------------------- [LEER] @@ -4465,7 +4465,7 @@ Category = Status Accuracy = 100 TotalPP = 30 Target = AllNearFoes -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = CanProtect,CanMirrorMove Description = The user gains an intimidating leer with sharp eyes. The target's Defense stat is reduced. #------------------------------- @@ -4476,7 +4476,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 0A6 +FunctionCode = EnsureNextMoveAlwaysHits Flags = CanProtect,CanMirrorMove Description = The user takes sure aim at the target. It ensures the next attack does not fail to hit the target. #------------------------------- @@ -4487,7 +4487,7 @@ Category = Status Accuracy = 75 TotalPP = 10 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove Description = With a scary face, the user tries to force a kiss on the target. If it suceeds, the target falls asleep. #------------------------------- @@ -4498,7 +4498,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserSide -FunctionCode = 0A1 +FunctionCode = StartPreventCriticalHitsAgainstUserSide Description = The user chants an incantation toward the sky, preventing the foe from landing critical hits. #------------------------------- [MEFIRST] @@ -4508,7 +4508,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearFoe -FunctionCode = 0B0 +FunctionCode = UseMoveTargetIsAboutToUse Flags = CanProtect Description = The user tries to cut ahead of the foe to steal and use the foe's intended move with greater power. #------------------------------- @@ -4519,7 +4519,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = CanProtect,CanMirrorMove Description = The user pins the target with a dark, arresting look. The target becomes unable to flee. #------------------------------- @@ -4530,7 +4530,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0B6 +FunctionCode = UseRandomMove Description = The user waggles a finger and stimulates its brain into randomly using nearly any move. #------------------------------- [MILKDRINK] @@ -4540,7 +4540,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = The user restores its own HP by up to half of its maximum HP. May also be used in the field to heal HP. #------------------------------- [MIMIC] @@ -4550,7 +4550,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 05C +FunctionCode = ReplaceMoveThisBattleWithTargetLastMoveUsed Flags = CanProtect Description = The user copies the move last used by the foe. The move can be used until the user is switched out. #------------------------------- @@ -4561,7 +4561,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 0A6 +FunctionCode = EnsureNextMoveAlwaysHits Flags = CanProtect,CanMirrorMove Description = The user senses the foe's movements with its mind to ensure its next attack does not miss the foe. #------------------------------- @@ -4572,7 +4572,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 034 +FunctionCode = RaiseUserEvasion2MinimizeUser Description = The user compresses its body to make itself look smaller, which sharply raises its evasiveness. #------------------------------- [MOONLIGHT] @@ -4582,7 +4582,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0D8 +FunctionCode = HealUserDependingOnWeather Description = The user restores its own HP. The amount of HP regained varies with the weather. #------------------------------- [MORNINGSUN] @@ -4592,7 +4592,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0D8 +FunctionCode = HealUserDependingOnWeather Description = The user restores its own HP. The amount of HP regained varies with the weather. #------------------------------- [NATUREPOWER] @@ -4602,7 +4602,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0B3 +FunctionCode = UseMoveDependingOnEnvironment Description = An attack that makes use of nature's power. Its effects vary depending on the user's environment. #------------------------------- [ODORSLEUTH] @@ -4612,7 +4612,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = NearOther -FunctionCode = 0A7 +FunctionCode = StartNegateTargetEvasionStatStageAndGhostImmunity Flags = CanProtect,CanMirrorMove Description = Enables the user to hit a Ghost type with any type of move. It also enables the user to hit an evasive foe. #------------------------------- @@ -4623,7 +4623,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 05A +FunctionCode = UserTargetAverageHP Flags = CanProtect,CanMirrorMove Description = The user adds its HP to the target's HP, then equally shares the combined HP with the target. #------------------------------- @@ -4634,7 +4634,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = AllBattlers -FunctionCode = 0E5 +FunctionCode = StartPerishCountsForAllBattlers Flags = Sound Description = Any Pokémon that hears this song faints in three turns, unless it switches out of battle. #------------------------------- @@ -4646,7 +4646,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 0AA +FunctionCode = ProtectUser Description = It enables the user to evade all attacks. Its chance of failing rises if it is used in succession. #------------------------------- [PSYCHUP] @@ -4656,7 +4656,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 055 +FunctionCode = UserCopyTargetStatStages Description = The user hypnotizes itself into copying any stat change made by the target. #------------------------------- [RECOVER] @@ -4666,7 +4666,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = Restoring its own cells, the user restores its own HP by half of its max HP. #------------------------------- [RECYCLE] @@ -4676,7 +4676,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0F6 +FunctionCode = RestoreUserConsumedItem Description = The user recycles a held item that has been used in battle so it can be used again. #------------------------------- [REFLECTTYPE] @@ -4686,7 +4686,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 062 +FunctionCode = SetUserTypesToTargetTypes Flags = CanProtect Description = The user reflects the target's type, making it the same type as the target. #------------------------------- @@ -4697,7 +4697,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 018 +FunctionCode = CureUserBurnPoisonParalysis Description = The user rests to cure itself of a poisoning, burn, or paralysis. #------------------------------- [ROAR] @@ -4708,7 +4708,7 @@ Accuracy = 100 TotalPP = 20 Target = NearOther Priority = -6 -FunctionCode = 0EB +FunctionCode = SwitchOutTargetStatusMove Flags = CanProtect,CanMirrorMove,Sound Description = The target is scared off and replaced by another Pokémon in its party. In the wild, the battle ends. #------------------------------- @@ -4719,7 +4719,7 @@ Category = Status Accuracy = 0 TotalPP = 25 Target = UserSide -FunctionCode = 01A +FunctionCode = StartUserSideImmunityToInflictedStatus Description = The user creates a protective field that prevents status problems for five turns. #------------------------------- [SCARYFACE] @@ -4729,7 +4729,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 04D +FunctionCode = LowerTargetSpeed2 Flags = CanProtect,CanMirrorMove Description = The user frightens the target with a scary face to harshly reduce its Speed stat. #------------------------------- @@ -4740,7 +4740,7 @@ Category = Status Accuracy = 85 TotalPP = 40 Target = NearOther -FunctionCode = 04C +FunctionCode = LowerTargetDefense2 Flags = CanProtect,CanMirrorMove,Sound Description = An earsplitting screech harshly reduces the target's Defense stat. #------------------------------- @@ -4751,7 +4751,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Description = The user reduces its polygon count to make itself more jagged, raising the Attack stat. #------------------------------- [SHELLSMASH] @@ -4761,7 +4761,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 035 +FunctionCode = LowerUserDefSpDef1RaiseUserAtkSpAtkSpd2 Description = The user breaks its shell, lowering its defenses but sharply raising attacking and Speed stats. #------------------------------- [SIMPLEBEAM] @@ -4771,7 +4771,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 063 +FunctionCode = SetTargetAbilityToSimple Flags = CanProtect,CanMirrorMove Description = The user's mysterious psychic wave changes the target's Ability to Simple. #------------------------------- @@ -4782,7 +4782,7 @@ Category = Status Accuracy = 55 TotalPP = 15 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove,Sound Description = A soothing lullaby is sung in a calming voice that puts the target into a deep slumber. #------------------------------- @@ -4793,7 +4793,7 @@ Category = Status Accuracy = 0 TotalPP = 1 Target = NearOther -FunctionCode = 05D +FunctionCode = ReplaceMoveWithTargetLastMoveUsed Description = It enables the user to permanently learn the move last used by the foe. Once used, Sketch disappears. #------------------------------- [SLACKOFF] @@ -4803,7 +4803,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = The user slacks off, restoring its own HP by up to half of its maximum HP. #------------------------------- [SLEEPTALK] @@ -4813,7 +4813,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0B4 +FunctionCode = UseRandomUserMoveIfAsleep Description = While it is asleep, the user randomly uses one of the moves it knows. #------------------------------- [SMOKESCREEN] @@ -4823,7 +4823,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove Description = The user releases an obscuring cloud of smoke or ink. It reduces the target's accuracy. #------------------------------- @@ -4834,7 +4834,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = The user restores its own HP by up to half of its maximum HP. May also be used in the field to heal HP. #------------------------------- [SPLASH] @@ -4844,7 +4844,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 001 +FunctionCode = DoesNothingUnusableInGravity Description = The user just flops and splashes around to no effect at all... #------------------------------- [STOCKPILE] @@ -4854,7 +4854,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 112 +FunctionCode = UserAddStockpileRaiseDefSpDef1 Description = The user charges up power and raises both its Defense and Sp. Def. The move can be used three times. #------------------------------- [SUBSTITUTE] @@ -4864,7 +4864,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 10C +FunctionCode = UserMakeSubstitute Description = The user makes a copy of itself using some of its HP. The copy serves as the user's decoy. #------------------------------- [SUPERSONIC] @@ -4874,7 +4874,7 @@ Category = Status Accuracy = 55 TotalPP = 20 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove,Sound Description = The user generates odd sound waves from its body. It may confuse the target. #------------------------------- @@ -4885,7 +4885,7 @@ Category = Status Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 041 +FunctionCode = RaiseTargetAttack2ConfuseTarget Flags = CanProtect,CanMirrorMove Description = The user enrages and confuses the target. However, it also sharply raises the target's Attack stat. #------------------------------- @@ -4896,7 +4896,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 114 +FunctionCode = HealUserDependingOnUserStockpile Description = The power stored using the move Stockpile is absorbed by the user to heal its HP. #------------------------------- [SWEETKISS] @@ -4906,7 +4906,7 @@ Category = Status Accuracy = 75 TotalPP = 10 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove Description = The user kisses the target with a sweet, angelic cuteness that causes confusion. #------------------------------- @@ -4917,7 +4917,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = AllNearFoes -FunctionCode = 048 +FunctionCode = LowerTargetEvasion1 Flags = CanProtect,CanMirrorMove Description = A sweet scent that lowers the foe's evasiveness. It also lures wild Pokémon if used in grass, etc. #------------------------------- @@ -4928,7 +4928,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 02E +FunctionCode = RaiseUserAttack2 Flags = Dance Description = A frenetic dance to uplift the fighting spirit. It sharply raises the user's Attack stat. #------------------------------- @@ -4939,7 +4939,7 @@ Category = Status Accuracy = 100 TotalPP = 30 Target = AllNearFoes -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = CanProtect,CanMirrorMove Description = The user wags its tail cutely, making opposing Pokémon less wary and lowering their Defense stat. #------------------------------- @@ -4950,7 +4950,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = AllNearOthers -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove,Dance Description = The user performs a wobbly dance that confuses the Pokémon around it. #------------------------------- @@ -4961,7 +4961,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 04A +FunctionCode = LowerTargetAtkDef1 Flags = CanProtect,CanMirrorMove Description = The user tickles the target into laughing, reducing its Attack and Defense stats. #------------------------------- @@ -4972,7 +4972,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 069 +FunctionCode = TransformUserIntoTarget Description = The user transforms into a copy of the target right down to having the same move set. #------------------------------- [WHIRLWIND] @@ -4983,7 +4983,7 @@ Accuracy = 100 TotalPP = 20 Target = NearOther Priority = -6 -FunctionCode = 0EB +FunctionCode = SwitchOutTargetStatusMove Flags = CanProtect,CanMirrorMove Description = The foe is blown away, to be replaced by another Pokémon in its party. In the wild, the battle ends. #------------------------------- @@ -4994,7 +4994,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D7 +FunctionCode = HealUserPositionNextTurn Description = One turn after this move is used, the target's HP is restored by half the user's maximum HP. #------------------------------- [WORKUP] @@ -5004,7 +5004,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 027 +FunctionCode = RaiseUserAtkSpAtk1 Description = The user is roused, and its Attack and Sp. Atk stats increase. #------------------------------- [YAWN] @@ -5014,7 +5014,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 004 +FunctionCode = SleepTargetNextTurn Flags = CanProtect,CanMirrorMove Description = The user lets loose a huge yawn that lulls the target into falling asleep on the next turn. #------------------------------- @@ -5026,7 +5026,7 @@ BaseDamage = 120 Accuracy = 70 TotalPP = 5 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user shoots filthy garbage at the target to attack. It may also poison the target. @@ -5039,7 +5039,7 @@ BaseDamage = 95 Accuracy = 100 TotalPP = 10 Target = AllNearOthers -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = It swamps the area around the user with a giant sludge wave. It may also poison those hit. @@ -5052,7 +5052,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 30 Description = Unsanitary sludge is hurled at the target. It may also poison the target. @@ -5065,7 +5065,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is stabbed with a tentacle or arm seeped with poison. It may also poison the target. @@ -5078,7 +5078,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate EffectChance = 10 Description = A slashing attack with a poisonous blade that may also poison the foe. Critical hits land more easily. @@ -5091,7 +5091,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = Unsanitary sludge is hurled at the target. It may also poison the target. @@ -5104,7 +5104,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 07B +FunctionCode = DoublePowerIfTargetPoisoned Flags = CanProtect,CanMirrorMove Description = The user drenches the foe in a special poisonous liquid. Its power doubles if the target is poisoned. #------------------------------- @@ -5116,7 +5116,7 @@ BaseDamage = 50 Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 050 +FunctionCode = ResetTargetStatStages Flags = CanProtect,CanMirrorMove Description = The user attacks by throwing a clump of special mud. All status changes are returned to normal. #------------------------------- @@ -5128,7 +5128,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 006 +FunctionCode = BadPoisonTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 30 Description = The user bites the target with toxic fangs. It may also leave the target badly poisoned. @@ -5141,7 +5141,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate EffectChance = 10 Description = The user hits the target with its tail. It may also poison the target. Critical hits land more easily. @@ -5154,7 +5154,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 30 Target = AllNearFoes -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The foe is attacked with a spray of harsh acid. It may also lower the target's Sp. Def stat. @@ -5167,7 +5167,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 04F +FunctionCode = LowerTargetSpDef2 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 100 Description = The user spits fluid that works to melt the target. This harshly reduces the target's Sp. Def stat. @@ -5180,7 +5180,7 @@ BaseDamage = 20 Accuracy = 70 TotalPP = 20 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 40 Description = The target is attacked with a discharge of filthy gases. It may also poison the target. @@ -5193,7 +5193,7 @@ BaseDamage = 15 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user stabs the target with a poisonous stinger. This may also poison the target. @@ -5205,7 +5205,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 02F +FunctionCode = RaiseUserDefense2 Description = The user alters its cellular structure to liquefy itself, sharply raising its Defense stat. #------------------------------- [COIL] @@ -5215,7 +5215,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 025 +FunctionCode = RaiseUserAtkDefAcc1 Description = The user coils up and concentrates. This raises its Attack and Defense stats as well as its accuracy. #------------------------------- [GASTROACID] @@ -5225,7 +5225,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 068 +FunctionCode = NegateTargetAbility Flags = CanProtect,CanMirrorMove Description = The user hurls up its stomach acids on the foe. The fluid negates the effect of the target's Ability. #------------------------------- @@ -5236,7 +5236,7 @@ Category = Status Accuracy = 80 TotalPP = 40 Target = AllNearFoes -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove Description = A cloud of poison gas is sprayed in the face of opposing Pokémon. It may poison those hit. #------------------------------- @@ -5247,7 +5247,7 @@ Category = Status Accuracy = 75 TotalPP = 35 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove,Powder Description = The user scatters a cloud of poisonous dust on the target. It may poison the target. #------------------------------- @@ -5258,7 +5258,7 @@ Category = Status Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 006 +FunctionCode = BadPoisonTarget Flags = CanProtect,CanMirrorMove Description = A move that leaves the target badly poisoned. Its poison damage worsens every turn. #------------------------------- @@ -5269,7 +5269,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = FoeSide -FunctionCode = 104 +FunctionCode = AddToxicSpikesToFoeSide Description = The user lays a trap of poison spikes at the foe's feet. They poison foes that switch into battle. #------------------------------- [PSYCHOBOOST] @@ -5280,7 +5280,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 03F +FunctionCode = LowerUserSpAtk2 Flags = CanProtect,CanMirrorMove Description = The user attacks the target at full power. The attack's recoil harshly reduces the user's Sp. Atk stat. #------------------------------- @@ -5292,7 +5292,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0DE +FunctionCode = HealUserByHalfOfDamageDoneIfTargetAsleep Flags = CanProtect,CanMirrorMove Description = The user eats the dreams of a sleeping foe. It absorbs half the damage caused to heal the user's HP. #------------------------------- @@ -5304,7 +5304,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 111 +FunctionCode = AttackTwoTurnsLater Description = Two turns after this move is used, a hunk of psychic energy attacks the target. #------------------------------- [PSYSTRIKE] @@ -5315,7 +5315,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 122 +FunctionCode = UseTargetDefenseInsteadOfTargetSpDef Flags = CanProtect,CanMirrorMove Description = The user materializes an odd psychic wave to attack the target. This attack does physical damage. #------------------------------- @@ -5327,7 +5327,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is hit by a strong telekinetic force. It may also reduce the target's Sp. Def stat. @@ -5340,7 +5340,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks with an odd, unseeable power. It may also make the target flinch. @@ -5353,7 +5353,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 122 +FunctionCode = UseTargetDefenseInsteadOfTargetSpDef Flags = CanProtect,CanMirrorMove Description = The user materializes an odd psychic wave to attack the target. This attack does physical damage. #------------------------------- @@ -5365,7 +5365,7 @@ BaseDamage = 80 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user focuses its willpower to its head and attacks the foe. It may also make the target flinch. @@ -5378,7 +5378,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 50 Description = The user lets loose a damaging burst of light. It may also reduce the target's Sp. Def stat. @@ -5391,7 +5391,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 50 Description = A mistlike flurry of down envelops and damages the target. It may also lower the target's Sp. Atk. @@ -5404,7 +5404,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user tears at the target with blades formed by psychic power. Critical hits land more easily. #------------------------------- @@ -5416,7 +5416,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = AllNearOthers -FunctionCode = 123 +FunctionCode = FailsUnlessTargetSharesTypeWithUser Flags = CanProtect,CanMirrorMove Description = Using an odd shock wave, the user damages any Pokémon of the same type as the user. #------------------------------- @@ -5428,7 +5428,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is attacked with a peculiar ray. It may also cause confusion. @@ -5441,7 +5441,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user unleashes a vicious blow after its cute act makes the foe less wary. It may also cause flinching. @@ -5454,7 +5454,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is hit by a weak telekinetic force. It may also leave the target confused. @@ -5468,7 +5468,7 @@ Accuracy = 100 TotalPP = 20 Target = None Priority = -5 -FunctionCode = 072 +FunctionCode = CounterSpecialDamage Flags = CanProtect Description = A retaliation move that counters any special attack, inflicting double the damage taken. #------------------------------- @@ -5480,7 +5480,7 @@ BaseDamage = 1 Accuracy = 80 TotalPP = 15 Target = NearOther -FunctionCode = 06F +FunctionCode = FixedDamageUserLevelRandom Flags = CanProtect,CanMirrorMove Description = The target is attacked with an odd psychic wave. The attack varies in intensity. #------------------------------- @@ -5492,7 +5492,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 08E +FunctionCode = PowerHigherWithUserPositiveStatStages Flags = CanProtect,CanMirrorMove Description = The user attacks with stored power. The more the user's stats are raised, the greater the damage. #------------------------------- @@ -5503,7 +5503,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 030 +FunctionCode = RaiseUserSpeed2 Description = The user relaxes and lightens its body to move faster. It sharply boosts the Speed stat. #------------------------------- [ALLYSWITCH] @@ -5514,7 +5514,7 @@ Accuracy = 0 TotalPP = 15 Target = User Priority = 1 -FunctionCode = 120 +FunctionCode = UserSwapsPositionsWithAlly Description = The user teleports using a strange power and switches its place with one of its allies. #------------------------------- [AMNESIA] @@ -5524,7 +5524,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 033 +FunctionCode = RaiseUserSpDef2 Description = The user temporarily empties its mind to forget its concerns. It sharply raises the user's Sp. Def stat. #------------------------------- [BARRIER] @@ -5534,7 +5534,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 02F +FunctionCode = RaiseUserDefense2 Description = The user throws up a sturdy wall that sharply raises its Defense stat. #------------------------------- [CALMMIND] @@ -5544,7 +5544,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 02C +FunctionCode = RaiseUserSpAtkSpDef1 Description = The user quietly focuses its mind and calms its spirit to raise its Sp. Atk and Sp. Def stats. #------------------------------- [COSMICPOWER] @@ -5554,7 +5554,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 02A +FunctionCode = RaiseUserDefSpDef1 Description = The user absorbs a mystical power from space to raise its Defense and Sp. Def stats. #------------------------------- [GRAVITY] @@ -5564,7 +5564,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = BothSides -FunctionCode = 118 +FunctionCode = StartGravity Description = Gravity is intensified for five turns, making moves involving flying unusable and negating Levitation. #------------------------------- [GUARDSPLIT] @@ -5574,7 +5574,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 059 +FunctionCode = UserTargetAverageBaseDefSpDef Flags = CanProtect Description = The user employs its psychic power to average its Defense and Sp. Def stats with those of its target. #------------------------------- @@ -5585,7 +5585,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 053 +FunctionCode = UserTargetSwapDefSpDefStages Flags = CanProtect,CanMirrorMove Description = The user employs its psychic power to switch changes to its Defense and Sp. Def with the target. #------------------------------- @@ -5596,7 +5596,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = AllNearFoes -FunctionCode = 0BB +FunctionCode = DisableTargetHealingMoves Flags = CanProtect,CanMirrorMove Description = For five turns, the foe is prevented from using any moves, Abilities, or held items that recover HP. #------------------------------- @@ -5607,7 +5607,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = Other -FunctionCode = 0DF +FunctionCode = HealTargetHalfOfTotalHP Flags = CanProtect,Pulse Description = The user emits a healing pulse which restores the target's HP by up to half of its max HP. #------------------------------- @@ -5618,7 +5618,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0E3 +FunctionCode = UserFaintsHealAndCureReplacement Description = The user faints. In return, the Pokémon taking its place will have its HP restored and status cured. #------------------------------- [HEARTSWAP] @@ -5628,7 +5628,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 054 +FunctionCode = UserTargetSwapStatStages Flags = CanProtect,CanMirrorMove Description = The user employs its psychic power to switch stat changes with the target. #------------------------------- @@ -5639,7 +5639,7 @@ Category = Status Accuracy = 60 TotalPP = 20 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove Description = The user employs hypnotic suggestion to make the target fall into a deep sleep. #------------------------------- @@ -5650,7 +5650,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0B8 +FunctionCode = DisableTargetMovesKnownByUser Description = If the foe knows any move also known by the user, the foe is prevented from using it. #------------------------------- [KINESIS] @@ -5660,7 +5660,7 @@ Category = Status Accuracy = 80 TotalPP = 15 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove Description = The user distracts the target by bending a spoon. It lowers the target's accuracy. #------------------------------- @@ -5671,7 +5671,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserSide -FunctionCode = 0A3 +FunctionCode = StartWeakenSpecialDamageAgainstUserSide Description = A wondrous wall of light is put up to suppress damage from special attacks for five turns. #------------------------------- [LUNARDANCE] @@ -5681,7 +5681,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0E4 +FunctionCode = UserFaintsHealAndCureReplacementRestorePP Flags = Dance Description = The user faints. In return, the Pokémon taking its place will have its status and HP fully restored. #------------------------------- @@ -5693,7 +5693,7 @@ Accuracy = 0 TotalPP = 15 Target = User Priority = 4 -FunctionCode = 0B1 +FunctionCode = BounceBackProblemCausingStatusMoves Description = A barrier reflects back to the target moves like Leech Seed and moves that damage status. #------------------------------- [MAGICROOM] @@ -5704,7 +5704,7 @@ Accuracy = 0 TotalPP = 10 Target = BothSides Priority = -7 -FunctionCode = 0F9 +FunctionCode = StartNegateHeldItems Flags = CanMirrorMove Description = The user creates a bizarre area in which Pokémon's held items lose their effects for five turns. #------------------------------- @@ -5715,7 +5715,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Description = The user meditates to awaken the power deep within its body and raise its Attack stat. #------------------------------- [MIRACLEEYE] @@ -5725,7 +5725,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = NearOther -FunctionCode = 0A8 +FunctionCode = StartNegateTargetEvasionStatStageAndDarkImmunity Flags = CanProtect,CanMirrorMove Description = Enables the user to hit a Dark type with any type of move. It also enables the user to hit an evasive foe. #------------------------------- @@ -5736,7 +5736,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 058 +FunctionCode = UserTargetAverageBaseAtkSpAtk Flags = CanProtect Description = The user employs its psychic power to average its Attack and Sp. Atk stats with those of the target. #------------------------------- @@ -5747,7 +5747,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 052 +FunctionCode = UserTargetSwapAtkSpAtkStages Flags = CanProtect,CanMirrorMove Description = The user employs its psychic power to switch changes to its Attack and Sp. Atk with the target. #------------------------------- @@ -5758,7 +5758,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 057 +FunctionCode = UserSwapBaseAtkDef Description = The user employs its psychic power to switch its Attack with its Defense stat. #------------------------------- [PSYCHOSHIFT] @@ -5768,7 +5768,7 @@ Category = Status Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 01B +FunctionCode = GiveUserStatusToTarget Flags = CanProtect,CanMirrorMove Description = Using its psychic power of suggestion, the user transfers its status problems to the target. #------------------------------- @@ -5779,7 +5779,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = UserSide -FunctionCode = 0A2 +FunctionCode = StartWeakenPhysicalDamageAgainstUserSide Description = A wondrous wall of light is put up to suppress damage from physical attacks for five turns. #------------------------------- [REST] @@ -5789,7 +5789,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D9 +FunctionCode = HealUserFullyAndFallAsleep Description = The user goes to sleep for two turns. It fully restores the user's HP and heals any status problem. #------------------------------- [ROLEPLAY] @@ -5799,7 +5799,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 065 +FunctionCode = SetUserAbilityToTargetAbility Description = The user mimics the target completely, copying the target's natural Ability. #------------------------------- [SKILLSWAP] @@ -5809,7 +5809,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 067 +FunctionCode = UserTargetSwapAbilities Flags = CanProtect,CanMirrorMove Description = The user employs its psychic power to exchange Abilities with the target. #------------------------------- @@ -5820,7 +5820,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 11A +FunctionCode = StartTargetAirborneAndAlwaysHitByMoves Flags = CanProtect,CanMirrorMove Description = The user makes the target float with its psychic power. The target is easier to hit for three turns. #------------------------------- @@ -5831,7 +5831,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 0EA +FunctionCode = FleeFromBattle Description = Use it to flee from any wild Pokémon. It can also warp to the last Pokémon Center visited. #------------------------------- [TRICK] @@ -5841,7 +5841,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0F2 +FunctionCode = UserTargetSwapItems Flags = CanProtect,CanMirrorMove Description = The user catches the target off guard and swaps its held item with its own. #------------------------------- @@ -5853,7 +5853,7 @@ Accuracy = 0 TotalPP = 5 Target = BothSides Priority = -7 -FunctionCode = 11F +FunctionCode = StartSlowerBattlersActFirst Flags = CanMirrorMove Description = The user creates a bizarre area in which slower Pokémon get to move first for five turns. #------------------------------- @@ -5865,7 +5865,7 @@ Accuracy = 0 TotalPP = 10 Target = BothSides Priority = -7 -FunctionCode = 124 +FunctionCode = StartSwapAllBattlersBaseDefensiveStats Flags = CanMirrorMove Description = The user creates a bizarre area in which Pokémon's Defense and Sp. Def stats are swapped for 5 turns. #------------------------------- @@ -5877,7 +5877,7 @@ BaseDamage = 150 Accuracy = 80 TotalPP = 5 Target = NearOther -FunctionCode = 0FC +FunctionCode = RecoilHalfOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks the foe with a hazardous, full-power headbutt. The user also takes terrible damage. #------------------------------- @@ -5889,7 +5889,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove,Bomb Description = The user launches a huge boulder at the target to attack. It must rest on the next turn, however. #------------------------------- @@ -5901,7 +5901,7 @@ BaseDamage = 100 Accuracy = 80 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user stabs the foe with sharpened stones from below. It has a high critical-hit ratio. #------------------------------- @@ -5913,7 +5913,7 @@ BaseDamage = 75 Accuracy = 90 TotalPP = 10 Target = AllNearFoes -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = Large boulders are hurled at the foes to inflict damage. It may also make the targets flinch. @@ -5926,7 +5926,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user attacks with a ray of light that sparkles as if it were made of gemstones. #------------------------------- @@ -5938,7 +5938,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 02D +FunctionCode = RaiseUserMainStats1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks with a prehistoric power. It may also raise all the user's stats at once. @@ -5951,7 +5951,7 @@ BaseDamage = 50 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user picks up and throws a small rock at the target to attack. #------------------------------- @@ -5963,7 +5963,7 @@ BaseDamage = 50 Accuracy = 80 TotalPP = 10 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = Boulders are hurled at the target. It also lowers the target's Speed by preventing its movement. @@ -5976,7 +5976,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 11C +FunctionCode = HitsTargetInSkyGroundsTarget Flags = CanProtect,CanMirrorMove Description = The user throws a stone or projectile to attack. A flying Pokémon will fall to the ground when hit. #------------------------------- @@ -5988,7 +5988,7 @@ BaseDamage = 30 Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 0D3 +FunctionCode = MultiTurnAttackPowersUpEachTurn Flags = Contact,CanProtect,CanMirrorMove Description = The user continually rolls into the target over five turns. It becomes stronger each time it hits. #------------------------------- @@ -6000,7 +6000,7 @@ BaseDamage = 25 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove Description = The user hurls hard rocks at the target. Two to five rocks are launched in quick succession. #------------------------------- @@ -6011,7 +6011,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 030 +FunctionCode = RaiseUserSpeed2 Description = The user polishes its body to reduce drag. It can sharply raise the Speed stat. #------------------------------- [SANDSTORM] @@ -6021,7 +6021,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 101 +FunctionCode = StartSandstormWeather Description = Summons a five-turn sandstorm to hurt all combatants except the Rock, Ground, and Steel types. #------------------------------- [STEALTHROCK] @@ -6031,7 +6031,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = FoeSide -FunctionCode = 105 +FunctionCode = AddStealthRocksToFoeSide Description = The user lays a trap of levitating stones around the foe. The trap hurts foes that switch into battle. #------------------------------- [WIDEGUARD] @@ -6042,7 +6042,7 @@ Accuracy = 0 TotalPP = 10 Target = UserSide Priority = 3 -FunctionCode = 0AC +FunctionCode = ProtectUserSideFromMultiTargetDamagingMoves Description = The user and its allies are protected from wide-ranging attacks for a turn. May fail if used in succession. #------------------------------- [DOOMDESIRE] @@ -6053,7 +6053,7 @@ BaseDamage = 140 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 111 +FunctionCode = AttackTwoTurnsLater Description = Two turns after this move is used, the user blasts the target with a concentrated bundle of light. #------------------------------- [IRONTAIL] @@ -6064,7 +6064,7 @@ BaseDamage = 100 Accuracy = 75 TotalPP = 15 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is slammed with a steel-hard tail. It may also lower the target's Defense stat. @@ -6077,7 +6077,7 @@ BaseDamage = 100 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 20 Description = The target is hit with a hard punch fired like a meteor. It may also raise the user's Attack. @@ -6090,7 +6090,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user gathers all its light energy and releases it at once. It may also lower the target's Sp. Def stat. @@ -6103,7 +6103,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The foe slams the target with its steel-hard head. It may also make the target flinch. @@ -6116,7 +6116,7 @@ BaseDamage = 70 Accuracy = 90 TotalPP = 25 Target = NearOther -FunctionCode = 01D +FunctionCode = RaiseUserDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 10 Description = The target is hit with wings of steel. It may also raise the user's Defense stat. @@ -6129,7 +6129,7 @@ BaseDamage = 65 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user looses a flash of energy from its polished body. It may also lower the target's accuracy. @@ -6142,7 +6142,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Bomb Description = The user launches steel bombs that stick to the target. This attack will not miss. #------------------------------- @@ -6154,7 +6154,7 @@ BaseDamage = 50 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks by throwing two steel gears at its target. #------------------------------- @@ -6166,7 +6166,7 @@ BaseDamage = 50 Accuracy = 95 TotalPP = 35 Target = NearOther -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 10 Description = The target is raked with steel claws. It may also raise the user's Attack stat. @@ -6180,7 +6180,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user strikes the target with tough punches as fast as bullets. This move always goes first. #------------------------------- @@ -6192,7 +6192,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 08D +FunctionCode = PowerHigherWithTargetFasterThanUser Flags = Contact,CanProtect,CanMirrorMove,Bomb Description = The user tackles the target with a high-speed spin. The slower the user, the greater the damage. #------------------------------- @@ -6204,7 +6204,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 09B +FunctionCode = PowerHigherWithUserHeavierThanTarget Flags = Contact,CanProtect,CanMirrorMove Description = The user slams into the foe with its heavy body. The heavier the user, the greater the damage. #------------------------------- @@ -6216,7 +6216,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = None -FunctionCode = 073 +FunctionCode = CounterDamagePlusHalf Flags = CanProtect,CanMirrorMove Description = The user retaliates with much greater power against the target that last inflicted damage on it. #------------------------------- @@ -6227,7 +6227,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 031 +FunctionCode = RaiseUserSpeed2LowerUserWeight Description = The user sheds part of its body to make itself lighter and sharply raise its Speed stat. #------------------------------- [IRONDEFENSE] @@ -6237,7 +6237,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 02F +FunctionCode = RaiseUserDefense2 Description = The user hardens its body's surface like iron, sharply raising its Defense stat. #------------------------------- [METALSOUND] @@ -6247,7 +6247,7 @@ Category = Status Accuracy = 85 TotalPP = 40 Target = NearOther -FunctionCode = 04F +FunctionCode = LowerTargetSpDef2 Flags = CanProtect,CanMirrorMove,Sound Description = A horrible sound like scraping metal harshly reduces the target's Sp. Def stat. #------------------------------- @@ -6258,7 +6258,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 036 +FunctionCode = RaiseUserAtk1Spd2 Description = The user rotates its gears, raising its Attack and sharply raising its Speed. #------------------------------- [HYDROCANNON] @@ -6269,7 +6269,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The target is hit with a watery blast. The user must rest on the next turn, however. #------------------------------- @@ -6281,7 +6281,7 @@ BaseDamage = 150 Accuracy = 100 TotalPP = 5 Target = AllNearFoes -FunctionCode = 08B +FunctionCode = PowerHigherWithUserHP Flags = CanProtect,CanMirrorMove Description = The user spouts water to damage the foe. The lower the user's HP, the less powerful it becomes. #------------------------------- @@ -6293,7 +6293,7 @@ BaseDamage = 120 Accuracy = 80 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The target is blasted by a huge volume of water launched under great pressure. #------------------------------- @@ -6305,7 +6305,7 @@ BaseDamage = 95 Accuracy = 85 TotalPP = 10 Target = AllNearFoes -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks by shooting muddy water at the opposing team. It may also lower the target's accuracy. @@ -6318,7 +6318,7 @@ BaseDamage = 95 Accuracy = 100 TotalPP = 15 Target = AllNearOthers -FunctionCode = 075 +FunctionCode = DoublePowerIfTargetUnderwater Flags = CanProtect,CanMirrorMove Description = It swamps the area around the user with a giant wave. It can also be used for crossing water. #------------------------------- @@ -6330,7 +6330,7 @@ BaseDamage = 90 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks by swinging its tail as if it were a vicious wave in a raging storm. #------------------------------- @@ -6342,7 +6342,7 @@ BaseDamage = 90 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The target is hammered with a large pincer. Critical hits land more easily. #------------------------------- @@ -6354,7 +6354,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0CB +FunctionCode = TwoTurnAttackInvulnerableUnderwater Flags = Contact,CanProtect,CanMirrorMove Description = Diving on the first turn, the user rises and hits on the next turn. It can be used to dive in the ocean. #------------------------------- @@ -6366,7 +6366,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove,ThawsUser EffectChance = 30 Description = The user shoots boiling hot water at its target. It may also leave the target with a burn. @@ -6379,7 +6379,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user charges at the target and may make it flinch. It can also be used to climb a waterfall. @@ -6392,7 +6392,7 @@ BaseDamage = 75 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 50 Description = The user cuts the foe with sharp shells. It may also lower the target's Defense stat. @@ -6405,7 +6405,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 080 +FunctionCode = DoublePowerIfTargetHPLessThanHalf Flags = CanProtect,CanMirrorMove Description = If the target's HP is down to about half, this attack will hit with double the power. #------------------------------- @@ -6417,7 +6417,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A spray of bubbles is forcefully ejected at the target. It may also lower its Speed stat. @@ -6430,7 +6430,7 @@ BaseDamage = 65 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 50 Description = The user attacks by spraying ink in the foe's face or eyes. It may also lower the target's accuracy. @@ -6443,7 +6443,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = Other -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove,Pulse EffectChance = 20 Description = The user attacks the target with a pulsing blast of water. It may also confuse the target. @@ -6456,7 +6456,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 108 +FunctionCode = WaterPledge Flags = CanProtect,CanMirrorMove Description = A column of water strikes the target. When combined with its fire equivalent, it makes a rainbow. #------------------------------- @@ -6469,7 +6469,7 @@ Accuracy = 100 TotalPP = 20 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user lunges at the target at a speed that makes it almost invisible. It is sure to strike first. #------------------------------- @@ -6481,7 +6481,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The target is blasted with a forceful shot of water. #------------------------------- @@ -6493,7 +6493,7 @@ BaseDamage = 35 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = Contact,CanProtect,CanMirrorMove Description = The target is clamped and squeezed by the user's very thick and sturdy shell for four to five turns. #------------------------------- @@ -6505,7 +6505,7 @@ BaseDamage = 35 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0D0 +FunctionCode = BindTargetDoublePowerIfTargetUnderwater Flags = CanProtect,CanMirrorMove Description = Traps foes in a violent swirling whirlpool for four to five turns. #------------------------------- @@ -6517,7 +6517,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 30 Target = AllNearFoes -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A spray of countless bubbles is jetted at the opposing team. It may also lower the targets' Speed stats. @@ -6529,7 +6529,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 0DA +FunctionCode = StartHealUserEachTurn Description = The user envelops itself in a veil made of water. It regains some HP on every turn. #------------------------------- [RAINDANCE] @@ -6539,7 +6539,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = BothSides -FunctionCode = 100 +FunctionCode = StartRainWeather Description = The user summons a heavy rain that falls for five turns, powering up Water-type moves. #------------------------------- [SOAK] @@ -6549,7 +6549,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 061 +FunctionCode = SetTargetTypesToWater Flags = CanProtect,CanMirrorMove Description = The user shoots a torrent of water at the target and changes the target's type to Water. #------------------------------- @@ -6560,7 +6560,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = BothSides -FunctionCode = 09E +FunctionCode = StartWeakenFireMoves Description = The user soaks itself with water. The move weakens Fire-type moves while the user is in the battle. #------------------------------- [WITHDRAW] @@ -6570,5 +6570,5 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 01D +FunctionCode = RaiseUserDefense1 Description = The user withdraws its body into its hard shell, raising its Defense stat. diff --git a/PBS/Gen 7/moves.txt b/PBS/Gen 7/moves.txt index 587cbf585..57ae13c02 100644 --- a/PBS/Gen 7/moves.txt +++ b/PBS/Gen 7/moves.txt @@ -8,7 +8,7 @@ BaseDamage = 120 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = Using its tough and impressive horn, the user rams into the target with no letup. #------------------------------- @@ -20,7 +20,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user calls out its underlings to pummel the target. Critical hits land more easily. #------------------------------- @@ -32,7 +32,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove,Sound EffectChance = 10 Description = The user vibrates its wings to generate a damaging sound wave. It may also lower the target's Sp. Def stat. @@ -46,7 +46,7 @@ Accuracy = 100 TotalPP = 10 Target = NearOther Priority = 2 -FunctionCode = 174 +FunctionCode = FailsIfNotUserFirstTurn Flags = Contact,CanProtect,CanMirrorMove Description = Although this move has great power, it only works the first turn the user is in battle. #------------------------------- @@ -58,7 +58,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 16F +FunctionCode = HealAllyOrDamageFoe Flags = CanProtect,CanMirrorMove,Bomb Description = Fires an exploding pollen puff at enemies, or a HP-restoring one at allies. #------------------------------- @@ -70,7 +70,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = Contact,CanProtect,CanMirrorMove Description = The user drains the target's blood. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -82,7 +82,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user makes a lunge at the target, attacking with full force. This lowers the target's Attack stat. @@ -95,7 +95,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user slashes at the foe by crossing its scythes or claws as if they were a pair of scissors. #------------------------------- @@ -107,7 +107,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks with a sinister beam of light. It may also confuse the target. @@ -120,7 +120,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0EE +FunctionCode = SwitchOutUserDamagingMove Flags = Contact,CanProtect,CanMirrorMove Description = After making its attack, the user rushes back to switch places with a party Pokémon in waiting. #------------------------------- @@ -132,7 +132,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 010 +FunctionCode = FlinchTargetTrampleMinimize Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user crushes its foes by rolling over them. This attack may make the target flinch. @@ -145,7 +145,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0F4 +FunctionCode = UserConsumeTargetBerry Flags = Contact,CanProtect,CanMirrorMove Description = The user bites the target. If the target is holding a Berry, the user eats it and gains its effect. #------------------------------- @@ -157,7 +157,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 02D +FunctionCode = RaiseUserMainStats1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The foe is attacked with powdery scales blown by wind. It may also raise all the user's stats. @@ -170,7 +170,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 150 +FunctionCode = RaiseUserAttack3IfTargetFaints Flags = Contact,CanProtect,CanMirrorMove Description = When the user knocks out a target with this move, the user's Attack stat rises drastically. #------------------------------- @@ -182,7 +182,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 20 Target = AllNearFoes -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = While resisting, the user attacks the opposing Pokémon. The targets' Sp. Atk stat is reduced. @@ -195,7 +195,7 @@ BaseDamage = 40 Accuracy = 95 TotalPP = 20 Target = NearOther -FunctionCode = 091 +FunctionCode = PowerHigherWithConsecutiveUse Flags = Contact,CanProtect,CanMirrorMove Description = The target is slashed with scythes or claws. Its power increases if it hits in succession. #------------------------------- @@ -207,7 +207,7 @@ BaseDamage = 25 Accuracy = 95 TotalPP = 20 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove Description = Sharp spikes are shot at the target in rapid succession. They hit two to five times in a row. #------------------------------- @@ -219,7 +219,7 @@ BaseDamage = 25 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0BE +FunctionCode = HitTwoTimesPoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The foe is stabbed twice by a pair of stingers. It may also poison the target. @@ -232,7 +232,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = Contact,CanProtect,CanMirrorMove Description = The target is infested and unable to flee for four to five turns. #------------------------------- @@ -243,7 +243,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 02A +FunctionCode = RaiseUserDefSpDef1 Description = The user calls out its underlings to shield its body, raising its Defense and Sp. Def stats. #------------------------------- [HEALORDER] @@ -253,7 +253,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = The user calls out its underlings to heal it. The user regains up to half of its max HP. #------------------------------- [POWDER] @@ -263,7 +263,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 148 +FunctionCode = TargetNextFireMoveDamagesTarget Flags = CanProtect,CanMirrorMove,Powder Description = The target is covered in a powder that explodes and damages it if it uses a Fire-type move. #------------------------------- @@ -274,7 +274,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 02B +FunctionCode = RaiseUserSpAtkSpDefSpd1 Flags = Dance Description = The user performs a beautiful dance. It boosts the user's Sp. Atk, Sp. Def, and Speed stats. #------------------------------- @@ -286,7 +286,7 @@ Accuracy = 0 TotalPP = 20 Target = User Priority = 2 -FunctionCode = 117 +FunctionCode = RedirectAllMovesToUser Flags = Powder Description = The user scatters irritating powder to draw attention to itself. Opponents aim only at the user. #------------------------------- @@ -297,7 +297,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = CanMirrorMove Description = The user ensnares the target with thin, gooey silk so it can't flee from battle. #------------------------------- @@ -308,7 +308,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = FoeSide -FunctionCode = 153 +FunctionCode = AddStickyWebToFoeSide Description = Weaves a sticky net around the opposing team, which lowers their Speed stats upon switching in. #------------------------------- [STRINGSHOT] @@ -318,7 +318,7 @@ Category = Status Accuracy = 95 TotalPP = 40 Target = AllNearFoes -FunctionCode = 04D +FunctionCode = LowerTargetSpeed2 Flags = CanProtect,CanMirrorMove Description = The foe is bound with silk blown from the user's mouth. This silk reduces the target's Speed. #------------------------------- @@ -329,7 +329,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 039 +FunctionCode = RaiseUserSpAtk3 Description = The user stares at flashing lights to focus its mind, drastically raising its Sp. Atk stat. #------------------------------- [HYPERSPACEFURY] @@ -340,7 +340,7 @@ BaseDamage = 100 Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 13B +FunctionCode = HoopaRemoveProtectionsBypassSubstituteLowerUserDef1 Flags = CanMirrorMove Description = Unleashes a barrage of multi-arm attacks, skipping protections. The user's Defense stat falls. #------------------------------- @@ -352,7 +352,7 @@ BaseDamage = 95 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 121 +FunctionCode = UseTargetAttackInsteadOfUserAttack Flags = Contact,CanProtect,CanMirrorMove Description = The user turns the foe's power against it. It does more damage the higher the target's Attack stat. #------------------------------- @@ -364,7 +364,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0A9 +FunctionCode = IgnoreTargetDefSpDefEvaStatStages Flags = Contact,CanProtect,CanMirrorMove Description = The user swings both arms and hits the target. Ignores the target's stat changes. #------------------------------- @@ -376,7 +376,7 @@ BaseDamage = 85 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 40 Description = The user lets loose a pitch-black shock wave at its target. It may also lower the target's accuracy. @@ -389,7 +389,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 20 Description = The user crunches up the target with sharp fangs. It may also lower the target's Defense stat. @@ -402,7 +402,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = Other -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove,Pulse EffectChance = 20 Description = The user releases a horrible aura imbued with dark thoughts. It may also make the target flinch. @@ -415,7 +415,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 16C +FunctionCode = DisableTargetSoundMoves Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks the target's throat. The target cannot use sound-based moves for two turns. @@ -428,7 +428,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user slashes the target the instant an opportunity arises. Critical hits land more easily. #------------------------------- @@ -441,7 +441,7 @@ Accuracy = 100 TotalPP = 5 Target = NearOther Priority = 1 -FunctionCode = 116 +FunctionCode = FailsIfTargetActed Flags = Contact,CanProtect,CanMirrorMove Description = This move enables the user to attack first. It fails if the target is not readying an attack, however. #------------------------------- @@ -453,7 +453,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0F0 +FunctionCode = RemoveTargetItem Flags = Contact,CanProtect,CanMirrorMove Description = The user slaps down the target's held item, preventing that item from being used in the battle. #------------------------------- @@ -465,7 +465,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 082 +FunctionCode = DoublePowerIfTargetLostHPThisTurn Flags = Contact,CanProtect,CanMirrorMove Description = If the target has already taken some damage in the same turn, this attack's power is doubled. #------------------------------- @@ -477,7 +477,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 30 Description = The target is bitten with viciously sharp fangs. It may make the target flinch. @@ -490,7 +490,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = AllNearOthers -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user swings its body around violently to inflict damage on everything in its vicinity. #------------------------------- @@ -502,7 +502,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user draws up to the foe disarmingly, then throws a sucker punch. It hits without fail. #------------------------------- @@ -514,7 +514,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 0F1 +FunctionCode = UserTakesTargetItem Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks and steals the foe's held item simultaneously. It can't steal if the user holds an item. #------------------------------- @@ -526,7 +526,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 15 Target = AllNearFoes -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = CanProtect,CanMirrorMove,Sound EffectChance = 100 Description = The user yells as if it is ranting about something, making the target's Sp. Atk stat decrease. @@ -539,7 +539,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 084 +FunctionCode = DoublePowerIfTargetActed Flags = Contact,CanProtect,CanMirrorMove Description = If the user moves after the target, this attack's power will be doubled. #------------------------------- @@ -551,7 +551,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 088 +FunctionCode = PursueSwitchingFoe Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that inflicts double damage if used on a target that is switching out of battle. #------------------------------- @@ -563,7 +563,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0C1 +FunctionCode = HitOncePerUserTeamMember Flags = CanProtect,CanMirrorMove Description = The user gets all the party Pokémon to attack the foe. The more party Pokémon, the more damage. #------------------------------- @@ -575,7 +575,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0F7 +FunctionCode = ThrowUserItemAtTarget Flags = CanProtect,CanMirrorMove Description = The user flings its held item at the target to attack. Its power and effects depend on the item. #------------------------------- @@ -587,7 +587,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 08E +FunctionCode = PowerHigherWithUserPositiveStatStages Flags = Contact,CanProtect,CanMirrorMove Description = The user boasts of its strength. Power increases the more the user's stats are raised. #------------------------------- @@ -599,7 +599,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 08F +FunctionCode = PowerHigherWithTargetPositiveStatStages Flags = Contact,CanProtect,CanMirrorMove Description = This attack's power increases the more the target has powered up with stat changes. #------------------------------- @@ -610,7 +610,7 @@ Category = Status Accuracy = 50 TotalPP = 10 Target = AllNearFoes -FunctionCode = 003 +FunctionCode = SleepTargetIfUserDarkrai Flags = CanProtect,CanMirrorMove Description = Opposing Pokémon are dragged into a world of total darkness that makes them sleep. #------------------------------- @@ -621,7 +621,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0F8 +FunctionCode = StartTargetCannotUseItem Flags = CanProtect,CanMirrorMove Description = It prevents the target from using its held item. Its Trainer is also prevented from using items on it. #------------------------------- @@ -632,7 +632,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 04F +FunctionCode = LowerTargetSpDef2 Flags = CanProtect,CanMirrorMove Description = The user feigns crying to fluster the target, harshly lowering its Sp. Def stat. #------------------------------- @@ -643,7 +643,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 040 +FunctionCode = RaiseTargetSpAtk1ConfuseTarget Flags = CanProtect,CanMirrorMove Description = Flattery is used to confuse the target. However, it also raises the target's Sp. Atk stat. #------------------------------- @@ -654,7 +654,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 029 +FunctionCode = RaiseUserAtkAcc1 Description = The user sharpens its claws to boost its Attack stat and accuracy. #------------------------------- [MEMENTO] @@ -664,7 +664,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0E2 +FunctionCode = UserFaintsLowerTargetAtkSpAtk2 Flags = CanProtect,CanMirrorMove Description = The user faints when using this move. In return, it harshly lowers the target's Attack and Sp. Atk. #------------------------------- @@ -675,7 +675,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 032 +FunctionCode = RaiseUserSpAtk2 Description = The user stimulates its brain by thinking bad thoughts. It sharply raises the user's Sp. Atk. #------------------------------- [PARTINGSHOT] @@ -685,7 +685,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 151 +FunctionCode = LowerTargetAtkSpAtk1SwitchOutUser Flags = CanProtect,CanMirrorMove,Sound Description = With a parting threat, the user lowers the target's Attack and Sp. Atk stats. Then it switches out. #------------------------------- @@ -696,7 +696,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 11E +FunctionCode = TargetActsLast Flags = CanProtect,CanMirrorMove Description = The user suppresses the target and makes its move go last. #------------------------------- @@ -708,7 +708,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 0B2 +FunctionCode = StealAndUseBeneficialStatusMove Description = The user steals the effects of any healing or stat-changing move the foe attempts to use. #------------------------------- [SWITCHEROO] @@ -718,7 +718,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0F2 +FunctionCode = UserTargetSwapItems Flags = CanProtect,CanMirrorMove Description = The user trades held items with the target faster than the eye can follow. #------------------------------- @@ -729,7 +729,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0BA +FunctionCode = DisableTargetStatusMoves Flags = CanProtect,CanMirrorMove Description = The target is taunted into a rage that allows it to use only attack moves for three turns. #------------------------------- @@ -740,7 +740,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 141 +FunctionCode = InvertTargetStatStages Flags = CanProtect,CanMirrorMove Description = All stat changes affecting the target turn topsy-turvy and become the opposite of what they were. #------------------------------- @@ -751,7 +751,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0B7 +FunctionCode = DisableTargetUsingSameMoveConsecutively Flags = CanProtect,CanMirrorMove Description = The user torments and enrages the foe, making it incapable of using the same move twice in a row. #------------------------------- @@ -763,7 +763,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The user blasts the target with power that distorts even time. The user must rest on the next turn. #------------------------------- @@ -775,7 +775,7 @@ BaseDamage = 130 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 03F +FunctionCode = LowerUserSpAtk2 Flags = CanProtect,CanMirrorMove Description = Comets are summoned down from the sky. The attack's recoil harshly reduces the user's Sp. Atk stat. #------------------------------- @@ -787,7 +787,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = RandomNearFoe -FunctionCode = 0D2 +FunctionCode = MultiTurnAttackConfuseUserAtEnd Flags = Contact,CanProtect,CanMirrorMove Description = The user rampages and attacks for two to three turns. It then becomes confused, however. #------------------------------- @@ -799,7 +799,7 @@ BaseDamage = 110 Accuracy = 100 TotalPP = 5 Target = AllNearFoes -FunctionCode = 15F +FunctionCode = LowerUserDefense1 Flags = CanProtect,CanMirrorMove,Sound Description = The user rubs its scales and makes a huge noise. Also lowers the user's Defense stat. #------------------------------- @@ -811,7 +811,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 165 +FunctionCode = NegateTargetAbilityIfTargetActed Flags = CanProtect,CanMirrorMove Description = If the target has already moved this turn, the effect of its Ability is negated. #------------------------------- @@ -823,7 +823,7 @@ BaseDamage = 100 Accuracy = 75 TotalPP = 10 Target = NearOther -FunctionCode = 010 +FunctionCode = FlinchTargetTrampleMinimize Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user tackles the foe while exhibiting overwhelming menace. It may also make the target flinch. @@ -836,7 +836,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user tears the target along with the space around it. Critical hits land more easily. #------------------------------- @@ -848,7 +848,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user uses its body like a hammer to attack the target and inflict damage. #------------------------------- @@ -860,7 +860,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Pulse Description = The target is attacked with a shock wave generated by the user's gaping mouth. #------------------------------- @@ -872,7 +872,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user slashes the target with huge, sharp claws. #------------------------------- @@ -884,7 +884,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user exhales a mighty gust that inflicts damage. It may also leave the target with paralysis. @@ -898,7 +898,7 @@ Accuracy = 90 TotalPP = 10 Target = NearOther Priority = -6 -FunctionCode = 0EC +FunctionCode = SwitchOutTargetDamagingMove Flags = Contact,CanProtect,CanMirrorMove Description = The user knocks away the target and drags out another Pokémon in its party. In the wild, the battle ends. #------------------------------- @@ -910,7 +910,7 @@ BaseDamage = 40 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks its target by hitting it with brutal strikes. The target is hit twice in a row. #------------------------------- @@ -922,7 +922,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 20 Target = AllNearFoes -FunctionCode = 078 +FunctionCode = FlinchTargetDoublePowerIfTargetInSky Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The user whips up a vicious tornado to tear at the opposing team. It may also make targets flinch. @@ -935,7 +935,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 06B +FunctionCode = FixedDamage40 Flags = CanProtect,CanMirrorMove Description = This attack hits the target with a shock wave of pure rage. This attack always inflicts 40 HP damage. #------------------------------- @@ -946,7 +946,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 026 +FunctionCode = RaiseUserAtkSpd1 Flags = Dance Description = The user vigorously performs a mystic, powerful dance that boosts its Attack and Speed stats. #------------------------------- @@ -958,7 +958,7 @@ BaseDamage = 130 Accuracy = 85 TotalPP = 5 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user charges at its foe, surrounding itself with lightning. It may also leave the target paralyzed. @@ -971,7 +971,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FD +FunctionCode = RecoilThirdOfDamageDealtParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 10 Description = The user electrifies itself, then charges at the foe. It causes considerable damage to the user as well. @@ -984,7 +984,7 @@ BaseDamage = 120 Accuracy = 50 TotalPP = 5 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 100 Description = The user fires an electric blast like a cannon to inflict damage and cause paralysis. @@ -997,7 +997,7 @@ BaseDamage = 110 Accuracy = 70 TotalPP = 10 Target = NearOther -FunctionCode = 008 +FunctionCode = ParalyzeTargetAlwaysHitsInRainHitsTargetInSky Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = A wicked thunderbolt is dropped on the foe to inflict damage. It may also leave the target paralyzed. @@ -1010,7 +1010,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 079 +FunctionCode = DoublePowerAfterFusionFlare Flags = CanProtect,CanMirrorMove Description = The user throws down a giant thunderbolt. It does more damage if influenced by an enormous flame. #------------------------------- @@ -1022,7 +1022,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 146 +FunctionCode = NormalMovesBecomeElectric Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user attacks with electrically charged fists. Normal-type moves become Electric-type. #------------------------------- @@ -1034,7 +1034,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A strong electric blast is loosed at the target. It may also leave the target with paralysis. @@ -1047,7 +1047,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FA +FunctionCode = RecoilQuarterOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user shrouds itself in electricity and smashes into its foe. It also damages the user a little. #------------------------------- @@ -1059,7 +1059,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = AllNearOthers -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = A flare of electricity is loosed to strike the area around the user. It may also cause paralysis. @@ -1072,7 +1072,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = A strong electric blast crashes down on the target. This may also make the target flinch. @@ -1085,7 +1085,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 10 Description = The target is punched with an electrified fist. It may also leave the target with paralysis. @@ -1098,7 +1098,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0EE +FunctionCode = SwitchOutUserDamagingMove Flags = CanProtect,CanMirrorMove Description = After making its attack, the user rushes back to switch places with a party Pokémon in waiting. #------------------------------- @@ -1110,7 +1110,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = AllNearOthers -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = CanProtect,CanMirrorMove Description = The user attacks everything around it. The user's HP is restored by half the damage dealt. #------------------------------- @@ -1122,7 +1122,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user throws an electrically charged tackle at the target. It may also leave the target with paralysis. @@ -1135,7 +1135,7 @@ BaseDamage = 65 Accuracy = 95 TotalPP = 15 Target = NearOther -FunctionCode = 009 +FunctionCode = ParalyzeFlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 100 Description = The user bites with electrified fangs. It may also make the target flinch or leave it with paralysis. @@ -1148,7 +1148,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user strikes the target with a quick jolt of electricity. This attack cannot be evaded. #------------------------------- @@ -1160,7 +1160,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 15 Target = AllNearFoes -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user captures and attacks foes by using an electric net, which lowers their Speed stat. @@ -1173,7 +1173,7 @@ BaseDamage = 50 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 020 +FunctionCode = RaiseUserSpAtk1 Flags = CanProtect,CanMirrorMove EffectChance = 70 Description = The user fires a concentrated bundle of electricity. It may also raise the user's Sp. Atk stat. @@ -1186,7 +1186,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A jolt of electricity is hurled at the foe to inflict damage. It may also leave the target with paralysis. @@ -1199,7 +1199,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user nuzzles its electrified cheeks against the target. This also leaves the target with paralysis. @@ -1212,7 +1212,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 099 +FunctionCode = PowerHigherWithUserFasterThanTarget Flags = CanProtect,CanMirrorMove,Bomb Description = The user hurls an electric orb at the foe. It does more damage the faster the user is. #------------------------------- @@ -1223,7 +1223,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 021 +FunctionCode = RaiseUserSpDef1PowerUpElectricMove Description = The user boosts the power of the Electric move it uses next. It also raises the user's Sp. Def stat. #------------------------------- [EERIEIMPULSE] @@ -1233,7 +1233,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 13D +FunctionCode = LowerTargetSpAtk2 Flags = CanProtect,CanMirrorMove Description = The user's body generates an eerie impulse. Harshly lowers the target's Sp. Atk stat. #------------------------------- @@ -1244,7 +1244,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 154 +FunctionCode = StartElectricTerrain Description = The user electrifies the ground for five turns. Pokémon on the ground no longer fall asleep. #------------------------------- [ELECTRIFY] @@ -1254,7 +1254,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 145 +FunctionCode = TargetMovesBecomeElectric Flags = CanProtect,CanMirrorMove Description = If the target uses a move after being electrified, that move becomes Electric-type. #------------------------------- @@ -1266,7 +1266,7 @@ Accuracy = 0 TotalPP = 25 Target = BothSides Priority = 1 -FunctionCode = 146 +FunctionCode = NormalMovesBecomeElectric Description = The user disperses electrically charged particles. Normal-type moves become Electric-type. #------------------------------- [MAGNETRISE] @@ -1276,7 +1276,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 119 +FunctionCode = StartUserAirborne Description = The user levitates using electrically generated magnetism for five turns. #------------------------------- [MAGNETICFLUX] @@ -1286,7 +1286,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = UserAndAllies -FunctionCode = 137 +FunctionCode = RaisePlusMinusUserAndAlliesDefSpDef1 Description = Manipulates magnetic fields to raise the Defense and Sp. Def stats of allies with Plus or Minus Abilities. #------------------------------- [THUNDERWAVE] @@ -1296,7 +1296,7 @@ Category = Status Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTargetIfNotTypeImmune Flags = CanProtect,CanMirrorMove Description = A weak electric charge is launched at the target. It causes paralysis if it hits. #------------------------------- @@ -1308,7 +1308,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0FC +FunctionCode = RecoilHalfOfDamageDealt Flags = CanProtect,CanMirrorMove Description = Fires a powerful beam of light drawn from the Eternal Flower. It also damages the user a lot. #------------------------------- @@ -1320,7 +1320,7 @@ BaseDamage = 130 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 03F +FunctionCode = LowerUserSpAtk2 Flags = CanProtect,CanMirrorMove Description = The user unleashes a strong beam. The attack's recoil harshly lowers the user's Sp. Atk stat. #------------------------------- @@ -1332,7 +1332,7 @@ BaseDamage = 95 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks by borrowing the power of the moon. This may also lower the target's Sp. Atk stat. @@ -1345,7 +1345,7 @@ BaseDamage = 90 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 10 Description = The user plays rough with the target and attacks it. This may also lower the target's Attack stat. @@ -1358,7 +1358,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user damages opposing Pokémon by emitting a powerful flash. #------------------------------- @@ -1370,7 +1370,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 14F +FunctionCode = HealUserByThreeQuartersOfDamageDone Flags = Contact,CanProtect,CanMirrorMove Description = The user steals the target's HP with a kiss. The user's HP is restored by over half of the damage dealt. #------------------------------- @@ -1382,7 +1382,7 @@ BaseDamage = 40 Accuracy = 0 TotalPP = 15 Target = AllNearFoes -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Sound Description = Letting out a charming cry, the user does emotional damage to foes. This attack never misses. #------------------------------- @@ -1394,7 +1394,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user stirs up a fairy wind and strikes the target with it. #------------------------------- @@ -1406,7 +1406,7 @@ BaseDamage = 1 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 06C +FunctionCode = FixedDamageHalfTargetHP Flags = CanProtect,CanMirrorMove Description = The user hits the target with the force of nature. It halves the target's HP. #------------------------------- @@ -1417,7 +1417,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearAlly -FunctionCode = 138 +FunctionCode = RaiseAllySpDef1 Description = The user raises the Sp. Def stat of an ally Pokémon by using a mysterious aroma. #------------------------------- [BABYDOLLEYES] @@ -1428,7 +1428,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = CanProtect,CanMirrorMove Description = The user stares with its baby-doll eyes, which lowers the target's Attack stat. Always goes first. #------------------------------- @@ -1439,7 +1439,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 04B +FunctionCode = LowerTargetAttack2 Flags = CanProtect,CanMirrorMove Description = The user charmingly gazes at the foe, making it less wary. The target's Attack is harshly lowered. #------------------------------- @@ -1451,7 +1451,7 @@ Accuracy = 0 TotalPP = 10 Target = UserSide Priority = 3 -FunctionCode = 14A +FunctionCode = ProtectUserSideFromStatusMoves Description = The user protects itself and its allies from status moves with a mysterious power. #------------------------------- [FAIRYLOCK] @@ -1461,7 +1461,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 152 +FunctionCode = TrapAllBattlersInBattleForOneTurn Flags = CanMirrorMove Description = By locking down the battlefield, the user keeps all Pokémon from fleeing during the next turn. #------------------------------- @@ -1472,7 +1472,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 16E +FunctionCode = HealTargetDependingOnGrassyTerrain Flags = CanProtect Description = The user restores the target's HP by up to half of its max HP. It restores more HP when the terrain is grass. #------------------------------- @@ -1483,7 +1483,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = AllBattlers -FunctionCode = 13F +FunctionCode = RaiseGrassBattlersDef1 Description = The user raises the Defense stats of all Grass-type Pokémon in battle with a mysterious power. #------------------------------- [GEOMANCY] @@ -1493,7 +1493,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 14E +FunctionCode = TwoTurnAttackRaiseUserSpAtkSpDefSpd2 Description = The user absorbs energy and sharply raises its Sp. Atk, Sp. Def, and Speed stats on the next turn. #------------------------------- [MISTYTERRAIN] @@ -1503,7 +1503,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 156 +FunctionCode = StartMistyTerrain Description = The user covers the ground with mist for five turns. Grounded Pokémon can't gain status conditions. #------------------------------- [MOONLIGHT] @@ -1513,7 +1513,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0D8 +FunctionCode = HealUserDependingOnWeather Description = The user restores its own HP. The amount of HP regained varies with the weather. #------------------------------- [SWEETKISS] @@ -1523,7 +1523,7 @@ Category = Status Accuracy = 75 TotalPP = 10 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove Description = The user kisses the target with a sweet, angelic cuteness that causes confusion. #------------------------------- @@ -1536,7 +1536,7 @@ Accuracy = 100 TotalPP = 20 Target = NearOther Priority = -3 -FunctionCode = 115 +FunctionCode = FailsIfUserDamagedThisTurn Flags = Contact,CanProtect,Punching Description = The user focuses its mind before launching a punch. It will fail if the user is hit before it is used. #------------------------------- @@ -1548,7 +1548,7 @@ BaseDamage = 130 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 10B +FunctionCode = CrashDamageIfFailsUnusableInGravity Flags = Contact,CanProtect,CanMirrorMove Description = The target is attacked with a knee kick from a jump. If it misses, the user is hurt instead. #------------------------------- @@ -1560,7 +1560,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 03C +FunctionCode = LowerUserDefSpDef1 Flags = Contact,CanProtect,CanMirrorMove Description = The user fights the foe up close without guarding itself. It also cuts the user's Defense and Sp. Def. #------------------------------- @@ -1572,7 +1572,7 @@ BaseDamage = 120 Accuracy = 70 TotalPP = 5 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 10 Description = The user heightens its mental focus and unleashes its power. It may also lower the target's Sp. Def. @@ -1585,7 +1585,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 03B +FunctionCode = LowerUserAtkDef1 Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks the target with great power. However, it also lowers the user's Attack and Defense. #------------------------------- @@ -1597,7 +1597,7 @@ BaseDamage = 100 Accuracy = 80 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user delivers a double chop with its forearms crossed. Critical hits land more easily. #------------------------------- @@ -1609,7 +1609,7 @@ BaseDamage = 100 Accuracy = 50 TotalPP = 5 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 100 Description = The user punches the target with full, concentrated power. It confuses the target if it hits. @@ -1622,7 +1622,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 10 Target = Other -FunctionCode = 144 +FunctionCode = EffectivenessIncludesFlyingType Flags = Contact,CanProtect,CanMirrorMove Description = The user dives down onto the target from the sky. This move is Fighting and Flying type simultaneously. #------------------------------- @@ -1634,7 +1634,7 @@ BaseDamage = 100 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 03E +FunctionCode = LowerUserSpeed1 Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user swings and hits with its strong and heavy fist. It lowers the user's Speed, however. #------------------------------- @@ -1646,7 +1646,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 10B +FunctionCode = CrashDamageIfFailsUnusableInGravity Flags = Contact,CanProtect,CanMirrorMove Description = The user jumps up high, then strikes with a kick. If the kick misses, the user hurts itself. #------------------------------- @@ -1658,7 +1658,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0A9 +FunctionCode = IgnoreTargetDefSpDefEvaStatStages Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks by slicing with its long horns. The target's stat changes don't affect the damage. #------------------------------- @@ -1670,7 +1670,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 122 +FunctionCode = UseTargetDefenseInsteadOfTargetSpDef Flags = CanProtect,CanMirrorMove Description = The user cuts with its long horn. The odd power contained in it does physical damage to the foe. #------------------------------- @@ -1682,7 +1682,7 @@ BaseDamage = 85 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 11B +FunctionCode = HitsTargetInSky Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user attacks the target with an uppercut thrown skyward with force. #------------------------------- @@ -1694,7 +1694,7 @@ BaseDamage = 80 Accuracy = 0 TotalPP = 20 Target = Other -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Pulse,Bomb Description = The user looses a blast of aura power from deep within its body. This move is certain to hit. #------------------------------- @@ -1706,7 +1706,7 @@ BaseDamage = 80 Accuracy = 80 TotalPP = 20 Target = NearOther -FunctionCode = 0FA +FunctionCode = RecoilQuarterOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user grabs the target and recklessly dives for the ground. It also hurts the user slightly. #------------------------------- @@ -1718,7 +1718,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 10A +FunctionCode = RemoveScreens Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks with a swift chop. It can also break any barrier such as Light Screen and Reflect. #------------------------------- @@ -1730,7 +1730,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = Contact,CanProtect,CanMirrorMove,Punching Description = An energy-draining punch. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -1743,7 +1743,7 @@ Accuracy = 0 TotalPP = 10 Target = NearOther Priority = -1 -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks last. In return, this throw move is guaranteed not to miss. #------------------------------- @@ -1755,7 +1755,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 07D +FunctionCode = DoublePowerIfTargetAsleepCureTarget Flags = Contact,CanProtect,CanMirrorMove Description = This attack inflicts big damage on a sleeping target. It also wakes the target up, however. #------------------------------- @@ -1767,7 +1767,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks the target's legs swiftly, reducing the target's Speed stat. @@ -1781,7 +1781,7 @@ Accuracy = 90 TotalPP = 10 Target = NearOther Priority = -6 -FunctionCode = 0EC +FunctionCode = SwitchOutTargetDamagingMove Flags = Contact,CanProtect,CanMirrorMove Description = The user throws the target and drags out another Pokémon in its party. In the wild, the battle ends. #------------------------------- @@ -1793,7 +1793,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is attacked with a shock wave. It may also leave the target with paralysis. @@ -1807,7 +1807,7 @@ Accuracy = 100 TotalPP = 10 Target = NearOther Priority = -4 -FunctionCode = 081 +FunctionCode = DoublePowerIfUserLostHPThisTurn Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that inflicts double the damage if the user has been hurt by the foe in the same turn. #------------------------------- @@ -1819,7 +1819,7 @@ BaseDamage = 60 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user lashes out with a quick, spinning kick. It may also make the target flinch. @@ -1832,7 +1832,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0A0 +FunctionCode = AlwaysCriticalHit Flags = Contact,CanProtect,CanMirrorMove Description = The user strikes the target with a fierce blow. This attack always results in a critical hit. #------------------------------- @@ -1844,7 +1844,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The target is attacked with a sharp chop. Critical hits land more easily. #------------------------------- @@ -1857,7 +1857,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user throws a punch at blinding speed. It is certain to strike first. #------------------------------- @@ -1869,7 +1869,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 100 Description = Striking opponents repeatedly makes the user's fists harder, raising the user's Attack stat. @@ -1882,7 +1882,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 50 Description = The user attacks with a punch that can shatter a rock. It may also lower the foe's Defense stat. @@ -1896,7 +1896,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user whirls its fists to send a wave of pure vacuum at the target. This move always goes first. #------------------------------- @@ -1908,7 +1908,7 @@ BaseDamage = 30 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = Contact,CanProtect,CanMirrorMove Description = The target is quickly kicked twice in succession using both feet. #------------------------------- @@ -1920,7 +1920,7 @@ BaseDamage = 15 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user looses a flurry of open-palmed arm thrusts that hit two to five times in a row. #------------------------------- @@ -1932,7 +1932,7 @@ BaseDamage = 10 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0BF +FunctionCode = HitThreeTimesPowersUpWithEachHit Flags = Contact,CanProtect,CanMirrorMove Description = A consecutive three-kick attack that becomes more powerful with each successive hit. #------------------------------- @@ -1945,7 +1945,7 @@ Accuracy = 100 TotalPP = 20 Target = None Priority = -5 -FunctionCode = 071 +FunctionCode = CounterPhysicalDamage Flags = Contact,CanProtect Description = A retaliation move that counters any physical attack, inflicting double the damage taken. #------------------------------- @@ -1957,7 +1957,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 0E1 +FunctionCode = UserFaintsFixedDamageUserHP Flags = CanProtect Description = The user risks all to attack the foe. The user faints but does damage equal to its HP. #------------------------------- @@ -1969,7 +1969,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 09A +FunctionCode = PowerHigherWithTargetWeight Flags = Contact,CanProtect,CanMirrorMove Description = A powerful low kick that makes the foe fall over. It inflicts greater damage on heavier foes. #------------------------------- @@ -1981,7 +1981,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 098 +FunctionCode = PowerLowerWithUserHP Flags = Contact,CanProtect,CanMirrorMove Description = An all-out attack that becomes more powerful the less HP the user has. #------------------------------- @@ -1993,7 +1993,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 06D +FunctionCode = FixedDamageUserLevel Flags = Contact,CanProtect,CanMirrorMove Description = The target is thrown using the power of gravity. It inflicts damage equal to the user's level. #------------------------------- @@ -2004,7 +2004,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 024 +FunctionCode = RaiseUserAtkDef1 Description = The user tenses its muscles to bulk up its body, boosting both its Attack and Defense stats. #------------------------------- [DETECT] @@ -2015,7 +2015,7 @@ Accuracy = 0 TotalPP = 5 Target = User Priority = 4 -FunctionCode = 0AA +FunctionCode = ProtectUser Description = It enables the user to evade all attacks. Its chance of failing rises if it is used in succession. #------------------------------- [MATBLOCK] @@ -2025,7 +2025,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = UserSide -FunctionCode = 149 +FunctionCode = ProtectUserSideFromDamagingMovesIfUserFirstTurn Description = Using a pulled-up mat as a shield, the user protects itself and its allies from damaging moves. #------------------------------- [QUICKGUARD] @@ -2036,7 +2036,7 @@ Accuracy = 0 TotalPP = 15 Target = UserSide Priority = 3 -FunctionCode = 0AB +FunctionCode = ProtectUserSideFromPriorityMoves Description = The user protects itself and its allies from priority moves. If may fail if used in succession. #------------------------------- [VCREATE] @@ -2047,7 +2047,7 @@ BaseDamage = 180 Accuracy = 95 TotalPP = 5 Target = NearOther -FunctionCode = 03D +FunctionCode = LowerUserDefSpDefSpd1 Flags = Contact,CanProtect,CanMirrorMove Description = With a fiery forehead, the user hurls itself at the foe. It lowers the user's Defense, Sp. Def, and Speed. #------------------------------- @@ -2059,7 +2059,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The target is razed by a fiery explosion. The user must rest on the next turn, however. #------------------------------- @@ -2071,7 +2071,7 @@ BaseDamage = 150 Accuracy = 100 TotalPP = 5 Target = AllNearFoes -FunctionCode = 08B +FunctionCode = PowerHigherWithUserHP Flags = CanProtect,CanMirrorMove Description = The user attacks in an explosive fury. The lower the user's HP, the less powerful this attack becomes. #------------------------------- @@ -2083,7 +2083,7 @@ BaseDamage = 150 Accuracy = 100 TotalPP = 5 Target = AllNearOthers -FunctionCode = 170 +FunctionCode = UserLosesHalfOfTotalHPExplosive Flags = CanProtect,CanMirrorMove Description = The user attacks everything by causing its own head to explode. This also damages the user. #------------------------------- @@ -2096,7 +2096,7 @@ Accuracy = 100 TotalPP = 5 Target = AllNearFoes Priority = -3 -FunctionCode = 171 +FunctionCode = UsedAfterUserTakesPhysicalDamage Flags = CanProtect Description = The user sets a shell trap. If it is hit by a physical move, the trap explodes and hurt the attacker. #------------------------------- @@ -2108,7 +2108,7 @@ BaseDamage = 130 Accuracy = 85 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The user attacks by engulfing the foe in a beautiful, yet intense, blue flame. It may also burn the foe. @@ -2121,7 +2121,7 @@ BaseDamage = 130 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 162 +FunctionCode = UserLosesFireType Flags = CanProtect,CanMirrorMove,ThawsUser Description = To inflict massive damage, the user burns itself out. The user will no longer be Fire type. #------------------------------- @@ -2133,7 +2133,7 @@ BaseDamage = 130 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 03F +FunctionCode = LowerUserSpAtk2 Flags = CanProtect,CanMirrorMove Description = The user attacks the target at full power. The attack's recoil sharply reduces the user's Sp. Atk stat. #------------------------------- @@ -2145,7 +2145,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FE +FunctionCode = RecoilThirdOfDamageDealtBurnTarget Flags = Contact,CanProtect,CanMirrorMove,ThawsUser EffectChance = 10 Description = The user cloaks itself in fire and charges at the foe. The user also takes damage and may burn the target. @@ -2158,7 +2158,7 @@ BaseDamage = 110 Accuracy = 85 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The foe is attacked with an intense blast of all-consuming fire. It may also leave the target with a burn. @@ -2171,7 +2171,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 07A +FunctionCode = DoublePowerAfterFusionBolt Flags = CanProtect,CanMirrorMove,ThawsUser Description = The user brings down a giant flame. It does more damage if influenced by an enormous thunderbolt. #------------------------------- @@ -2183,7 +2183,7 @@ BaseDamage = 100 Accuracy = 50 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks by engulfing the target in an intense fire. It leaves the target with a burn. @@ -2196,7 +2196,7 @@ BaseDamage = 100 Accuracy = 75 TotalPP = 5 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = CanProtect,CanMirrorMove Description = The target becomes trapped within a maelstrom of fire that rages for four to five turns. #------------------------------- @@ -2208,7 +2208,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove,ThawsUser EffectChance = 50 Description = The target is razed with a mystical fire of great intensity. It may also leave the target with a burn. @@ -2221,7 +2221,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = AllNearOthers -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 30 Description = An inferno of scarlet flames torches everything around the user. It may leave the foe with a burn. @@ -2234,7 +2234,7 @@ BaseDamage = 95 Accuracy = 90 TotalPP = 10 Target = AllNearFoes -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks by exhaling hot breath on the opposing team. It may also leave targets with a burn. @@ -2247,7 +2247,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is scorched with an intense blast of fire. It may also leave the target with a burn. @@ -2260,7 +2260,7 @@ BaseDamage = 85 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate EffectChance = 10 Description = The user launches a kick with a high critical-hit ratio. It may also leave the target with a burn. @@ -2273,7 +2273,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 020 +FunctionCode = RaiseUserSpAtk1 Flags = CanProtect,CanMirrorMove,Dance EffectChance = 50 Description = Cloaked in flames, the user dances and flaps its wings. It may also raise the user's Sp. Atk stat. @@ -2286,7 +2286,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user strikes the target with a burning lash. This also lowers the target's Defense stat. @@ -2299,7 +2299,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 107 +FunctionCode = FirePledge Flags = CanProtect,CanMirrorMove Description = A column of fire hits opposing Pokémon. When used with its Grass equivalent, it makes a sea of fire. #------------------------------- @@ -2311,7 +2311,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = AllNearOthers -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = An inferno of scarlet flames torches everything around the user. It may leave targets with a burn. @@ -2324,7 +2324,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 10 Description = The target is punched with a fiery fist. It may leave the target with a burn. @@ -2337,7 +2337,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks by breathing a special, hot fire. This also lowers the target's Sp. Atk stat. @@ -2350,7 +2350,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 074 +FunctionCode = DamageTargetAlly Flags = CanProtect,CanMirrorMove Description = The user attacks the foe with a bursting flame. It also damages Pokémon next to the target. #------------------------------- @@ -2362,7 +2362,7 @@ BaseDamage = 65 Accuracy = 95 TotalPP = 15 Target = NearOther -FunctionCode = 00B +FunctionCode = BurnFlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 100 Description = The user bites with flame-cloaked fangs. It may also make the target flinch or leave it burned. @@ -2375,7 +2375,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = Contact,CanProtect,CanMirrorMove,ThawsUser EffectChance = 10 Description = The user cloaks itself in fire and charges at the target. It may also leave the target with a burn. @@ -2388,7 +2388,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 15 Target = AllNearFoes -FunctionCode = 0F5 +FunctionCode = DestroyTargetBerryOrGem Flags = CanProtect,CanMirrorMove Description = The user attacks the foe with fire. The target's held Berry becomes burnt up and unusable. #------------------------------- @@ -2400,7 +2400,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 01F +FunctionCode = RaiseUserSpeed1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user cloaks itself in flame and attacks. Building up more power, it raises the user's Speed stat. @@ -2413,7 +2413,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is attacked with small flames. It may also leave the target with a burn. @@ -2426,7 +2426,7 @@ BaseDamage = 35 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = CanProtect,CanMirrorMove Description = The target becomes trapped within a fierce vortex of fire that rages for four to five turns. #------------------------------- @@ -2438,7 +2438,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 09B +FunctionCode = PowerHigherWithUserHeavierThanTarget Flags = Contact,CanProtect,CanMirrorMove Description = The user slams the foe with its flaming body. The heavier the user is, the greater the damage. #------------------------------- @@ -2449,7 +2449,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = BothSides -FunctionCode = 0FF +FunctionCode = StartSunWeather Description = The user intensifies the sun for five turns, powering up Fire-type moves. #------------------------------- [WILLOWISP] @@ -2459,7 +2459,7 @@ Category = Status Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove Description = The user shoots a sinister, bluish-white flame at the target to inflict a burn. #------------------------------- @@ -2471,7 +2471,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = Other -FunctionCode = 0C7 +FunctionCode = TwoTurnAttackFlinchTarget Flags = CanProtect,CanMirrorMove,HighCriticalHitRate EffectChance = 30 Description = A second-turn attack move where critical hits land more easily. It may also make the target flinch. @@ -2484,7 +2484,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = Other -FunctionCode = 0FB +FunctionCode = RecoilThirdOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user tucks in its wings and charges from a low altitude. The user also takes serious damage. #------------------------------- @@ -2496,7 +2496,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 03C +FunctionCode = LowerUserDefSpDef1 Flags = Contact,CanProtect,CanMirrorMove Description = The user soars upward and drops at high speeds. Its Defense and Sp. Def stats are lowered. #------------------------------- @@ -2508,7 +2508,7 @@ BaseDamage = 110 Accuracy = 70 TotalPP = 10 Target = Other -FunctionCode = 015 +FunctionCode = ConfuseTargetAlwaysHitsInRainHitsTargetInSky Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user wraps its foe in a fierce wind that flies up into the sky. It may also confuse the foe. @@ -2521,7 +2521,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 5 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = A vortex of air is shot at the target to inflict damage. Critical hits land more easily. #------------------------------- @@ -2533,7 +2533,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 172 +FunctionCode = BurnAttackerBeforeUserActs Flags = CanProtect,Bomb Description = The user heats up its beak before attacking. Making contact in this time results in a burn. #------------------------------- @@ -2545,7 +2545,7 @@ BaseDamage = 90 Accuracy = 95 TotalPP = 15 Target = Other -FunctionCode = 0C9 +FunctionCode = TwoTurnAttackInvulnerableInSky Flags = Contact,CanProtect,CanMirrorMove Description = The user soars, then strikes on the second turn. It can also be used for flying to any familiar town. #------------------------------- @@ -2557,7 +2557,7 @@ BaseDamage = 85 Accuracy = 85 TotalPP = 5 Target = Other -FunctionCode = 0CC +FunctionCode = TwoTurnAttackInvulnerableInSkyParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user bounces up high, then drops on the foe on the second turn. It may also paralyze the foe. @@ -2570,7 +2570,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 20 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = A corkscrewing attack with the sharp beak acting as a drill. #------------------------------- @@ -2582,7 +2582,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = Other -FunctionCode = 14F +FunctionCode = HealUserByThreeQuartersOfDamageDone Flags = CanProtect,CanMirrorMove Description = The user absorbs its target's HP. The user's HP is restored by over half of the damage dealt. #------------------------------- @@ -2594,7 +2594,7 @@ BaseDamage = 75 Accuracy = 95 TotalPP = 15 Target = Other -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks with a blade of air that slices even the sky. It may also make the target flinch. @@ -2607,7 +2607,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = Other -FunctionCode = 014 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove,Sound EffectChance = 100 Description = The user attacks using a sound wave based on words it has learned. It may also confuse the target. @@ -2620,7 +2620,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = Other -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user confounds the foe with speed, then slashes. The attack lands without fail. #------------------------------- @@ -2632,7 +2632,7 @@ BaseDamage = 60 Accuracy = 95 TotalPP = 25 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user launches razor-like wind to slash the opposing team. Critical hits land more easily. #------------------------------- @@ -2644,7 +2644,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = Other -FunctionCode = 0F4 +FunctionCode = UserConsumeTargetBerry Flags = Contact,CanProtect,CanMirrorMove Description = The user pecks the target. If the target is holding a Berry, the user eats it and gains its effect. #------------------------------- @@ -2656,7 +2656,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 10 Target = Other -FunctionCode = 0CE +FunctionCode = TwoTurnAttackInvulnerableInSkyTargetCannotAct Flags = Contact,CanProtect,CanMirrorMove Description = The user takes the foe into the sky, then drops it on the next turn. The foe cannot attack while airborne. #------------------------------- @@ -2668,7 +2668,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 35 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is struck with large, imposing wings spread wide to inflict damage. #------------------------------- @@ -2680,7 +2680,7 @@ BaseDamage = 55 Accuracy = 100 TotalPP = 15 Target = Other -FunctionCode = 086 +FunctionCode = DoublePowerIfUserHasNoItem Flags = Contact,CanProtect,CanMirrorMove Description = The user nimbly strikes the foe. This attack does more damage if the user is not holding an item. #------------------------------- @@ -2692,7 +2692,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 35 Target = Other -FunctionCode = 077 +FunctionCode = DoublePowerIfTargetInSky Flags = CanProtect,CanMirrorMove Description = A gust of wind is whipped up by wings and launched at the target to inflict damage. #------------------------------- @@ -2704,7 +2704,7 @@ BaseDamage = 35 Accuracy = 100 TotalPP = 35 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is jabbed with a sharply pointed beak or horn. #------------------------------- @@ -2715,7 +2715,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 049 +FunctionCode = LowerTargetEvasion1RemoveSideEffects Flags = CanProtect,CanMirrorMove Description = A strong wind blows away the foe's obstacles such as Light Screen. It also lowers their evasion. #------------------------------- @@ -2726,7 +2726,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 04B +FunctionCode = LowerTargetAttack2 Flags = CanProtect,CanMirrorMove,Dance Description = The user covers the target's body with a mass of down that harshly lowers its Attack stat. #------------------------------- @@ -2737,7 +2737,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0AE +FunctionCode = UseLastMoveUsedByTarget Description = The user counters the target by mimicking the target's last move. #------------------------------- [ROOST] @@ -2747,7 +2747,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D6 +FunctionCode = HealUserHalfOfTotalHPLoseFlyingTypeThisTurn Description = The user lands and rests its body. It restores the user's HP by up to half of its max HP. #------------------------------- [TAILWIND] @@ -2757,7 +2757,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = UserSide -FunctionCode = 05B +FunctionCode = StartUserSideDoubleSpeed Description = The user whips up a turbulent whirlwind that ups the Speed of all party Pokémon for four turns. #------------------------------- [SHADOWFORCE] @@ -2768,7 +2768,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 0CD +FunctionCode = TwoTurnAttackInvulnerableRemoveProtections Flags = Contact,CanMirrorMove Description = The user disappears, then strikes the foe on the second turn. It hits even if the foe protects itself. #------------------------------- @@ -2780,7 +2780,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 163 +FunctionCode = IgnoreTargetAbility Flags = CanProtect,CanMirrorMove Description = The user emits a sinister ray. This move can be used on the target regardless of its Abilities. #------------------------------- @@ -2792,7 +2792,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 14D +FunctionCode = TwoTurnAttackInvulnerableRemoveProtections Flags = Contact,CanMirrorMove Description = The user vanishes somewhere, then strikes on the next turn. Hits through protections. #------------------------------- @@ -2804,7 +2804,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 15D +FunctionCode = UserStealTargetPositiveStatStages Flags = Contact,CanProtect,CanMirrorMove Description = The user hides in the target's shadow, steals the target's stat boosts, and then attacks. #------------------------------- @@ -2816,7 +2816,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The user beats the target with a bone containing a spirit. May lower the target's Defense stat. @@ -2829,7 +2829,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 20 Description = The user hurls a shadowy blob at the target. It may also lower the target's Sp. Def stat. @@ -2842,7 +2842,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks while also stitching the target's shadow to the ground to prevent it fleeing. @@ -2855,7 +2855,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user slashes with a sharp claw made from shadows. Critical hits land more easily. #------------------------------- @@ -2867,7 +2867,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 07F +FunctionCode = DoublePowerIfTargetStatusProblem Flags = CanProtect,CanMirrorMove Description = This relentless attack does massive damage to a target affected by status problems. #------------------------------- @@ -2879,7 +2879,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 02D +FunctionCode = RaiseUserMainStats1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user blasts the target with a gust of repulsive wind. It may also raise all the user's stats at once. @@ -2892,7 +2892,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user throws a punch from the shadows. The punch lands without fail. #------------------------------- @@ -2905,7 +2905,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user extends its shadow and attacks the target from behind. This move always goes first. #------------------------------- @@ -2917,7 +2917,7 @@ BaseDamage = 30 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks the target while shouting in a startling fashion. It may also make the target flinch. @@ -2930,7 +2930,7 @@ BaseDamage = 30 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is licked with a long tongue, causing damage. It may also leave the target with paralysis. @@ -2943,7 +2943,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 06D +FunctionCode = FixedDamageUserLevel Flags = CanProtect,CanMirrorMove Description = The user makes the foe see a frightening mirage. It inflicts damage matching the user's level. #------------------------------- @@ -2954,7 +2954,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove Description = The target is exposed to a sinister ray that triggers confusion. #------------------------------- @@ -2965,7 +2965,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 10D +FunctionCode = CurseTargetOrLowerUserSpd1RaiseUserAtkDef1 Description = A move that works differently for the Ghost type than for all the other types. #------------------------------- [DESTINYBOND] @@ -2975,7 +2975,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0E7 +FunctionCode = AttackerFaintsIfUserFaints Description = When this move is used, if the user faints, the foe that landed the knockout hit also faints. #------------------------------- [GRUDGE] @@ -2985,7 +2985,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0E6 +FunctionCode = SetAttackerMovePPTo0IfUserFaints Description = If the user faints, the user's grudge fully depletes the PP of the foe's move that knocked it out. #------------------------------- [NIGHTMARE] @@ -2995,7 +2995,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 10F +FunctionCode = StartDamageTargetEachTurnIfTargetAsleep Flags = CanProtect,CanMirrorMove Description = A sleeping target sees a nightmare that inflicts some damage every turn. #------------------------------- @@ -3006,7 +3006,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 10E +FunctionCode = LowerPPOfTargetLastMoveBy4 Flags = CanProtect,CanMirrorMove Description = The user unleashes its grudge on the move last used by the target by cutting 4 PP from it. #------------------------------- @@ -3017,7 +3017,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 142 +FunctionCode = AddGhostTypeToTarget Flags = CanProtect,CanMirrorMove Description = The user takes the target trick-or-treating. This adds Ghost type to the target's type. #------------------------------- @@ -3029,7 +3029,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The user slams the target with an enormous tree. The user can't move on the next turn. #------------------------------- @@ -3041,7 +3041,7 @@ BaseDamage = 130 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 03F +FunctionCode = LowerUserSpAtk2 Flags = CanProtect,CanMirrorMove Description = A storm of sharp is whipped up. The attack's recoil harshly reduces the user's Sp. Atk stat. #------------------------------- @@ -3053,7 +3053,7 @@ BaseDamage = 125 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0C4 +FunctionCode = TwoTurnAttackOneTurnInSun Flags = Contact,CanProtect,CanMirrorMove Description = The user gathers light energy into a blade, attacking the target on the next turn. #------------------------------- @@ -3065,7 +3065,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = RandomNearFoe -FunctionCode = 0D2 +FunctionCode = MultiTurnAttackConfuseUserAtEnd Flags = Contact,CanProtect,CanMirrorMove,Dance Description = The user attacks by scattering petals for two to three turns. The user then becomes confused. #------------------------------- @@ -3077,7 +3077,7 @@ BaseDamage = 120 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user violently whirls its vines or tentacles to harshly lash the target. #------------------------------- @@ -3089,7 +3089,7 @@ BaseDamage = 120 Accuracy = 85 TotalPP = 5 Target = NearOther -FunctionCode = 04F +FunctionCode = LowerTargetSpDef2 Flags = CanProtect,CanMirrorMove EffectChance = 40 Description = The user generates a shock wave from within its body. It may harshly lower the target's Sp. Def. @@ -3102,7 +3102,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0C4 +FunctionCode = TwoTurnAttackOneTurnInSun Flags = CanProtect,CanMirrorMove Description = A two-turn attack. The user gathers light, then blasts a bundled beam on the second turn. #------------------------------- @@ -3114,7 +3114,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FB +FunctionCode = RecoilThirdOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user slams its rugged body into the target to attack. The user also sustains serious damage. #------------------------------- @@ -3126,7 +3126,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 10 Description = The user draws power from nature and fires it at the target. It may also lower the target's Sp. Def. @@ -3139,7 +3139,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user handles a sharp leaf like a sword and attacks by slashing. It has a high critical-hit ratio. #------------------------------- @@ -3151,7 +3151,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = AllNearOthers -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user stirs up a violent petal blizzard and attacks everything around it. #------------------------------- @@ -3163,7 +3163,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 106 +FunctionCode = GrassPledge Flags = CanProtect,CanMirrorMove Description = A column of grass hits the foes. When used with its water equivalent, it creates a vast swamp. #------------------------------- @@ -3175,7 +3175,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Bomb Description = The user slams a barrage of hard-shelled seeds down on the target from above. #------------------------------- @@ -3187,7 +3187,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = CanProtect,CanMirrorMove Description = A nutrient-draining attack. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -3199,7 +3199,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = Contact,CanProtect,CanMirrorMove Description = The user drains the foe's energy with its horns. The user's HP is restored by half the damage inflicted. #------------------------------- @@ -3211,7 +3211,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user lands an intense tropical kick on the target. This also lowers the target's Attack stat. @@ -3224,7 +3224,7 @@ BaseDamage = 65 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 50 Description = The user attacks its foe by encircling it in sharp leaves. This attack may also lower the foe's accuracy. @@ -3237,7 +3237,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user scatters curious leaves that chase the target. This attack will not miss. #------------------------------- @@ -3249,7 +3249,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks by wildly swinging its thorny arms. It may also make the target flinch. @@ -3262,7 +3262,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 25 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = Sharp-edged leaves are launched to slash at the opposing team. Critical hits land more easily. #------------------------------- @@ -3274,7 +3274,7 @@ BaseDamage = 45 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is struck with slender, whiplike vines to inflict damage. #------------------------------- @@ -3286,7 +3286,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 40 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user attacks by pelting the target with leaves. #------------------------------- @@ -3298,7 +3298,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = CanProtect,CanMirrorMove Description = A nutrient-draining attack. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -3310,7 +3310,7 @@ BaseDamage = 25 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove,Bomb Description = The user forcefully shoots seeds at the target. Two to five seeds are shot in rapid succession. #------------------------------- @@ -3322,7 +3322,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = CanProtect,CanMirrorMove Description = A nutrient-draining attack. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -3334,7 +3334,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 09A +FunctionCode = PowerHigherWithTargetWeight Flags = Contact,CanProtect,CanMirrorMove Description = The user snares the target with grass and trips it. The heavier the target, the greater the damage. #------------------------------- @@ -3345,7 +3345,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = UserAndAllies -FunctionCode = 019 +FunctionCode = CureUserPartyStatus Description = The user releases a soothing scent that heals all status problems affecting the user's party. #------------------------------- [COTTONGUARD] @@ -3355,7 +3355,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 038 +FunctionCode = RaiseUserDefense3 Description = The user protects itself by wrapping its body in soft cotton, drastically raising its Defense stat. #------------------------------- [COTTONSPORE] @@ -3365,7 +3365,7 @@ Category = Status Accuracy = 100 TotalPP = 40 Target = AllNearFoes -FunctionCode = 04D +FunctionCode = LowerTargetSpeed2 Flags = CanProtect,CanMirrorMove,Powder Description = The user releases cotton-like spores that cling to the foe, harshly reducing its Speed stat. #------------------------------- @@ -3376,7 +3376,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 143 +FunctionCode = AddGrassTypeToTarget Flags = CanProtect,CanMirrorMove Description = The user puts a forest curse on the target. The target is now Grass type as well. #------------------------------- @@ -3387,7 +3387,7 @@ Category = Status Accuracy = 55 TotalPP = 15 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove,Sound Description = The user plays a pleasant melody that lulls the target into a deep sleep. #------------------------------- @@ -3398,7 +3398,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 155 +FunctionCode = StartGrassyTerrain Description = The user turns the ground to grass for five turns. Grounded Pokémon restore a little HP every turn. #------------------------------- [INGRAIN] @@ -3408,7 +3408,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 0DB +FunctionCode = StartHealUserEachTurnTrapUserInBattle Description = The user lays roots that restore its HP on every turn. Because it is rooted, it can't switch out. #------------------------------- [LEECHSEED] @@ -3418,7 +3418,7 @@ Category = Status Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0DC +FunctionCode = StartLeechSeedTarget Flags = CanProtect,CanMirrorMove Description = A seed is planted on the target. It steals some HP from the target every turn. #------------------------------- @@ -3429,7 +3429,7 @@ Category = Status Accuracy = 75 TotalPP = 15 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove,Powder Description = The user scatters a big cloud of sleep-inducing dust around the target. #------------------------------- @@ -3441,7 +3441,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 14C +FunctionCode = ProtectUserFromTargetingMovesSpikyShield Description = Protects the user from attacks. Also damages attackers that make contact with the user. #------------------------------- [SPORE] @@ -3451,7 +3451,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove,Powder Description = The user scatters bursts of spores that induce sleep. #------------------------------- @@ -3462,7 +3462,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 160 +FunctionCode = HealUserByTargetAttackLowerTargetAttack1 Flags = CanProtect,CanMirrorMove Description = The user restores its HP by the target's Attack stat amount. Then lowers the target's Attack stat. #------------------------------- @@ -3473,7 +3473,7 @@ Category = Status Accuracy = 75 TotalPP = 30 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove,Powder Description = The user scatters a cloud of paralyzing powder. It may leave the target with paralysis. #------------------------------- @@ -3484,7 +3484,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0D8 +FunctionCode = HealUserDependingOnWeather Description = The user restores its own HP. The amount of HP regained varies with the weather. #------------------------------- [WORRYSEED] @@ -3494,7 +3494,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 064 +FunctionCode = SetTargetAbilityToInsomnia Flags = CanProtect,CanMirrorMove Description = A seed that causes worry is planted on the foe. It prevents sleep by making its Ability Insomnia. #------------------------------- @@ -3506,7 +3506,7 @@ BaseDamage = 120 Accuracy = 85 TotalPP = 10 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user attacks its foes by manifesting the power of the land in fearsome blades of stone. #------------------------------- @@ -3518,7 +3518,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 10 Target = AllNearOthers -FunctionCode = 076 +FunctionCode = DoublePowerIfTargetUnderground Flags = CanProtect,CanMirrorMove Description = The user sets off an earthquake that strikes every Pokémon around it. #------------------------------- @@ -3530,7 +3530,7 @@ BaseDamage = 95 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user fiercely attacks the target using its entire body. #------------------------------- @@ -3542,7 +3542,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user makes the ground under the foe erupt with power. It may also lower the target's Sp. Def. @@ -3555,7 +3555,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user gathers the energy of the land and focuses that power on foes to damage them. #------------------------------- @@ -3567,7 +3567,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 11C +FunctionCode = HitsTargetInSkyGroundsTarget Flags = CanProtect,CanMirrorMove Description = This move also hits Pokémon that are in the air. Those Pokémon are knocked down to the ground. #------------------------------- @@ -3579,7 +3579,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = CanProtect,CanMirrorMove Description = The user attacks with a wave that crawls along the ground. Those it hits can't flee from battle. #------------------------------- @@ -3591,7 +3591,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0CA +FunctionCode = TwoTurnAttackInvulnerableUnderground Flags = Contact,CanProtect,CanMirrorMove Description = The user burrows, then attacks on the second turn. It can also be used to exit dungeons. #------------------------------- @@ -3603,7 +3603,7 @@ BaseDamage = 80 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user crashes into its target while rotating its body like a drill. Critical hits land more easily. #------------------------------- @@ -3615,7 +3615,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 166 +FunctionCode = DoublePowerIfUserLastMoveFailed Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks driven by frustration. Power increases if the user's previous move failed. #------------------------------- @@ -3627,7 +3627,7 @@ BaseDamage = 65 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user clubs the target with a bone. It may also make the target flinch. @@ -3640,7 +3640,7 @@ BaseDamage = 65 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 30 Description = The user launches a hard-packed mud ball to attack. It may also lower the target's accuracy. @@ -3653,7 +3653,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = AllNearOthers -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1WeakerInGrassyTerrain Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user strikes everything around it by stomping on the ground. It reduces hit Pokémon's Speed. @@ -3666,7 +3666,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 15 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks by hurling a blob of mud at the target. It also reduces the target's Speed. @@ -3679,7 +3679,7 @@ BaseDamage = 50 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = CanProtect,CanMirrorMove Description = The user throws the bone it holds. The bone loops to hit the target twice, coming and going. #------------------------------- @@ -3691,7 +3691,7 @@ BaseDamage = 35 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = CanProtect,CanMirrorMove Description = The user traps the target inside a harshly raging sandstorm for four to five turns. #------------------------------- @@ -3703,7 +3703,7 @@ BaseDamage = 25 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove Description = The user strikes the target with a hard bone two to five times in a row. #------------------------------- @@ -3715,7 +3715,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user hurls mud in the target's face to inflict damage and lower its accuracy. @@ -3728,7 +3728,7 @@ BaseDamage = 1 Accuracy = 30 TotalPP = 5 Target = NearOther -FunctionCode = 070 +FunctionCode = OHKOHitsTargetUnderground Flags = CanProtect,CanMirrorMove Description = The user opens up a fissure in the ground and drops the foe in. The target instantly faints if it hits. #------------------------------- @@ -3740,7 +3740,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 30 Target = AllNearOthers -FunctionCode = 095 +FunctionCode = RandomPowerDoublePowerIfTargetUnderground Flags = CanProtect,CanMirrorMove Description = The user looses a ground-shaking quake affecting everyone around the user. Its power varies. #------------------------------- @@ -3751,7 +3751,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = BothSides -FunctionCode = 09D +FunctionCode = StartWeakenElectricMoves Description = The user covers itself with mud. It weakens Electric-type moves while the user is in the battle. #------------------------------- [ROTOTILLER] @@ -3761,7 +3761,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = AllBattlers -FunctionCode = 13E +FunctionCode = RaiseGroundedGrassBattlersAtkSpAtk1 Description = The user tills the soil to encourage plant growth. This raises the Attack and Sp. Atk of Grass types. #------------------------------- [SANDATTACK] @@ -3771,7 +3771,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove Description = Sand is hurled in the target's face, reducing its accuracy. #------------------------------- @@ -3782,7 +3782,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 16D +FunctionCode = HealUserDependingOnSandstorm Description = The user regains up to half of its max HP. It restores more HP in a sandstorm. #------------------------------- [SPIKES] @@ -3792,7 +3792,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = FoeSide -FunctionCode = 103 +FunctionCode = AddSpikesToFoeSide Description = The user lays a trap of spikes at the foe's feet. The trap hurts foes that switch into battle. #------------------------------- [FREEZESHOCK] @@ -3803,7 +3803,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C5 +FunctionCode = TwoTurnAttackParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = On the second turn, the user hits the foe with electrically charged ice. It may also paralyze the foe. @@ -3816,7 +3816,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C6 +FunctionCode = TwoTurnAttackBurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = On the second turn, an ultracold, freezing wind surrounds the foe. This may leave it with a burn. @@ -3829,7 +3829,7 @@ BaseDamage = 110 Accuracy = 70 TotalPP = 5 Target = AllNearFoes -FunctionCode = 00D +FunctionCode = FreezeTargetAlwaysHitsInHail Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A howling blizzard is summoned to strike the opposing team. It may also freeze them solid. @@ -3842,7 +3842,7 @@ BaseDamage = 100 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 03E +FunctionCode = LowerUserSpeed1 Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user swings and hits with its strong, heavy fist. It lowers the user's Speed, however. #------------------------------- @@ -3854,7 +3854,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 00C +FunctionCode = FreezeTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is struck with an icy-cold beam of energy. It may also freeze the target solid. @@ -3867,7 +3867,7 @@ BaseDamage = 85 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks by harshly dropping an icicle onto the foe. It may also make the target flinch. @@ -3880,7 +3880,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00C +FunctionCode = FreezeTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 10 Description = The target is punched with an icy fist. It may also leave the target frozen. @@ -3893,7 +3893,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 135 +FunctionCode = FreezeTargetSuperEffectiveAgainstWater Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user rapidly cools the target. This may freeze the target. Is super-effective on Water types. @@ -3906,7 +3906,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is hit with a rainbow-colored beam. This may also lower the target's Attack stat. @@ -3919,7 +3919,7 @@ BaseDamage = 65 Accuracy = 95 TotalPP = 10 Target = AllNearFoes -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks by blowing freezing cold air at the foe. This attack reduces the targets' Speed stat. @@ -3932,7 +3932,7 @@ BaseDamage = 65 Accuracy = 95 TotalPP = 15 Target = NearOther -FunctionCode = 00E +FunctionCode = FreezeFlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 100 Description = The user bites with cold-infused fangs. It may also make the target flinch or leave it frozen. @@ -3946,7 +3946,7 @@ Accuracy = 100 TotalPP = 10 Target = NearOther Priority = -4 -FunctionCode = 081 +FunctionCode = DoublePowerIfUserLostHPThisTurn Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that inflicts double the damage if the user has been hurt by the foe in the same turn. #------------------------------- @@ -3958,7 +3958,7 @@ BaseDamage = 60 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0A0 +FunctionCode = AlwaysCriticalHit Flags = CanProtect,CanMirrorMove Description = The user blows a cold breath on the target. This attack always results in a critical hit. #------------------------------- @@ -3970,7 +3970,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 15 Target = AllNearFoes -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks with a gust of chilled air. It also lowers the targets' Speed stat. @@ -3984,7 +3984,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user flash freezes chunks of ice and hurls them at the target. This move always goes first. #------------------------------- @@ -3996,7 +3996,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 25 Target = AllNearFoes -FunctionCode = 00C +FunctionCode = FreezeTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks with a chilling gust of powdery snow. It may also freeze the targets. @@ -4009,7 +4009,7 @@ BaseDamage = 30 Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 0D3 +FunctionCode = MultiTurnAttackPowersUpEachTurn Flags = Contact,CanProtect,CanMirrorMove,Bomb Description = The user continually rolls into the target over five turns. It becomes stronger each time it hits. #------------------------------- @@ -4021,7 +4021,7 @@ BaseDamage = 25 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove Description = The user launches sharp icicles at the target. It strikes two to five times in a row. #------------------------------- @@ -4033,7 +4033,7 @@ BaseDamage = 1 Accuracy = 30 TotalPP = 5 Target = NearOther -FunctionCode = 070 +FunctionCode = OHKOIce Flags = CanProtect,CanMirrorMove Description = The foe is attacked with a blast of absolute-zero cold. The target instantly faints if it hits. #------------------------------- @@ -4044,7 +4044,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = UserSide -FunctionCode = 167 +FunctionCode = StartWeakenDamageAgainstUserSideIfHail Description = This move reduces damage from attacks for five turns. This can be used only in a hailstorm. #------------------------------- [HAIL] @@ -4054,7 +4054,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 102 +FunctionCode = StartHailWeather Description = The user summons a hail storm lasting five turns. It damages all Pokémon except the Ice type. #------------------------------- [HAZE] @@ -4064,7 +4064,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = BothSides -FunctionCode = 051 +FunctionCode = ResetAllBattlersStatStages Description = The user creates a haze that eliminates every stat change among all the Pokémon engaged in battle. #------------------------------- [MIST] @@ -4074,7 +4074,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserSide -FunctionCode = 056 +FunctionCode = StartUserSideImmunityToStatStageLowering Description = The user cloaks its body with a white mist that prevents any of its stats from being cut for five turns. #------------------------------- [EXPLOSION] @@ -4085,7 +4085,7 @@ BaseDamage = 250 Accuracy = 100 TotalPP = 5 Target = AllNearOthers -FunctionCode = 0E0 +FunctionCode = UserFaintsExplosive Flags = CanProtect,CanMirrorMove Description = The user explodes to inflict damage on those around it. The user faints upon using this move. #------------------------------- @@ -4097,7 +4097,7 @@ BaseDamage = 200 Accuracy = 100 TotalPP = 5 Target = AllNearOthers -FunctionCode = 0E0 +FunctionCode = UserFaintsExplosive Flags = CanProtect,CanMirrorMove Description = The user blows up to inflict damage on all Pokémon in battle. The user faints upon using this move. #------------------------------- @@ -4109,7 +4109,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = Contact,CanProtect,CanMirrorMove Description = The user charges at the target using every bit of its power. The user must rest on the next turn. #------------------------------- @@ -4121,7 +4121,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The foe is attacked with a powerful beam. The user must rest on the next turn to regain its energy. #------------------------------- @@ -4133,7 +4133,7 @@ BaseDamage = 140 Accuracy = 100 TotalPP = 10 Target = AllNearOthers -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Sound Description = The user attacks everything around it with the destructive power of a terrible, explosive sound. #------------------------------- @@ -4145,7 +4145,7 @@ BaseDamage = 140 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 125 +FunctionCode = FailsIfUserHasUnusedMove Flags = Contact,CanProtect,CanMirrorMove Description = This move can be used only after the user has used all the other moves it knows in the battle. #------------------------------- @@ -4157,7 +4157,7 @@ BaseDamage = 130 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0C8 +FunctionCode = TwoTurnAttackChargeRaiseUserDefense1 Flags = Contact,CanProtect,CanMirrorMove Description = The user tucks in its head to raise its Defense in the first turn, then rams the foe on the next turn. #------------------------------- @@ -4169,7 +4169,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FB +FunctionCode = RecoilThirdOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = A reckless, life-risking tackle. It also damages the user by a fairly large amount, however. #------------------------------- @@ -4181,7 +4181,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FA +FunctionCode = RecoilQuarterOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user charges its head into the foe, using its powerful guard hair. The user also takes damage. #------------------------------- @@ -4193,7 +4193,7 @@ BaseDamage = 120 Accuracy = 75 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is attacked by a kick launched with muscle-packed power. #------------------------------- @@ -4205,7 +4205,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 09F +FunctionCode = TypeDependsOnUserDrive Flags = CanProtect,CanMirrorMove Description = The user fires a beam of light at its target. The type changes depending on the Drive the user holds. #------------------------------- @@ -4217,7 +4217,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = RandomNearFoe -FunctionCode = 0D2 +FunctionCode = MultiTurnAttackConfuseUserAtEnd Flags = Contact,CanProtect,CanMirrorMove Description = The user rampages and attacks for two to three turns. It then becomes confused, however. #------------------------------- @@ -4229,7 +4229,7 @@ BaseDamage = 100 Accuracy = 75 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Bomb Description = A large egg is hurled at the target with maximum force to inflict damage. #------------------------------- @@ -4241,7 +4241,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 09F +FunctionCode = TypeDependsOnUserPlate Flags = CanProtect,CanMirrorMove Description = The user releases countless shots of light. Its type varies with the kind of Plate the user is holding. #------------------------------- @@ -4253,7 +4253,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Sound Description = The user lets loose a horribly echoing shout with the power to inflict damage. #------------------------------- @@ -4265,7 +4265,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 09F +FunctionCode = TypeDependsOnUserMemory Flags = Contact,CanProtect,CanMirrorMove Description = Cloaking itself in high energy, the user slams into the target. This move's type depends on the held memory. #------------------------------- @@ -4277,7 +4277,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 169 +FunctionCode = TypeIsUserFirstType Flags = CanProtect,CanMirrorMove,Dance Description = The user attacks the target by dancing very hard. The user's type determines the type of this move. #------------------------------- @@ -4289,7 +4289,7 @@ BaseDamage = 90 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user attacks the target by smashing into it with incredible force. It may also confuse the target. @@ -4302,7 +4302,7 @@ BaseDamage = 90 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 0FA +FunctionCode = RecoilQuarterOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = A reckless, full-body charge attack for slamming into the foe. It also damages the user a little. #------------------------------- @@ -4314,7 +4314,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = RandomNearFoe -FunctionCode = 0D1 +FunctionCode = MultiTurnAttackPreventSleeping Flags = CanProtect,CanMirrorMove,Sound Description = The user attacks in an uproar for three turns. Over that time, no one can fall asleep. #------------------------------- @@ -4326,7 +4326,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTargetTrampleMinimize Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user drops onto the target with its full body weight. It may leave the target with paralysis. @@ -4340,7 +4340,7 @@ Accuracy = 100 TotalPP = 5 Target = NearOther Priority = 2 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user charges the target at blinding speed. This attack always goes before any other move. #------------------------------- @@ -4352,7 +4352,7 @@ BaseDamage = 80 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 10 Description = The user bites hard on the target with its sharp front fangs. It may also make the target flinch. @@ -4365,7 +4365,7 @@ BaseDamage = 80 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The target is slugged by a punch thrown with muscle-packed power. #------------------------------- @@ -4377,7 +4377,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 0C3 +FunctionCode = TwoTurnAttack Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = A two-turn attack. Blades of wind hit the foe on the second turn. Critical hits land more easily. #------------------------------- @@ -4389,7 +4389,7 @@ BaseDamage = 80 Accuracy = 75 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is slammed with a long tail, vines, etc., to inflict damage. #------------------------------- @@ -4401,7 +4401,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is slugged with a punch thrown at maximum power. It can also be used to move heavy boulders. #------------------------------- @@ -4413,7 +4413,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 017 +FunctionCode = ParalyzeBurnOrFreezeTarget Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The user strikes with a simultaneous three-beam attack. May also paralyze, burn, or freeze the target. @@ -4426,7 +4426,7 @@ BaseDamage = 75 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 50 Description = The user slashes the target with hard and sharp claws. It may also lower the target's Defense. @@ -4439,7 +4439,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 003 +FunctionCode = SleepTargetChangeUserMeloettaForm Flags = CanProtect,CanMirrorMove,Sound EffectChance = 10 Description = An ancient song appeals to the hearts of those listening. It may also induce sleep. @@ -4452,7 +4452,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0A9 +FunctionCode = IgnoreTargetDefSpDefEvaStatStages Flags = Contact,CanProtect,CanMirrorMove Description = Seeking an opening, the user strikes continually. The foe's stat changes don't affect the damage. #------------------------------- @@ -4464,7 +4464,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 20 Description = The target is hit with rhythmically launched punches that may also leave it confused. @@ -4477,7 +4477,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 07E +FunctionCode = DoublePowerIfUserPoisonedBurnedParalyzed Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that doubles its power if the user is poisoned, burned, or has paralysis. #------------------------------- @@ -4489,7 +4489,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user sticks out its head and attacks by charging into the foe. It may also make the target flinch. @@ -4502,7 +4502,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 085 +FunctionCode = DoublePowerIfAllyFaintedLastTurn Flags = Contact,CanProtect,CanMirrorMove Description = Gets revenge for a fainted ally. If an ally fainted in the last turn, this attack's damage increases. #------------------------------- @@ -4514,7 +4514,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0A4 +FunctionCode = EffectDependsOnEnvironment Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks with a secret power. Its added effects vary depending on the user's environment. @@ -4527,7 +4527,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The target is attacked with a slash of claws or blades. Critical hits land more easily. #------------------------------- @@ -4539,7 +4539,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 07C +FunctionCode = DoublePowerIfTargetParalyzedCureTarget Flags = Contact,CanProtect,CanMirrorMove Description = This attack inflicts double damage on a paralyzed foe. It also cures the target's paralysis, however. #------------------------------- @@ -4551,7 +4551,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is jabbed with a sharply pointed horn to inflict damage. #------------------------------- @@ -4563,7 +4563,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 010 +FunctionCode = FlinchTargetTrampleMinimize Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is stomped with a big foot. It may also make the target flinch. @@ -4576,7 +4576,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 0F1 +FunctionCode = UserTakesTargetItem Flags = Contact,CanProtect,CanMirrorMove Description = The user endearingly approaches the target, then steals the target's held item. #------------------------------- @@ -4588,7 +4588,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 090 +FunctionCode = TypeDependsOnUserIVs Flags = CanProtect,CanMirrorMove Description = A unique attack that varies in type and intensity depending on the Pokémon using it. #------------------------------- @@ -4600,7 +4600,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 083 +FunctionCode = UsedAfterAllyRoundWithDoublePower Flags = CanProtect,CanMirrorMove,Sound Description = The user attacks with a song. Others can join in the Round and make the attack do greater damage. #------------------------------- @@ -4612,7 +4612,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = AllNearFoes -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = Star-shaped rays are shot at the opposing team. This attack never misses. #------------------------------- @@ -4624,7 +4624,7 @@ BaseDamage = 55 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is gripped and squeezed from both sides to inflict damage. #------------------------------- @@ -4636,7 +4636,7 @@ BaseDamage = 50 Accuracy = 95 TotalPP = 30 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is cut with a scythe or a claw. It can also be used to cut down thin trees. #------------------------------- @@ -4648,7 +4648,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 011 +FunctionCode = FlinchTargetFailsIfUserNotAsleep Flags = CanProtect,CanMirrorMove,Sound EffectChance = 30 Description = An attack that can be used only if the user is asleep. The harsh noise may also make the target flinch. @@ -4661,7 +4661,7 @@ BaseDamage = 50 Accuracy = 0 TotalPP = 1 Target = RandomNearFoe -FunctionCode = 002 +FunctionCode = Struggle Flags = Contact,CanProtect Description = An attack that is used in desperation only if the user has no PP. It also hurts the user slightly. #------------------------------- @@ -4673,7 +4673,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 087 +FunctionCode = TypeAndPowerDependOnWeather Flags = CanProtect,CanMirrorMove,Bomb Description = An attack move that varies in power and type depending on the weather. #------------------------------- @@ -4685,7 +4685,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 092 +FunctionCode = PowerHigherWithConsecutiveUseOnUserSide Flags = CanProtect,CanMirrorMove,Sound Description = The user attacks the foe with an echoing voice. If this move is used every turn, it does greater damage. #------------------------------- @@ -4698,7 +4698,7 @@ Accuracy = 100 TotalPP = 10 Target = NearOther Priority = 3 -FunctionCode = 012 +FunctionCode = FlinchTargetFailsIfNotUserFirstTurn Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = An attack that hits first and makes the target flinch. It only works the first turn the user is in battle. @@ -4711,7 +4711,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 40 Target = NearOther -FunctionCode = 0E9 +FunctionCode = CannotMakeTargetFaint Flags = Contact,CanProtect,CanMirrorMove Description = A restrained attack that prevents the target from fainting. The target is left with at least 1 HP. #------------------------------- @@ -4723,7 +4723,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 40 Target = NearOther -FunctionCode = 0E9 +FunctionCode = CannotMakeTargetFaint Flags = Contact,CanProtect,CanMirrorMove Description = The user holds back when it attacks, and the target is left with at least 1 HP. #------------------------------- @@ -4735,7 +4735,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 109 +FunctionCode = AddMoneyGainedFromBattle Flags = CanProtect,CanMirrorMove Description = Numerous coins are hurled at the target to inflict damage. Money is earned after battle. #------------------------------- @@ -4747,7 +4747,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is physically pounded with a long tail or a foreleg, etc. #------------------------------- @@ -4760,7 +4760,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user lunges at the target at a speed that makes it almost invisible. It is sure to strike first. #------------------------------- @@ -4772,7 +4772,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = Hard, pointed, and sharp claws rake the target to inflict damage. #------------------------------- @@ -4784,7 +4784,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = A physical attack in which the user charges and slams into the target with its whole body. #------------------------------- @@ -4796,7 +4796,7 @@ BaseDamage = 35 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user slams the target with a long tail, vines, or tentacle. The target is hit twice in a row. #------------------------------- @@ -4809,7 +4809,7 @@ Accuracy = 100 TotalPP = 10 Target = NearOther Priority = 2 -FunctionCode = 0AD +FunctionCode = RemoveProtections Flags = CanMirrorMove Description = An attack that hits a target using Protect or Detect. It also lifts the effects of those moves. #------------------------------- @@ -4821,7 +4821,7 @@ BaseDamage = 25 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks by striking the target with its hard tail. It hits the Pokémon two to five times in a row. #------------------------------- @@ -4833,7 +4833,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 093 +FunctionCode = StartRaiseUserAtk1WhenDamaged Flags = Contact,CanProtect,CanMirrorMove Description = As long as this move is in use, the user's Attack rises each time the user is hit in battle. #------------------------------- @@ -4845,7 +4845,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 40 Target = NearOther -FunctionCode = 110 +FunctionCode = RemoveUserBindingAndEntryHazards Flags = Contact,CanProtect,CanMirrorMove Description = A spin attack that can also eliminate such moves as Bind, Wrap, Leech Seed, and Spikes. #------------------------------- @@ -4857,7 +4857,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove Description = Sharp spikes are shot at the target in rapid succession. They hit two to five times in a row. #------------------------------- @@ -4869,7 +4869,7 @@ BaseDamage = 18 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The target is hit with a flurry of punches that strike two to five times in a row. #------------------------------- @@ -4881,7 +4881,7 @@ BaseDamage = 18 Accuracy = 80 TotalPP = 15 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The target is raked with sharp claws or scythes for two to five times in quick succession. #------------------------------- @@ -4893,7 +4893,7 @@ BaseDamage = 15 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove,Bomb Description = Round objects are hurled at the target to strike two to five times in a row. #------------------------------- @@ -4905,7 +4905,7 @@ BaseDamage = 15 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = Contact,CanProtect,CanMirrorMove Description = Things such as long bodies or tentacles are used to bind and squeeze the foe for four to five turns. #------------------------------- @@ -4917,7 +4917,7 @@ BaseDamage = 15 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The target is slapped repeatedly, back and forth, two to five times in a row. #------------------------------- @@ -4929,7 +4929,7 @@ BaseDamage = 15 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The target is jabbed repeatedly with a horn or beak two to five times in a row. #------------------------------- @@ -4941,7 +4941,7 @@ BaseDamage = 15 Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = Contact,CanProtect,CanMirrorMove Description = A long body or vines are used to wrap and squeeze the target for four to five turns. #------------------------------- @@ -4953,7 +4953,7 @@ BaseDamage = 10 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 10 Description = The foe is attacked with long, creeping tentacles or vines. It may also lower the target's Speed. @@ -4967,7 +4967,7 @@ Accuracy = 0 TotalPP = 10 Target = None Priority = 1 -FunctionCode = 0D4 +FunctionCode = MultiTurnAttackBideThenReturnDoubleDamage Flags = Contact,CanProtect Description = The user endures attacks for two turns, then strikes back to cause double the damage taken. #------------------------------- @@ -4979,7 +4979,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 08C +FunctionCode = PowerHigherWithTargetHP Flags = Contact,CanProtect,CanMirrorMove Description = The target is crushed with great force. The attack is more powerful the more HP the target has left. #------------------------------- @@ -4991,7 +4991,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 06E +FunctionCode = LowerTargetHPToUserHP Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that cuts down the target's HP to equal the user's HP. #------------------------------- @@ -5003,7 +5003,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 098 +FunctionCode = PowerLowerWithUserHP Flags = Contact,CanProtect,CanMirrorMove Description = The user flails about aimlessly to attack. It becomes more powerful the less HP the user has. #------------------------------- @@ -5015,7 +5015,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 08A +FunctionCode = PowerLowerWithUserHappiness Flags = Contact,CanProtect,CanMirrorMove Description = A full-power attack that grows more powerful the less the user likes its Trainer. #------------------------------- @@ -5027,7 +5027,7 @@ BaseDamage = 1 Accuracy = 30 TotalPP = 5 Target = NearOther -FunctionCode = 070 +FunctionCode = OHKO Flags = Contact,CanProtect,CanMirrorMove Description = A vicious, tearing attack with big pincers. The target will faint instantly if this attack hits. #------------------------------- @@ -5039,7 +5039,7 @@ BaseDamage = 1 Accuracy = 30 TotalPP = 5 Target = NearOther -FunctionCode = 070 +FunctionCode = OHKO Flags = Contact,CanProtect,CanMirrorMove Description = The user stabs the foe with a horn that rotates like a drill. If it hits, the target faints instantly. #------------------------------- @@ -5051,7 +5051,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 096 +FunctionCode = TypeAndPowerDependOnUserBerry Flags = CanProtect,CanMirrorMove Description = The user draws power to attack by using its held Berry. The Berry determines its type and power. #------------------------------- @@ -5063,7 +5063,7 @@ BaseDamage = 1 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 094 +FunctionCode = RandomlyDamageOrHealTarget Flags = CanProtect,CanMirrorMove Description = The user attacks by giving the target a gift with a hidden trap. It restores HP sometimes, however. #------------------------------- @@ -5075,7 +5075,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 089 +FunctionCode = PowerHigherWithUserHappiness Flags = Contact,CanProtect,CanMirrorMove Description = A full-power attack that grows more powerful the more the user likes its Trainer. #------------------------------- @@ -5087,7 +5087,7 @@ BaseDamage = 1 Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 06A +FunctionCode = FixedDamage20 Flags = CanProtect,CanMirrorMove Description = The target is hit with a destructive shock wave that always inflicts 20 HP damage. #------------------------------- @@ -5099,7 +5099,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 113 +FunctionCode = PowerDependsOnUserStockpile Flags = CanProtect Description = The power stored using the move Stockpile is released all at once in an attack. #------------------------------- @@ -5111,7 +5111,7 @@ BaseDamage = 1 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 06C +FunctionCode = FixedDamageHalfTargetHP Flags = Contact,CanProtect,CanMirrorMove Description = The user chomps hard on the target with its sharp front fangs. It cuts the target's HP to half. #------------------------------- @@ -5123,7 +5123,7 @@ BaseDamage = 1 Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 097 +FunctionCode = PowerHigherWithLessPP Flags = Contact,CanProtect,CanMirrorMove Description = The fewer PP this move has, the greater its attack power. #------------------------------- @@ -5135,7 +5135,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 08C +FunctionCode = PowerHigherWithTargetHP Flags = Contact,CanProtect,CanMirrorMove Description = The user powerfully wrings the foe. The more HP the foe has, the greater this attack's power. #------------------------------- @@ -5146,7 +5146,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserOrNearAlly -FunctionCode = 037 +FunctionCode = RaiseTargetRandomStat2 Description = The user applies pressure to stress points, sharply boosting one of its stats. #------------------------------- [AFTERYOU] @@ -5156,7 +5156,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 11D +FunctionCode = TargetActsNext Description = The user helps the target and makes it use its move right after the user. #------------------------------- [ASSIST] @@ -5166,7 +5166,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 0B5 +FunctionCode = UseRandomMoveFromUserParty Description = The user hurriedly and randomly uses a move among those known by other Pokémon in the party. #------------------------------- [ATTRACT] @@ -5176,7 +5176,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 016 +FunctionCode = AttractTarget Flags = CanProtect,CanMirrorMove Description = If it is the opposite gender of the user, the target becomes infatuated and less likely to attack. #------------------------------- @@ -5187,7 +5187,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 0ED +FunctionCode = SwitchOutUserPassOnEffects Description = The user switches places with a party Pokémon in waiting, passing along any stat changes. #------------------------------- [BELLYDRUM] @@ -5197,7 +5197,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 03A +FunctionCode = MaxUserAttackLoseHalfOfTotalHP Description = The user maximizes its Attack stat in exchange for HP equal to half its max HP. #------------------------------- [BESTOW] @@ -5207,7 +5207,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 0F3 +FunctionCode = TargetTakesUserItem Flags = CanMirrorMove Description = The user passes its held item to the target when the target isn't holding an item. #------------------------------- @@ -5218,7 +5218,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = CanMirrorMove Description = The user blocks the target's way with arms spread wide to prevent escape. #------------------------------- @@ -5229,7 +5229,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 060 +FunctionCode = SetUserTypesBasedOnEnvironment Description = The user's type is changed depending on its environment, such as at water's edge, in grass, or in a cave. #------------------------------- [CAPTIVATE] @@ -5239,7 +5239,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = AllNearFoes -FunctionCode = 04E +FunctionCode = LowerTargetSpAtk2IfCanAttract Flags = CanProtect,CanMirrorMove Description = If it is the opposite gender of the user, the target is charmed into harshly lowering its Sp. Atk stat. #------------------------------- @@ -5250,7 +5250,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 134 +FunctionCode = DoesNothingCongratuations Description = The Pokémon congratulates you on your special day! #------------------------------- [CONFIDE] @@ -5260,7 +5260,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 13C +FunctionCode = LowerTargetSpAtk1 Flags = CanMirrorMove,Sound Description = The user tells the target a secret. The target loses focus and its Sp. Atk stat is lowered. #------------------------------- @@ -5271,7 +5271,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 05E +FunctionCode = SetUserTypesToUserMoveType Description = The user changes its type to become the same type as one of its moves. #------------------------------- [CONVERSION2] @@ -5281,7 +5281,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = NearOther -FunctionCode = 05F +FunctionCode = SetUserTypesToResistLastAttack Description = The user changes its type to make itself resistant to the type of the attack the opponent used last. #------------------------------- [COPYCAT] @@ -5291,7 +5291,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 0AF +FunctionCode = UseLastMoveUsed Description = The user mimics the move used immediately before it. The move fails if no other move has been used yet. #------------------------------- [DEFENSECURL] @@ -5301,7 +5301,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 01E +FunctionCode = RaiseUserDefense1CurlUpUser Description = The user curls up to conceal weak spots and raise its Defense stat. #------------------------------- [DISABLE] @@ -5311,7 +5311,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0B9 +FunctionCode = DisableTargetLastMoveUsed Flags = CanProtect,CanMirrorMove Description = For four turns, this move prevents the target from using the move it last used. #------------------------------- @@ -5322,7 +5322,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 022 +FunctionCode = RaiseUserEvasion1 Description = By moving rapidly, the user makes illusory copies of itself to raise its evasiveness. #------------------------------- [ENCORE] @@ -5332,7 +5332,7 @@ Category = Status Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 0BC +FunctionCode = DisableTargetUsingDifferentMove Flags = CanProtect,CanMirrorMove Description = The user compels the target to keep using only the move it last used for three turns. #------------------------------- @@ -5344,7 +5344,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 0E8 +FunctionCode = UserEnduresFaintingThisTurn Description = The user endures any attack with at least 1 HP. Its chance of failing rises if it is used in succession. #------------------------------- [ENTRAINMENT] @@ -5354,7 +5354,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 066 +FunctionCode = SetTargetAbilityToUserAbility Flags = CanProtect,CanMirrorMove Description = The user dances to compel the target to mimic it, making the target's Ability the same as the user's. #------------------------------- @@ -5365,7 +5365,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove Description = The user flashes a light that cuts the target's accuracy. It can also be used to illuminate caves. #------------------------------- @@ -5376,7 +5376,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 023 +FunctionCode = RaiseUserCriticalHitRate2 Description = The user takes a deep breath and focuses so that critical hits land more easily. #------------------------------- [FOLLOWME] @@ -5387,7 +5387,7 @@ Accuracy = 0 TotalPP = 20 Target = User Priority = 2 -FunctionCode = 117 +FunctionCode = RedirectAllMovesToUser Description = The user draws attention to itself, making all targets take aim only at the user. #------------------------------- [FORESIGHT] @@ -5397,7 +5397,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = NearOther -FunctionCode = 0A7 +FunctionCode = StartNegateTargetEvasionStatStageAndGhostImmunity Flags = CanProtect,CanMirrorMove Description = Enables the user to hit a Ghost type with any kind of move. It also enables the user to hit an evasive foe. #------------------------------- @@ -5408,7 +5408,7 @@ Category = Status Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove Description = The user intimidates the target with the pattern on its belly to cause paralysis. #------------------------------- @@ -5419,7 +5419,7 @@ Category = Status Accuracy = 100 TotalPP = 40 Target = AllNearFoes -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = CanProtect,CanMirrorMove,Sound Description = The user growls in an endearing way, making the foe less wary. The foe's Attack stat is lowered. #------------------------------- @@ -5430,7 +5430,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 028 +FunctionCode = RaiseUserAtkSpAtk1Or2InSun Description = The user's body grows all at once, raising the Atk and Sp. Atk stats. #------------------------------- [HAPPYHOUR] @@ -5440,7 +5440,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserSide -FunctionCode = 157 +FunctionCode = DoubleMoneyGainedFromBattle Description = Using Happy Hour doubles the amount of prize money received after battle. #------------------------------- [HARDEN] @@ -5450,7 +5450,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 01D +FunctionCode = RaiseUserDefense1 Description = The user stiffens all the muscles in its body to raise its Defense stat. #------------------------------- [HEALBELL] @@ -5460,7 +5460,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = UserAndAllies -FunctionCode = 019 +FunctionCode = CureUserPartyStatus Flags = Sound Description = The user makes a soothing bell chime to heal the status problems of all the party Pokémon. #------------------------------- @@ -5472,7 +5472,7 @@ Accuracy = 0 TotalPP = 20 Target = NearAlly Priority = 5 -FunctionCode = 09C +FunctionCode = PowerUpAllyMove Description = The user assists an ally by boosting the power of its attack. #------------------------------- [HOLDHANDS] @@ -5482,7 +5482,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = NearAlly -FunctionCode = 133 +FunctionCode = DoesNothingFailsIfNoAlly Description = The user and an ally hold hands. This makes them very happy. #------------------------------- [HOWL] @@ -5492,7 +5492,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Description = The user howls loudly to raise its spirit, boosting its Attack stat. #------------------------------- [LASERFOCUS] @@ -5502,7 +5502,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 15E +FunctionCode = EnsureNextCriticalHit Description = The user focuses intensely. The attack on the next turn always results in a critical hit. #------------------------------- [LEER] @@ -5512,7 +5512,7 @@ Category = Status Accuracy = 100 TotalPP = 30 Target = AllNearFoes -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = CanProtect,CanMirrorMove Description = The user gains an intimidating leer with sharp eyes. The target's Defense stat is reduced. #------------------------------- @@ -5523,7 +5523,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 0A6 +FunctionCode = EnsureNextMoveAlwaysHits Flags = CanProtect,CanMirrorMove Description = The user takes sure aim at the target. It ensures the next attack does not fail to hit the target. #------------------------------- @@ -5534,7 +5534,7 @@ Category = Status Accuracy = 75 TotalPP = 10 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove Description = With a scary face, the user tries to force a kiss on the target. If it suceeds, the target falls asleep. #------------------------------- @@ -5545,7 +5545,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserSide -FunctionCode = 0A1 +FunctionCode = StartPreventCriticalHitsAgainstUserSide Description = The user chants an incantation toward the sky, preventing the foe from landing critical hits. #------------------------------- [MEFIRST] @@ -5555,7 +5555,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearFoe -FunctionCode = 0B0 +FunctionCode = UseMoveTargetIsAboutToUse Flags = CanProtect Description = The user tries to cut ahead of the foe to steal and use the foe's intended move with greater power. #------------------------------- @@ -5566,7 +5566,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = CanMirrorMove Description = The user pins the target with a dark, arresting look. The target becomes unable to flee. #------------------------------- @@ -5577,7 +5577,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0B6 +FunctionCode = UseRandomMove Description = The user waggles a finger and stimulates its brain into randomly using nearly any move. #------------------------------- [MILKDRINK] @@ -5587,7 +5587,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = The user restores its own HP by up to half of its maximum HP. May also be used in the field to heal HP. #------------------------------- [MIMIC] @@ -5597,7 +5597,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 05C +FunctionCode = ReplaceMoveThisBattleWithTargetLastMoveUsed Flags = CanProtect Description = The user copies the move last used by the foe. The move can be used until the user is switched out. #------------------------------- @@ -5608,7 +5608,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 0A6 +FunctionCode = EnsureNextMoveAlwaysHits Flags = CanProtect,CanMirrorMove Description = The user senses the foe's movements with its mind to ensure its next attack does not miss the foe. #------------------------------- @@ -5619,7 +5619,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 034 +FunctionCode = RaiseUserEvasion2MinimizeUser Description = The user compresses its body to make itself look smaller, which sharply raises its evasiveness. #------------------------------- [MORNINGSUN] @@ -5629,7 +5629,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0D8 +FunctionCode = HealUserDependingOnWeather Description = The user restores its own HP. The amount of HP regained varies with the weather. #------------------------------- [NATUREPOWER] @@ -5639,7 +5639,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0B3 +FunctionCode = UseMoveDependingOnEnvironment Description = An attack that makes use of nature's power. Its effects vary depending on the user's environment. #------------------------------- [NOBLEROAR] @@ -5649,7 +5649,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = NearOther -FunctionCode = 13A +FunctionCode = LowerTargetAtkSpAtk1 Flags = CanProtect,CanMirrorMove,Sound Description = Letting out a noble roar, the user intimidates the target and lowers its Attack and Sp. Atk. #------------------------------- @@ -5660,7 +5660,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = NearOther -FunctionCode = 0A7 +FunctionCode = StartNegateTargetEvasionStatStageAndGhostImmunity Flags = CanProtect,CanMirrorMove Description = Enables the user to hit a Ghost type with any type of move. It also enables the user to hit an evasive foe. #------------------------------- @@ -5671,7 +5671,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 05A +FunctionCode = UserTargetAverageHP Flags = CanProtect,CanMirrorMove Description = The user adds its HP to the target's HP, then equally shares the combined HP with the target. #------------------------------- @@ -5682,7 +5682,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = AllBattlers -FunctionCode = 0E5 +FunctionCode = StartPerishCountsForAllBattlers Flags = Sound Description = Any Pokémon that hears this song faints in three turns, unless it switches out of battle. #------------------------------- @@ -5693,7 +5693,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 139 +FunctionCode = LowerTargetAttack1BypassSubstitute Flags = CanMirrorMove Description = The user and target become friends. The target loses its will to fight, lowering its Attack stat. #------------------------------- @@ -5705,7 +5705,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 0AA +FunctionCode = ProtectUser Description = It enables the user to evade all attacks. Its chance of failing rises if it is used in succession. #------------------------------- [PSYCHUP] @@ -5715,7 +5715,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 055 +FunctionCode = UserCopyTargetStatStages Description = The user hypnotizes itself into copying any stat change made by the target. #------------------------------- [RECOVER] @@ -5725,7 +5725,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = Restoring its own cells, the user restores its own HP by half of its max HP. #------------------------------- [RECYCLE] @@ -5735,7 +5735,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0F6 +FunctionCode = RestoreUserConsumedItem Description = The user recycles a held item that has been used in battle so it can be used again. #------------------------------- [REFLECTTYPE] @@ -5745,7 +5745,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 062 +FunctionCode = SetUserTypesToTargetTypes Flags = CanProtect Description = The user reflects the target's type, making it the same type as the target. #------------------------------- @@ -5756,7 +5756,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 018 +FunctionCode = CureUserBurnPoisonParalysis Description = The user rests to cure itself of a poisoning, burn, or paralysis. #------------------------------- [ROAR] @@ -5767,7 +5767,7 @@ Accuracy = 0 TotalPP = 20 Target = NearOther Priority = -6 -FunctionCode = 0EB +FunctionCode = SwitchOutTargetStatusMove Flags = CanMirrorMove,Sound Description = The target is scared off and replaced by another Pokémon in its party. In the wild, the battle ends. #------------------------------- @@ -5778,7 +5778,7 @@ Category = Status Accuracy = 0 TotalPP = 25 Target = UserSide -FunctionCode = 01A +FunctionCode = StartUserSideImmunityToInflictedStatus Description = The user creates a protective field that prevents status problems for five turns. #------------------------------- [SCARYFACE] @@ -5788,7 +5788,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 04D +FunctionCode = LowerTargetSpeed2 Flags = CanProtect,CanMirrorMove Description = The user frightens the target with a scary face to harshly reduce its Speed stat. #------------------------------- @@ -5799,7 +5799,7 @@ Category = Status Accuracy = 85 TotalPP = 40 Target = NearOther -FunctionCode = 04C +FunctionCode = LowerTargetDefense2 Flags = CanProtect,CanMirrorMove,Sound Description = An earsplitting screech harshly reduces the target's Defense stat. #------------------------------- @@ -5810,7 +5810,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Description = The user reduces its polygon count to make itself more jagged, raising the Attack stat. #------------------------------- [SHELLSMASH] @@ -5820,7 +5820,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 035 +FunctionCode = LowerUserDefSpDef1RaiseUserAtkSpAtkSpd2 Description = The user breaks its shell, lowering its defenses but sharply raising attacking and Speed stats. #------------------------------- [SIMPLEBEAM] @@ -5830,7 +5830,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 063 +FunctionCode = SetTargetAbilityToSimple Flags = CanProtect,CanMirrorMove Description = The user's mysterious psychic wave changes the target's Ability to Simple. #------------------------------- @@ -5841,7 +5841,7 @@ Category = Status Accuracy = 55 TotalPP = 15 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove,Sound Description = A soothing lullaby is sung in a calming voice that puts the target into a deep slumber. #------------------------------- @@ -5852,7 +5852,7 @@ Category = Status Accuracy = 0 TotalPP = 1 Target = NearOther -FunctionCode = 05D +FunctionCode = ReplaceMoveWithTargetLastMoveUsed Description = It enables the user to permanently learn the move last used by the foe. Once used, Sketch disappears. #------------------------------- [SLACKOFF] @@ -5862,7 +5862,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = The user slacks off, restoring its own HP by up to half of its maximum HP. #------------------------------- [SLEEPTALK] @@ -5872,7 +5872,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0B4 +FunctionCode = UseRandomUserMoveIfAsleep Description = While it is asleep, the user randomly uses one of the moves it knows. #------------------------------- [SMOKESCREEN] @@ -5882,7 +5882,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove Description = The user releases an obscuring cloud of smoke or ink. It reduces the target's accuracy. #------------------------------- @@ -5893,7 +5893,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = The user restores its own HP by up to half of its maximum HP. May also be used in the field to heal HP. #------------------------------- [SPLASH] @@ -5903,7 +5903,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 001 +FunctionCode = DoesNothingUnusableInGravity Description = The user just flops and splashes around to no effect at all... #------------------------------- [SPOTLIGHT] @@ -5914,7 +5914,7 @@ Accuracy = 0 TotalPP = 15 Target = NearOther Priority = 3 -FunctionCode = 16A +FunctionCode = RedirectAllMovesToTarget Flags = CanProtect Description = The user shines a spotlight on the target so that only it will be attacked during the turn. #------------------------------- @@ -5925,7 +5925,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 112 +FunctionCode = UserAddStockpileRaiseDefSpDef1 Description = The user charges up power and raises both its Defense and Sp. Def. The move can be used three times. #------------------------------- [SUBSTITUTE] @@ -5935,7 +5935,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 10C +FunctionCode = UserMakeSubstitute Description = The user makes a copy of itself using some of its HP. The copy serves as the user's decoy. #------------------------------- [SUPERSONIC] @@ -5945,7 +5945,7 @@ Category = Status Accuracy = 55 TotalPP = 20 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove,Sound Description = The user generates odd sound waves from its body. It may confuse the target. #------------------------------- @@ -5956,7 +5956,7 @@ Category = Status Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 041 +FunctionCode = RaiseTargetAttack2ConfuseTarget Flags = CanProtect,CanMirrorMove Description = The user enrages and confuses the target. However, it also sharply raises the target's Attack stat. #------------------------------- @@ -5967,7 +5967,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 114 +FunctionCode = HealUserDependingOnUserStockpile Description = The power stored using the move Stockpile is absorbed by the user to heal its HP. #------------------------------- [SWEETSCENT] @@ -5977,7 +5977,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = AllNearFoes -FunctionCode = 048 +FunctionCode = LowerTargetEvasion2 Flags = CanProtect,CanMirrorMove Description = A sweet scent that lowers the foe's evasiveness. It also lures wild Pokémon if used in grass, etc. #------------------------------- @@ -5988,7 +5988,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 02E +FunctionCode = RaiseUserAttack2 Flags = Dance Description = A frenetic dance to uplift the fighting spirit. It sharply raises the user's Attack stat. #------------------------------- @@ -5999,7 +5999,7 @@ Category = Status Accuracy = 100 TotalPP = 30 Target = AllNearFoes -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = CanProtect,CanMirrorMove Description = The user wags its tail cutely, making opposing Pokémon less wary and lowering their Defense stat. #------------------------------- @@ -6010,9 +6010,9 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 13A +FunctionCode = LowerTargetAtkSpAtk1 Flags = CanMirrorMove -Description = The user gets teary eyed to make the target lose its combative spirit. This lowers the target's Attack and Sp. Atk stats. +Description = Gets teary eyed to make the target lose its will to fight. Lowers the target's Attack and Sp. Atk. #------------------------------- [TEETERDANCE] Name = Teeter Dance @@ -6021,7 +6021,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = AllNearOthers -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove,Dance Description = The user performs a wobbly dance that confuses the Pokémon around it. #------------------------------- @@ -6032,7 +6032,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 04A +FunctionCode = LowerTargetAtkDef1 Flags = CanProtect,CanMirrorMove Description = The user tickles the target into laughing, reducing its Attack and Defense stats. #------------------------------- @@ -6043,7 +6043,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 069 +FunctionCode = TransformUserIntoTarget Description = The user transforms into a copy of the target right down to having the same move set. #------------------------------- [WHIRLWIND] @@ -6054,7 +6054,7 @@ Accuracy = 0 TotalPP = 20 Target = NearOther Priority = -6 -FunctionCode = 0EB +FunctionCode = SwitchOutTargetStatusMove Flags = CanMirrorMove Description = The foe is blown away, to be replaced by another Pokémon in its party. In the wild, the battle ends. #------------------------------- @@ -6065,7 +6065,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D7 +FunctionCode = HealUserPositionNextTurn Description = One turn after this move is used, the target's HP is restored by half the user's maximum HP. #------------------------------- [WORKUP] @@ -6075,7 +6075,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 027 +FunctionCode = RaiseUserAtkSpAtk1 Description = The user is roused, and its Attack and Sp. Atk stats increase. #------------------------------- [YAWN] @@ -6085,7 +6085,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 004 +FunctionCode = SleepTargetNextTurn Flags = CanProtect,CanMirrorMove Description = The user lets loose a huge yawn that lulls the target into falling asleep on the next turn. #------------------------------- @@ -6097,7 +6097,7 @@ BaseDamage = 120 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 158 +FunctionCode = FailsIfUserNotConsumedBerry Flags = CanProtect Description = The user lets out a damaging belch at the target. The user must eat a held Berry to use this move. #------------------------------- @@ -6109,7 +6109,7 @@ BaseDamage = 120 Accuracy = 80 TotalPP = 5 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user shoots filthy garbage at the target to attack. It may also poison the target. @@ -6122,7 +6122,7 @@ BaseDamage = 95 Accuracy = 100 TotalPP = 10 Target = AllNearOthers -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = It swamps the area around the user with a giant sludge wave. It may also poison those hit. @@ -6135,7 +6135,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 30 Description = Unsanitary sludge is hurled at the target. It may also poison the target. @@ -6148,7 +6148,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is stabbed with a tentacle or arm seeped with poison. It may also poison the target. @@ -6161,7 +6161,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate EffectChance = 10 Description = A slashing attack with a poisonous blade that may also poison the foe. Critical hits land more easily. @@ -6174,7 +6174,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = Unsanitary sludge is hurled at the target. It may also poison the target. @@ -6187,7 +6187,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 07B +FunctionCode = DoublePowerIfTargetPoisoned Flags = CanProtect,CanMirrorMove Description = The user drenches the foe in a special poisonous liquid. Its power doubles if the target is poisoned. #------------------------------- @@ -6199,7 +6199,7 @@ BaseDamage = 50 Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 050 +FunctionCode = ResetTargetStatStages Flags = CanProtect,CanMirrorMove Description = The user attacks by throwing a clump of special mud. All status changes are returned to normal. #------------------------------- @@ -6211,7 +6211,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 006 +FunctionCode = BadPoisonTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 50 Description = The user bites the target with toxic fangs. It may also leave the target badly poisoned. @@ -6224,7 +6224,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate EffectChance = 10 Description = The user hits the target with its tail. It may also poison the target. Critical hits land more easily. @@ -6237,7 +6237,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 30 Target = AllNearFoes -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The foe is attacked with a spray of harsh acid. It may also lower the target's Sp. Def stat. @@ -6250,7 +6250,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 04F +FunctionCode = LowerTargetSpDef2 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 100 Description = The user spits fluid that works to melt the target. This harshly reduces the target's Sp. Def stat. @@ -6263,7 +6263,7 @@ BaseDamage = 30 Accuracy = 70 TotalPP = 20 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 40 Description = The target is attacked with a discharge of filthy gases. It may also poison the target. @@ -6276,7 +6276,7 @@ BaseDamage = 15 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user stabs the target with a poisonous stinger. This may also poison the target. @@ -6288,7 +6288,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 02F +FunctionCode = RaiseUserDefense2 Description = The user alters its cellular structure to liquefy itself, sharply raising its Defense stat. #------------------------------- [BANEFULBUNKER] @@ -6299,7 +6299,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 168 +FunctionCode = ProtectUserBanefulBunker Description = Protects the user from attacks. Also poisons any attacker that makes contact with the user. #------------------------------- [COIL] @@ -6309,7 +6309,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 025 +FunctionCode = RaiseUserAtkDefAcc1 Description = The user coils up and concentrates. This raises its Attack and Defense stats as well as its accuracy. #------------------------------- [GASTROACID] @@ -6319,7 +6319,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 068 +FunctionCode = NegateTargetAbility Flags = CanProtect,CanMirrorMove Description = The user hurls up its stomach acids on the foe. The fluid negates the effect of the target's Ability. #------------------------------- @@ -6330,7 +6330,7 @@ Category = Status Accuracy = 90 TotalPP = 40 Target = AllNearFoes -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove Description = A cloud of poison gas is sprayed in the face of opposing Pokémon. It may poison those hit. #------------------------------- @@ -6341,7 +6341,7 @@ Category = Status Accuracy = 75 TotalPP = 35 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove,Powder Description = The user scatters a cloud of poisonous dust on the target. It may poison the target. #------------------------------- @@ -6352,7 +6352,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 15B +FunctionCode = CureTargetStatusHealUserHalfOfTotalHP Flags = CanProtect,CanMirrorMove Description = The user heals the target's status condition. If so, it also restores the user's own HP. #------------------------------- @@ -6363,7 +6363,7 @@ Category = Status Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 006 +FunctionCode = BadPoisonTarget Flags = CanProtect,CanMirrorMove Description = A move that leaves the target badly poisoned. Its poison damage worsens every turn. #------------------------------- @@ -6374,7 +6374,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = FoeSide -FunctionCode = 104 +FunctionCode = AddToxicSpikesToFoeSide Description = The user lays a trap of poison spikes at the foe's feet. They poison foes that switch into battle. #------------------------------- [TOXICTHREAD] @@ -6384,7 +6384,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 159 +FunctionCode = PoisonTargetLowerTargetSpeed1 Flags = CanProtect,CanMirrorMove Description = The user shoots poisonous threads to poison the target and lower the target's Speed stat. #------------------------------- @@ -6395,7 +6395,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = AllNearFoes -FunctionCode = 140 +FunctionCode = LowerPoisonedTargetAtkSpAtkSpd1 Flags = CanProtect Description = Foes are drenched in an odd liquid that lowers the Attack, Sp. Atk, and Speed of poisoned Pokémon. #------------------------------- @@ -6407,7 +6407,7 @@ BaseDamage = 160 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The user shoots powerful lasers using the power of a prism. The user can't move on the next turn. #------------------------------- @@ -6419,7 +6419,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 03F +FunctionCode = LowerUserSpAtk2 Flags = CanProtect,CanMirrorMove Description = The user attacks the target at full power. The attack's recoil harshly reduces the user's Sp. Atk stat. #------------------------------- @@ -6431,7 +6431,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 111 +FunctionCode = AttackTwoTurnsLater Description = Two turns after this move is used, a hunk of psychic energy attacks the target. #------------------------------- [SYNCHRONOISE] @@ -6442,7 +6442,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = AllNearOthers -FunctionCode = 123 +FunctionCode = FailsUnlessTargetSharesTypeWithUser Flags = CanProtect,CanMirrorMove Description = Using an odd shock wave, the user damages any Pokémon of the same type as the user. #------------------------------- @@ -6454,7 +6454,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0DE +FunctionCode = HealUserByHalfOfDamageDoneIfTargetAsleep Flags = CanProtect,CanMirrorMove Description = The user eats the dreams of a sleeping foe. It absorbs half the damage caused to heal the user's HP. #------------------------------- @@ -6466,7 +6466,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 164 +FunctionCode = CategoryDependsOnHigherDamageIgnoreTargetAbility Flags = CanProtect,CanMirrorMove Description = The user attacks with a pillar of light. This move the higher of the user's Attack or Sp. Atk stat. #------------------------------- @@ -6478,7 +6478,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 122 +FunctionCode = UseTargetDefenseInsteadOfTargetSpDef Flags = CanProtect,CanMirrorMove Description = The user materializes an odd psychic wave to attack the target. This attack does physical damage. #------------------------------- @@ -6490,7 +6490,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is hit by a strong telekinetic force. It may also reduce the target's Sp. Def stat. @@ -6503,7 +6503,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 10A +FunctionCode = RemoveScreens Flags = Contact,CanProtect,CanMirrorMove,Biting Description = The user bites the target using psychic capabilities. This can also destroy Light Screen and Reflect. #------------------------------- @@ -6515,7 +6515,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks with an odd, unseeable power. It may also make the target flinch. @@ -6528,7 +6528,7 @@ BaseDamage = 80 Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 147 +FunctionCode = RemoveProtectionsBypassSubstitute Flags = CanMirrorMove Description = Using a hyperspace hole, the user appears right next to the target and strikes. Skips protections. #------------------------------- @@ -6540,7 +6540,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 122 +FunctionCode = UseTargetDefenseInsteadOfTargetSpDef Flags = CanProtect,CanMirrorMove Description = The user materializes an odd psychic wave to attack the target. This attack does physical damage. #------------------------------- @@ -6552,7 +6552,7 @@ BaseDamage = 80 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user focuses its willpower to its head and attacks the foe. It may also make the target flinch. @@ -6565,7 +6565,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 50 Description = The user lets loose a damaging burst of light. It may also reduce the target's Sp. Def stat. @@ -6578,7 +6578,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 50 Description = A mistlike flurry of down envelops and damages the target. It may also lower the target's Sp. Atk. @@ -6591,7 +6591,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user tears at the target with blades formed by psychic power. Critical hits land more easily. #------------------------------- @@ -6603,7 +6603,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is attacked with a peculiar ray. It may also cause confusion. @@ -6616,7 +6616,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user unleashes a vicious blow after its cute act makes the foe less wary. It may also cause flinching. @@ -6629,7 +6629,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is hit by a weak telekinetic force. It may also leave the target confused. @@ -6642,7 +6642,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 08E +FunctionCode = PowerHigherWithUserPositiveStatStages Flags = CanProtect,CanMirrorMove Description = The user attacks with stored power. The more the user's stats are raised, the greater the damage. #------------------------------- @@ -6655,7 +6655,7 @@ Accuracy = 100 TotalPP = 20 Target = None Priority = -5 -FunctionCode = 072 +FunctionCode = CounterSpecialDamage Flags = CanProtect Description = A retaliation move that counters any special attack, inflicting double the damage taken. #------------------------------- @@ -6667,7 +6667,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 06F +FunctionCode = FixedDamageUserLevelRandom Flags = CanProtect,CanMirrorMove Description = The target is attacked with an odd psychic wave. The attack varies in intensity. #------------------------------- @@ -6678,7 +6678,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 030 +FunctionCode = RaiseUserSpeed2 Description = The user relaxes and lightens its body to move faster. It sharply boosts the Speed stat. #------------------------------- [ALLYSWITCH] @@ -6689,7 +6689,7 @@ Accuracy = 0 TotalPP = 15 Target = User Priority = 2 -FunctionCode = 120 +FunctionCode = UserSwapsPositionsWithAlly Description = The user teleports using a strange power and switches its place with one of its allies. #------------------------------- [AMNESIA] @@ -6699,7 +6699,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 033 +FunctionCode = RaiseUserSpDef2 Description = The user temporarily empties its mind to forget its concerns. It sharply raises the user's Sp. Def stat. #------------------------------- [BARRIER] @@ -6709,7 +6709,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 02F +FunctionCode = RaiseUserDefense2 Description = The user throws up a sturdy wall that sharply raises its Defense stat. #------------------------------- [CALMMIND] @@ -6719,7 +6719,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 02C +FunctionCode = RaiseUserSpAtkSpDef1 Description = The user quietly focuses its mind and calms its spirit to raise its Sp. Atk and Sp. Def stats. #------------------------------- [COSMICPOWER] @@ -6729,7 +6729,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 02A +FunctionCode = RaiseUserDefSpDef1 Description = The user absorbs a mystical power from space to raise its Defense and Sp. Def stats. #------------------------------- [GRAVITY] @@ -6739,7 +6739,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = BothSides -FunctionCode = 118 +FunctionCode = StartGravity Description = Gravity is intensified for five turns, making moves involving flying unusable and negating Levitation. #------------------------------- [GUARDSPLIT] @@ -6749,7 +6749,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 059 +FunctionCode = UserTargetAverageBaseDefSpDef Flags = CanProtect Description = The user employs its psychic power to average its Defense and Sp. Def stats with those of its target. #------------------------------- @@ -6760,7 +6760,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 053 +FunctionCode = UserTargetSwapDefSpDefStages Flags = CanProtect,CanMirrorMove Description = The user employs its psychic power to switch changes to its Defense and Sp. Def with the target. #------------------------------- @@ -6771,7 +6771,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = AllNearFoes -FunctionCode = 0BB +FunctionCode = DisableTargetHealingMoves Flags = CanProtect,CanMirrorMove Description = For five turns, the foe is prevented from using any moves, Abilities, or held items that recover HP. #------------------------------- @@ -6782,7 +6782,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = Other -FunctionCode = 0DF +FunctionCode = HealTargetHalfOfTotalHP Flags = CanProtect,Pulse Description = The user emits a healing pulse which restores the target's HP by up to half of its max HP. #------------------------------- @@ -6793,7 +6793,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0E3 +FunctionCode = UserFaintsHealAndCureReplacement Description = The user faints. In return, the Pokémon taking its place will have its HP restored and status cured. #------------------------------- [HEARTSWAP] @@ -6803,7 +6803,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 054 +FunctionCode = UserTargetSwapStatStages Flags = CanProtect,CanMirrorMove Description = The user employs its psychic power to switch stat changes with the target. #------------------------------- @@ -6814,7 +6814,7 @@ Category = Status Accuracy = 60 TotalPP = 20 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove Description = The user employs hypnotic suggestion to make the target fall into a deep sleep. #------------------------------- @@ -6825,7 +6825,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0B8 +FunctionCode = DisableTargetMovesKnownByUser Description = If the foe knows any move also known by the user, the foe is prevented from using it. #------------------------------- [INSTRUCT] @@ -6835,7 +6835,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 16B +FunctionCode = TargetUsesItsLastUsedMoveAgain Flags = CanProtect Description = The user instructs the target to use the target's last move again. #------------------------------- @@ -6846,7 +6846,7 @@ Category = Status Accuracy = 80 TotalPP = 15 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove Description = The user distracts the target by bending a spoon. It lowers the target's accuracy. #------------------------------- @@ -6857,7 +6857,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserSide -FunctionCode = 0A3 +FunctionCode = StartWeakenSpecialDamageAgainstUserSide Description = A wondrous wall of light is put up to suppress damage from special attacks for five turns. #------------------------------- [LUNARDANCE] @@ -6867,7 +6867,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0E4 +FunctionCode = UserFaintsHealAndCureReplacementRestorePP Flags = Dance Description = The user faints. In return, the Pokémon taking its place will have its status and HP fully restored. #------------------------------- @@ -6879,7 +6879,7 @@ Accuracy = 0 TotalPP = 15 Target = User Priority = 4 -FunctionCode = 0B1 +FunctionCode = BounceBackProblemCausingStatusMoves Description = A barrier reflects back to the target moves like Leech Seed and moves that damage status. #------------------------------- [MAGICROOM] @@ -6889,7 +6889,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 0F9 +FunctionCode = StartNegateHeldItems Flags = CanMirrorMove Description = The user creates a bizarre area in which Pokémon's held items lose their effects for five turns. #------------------------------- @@ -6900,7 +6900,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Description = The user meditates to awaken the power deep within its body and raise its Attack stat. #------------------------------- [MIRACLEEYE] @@ -6910,7 +6910,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = NearOther -FunctionCode = 0A8 +FunctionCode = StartNegateTargetEvasionStatStageAndDarkImmunity Flags = CanProtect,CanMirrorMove Description = Enables the user to hit a Dark type with any type of move. It also enables the user to hit an evasive foe. #------------------------------- @@ -6921,7 +6921,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 058 +FunctionCode = UserTargetAverageBaseAtkSpAtk Flags = CanProtect Description = The user employs its psychic power to average its Attack and Sp. Atk stats with those of the target. #------------------------------- @@ -6932,7 +6932,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 052 +FunctionCode = UserTargetSwapAtkSpAtkStages Flags = CanProtect,CanMirrorMove Description = The user employs its psychic power to switch changes to its Attack and Sp. Atk with the target. #------------------------------- @@ -6943,7 +6943,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 057 +FunctionCode = UserSwapBaseAtkDef Description = The user employs its psychic power to switch its Attack with its Defense stat. #------------------------------- [PSYCHICTERRAIN] @@ -6953,7 +6953,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 173 +FunctionCode = StartPsychicTerrain Description = Protects grounded Pokémon from priority moves and powers up Psychic-type moves for five turns. #------------------------------- [PSYCHOSHIFT] @@ -6963,7 +6963,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 01B +FunctionCode = GiveUserStatusToTarget Flags = CanProtect,CanMirrorMove Description = Using its psychic power of suggestion, the user transfers its status problems to the target. #------------------------------- @@ -6974,7 +6974,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = UserSide -FunctionCode = 0A2 +FunctionCode = StartWeakenPhysicalDamageAgainstUserSide Description = A wondrous wall of light is put up to suppress damage from physical attacks for five turns. #------------------------------- [REST] @@ -6984,7 +6984,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D9 +FunctionCode = HealUserFullyAndFallAsleep Description = The user goes to sleep for two turns. It fully restores the user's HP and heals any status problem. #------------------------------- [ROLEPLAY] @@ -6994,7 +6994,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 065 +FunctionCode = SetUserAbilityToTargetAbility Description = The user mimics the target completely, copying the target's natural Ability. #------------------------------- [SKILLSWAP] @@ -7004,7 +7004,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 067 +FunctionCode = UserTargetSwapAbilities Flags = CanProtect,CanMirrorMove Description = The user employs its psychic power to exchange Abilities with the target. #------------------------------- @@ -7015,7 +7015,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 161 +FunctionCode = UserTargetSwapBaseSpeed Flags = CanProtect,CanMirrorMove Description = The user exchanges Speed stats with the target. #------------------------------- @@ -7026,7 +7026,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 11A +FunctionCode = StartTargetAirborneAndAlwaysHitByMoves Flags = CanProtect,CanMirrorMove Description = The user makes the target float with its psychic power. The target is easier to hit for three turns. #------------------------------- @@ -7037,7 +7037,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 0EA +FunctionCode = FleeFromBattle Description = Use it to flee from any wild Pokémon. It can also warp to the last Pokémon Center visited. #------------------------------- [TRICK] @@ -7047,7 +7047,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0F2 +FunctionCode = UserTargetSwapItems Flags = CanProtect,CanMirrorMove Description = The user catches the target off guard and swaps its held item with its own. #------------------------------- @@ -7059,7 +7059,7 @@ Accuracy = 0 TotalPP = 5 Target = BothSides Priority = -7 -FunctionCode = 11F +FunctionCode = StartSlowerBattlersActFirst Flags = CanMirrorMove Description = The user creates a bizarre area in which slower Pokémon get to move first for five turns. #------------------------------- @@ -7071,7 +7071,7 @@ Accuracy = 0 TotalPP = 10 Target = BothSides Priority = -7 -FunctionCode = 124 +FunctionCode = StartSwapAllBattlersBaseDefensiveStats Flags = CanMirrorMove Description = The user creates a bizarre area in which Pokémon's Defense and Sp. Def stats are swapped for 5 turns. #------------------------------- @@ -7083,7 +7083,7 @@ BaseDamage = 150 Accuracy = 80 TotalPP = 5 Target = NearOther -FunctionCode = 0FC +FunctionCode = RecoilHalfOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks the foe with a hazardous, full-power headbutt. The user also takes terrible damage. #------------------------------- @@ -7095,7 +7095,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove,Bomb Description = The user launches a huge boulder at the target to attack. It must rest on the next turn, however. #------------------------------- @@ -7107,7 +7107,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 5 Target = AllNearFoes -FunctionCode = 136 +FunctionCode = RaiseUserDefense2 Flags = CanProtect,CanMirrorMove EffectChance = 50 Description = The user whips up a storm of diamonds to damage foes. This may also sharply raise the user's Defense stat. @@ -7120,7 +7120,7 @@ BaseDamage = 100 Accuracy = 80 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user stabs the foe with sharpened stones from below. It has a high critical-hit ratio. #------------------------------- @@ -7132,7 +7132,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user attacks with a ray of light that sparkles as if it were made of gemstones. #------------------------------- @@ -7144,7 +7144,7 @@ BaseDamage = 75 Accuracy = 90 TotalPP = 10 Target = AllNearFoes -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = Large boulders are hurled at the foes to inflict damage. It may also make the targets flinch. @@ -7157,7 +7157,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 02D +FunctionCode = RaiseUserMainStats1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks with a prehistoric power. It may also raise all the user's stats at once. @@ -7170,7 +7170,7 @@ BaseDamage = 60 Accuracy = 95 TotalPP = 15 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = Boulders are hurled at the target. It also lowers the target's Speed by preventing its movement. @@ -7183,7 +7183,7 @@ BaseDamage = 50 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user picks up and throws a small rock at the target to attack. #------------------------------- @@ -7195,7 +7195,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 11C +FunctionCode = HitsTargetInSkyGroundsTarget Flags = CanProtect,CanMirrorMove Description = The user throws a stone or projectile to attack. A flying Pokémon will fall to the ground when hit. #------------------------------- @@ -7208,7 +7208,7 @@ Accuracy = 100 TotalPP = 20 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user smashes into the target at high speed. This move always goes first. #------------------------------- @@ -7220,7 +7220,7 @@ BaseDamage = 30 Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 0D3 +FunctionCode = MultiTurnAttackPowersUpEachTurn Flags = Contact,CanProtect,CanMirrorMove Description = The user continually rolls into the target over five turns. It becomes stronger each time it hits. #------------------------------- @@ -7232,7 +7232,7 @@ BaseDamage = 25 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove,Bomb Description = The user hurls hard rocks at the target. Two to five rocks are launched in quick succession. #------------------------------- @@ -7243,7 +7243,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 030 +FunctionCode = RaiseUserSpeed2 Description = The user polishes its body to reduce drag. It can sharply raise the Speed stat. #------------------------------- [SANDSTORM] @@ -7253,7 +7253,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 101 +FunctionCode = StartSandstormWeather Description = Summons a five-turn sandstorm to hurt all combatants except the Rock, Ground, and Steel types. #------------------------------- [STEALTHROCK] @@ -7263,7 +7263,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = FoeSide -FunctionCode = 105 +FunctionCode = AddStealthRocksToFoeSide Description = The user lays a trap of levitating stones around the foe. The trap hurts foes that switch into battle. #------------------------------- [WIDEGUARD] @@ -7274,7 +7274,7 @@ Accuracy = 0 TotalPP = 10 Target = UserSide Priority = 3 -FunctionCode = 0AC +FunctionCode = ProtectUserSideFromMultiTargetDamagingMoves Description = The user and its allies are protected from wide-ranging attacks for a turn. May fail if used in succession. #------------------------------- [DOOMDESIRE] @@ -7285,7 +7285,7 @@ BaseDamage = 140 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 111 +FunctionCode = AttackTwoTurnsLater Description = Two turns after this move is used, the user blasts the target with a concentrated bundle of light. #------------------------------- [IRONTAIL] @@ -7296,7 +7296,7 @@ BaseDamage = 100 Accuracy = 75 TotalPP = 15 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is slammed with a steel-hard tail. It may also lower the target's Defense stat. @@ -7309,7 +7309,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 163 +FunctionCode = IgnoreTargetAbility Flags = Contact,CanProtect,CanMirrorMove Description = The user slams into the target with the force of a meteor. Can't be stopped by the target's Ability. #------------------------------- @@ -7321,7 +7321,7 @@ BaseDamage = 90 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 20 Description = The target is hit with a hard punch fired like a meteor. It may also raise the user's Attack. @@ -7334,7 +7334,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user entangles the target with its anchor chain. The target becomes unable to flee. @@ -7347,7 +7347,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user gathers all its light energy and releases it at once. It may also lower the target's Sp. Def stat. @@ -7360,7 +7360,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The foe slams the target with its steel-hard head. It may also make the target flinch. @@ -7373,7 +7373,7 @@ BaseDamage = 70 Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user stabs the target with a sharp horn. This attack never misses. #------------------------------- @@ -7385,7 +7385,7 @@ BaseDamage = 70 Accuracy = 90 TotalPP = 25 Target = NearOther -FunctionCode = 01D +FunctionCode = RaiseUserDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 10 Description = The target is hit with wings of steel. It may also raise the user's Defense stat. @@ -7398,7 +7398,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 175 +FunctionCode = HitTwoTimesFlinchTarget Flags = Contact,CanProtect,Punching EffectChance = 30 Description = The user rotates, centering the hex nut in its chest, and then strikes twice. May cause flinching. @@ -7411,7 +7411,7 @@ BaseDamage = 65 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user looses a flash of energy from its polished body. It may also lower the target's accuracy. @@ -7424,7 +7424,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Bomb Description = The user launches steel bombs that stick to the target. This attack will not miss. #------------------------------- @@ -7436,7 +7436,7 @@ BaseDamage = 50 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks by throwing two steel gears at its target. #------------------------------- @@ -7448,7 +7448,7 @@ BaseDamage = 50 Accuracy = 95 TotalPP = 35 Target = NearOther -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 10 Description = The target is raked with steel claws. It may also raise the user's Attack stat. @@ -7462,7 +7462,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user strikes the target with tough punches as fast as bullets. This move always goes first. #------------------------------- @@ -7474,7 +7474,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 08D +FunctionCode = PowerHigherWithTargetFasterThanUser Flags = Contact,CanProtect,CanMirrorMove,Bomb Description = The user tackles the target with a high-speed spin. The slower the user, the greater the damage. #------------------------------- @@ -7486,7 +7486,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 09B +FunctionCode = PowerHigherWithUserHeavierThanTarget Flags = Contact,CanProtect,CanMirrorMove Description = The user slams into the foe with its heavy body. The heavier the user, the greater the damage. #------------------------------- @@ -7498,7 +7498,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = None -FunctionCode = 073 +FunctionCode = CounterDamagePlusHalf Flags = CanProtect,CanMirrorMove Description = The user retaliates with much greater power against the target that last inflicted damage on it. #------------------------------- @@ -7509,7 +7509,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 031 +FunctionCode = RaiseUserSpeed2LowerUserWeight Description = The user sheds part of its body to make itself lighter and sharply raise its Speed stat. #------------------------------- [GEARUP] @@ -7519,7 +7519,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = UserAndAllies -FunctionCode = 15C +FunctionCode = RaisePlusMinusUserAndAlliesAtkSpAtk1 Description = The user engages its gears to raise the Attack and Sp. Atk of allies with the Plus or Minus Ability. #------------------------------- [IRONDEFENSE] @@ -7529,7 +7529,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 02F +FunctionCode = RaiseUserDefense2 Description = The user hardens its body's surface like iron, sharply raising its Defense stat. #------------------------------- [KINGSSHIELD] @@ -7540,7 +7540,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 14B +FunctionCode = ProtectUserFromDamagingMovesKingsShield Description = Protects itself from damage. It also harshly lowers the Attack of attackers that make contact. #------------------------------- [METALSOUND] @@ -7550,7 +7550,7 @@ Category = Status Accuracy = 85 TotalPP = 40 Target = NearOther -FunctionCode = 04F +FunctionCode = LowerTargetSpDef2 Flags = CanProtect,CanMirrorMove,Sound Description = A horrible sound like scraping metal harshly reduces the target's Sp. Def stat. #------------------------------- @@ -7561,7 +7561,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 036 +FunctionCode = RaiseUserAtk1Spd2 Description = The user rotates its gears, raising its Attack and sharply raising its Speed. #------------------------------- [HYDROCANNON] @@ -7572,7 +7572,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The target is hit with a watery blast. The user must rest on the next turn, however. #------------------------------- @@ -7584,7 +7584,7 @@ BaseDamage = 150 Accuracy = 100 TotalPP = 5 Target = AllNearFoes -FunctionCode = 08B +FunctionCode = PowerHigherWithUserHP Flags = CanProtect,CanMirrorMove Description = The user spouts water to damage the foe. The lower the user's HP, the less powerful it becomes. #------------------------------- @@ -7596,7 +7596,7 @@ BaseDamage = 110 Accuracy = 80 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The target is blasted by a huge volume of water launched under great pressure. #------------------------------- @@ -7608,7 +7608,7 @@ BaseDamage = 110 Accuracy = 85 TotalPP = 10 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Pulse Description = The user attacks opposing Pokémon with countless beams of light that glow a deep and brilliant blue. #------------------------------- @@ -7620,7 +7620,7 @@ BaseDamage = 110 Accuracy = 95 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove,ThawsUser EffectChance = 30 Description = The user immerses the target in superheated steam. This may also leave the target with a burn. @@ -7633,7 +7633,7 @@ BaseDamage = 100 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The target is hammered with a large pincer. Critical hits land more easily. #------------------------------- @@ -7645,7 +7645,7 @@ BaseDamage = 90 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks by swinging its tail as if it were a vicious wave in a raging storm. #------------------------------- @@ -7657,7 +7657,7 @@ BaseDamage = 90 Accuracy = 85 TotalPP = 10 Target = AllNearFoes -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks by shooting muddy water at the opposing team. It may also lower the target's accuracy. @@ -7670,7 +7670,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = AllNearOthers -FunctionCode = 15A +FunctionCode = CureTargetBurn Flags = CanProtect,CanMirrorMove,Sound EffectChance = 100 Description = The user bursts into song, emitting many bubbles. Any burnt Pokémon will be healed by these bubbles. @@ -7683,7 +7683,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = AllNearOthers -FunctionCode = 075 +FunctionCode = DoublePowerIfTargetUnderwater Flags = CanProtect,CanMirrorMove Description = It swamps the area around the user with a giant wave. It can also be used for crossing water. #------------------------------- @@ -7695,7 +7695,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user slams into the target using a full-force blast of water. May lower the target's Defense. @@ -7708,7 +7708,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0CB +FunctionCode = TwoTurnAttackInvulnerableUnderwater Flags = Contact,CanProtect,CanMirrorMove Description = Diving on the first turn, the user rises and hits on the next turn. It can be used to dive in the ocean. #------------------------------- @@ -7720,7 +7720,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove,ThawsUser EffectChance = 30 Description = The user shoots boiling hot water at its target. It may also leave the target with a burn. @@ -7733,7 +7733,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 108 +FunctionCode = WaterPledge Flags = CanProtect,CanMirrorMove Description = A column of water strikes the target. When combined with its fire equivalent, it makes a rainbow. #------------------------------- @@ -7745,7 +7745,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user charges at the target and may make it flinch. It can also be used to climb a waterfall. @@ -7758,7 +7758,7 @@ BaseDamage = 75 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 50 Description = The user cuts the foe with sharp shells. It may also lower the target's Defense stat. @@ -7771,7 +7771,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 080 +FunctionCode = DoublePowerIfTargetHPLessThanHalf Flags = CanProtect,CanMirrorMove Description = If the target's HP is down to about half, this attack will hit with double the power. #------------------------------- @@ -7783,7 +7783,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A spray of bubbles is forcefully ejected at the target. It may also lower its Speed stat. @@ -7796,7 +7796,7 @@ BaseDamage = 65 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 50 Description = The user attacks by spraying ink in the foe's face or eyes. It may also lower the target's accuracy. @@ -7809,7 +7809,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = Other -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove,Pulse EffectChance = 20 Description = The user attacks the target with a pulsing blast of water. It may also confuse the target. @@ -7823,7 +7823,7 @@ Accuracy = 100 TotalPP = 20 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user lunges at the target at a speed that makes it almost invisible. It is sure to strike first. #------------------------------- @@ -7835,7 +7835,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 30 Target = AllNearFoes -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A spray of countless bubbles is jetted at the opposing team. It may also lower the targets' Speed stats. @@ -7848,7 +7848,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The target is blasted with a forceful shot of water. #------------------------------- @@ -7860,7 +7860,7 @@ BaseDamage = 35 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = Contact,CanProtect,CanMirrorMove Description = The target is clamped and squeezed by the user's very thick and sturdy shell for four to five turns. #------------------------------- @@ -7872,7 +7872,7 @@ BaseDamage = 35 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0D0 +FunctionCode = BindTargetDoublePowerIfTargetUnderwater Flags = CanProtect,CanMirrorMove Description = Traps foes in a violent swirling whirlpool for four to five turns. #------------------------------- @@ -7885,7 +7885,7 @@ Accuracy = 100 TotalPP = 20 Target = NearOther Priority = 1 -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimesOrThreeForAshGreninja Flags = CanProtect,CanMirrorMove Description = The user hits the target with throwing stars 2-5 times in a row. This move always goes first. #------------------------------- @@ -7896,7 +7896,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 0DA +FunctionCode = StartHealUserEachTurn Description = The user envelops itself in a veil made of water. It regains some HP on every turn. #------------------------------- [RAINDANCE] @@ -7906,7 +7906,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = BothSides -FunctionCode = 100 +FunctionCode = StartRainWeather Description = The user summons a heavy rain that falls for five turns, powering up Water-type moves. #------------------------------- [SOAK] @@ -7916,7 +7916,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 061 +FunctionCode = SetTargetTypesToWater Flags = CanProtect,CanMirrorMove Description = The user shoots a torrent of water at the target and changes the target's type to Water. #------------------------------- @@ -7927,7 +7927,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = BothSides -FunctionCode = 09E +FunctionCode = StartWeakenFireMoves Description = The user soaks itself with water. The move weakens Fire-type moves while the user is in the battle. #------------------------------- [WITHDRAW] @@ -7937,5 +7937,5 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 01D +FunctionCode = RaiseUserDefense1 Description = The user withdraws its body into its hard shell, raising its Defense stat. diff --git a/PBS/Gen 8/moves.txt b/PBS/Gen 8/moves.txt index 59acf64dc..2d6717bdd 100644 --- a/PBS/Gen 8/moves.txt +++ b/PBS/Gen 8/moves.txt @@ -8,7 +8,7 @@ BaseDamage = 120 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = Using its tough and impressive horn, the user rams into the target with no letup. #------------------------------- @@ -20,7 +20,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user calls out its underlings to pummel the target. Critical hits land more easily. #------------------------------- @@ -32,7 +32,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove,Sound EffectChance = 10 Description = The user vibrates its wings to generate a damaging sound wave. It may also lower the target's Sp. Def stat. @@ -46,7 +46,7 @@ Accuracy = 100 TotalPP = 10 Target = NearOther Priority = 2 -FunctionCode = 174 +FunctionCode = FailsIfNotUserFirstTurn Flags = Contact,CanProtect,CanMirrorMove Description = Although this move has great power, it only works the first turn the user is in battle. #------------------------------- @@ -58,7 +58,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 16F +FunctionCode = HealAllyOrDamageFoe Flags = CanProtect,CanMirrorMove,Bomb Description = Fires an exploding pollen puff at enemies, or a HP-restoring one at allies. #------------------------------- @@ -70,7 +70,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = Contact,CanProtect,CanMirrorMove Description = The user drains the target's blood. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -82,7 +82,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user makes a lunge at the target, attacking with full force. This lowers the target's Attack stat. @@ -95,7 +95,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user slashes at the foe by crossing its scythes or claws as if they were a pair of scissors. #------------------------------- @@ -107,7 +107,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks with a sinister beam of light. It may also confuse the target. @@ -120,7 +120,7 @@ BaseDamage = 70 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user skitters behind the target to attack. This also lowers the target's Sp. Atk stat. @@ -133,7 +133,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0EE +FunctionCode = SwitchOutUserDamagingMove Flags = Contact,CanProtect,CanMirrorMove Description = After making its attack, the user rushes back to switch places with a party Pokémon in waiting. #------------------------------- @@ -145,7 +145,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 010 +FunctionCode = FlinchTargetTrampleMinimize Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user crushes its foes by rolling over them. This attack may make the target flinch. @@ -158,7 +158,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0F4 +FunctionCode = UserConsumeTargetBerry Flags = Contact,CanProtect,CanMirrorMove Description = The user bites the target. If the target is holding a Berry, the user eats it and gains its effect. #------------------------------- @@ -170,7 +170,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 02D +FunctionCode = RaiseUserMainStats1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The foe is attacked with powdery scales blown by wind. It may also raise all the user's stats. @@ -183,7 +183,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 150 +FunctionCode = RaiseUserAttack3IfTargetFaints Flags = Contact,CanProtect,CanMirrorMove Description = When the user knocks out a target with this move, the user's Attack stat rises drastically. #------------------------------- @@ -195,7 +195,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 20 Target = AllNearFoes -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = While resisting, the user attacks the opposing Pokémon. The targets' Sp. Atk stat is reduced. @@ -208,7 +208,7 @@ BaseDamage = 40 Accuracy = 95 TotalPP = 20 Target = NearOther -FunctionCode = 091 +FunctionCode = PowerHigherWithConsecutiveUse Flags = Contact,CanProtect,CanMirrorMove Description = The target is slashed with scythes or claws. Its power increases if it hits in succession. #------------------------------- @@ -220,7 +220,7 @@ BaseDamage = 25 Accuracy = 95 TotalPP = 20 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove Description = Sharp spikes are shot at the target in rapid succession. They hit two to five times in a row. #------------------------------- @@ -232,7 +232,7 @@ BaseDamage = 25 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0BE +FunctionCode = HitTwoTimesPoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The foe is stabbed twice by a pair of stingers. It may also poison the target. @@ -245,7 +245,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = Contact,CanProtect,CanMirrorMove Description = The target is infested and unable to flee for four to five turns. #------------------------------- @@ -256,7 +256,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 02A +FunctionCode = RaiseUserDefSpDef1 Description = The user calls out its underlings to shield its body, raising its Defense and Sp. Def stats. #------------------------------- [HEALORDER] @@ -266,7 +266,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = The user calls out its underlings to heal it. The user regains up to half of its max HP. #------------------------------- [POWDER] @@ -276,7 +276,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 148 +FunctionCode = TargetNextFireMoveDamagesTarget Flags = CanProtect,CanMirrorMove,Powder Description = The target is covered in a powder that explodes and damages it if it uses a Fire-type move. #------------------------------- @@ -287,7 +287,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 02B +FunctionCode = RaiseUserSpAtkSpDefSpd1 Flags = Dance Description = The user performs a beautiful dance. It boosts the user's Sp. Atk, Sp. Def, and Speed stats. #------------------------------- @@ -299,7 +299,7 @@ Accuracy = 0 TotalPP = 20 Target = User Priority = 2 -FunctionCode = 117 +FunctionCode = RedirectAllMovesToUser Flags = Powder Description = The user scatters irritating powder to draw attention to itself. Opponents aim only at the user. #------------------------------- @@ -310,7 +310,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = CanMirrorMove Description = The user ensnares the target with thin, gooey silk so it can't flee from battle. #------------------------------- @@ -321,7 +321,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = FoeSide -FunctionCode = 153 +FunctionCode = AddStickyWebToFoeSide Description = Weaves a sticky net around the opposing team, which lowers their Speed stats upon switching in. #------------------------------- [STRINGSHOT] @@ -331,7 +331,7 @@ Category = Status Accuracy = 95 TotalPP = 40 Target = AllNearFoes -FunctionCode = 04D +FunctionCode = LowerTargetSpeed2 Flags = CanProtect,CanMirrorMove Description = The foe is bound with silk blown from the user's mouth. This silk reduces the target's Speed. #------------------------------- @@ -342,7 +342,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 039 +FunctionCode = RaiseUserSpAtk3 Description = The user stares at flashing lights to focus its mind, drastically raising its Sp. Atk stat. #------------------------------- [HYPERSPACEFURY] @@ -353,7 +353,7 @@ BaseDamage = 100 Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 13B +FunctionCode = HoopaRemoveProtectionsBypassSubstituteLowerUserDef1 Flags = CanMirrorMove Description = Unleashes a barrage of multi-arm attacks, skipping protections. The user's Defense stat falls. #------------------------------- @@ -365,7 +365,7 @@ BaseDamage = 95 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 121 +FunctionCode = UseTargetAttackInsteadOfUserAttack Flags = Contact,CanProtect,CanMirrorMove Description = The user turns the foe's power against it. It does more damage the higher the target's Attack stat. #------------------------------- @@ -377,7 +377,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The user transforms its wrath into a fire-like aura to attack. This may also make foes flinch. @@ -390,7 +390,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0A9 +FunctionCode = IgnoreTargetDefSpDefEvaStatStages Flags = Contact,CanProtect,CanMirrorMove Description = The user swings both arms and hits the target. Ignores the target's stat changes. #------------------------------- @@ -402,7 +402,7 @@ BaseDamage = 85 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 40 Description = The user lets loose a pitch-black shock wave at its target. It may also lower the target's accuracy. @@ -415,7 +415,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 20 Description = The user crunches up the target with sharp fangs. It may also lower the target's Defense stat. @@ -428,7 +428,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = Other -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove,Pulse EffectChance = 20 Description = The user releases a horrible aura imbued with dark thoughts. It may also make the target flinch. @@ -441,7 +441,7 @@ BaseDamage = 80 Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user pretends to bow its head, but then it stabs the target with its disheveled hair. Never misses. #------------------------------- @@ -453,7 +453,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 190 +FunctionCode = TrapUserAndTargetInBattle Flags = Contact,CanProtect,CanMirrorMove Description = This move prevents the user and the target from switching out until either of them faints. #------------------------------- @@ -465,7 +465,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 16C +FunctionCode = DisableTargetSoundMoves Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks the target's throat. The target cannot use sound-based moves for two turns. @@ -478,7 +478,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 0A0 +FunctionCode = AlwaysCriticalHit Flags = Contact,CanProtect,CanMirrorMove Description = Strikes with a fierce blow through mastery of the Dark style. Always results in a critical hit. #------------------------------- @@ -490,7 +490,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 184 +FunctionCode = DoublePowerIfUserStatsLoweredThisTurn Flags = Contact,CanProtect,CanMirrorMove Description = The user lashes out to vent its frustration. Power is doubled if its stats dropped this turn. #------------------------------- @@ -502,7 +502,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user slashes the target the instant an opportunity arises. Critical hits land more easily. #------------------------------- @@ -515,7 +515,7 @@ Accuracy = 100 TotalPP = 5 Target = NearOther Priority = 1 -FunctionCode = 116 +FunctionCode = FailsIfTargetActed Flags = Contact,CanProtect,CanMirrorMove Description = This move enables the user to attack first. It fails if the target is not readying an attack, however. #------------------------------- @@ -527,7 +527,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0F0 +FunctionCode = RemoveTargetItem Flags = Contact,CanProtect,CanMirrorMove Description = The user slaps down the target's held item, preventing that item from being used in the battle. #------------------------------- @@ -539,7 +539,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 082 +FunctionCode = DoublePowerIfTargetLostHPThisTurn Flags = Contact,CanProtect,CanMirrorMove Description = If the target has already taken some damage in the same turn, this attack's power is doubled. #------------------------------- @@ -551,7 +551,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 30 Description = The target is bitten with viciously sharp fangs. It may make the target flinch. @@ -564,7 +564,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = AllNearOthers -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user swings its body around violently to inflict damage on everything in its vicinity. #------------------------------- @@ -576,7 +576,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user draws up to the foe disarmingly, then throws a sucker punch. It hits without fail. #------------------------------- @@ -588,7 +588,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 0F1 +FunctionCode = UserTakesTargetItem Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks and steals the foe's held item simultaneously. It can't steal if the user holds an item. #------------------------------- @@ -600,7 +600,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 15 Target = AllNearFoes -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = CanProtect,CanMirrorMove,Sound EffectChance = 100 Description = The user yells as if it is ranting about something, making the target's Sp. Atk stat decrease. @@ -613,7 +613,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 084 +FunctionCode = DoublePowerIfTargetActed Flags = Contact,CanProtect,CanMirrorMove Description = If the user moves after the target, this attack's power will be doubled. #------------------------------- @@ -625,7 +625,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 088 +FunctionCode = PursueSwitchingFoe Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that inflicts double damage if used on a target that is switching out of battle. #------------------------------- @@ -637,7 +637,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0C1 +FunctionCode = HitOncePerUserTeamMember Flags = CanProtect,CanMirrorMove Description = The user gets all the party Pokémon to attack the foe. The more party Pokémon, the more damage. #------------------------------- @@ -649,7 +649,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0F7 +FunctionCode = ThrowUserItemAtTarget Flags = CanProtect,CanMirrorMove Description = The user flings its held item at the target to attack. Its power and effects depend on the item. #------------------------------- @@ -661,7 +661,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 08E +FunctionCode = PowerHigherWithUserPositiveStatStages Flags = Contact,CanProtect,CanMirrorMove Description = The user boasts of its strength. Power increases the more the user's stats are raised. #------------------------------- @@ -673,7 +673,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 08F +FunctionCode = PowerHigherWithTargetPositiveStatStages Flags = Contact,CanProtect,CanMirrorMove Description = This attack's power increases the more the target has powered up with stat changes. #------------------------------- @@ -684,7 +684,7 @@ Category = Status Accuracy = 50 TotalPP = 10 Target = AllNearFoes -FunctionCode = 003 +FunctionCode = SleepTargetIfUserDarkrai Flags = CanProtect,CanMirrorMove Description = Opposing Pokémon are dragged into a world of total darkness that makes them sleep. #------------------------------- @@ -695,7 +695,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0F8 +FunctionCode = StartTargetCannotUseItem Flags = CanProtect,CanMirrorMove Description = It prevents the target from using its held item. Its Trainer is also prevented from using items on it. #------------------------------- @@ -706,7 +706,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 04F +FunctionCode = LowerTargetSpDef2 Flags = CanProtect,CanMirrorMove Description = The user feigns crying to fluster the target, harshly lowering its Sp. Def stat. #------------------------------- @@ -717,7 +717,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 040 +FunctionCode = RaiseTargetSpAtk1ConfuseTarget Flags = CanProtect,CanMirrorMove Description = Flattery is used to confuse the target. However, it also raises the target's Sp. Atk stat. #------------------------------- @@ -728,7 +728,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 029 +FunctionCode = RaiseUserAtkAcc1 Description = The user sharpens its claws to boost its Attack stat and accuracy. #------------------------------- [MEMENTO] @@ -738,7 +738,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0E2 +FunctionCode = UserFaintsLowerTargetAtkSpAtk2 Flags = CanProtect,CanMirrorMove Description = The user faints when using this move. In return, it harshly lowers the target's Attack and Sp. Atk. #------------------------------- @@ -749,7 +749,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 032 +FunctionCode = RaiseUserSpAtk2 Description = The user stimulates its brain by thinking bad thoughts. It sharply raises the user's Sp. Atk. #------------------------------- [OBSTRUCT] @@ -760,7 +760,7 @@ Accuracy = 100 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 186 +FunctionCode = ProtectUserFromDamagingMovesObstruct Description = The user protects itself from all attacks. Direct contact lowers the attacker's Defense. #------------------------------- [PARTINGSHOT] @@ -770,7 +770,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 151 +FunctionCode = LowerTargetAtkSpAtk1SwitchOutUser Flags = CanProtect,CanMirrorMove,Sound Description = With a parting threat, the user lowers the target's Attack and Sp. Atk stats. Then it switches out. #------------------------------- @@ -781,7 +781,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 11E +FunctionCode = TargetActsLast Flags = CanProtect,CanMirrorMove Description = The user suppresses the target and makes its move go last. #------------------------------- @@ -793,7 +793,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 0B2 +FunctionCode = StealAndUseBeneficialStatusMove Description = The user steals the effects of any healing or stat-changing move the foe attempts to use. #------------------------------- [SWITCHEROO] @@ -803,7 +803,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0F2 +FunctionCode = UserTargetSwapItems Flags = CanProtect,CanMirrorMove Description = The user trades held items with the target faster than the eye can follow. #------------------------------- @@ -814,7 +814,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0BA +FunctionCode = DisableTargetStatusMoves Flags = CanProtect,CanMirrorMove Description = The target is taunted into a rage that allows it to use only attack moves for three turns. #------------------------------- @@ -825,7 +825,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 141 +FunctionCode = InvertTargetStatStages Flags = CanProtect,CanMirrorMove Description = All stat changes affecting the target turn topsy-turvy and become the opposite of what they were. #------------------------------- @@ -836,7 +836,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0B7 +FunctionCode = DisableTargetUsingSameMoveConsecutively Flags = CanProtect,CanMirrorMove Description = The user torments and enrages the foe, making it incapable of using the same move twice in a row. #------------------------------- @@ -848,7 +848,7 @@ BaseDamage = 160 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = This is Eternatus's most powerful attack in its original form. The user can't move on the next turn. #------------------------------- @@ -860,7 +860,7 @@ BaseDamage = 150 Accuracy = 100 TotalPP = 5 Target = AllNearFoes -FunctionCode = 08B +FunctionCode = PowerHigherWithUserHP Flags = CanProtect,CanMirrorMove Description = Converts life-force into power to attack. The lower the user's HP, the lower the move's power. #------------------------------- @@ -872,7 +872,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The user blasts the target with power that distorts even time. The user must rest on the next turn. #------------------------------- @@ -884,7 +884,7 @@ BaseDamage = 130 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 03F +FunctionCode = LowerUserSpAtk2 Flags = CanProtect,CanMirrorMove Description = Comets are summoned down from the sky. The attack's recoil harshly reduces the user's Sp. Atk stat. #------------------------------- @@ -896,7 +896,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = RandomNearFoe -FunctionCode = 0D2 +FunctionCode = MultiTurnAttackConfuseUserAtEnd Flags = Contact,CanProtect,CanMirrorMove Description = The user rampages and attacks for two to three turns. It then becomes confused, however. #------------------------------- @@ -908,7 +908,7 @@ BaseDamage = 110 Accuracy = 100 TotalPP = 5 Target = AllNearFoes -FunctionCode = 15F +FunctionCode = LowerUserDefense1 Flags = CanProtect,CanMirrorMove,Sound Description = The user rubs its scales and makes a huge noise. Also lowers the user's Defense stat. #------------------------------- @@ -920,7 +920,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 165 +FunctionCode = NegateTargetAbilityIfTargetActed Flags = CanProtect,CanMirrorMove Description = If the target has already moved this turn, the effect of its Ability is negated. #------------------------------- @@ -932,7 +932,7 @@ BaseDamage = 100 Accuracy = 75 TotalPP = 10 Target = NearOther -FunctionCode = 010 +FunctionCode = FlinchTargetTrampleMinimize Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user tackles the foe while exhibiting overwhelming menace. It may also make the target flinch. @@ -945,7 +945,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect Description = The user unleashes a strong beam from its core. #------------------------------- @@ -957,7 +957,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user tears the target along with the space around it. Critical hits land more easily. #------------------------------- @@ -969,7 +969,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user uses its body like a hammer to attack the target and inflict damage. #------------------------------- @@ -981,7 +981,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Pulse Description = The target is attacked with a shock wave generated by the user's gaping mouth. #------------------------------- @@ -993,7 +993,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user slashes the target with huge, sharp claws. #------------------------------- @@ -1005,7 +1005,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 15 Target = AllNearFoes -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user swings its tough tail wildly and attacks all foes. This also lowers their Attack stats. @@ -1018,7 +1018,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user exhales a mighty gust that inflicts damage. It may also leave the target with paralysis. @@ -1032,7 +1032,7 @@ Accuracy = 90 TotalPP = 10 Target = NearOther Priority = -6 -FunctionCode = 0EC +FunctionCode = SwitchOutTargetDamagingMove Flags = Contact,CanProtect,CanMirrorMove Description = The user knocks away the target and drags out another Pokémon in its party. In the wild, the battle ends. #------------------------------- @@ -1044,7 +1044,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 188 +FunctionCode = HitTwoTimesTargetThenTargetAlly Flags = CanProtect,CanMirrorMove Description = The user attacks twice using Dreepy. If there are two targets, this move hits each one once. #------------------------------- @@ -1056,7 +1056,7 @@ BaseDamage = 40 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks its target by hitting it with brutal strikes. The target is hit twice in a row. #------------------------------- @@ -1068,7 +1068,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 20 Target = AllNearFoes -FunctionCode = 078 +FunctionCode = FlinchTargetDoublePowerIfTargetInSky Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The user whips up a vicious tornado to tear at the opposing team. It may also make targets flinch. @@ -1081,7 +1081,7 @@ BaseDamage = 25 Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 18A +FunctionCode = HitTwoToFiveTimesRaiseUserSpd1LowerUserDef1 Flags = CanProtect,CanMirrorMove Description = Attacks by shooting scales two to five times in a row. Boosts the user's Speed but lowers its Defense. #------------------------------- @@ -1093,7 +1093,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 06B +FunctionCode = FixedDamage40 Flags = CanProtect,CanMirrorMove Description = This attack hits the target with a shock wave of pure rage. This attack always inflicts 40 HP damage. #------------------------------- @@ -1104,7 +1104,7 @@ Category = Status Accuracy = 100 TotalPP = 5 Target = User -FunctionCode = 17A +FunctionCode = RaiseUserMainStats1LoseThirdOfTotalHP Flags = Sound Description = The user raises all its stats by using some of its HP. #------------------------------- @@ -1115,7 +1115,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 026 +FunctionCode = RaiseUserAtkSpd1 Flags = Dance Description = The user vigorously performs a mystic, powerful dance that boosts its Attack and Speed stats. #------------------------------- @@ -1127,7 +1127,7 @@ BaseDamage = 130 Accuracy = 85 TotalPP = 5 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user charges at its foe, surrounding itself with lightning. It may also leave the target paralyzed. @@ -1140,7 +1140,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FD +FunctionCode = RecoilThirdOfDamageDealtParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 10 Description = The user electrifies itself, then charges at the foe. It causes considerable damage to the user as well. @@ -1153,7 +1153,7 @@ BaseDamage = 120 Accuracy = 50 TotalPP = 5 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 100 Description = The user fires an electric blast like a cannon to inflict damage and cause paralysis. @@ -1166,7 +1166,7 @@ BaseDamage = 110 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 178 +FunctionCode = TypeDependsOnUserMorpekoFormRaiseUserSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = Morpeko attacks and raises its Speed with energy stored in its cheeks. Type changes with the user's form. @@ -1179,7 +1179,7 @@ BaseDamage = 110 Accuracy = 70 TotalPP = 10 Target = NearOther -FunctionCode = 008 +FunctionCode = ParalyzeTargetAlwaysHitsInRainHitsTargetInSky Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = A wicked thunderbolt is dropped on the foe to inflict damage. It may also leave the target paralyzed. @@ -1192,7 +1192,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 079 +FunctionCode = DoublePowerAfterFusionFlare Flags = CanProtect,CanMirrorMove Description = The user throws down a giant thunderbolt. It does more damage if influenced by an enormous flame. #------------------------------- @@ -1204,7 +1204,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 146 +FunctionCode = NormalMovesBecomeElectric Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user attacks with electrically charged fists. Normal-type moves become Electric-type. #------------------------------- @@ -1216,7 +1216,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A strong electric blast is loosed at the target. It may also leave the target with paralysis. @@ -1229,7 +1229,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FA +FunctionCode = RecoilQuarterOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user shrouds itself in electricity and smashes into its foe. It also damages the user a little. #------------------------------- @@ -1241,7 +1241,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 183 +FunctionCode = DoublePowerIfTargetNotActed Flags = Contact,CanProtect,CanMirrorMove Description = Stabs the target with an electrified beak. Power is doubled if the user attacks first. #------------------------------- @@ -1253,7 +1253,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = AllNearOthers -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = A flare of electricity is loosed to strike the area around the user. It may also cause paralysis. @@ -1266,7 +1266,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Sound Description = The user attacks all foes by twanging a guitar or bass guitar, causing a huge echo and strong vibration. #------------------------------- @@ -1278,7 +1278,7 @@ BaseDamage = 80 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = CanProtect,CanMirrorMove Description = The user traps the target in a cage of sparking electricity for four to five turns. #------------------------------- @@ -1290,7 +1290,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = A strong electric blast crashes down on the target. This may also make the target flinch. @@ -1303,7 +1303,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 10 Description = The target is punched with an electrified fist. It may also leave the target with paralysis. @@ -1316,7 +1316,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 180 +FunctionCode = DoublePowerInElectricTerrain Flags = CanProtect,CanMirrorMove Description = The user attacks with electric voltage rising from the ground. Power is doubled on Electric Terrain. #------------------------------- @@ -1328,7 +1328,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0EE +FunctionCode = SwitchOutUserDamagingMove Flags = CanProtect,CanMirrorMove Description = After making its attack, the user rushes back to switch places with a party Pokémon in waiting. #------------------------------- @@ -1340,7 +1340,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = AllNearOthers -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = CanProtect,CanMirrorMove Description = The user attacks everything around it. The user's HP is restored by half the damage dealt. #------------------------------- @@ -1352,7 +1352,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user throws an electrically charged tackle at the target. It may also leave the target with paralysis. @@ -1365,7 +1365,7 @@ BaseDamage = 65 Accuracy = 95 TotalPP = 15 Target = NearOther -FunctionCode = 009 +FunctionCode = ParalyzeFlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 100 Description = The user bites with electrified fangs. It may also make the target flinch or leave it with paralysis. @@ -1378,7 +1378,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user strikes the target with a quick jolt of electricity. This attack cannot be evaded. #------------------------------- @@ -1390,7 +1390,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 15 Target = AllNearFoes -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user captures and attacks foes by using an electric net, which lowers their Speed stat. @@ -1403,7 +1403,7 @@ BaseDamage = 50 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 020 +FunctionCode = RaiseUserSpAtk1 Flags = CanProtect,CanMirrorMove EffectChance = 70 Description = The user fires a concentrated bundle of electricity. It may also raise the user's Sp. Atk stat. @@ -1416,7 +1416,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A jolt of electricity is hurled at the foe to inflict damage. It may also leave the target with paralysis. @@ -1429,7 +1429,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user nuzzles its electrified cheeks against the target. This also leaves the target with paralysis. @@ -1442,7 +1442,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 099 +FunctionCode = PowerHigherWithUserFasterThanTarget Flags = CanProtect,CanMirrorMove,Bomb Description = The user hurls an electric orb at the foe. It does more damage the faster the user is. #------------------------------- @@ -1453,7 +1453,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 021 +FunctionCode = RaiseUserSpDef1PowerUpElectricMove Description = The user boosts the power of the Electric move it uses next. It also raises the user's Sp. Def stat. #------------------------------- [EERIEIMPULSE] @@ -1463,7 +1463,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 13D +FunctionCode = LowerTargetSpAtk2 Flags = CanProtect,CanMirrorMove Description = The user's body generates an eerie impulse. Harshly lowers the target's Sp. Atk stat. #------------------------------- @@ -1474,7 +1474,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 154 +FunctionCode = StartElectricTerrain Description = The user electrifies the ground for five turns. Pokémon on the ground no longer fall asleep. #------------------------------- [ELECTRIFY] @@ -1484,7 +1484,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 145 +FunctionCode = TargetMovesBecomeElectric Flags = CanProtect,CanMirrorMove Description = If the target uses a move after being electrified, that move becomes Electric-type. #------------------------------- @@ -1496,7 +1496,7 @@ Accuracy = 0 TotalPP = 25 Target = BothSides Priority = 1 -FunctionCode = 146 +FunctionCode = NormalMovesBecomeElectric Description = The user disperses electrically charged particles. Normal-type moves become Electric-type. #------------------------------- [MAGNETRISE] @@ -1506,7 +1506,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 119 +FunctionCode = StartUserAirborne Description = The user levitates using electrically generated magnetism for five turns. #------------------------------- [MAGNETICFLUX] @@ -1516,7 +1516,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = UserAndAllies -FunctionCode = 137 +FunctionCode = RaisePlusMinusUserAndAlliesDefSpDef1 Description = Manipulates magnetic fields to raise the Defense and Sp. Def stats of allies with Plus or Minus Abilities. #------------------------------- [THUNDERWAVE] @@ -1526,7 +1526,7 @@ Category = Status Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTargetIfNotTypeImmune Flags = CanProtect,CanMirrorMove Description = A weak electric charge is launched at the target. It causes paralysis if it hits. #------------------------------- @@ -1538,7 +1538,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0FC +FunctionCode = RecoilHalfOfDamageDealt Flags = CanProtect,CanMirrorMove Description = Fires a powerful beam of light drawn from the Eternal Flower. It also damages the user a lot. #------------------------------- @@ -1550,7 +1550,7 @@ BaseDamage = 130 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 03F +FunctionCode = LowerUserSpAtk2 Flags = CanProtect,CanMirrorMove Description = The user unleashes a strong beam. The attack's recoil harshly lowers the user's Sp. Atk stat. #------------------------------- @@ -1562,7 +1562,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = AllNearOthers -FunctionCode = 18E +FunctionCode = UserFaintsPowersUpInMistyTerrainExplosive Flags = CanProtect,CanMirrorMove Description = The user attacks everything around and faints upon using this move. Power increases on Misty Terrain. #------------------------------- @@ -1574,7 +1574,7 @@ BaseDamage = 95 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks by borrowing the power of the moon. This may also lower the target's Sp. Atk stat. @@ -1587,7 +1587,7 @@ BaseDamage = 90 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 10 Description = The user plays rough with the target and attacks it. This may also lower the target's Attack stat. @@ -1600,7 +1600,7 @@ BaseDamage = 90 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The user attacks the target by emitting steam. This may also confuse the target. @@ -1613,7 +1613,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user damages opposing Pokémon by emitting a powerful flash. #------------------------------- @@ -1625,7 +1625,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks the target with immense force. This also lowers the target's Sp. Atk stat. @@ -1638,7 +1638,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 14F +FunctionCode = HealUserByThreeQuartersOfDamageDone Flags = Contact,CanProtect,CanMirrorMove Description = The user steals the target's HP with a kiss. The user's HP is restored by over half of the damage dealt. #------------------------------- @@ -1650,7 +1650,7 @@ BaseDamage = 40 Accuracy = 0 TotalPP = 15 Target = AllNearFoes -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Sound Description = Letting out a charming cry, the user does emotional damage to foes. This attack never misses. #------------------------------- @@ -1662,7 +1662,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user stirs up a fairy wind and strikes the target with it. #------------------------------- @@ -1674,7 +1674,7 @@ BaseDamage = 1 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 06C +FunctionCode = FixedDamageHalfTargetHP Flags = CanProtect,CanMirrorMove Description = The user hits the target with the force of nature. It halves the target's HP. #------------------------------- @@ -1685,7 +1685,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearAlly -FunctionCode = 138 +FunctionCode = RaiseAllySpDef1 Description = The user raises the Sp. Def stat of an ally Pokémon by using a mysterious aroma. #------------------------------- [BABYDOLLEYES] @@ -1696,7 +1696,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = CanProtect,CanMirrorMove Description = The user stares with its baby-doll eyes, which lowers the target's Attack stat. Always goes first. #------------------------------- @@ -1707,7 +1707,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 04B +FunctionCode = LowerTargetAttack2 Flags = CanProtect,CanMirrorMove Description = The user charmingly gazes at the foe, making it less wary. The target's Attack is harshly lowered. #------------------------------- @@ -1719,7 +1719,7 @@ Accuracy = 0 TotalPP = 10 Target = UserSide Priority = 3 -FunctionCode = 14A +FunctionCode = ProtectUserSideFromStatusMoves Description = The user protects itself and its allies from status moves with a mysterious power. #------------------------------- [DECORATE] @@ -1729,7 +1729,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 17C +FunctionCode = RaiseTargetAtkSpAtk2 Description = The user sharply raises the target's Attack and Sp. Atk stats by decorating the target. #------------------------------- [FAIRYLOCK] @@ -1739,7 +1739,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 152 +FunctionCode = TrapAllBattlersInBattleForOneTurn Flags = CanMirrorMove Description = By locking down the battlefield, the user keeps all Pokémon from fleeing during the next turn. #------------------------------- @@ -1750,7 +1750,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 16E +FunctionCode = HealTargetDependingOnGrassyTerrain Flags = CanProtect Description = The user restores the target's HP by up to half of its max HP. It restores more HP when the terrain is grass. #------------------------------- @@ -1761,7 +1761,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = AllBattlers -FunctionCode = 13F +FunctionCode = RaiseGrassBattlersDef1 Description = The user raises the Defense stats of all Grass-type Pokémon in battle with a mysterious power. #------------------------------- [GEOMANCY] @@ -1771,7 +1771,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 14E +FunctionCode = TwoTurnAttackRaiseUserSpAtkSpDefSpd2 Description = The user absorbs energy and sharply raises its Sp. Atk, Sp. Def, and Speed stats on the next turn. #------------------------------- [MISTYTERRAIN] @@ -1781,7 +1781,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 156 +FunctionCode = StartMistyTerrain Description = The user covers the ground with mist for five turns. Grounded Pokémon can't gain status conditions. #------------------------------- [MOONLIGHT] @@ -1791,7 +1791,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0D8 +FunctionCode = HealUserDependingOnWeather Description = The user restores its own HP. The amount of HP regained varies with the weather. #------------------------------- [SWEETKISS] @@ -1801,7 +1801,7 @@ Category = Status Accuracy = 75 TotalPP = 10 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove Description = The user kisses the target with a sweet, angelic cuteness that causes confusion. #------------------------------- @@ -1814,7 +1814,7 @@ Accuracy = 100 TotalPP = 20 Target = NearOther Priority = -3 -FunctionCode = 115 +FunctionCode = FailsIfUserDamagedThisTurn Flags = Contact,CanProtect,Punching Description = The user focuses its mind before launching a punch. It will fail if the user is hit before it is used. #------------------------------- @@ -1826,7 +1826,7 @@ BaseDamage = 150 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The user attacks wildly with its thick leek. The user can't move on the next turn. #------------------------------- @@ -1838,7 +1838,7 @@ BaseDamage = 130 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 10B +FunctionCode = CrashDamageIfFailsUnusableInGravity Flags = Contact,CanProtect,CanMirrorMove Description = The target is attacked with a knee kick from a jump. If it misses, the user is hurt instead. #------------------------------- @@ -1850,7 +1850,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 03C +FunctionCode = LowerUserDefSpDef1 Flags = Contact,CanProtect,CanMirrorMove Description = The user fights the foe up close without guarding itself. It also cuts the user's Defense and Sp. Def. #------------------------------- @@ -1862,7 +1862,7 @@ BaseDamage = 120 Accuracy = 70 TotalPP = 5 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 10 Description = The user heightens its mental focus and unleashes its power. It may also lower the target's Sp. Def. @@ -1875,7 +1875,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 03B +FunctionCode = LowerUserAtkDef1 Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks the target with great power. However, it also lowers the user's Attack and Defense. #------------------------------- @@ -1887,7 +1887,7 @@ BaseDamage = 100 Accuracy = 80 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user delivers a double chop with its forearms crossed. Critical hits land more easily. #------------------------------- @@ -1899,7 +1899,7 @@ BaseDamage = 100 Accuracy = 50 TotalPP = 5 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 100 Description = The user punches the target with full, concentrated power. It confuses the target if it hits. @@ -1912,7 +1912,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 10 Target = Other -FunctionCode = 144 +FunctionCode = EffectivenessIncludesFlyingType Flags = Contact,CanProtect,CanMirrorMove Description = The user dives down onto the target from the sky. This move is Fighting and Flying type simultaneously. #------------------------------- @@ -1924,7 +1924,7 @@ BaseDamage = 100 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 03E +FunctionCode = LowerUserSpeed1 Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user swings and hits with its strong and heavy fist. It lowers the user's Speed, however. #------------------------------- @@ -1936,7 +1936,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 10B +FunctionCode = CrashDamageIfFailsUnusableInGravity Flags = Contact,CanProtect,CanMirrorMove Description = The user jumps up high, then strikes with a kick. If the kick misses, the user hurts itself. #------------------------------- @@ -1948,7 +1948,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0A9 +FunctionCode = IgnoreTargetDefSpDefEvaStatStages Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks by slicing with its long horns. The target's stat changes don't affect the damage. #------------------------------- @@ -1960,7 +1960,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = Overwhelms the target with lightning-like movement, then kicks. Lowers the target's Defense stat. @@ -1973,7 +1973,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 122 +FunctionCode = UseTargetDefenseInsteadOfTargetSpDef Flags = CanProtect,CanMirrorMove Description = The user cuts with its long horn. The odd power contained in it does physical damage to the foe. #------------------------------- @@ -1985,7 +1985,7 @@ BaseDamage = 85 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 11B +FunctionCode = HitsTargetInSky Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user attacks the target with an uppercut thrown skyward with force. #------------------------------- @@ -1997,7 +1997,7 @@ BaseDamage = 80 Accuracy = 0 TotalPP = 20 Target = Other -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Pulse,Bomb Description = The user looses a blast of aura power from deep within its body. This move is certain to hit. #------------------------------- @@ -2009,7 +2009,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 197 +FunctionCode = UseUserBaseDefenseInsteadOfUserBaseAttack Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks by slamming its body into the target. Power increases the higher the user's Defense is. #------------------------------- @@ -2021,7 +2021,7 @@ BaseDamage = 80 Accuracy = 80 TotalPP = 20 Target = NearOther -FunctionCode = 0FA +FunctionCode = RecoilQuarterOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user grabs the target and recklessly dives for the ground. It also hurts the user slightly. #------------------------------- @@ -2033,7 +2033,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 10A +FunctionCode = RemoveScreens Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks with a swift chop. It can also break any barrier such as Light Screen and Reflect. #------------------------------- @@ -2045,7 +2045,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = Contact,CanProtect,CanMirrorMove,Punching Description = An energy-draining punch. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -2058,7 +2058,7 @@ Accuracy = 0 TotalPP = 10 Target = NearOther Priority = -1 -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks last. In return, this throw move is guaranteed not to miss. #------------------------------- @@ -2070,7 +2070,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 07D +FunctionCode = DoublePowerIfTargetAsleepCureTarget Flags = Contact,CanProtect,CanMirrorMove Description = This attack inflicts big damage on a sleeping target. It also wakes the target up, however. #------------------------------- @@ -2082,7 +2082,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks the target's legs swiftly, reducing the target's Speed stat. @@ -2096,7 +2096,7 @@ Accuracy = 90 TotalPP = 10 Target = NearOther Priority = -6 -FunctionCode = 0EC +FunctionCode = SwitchOutTargetDamagingMove Flags = Contact,CanProtect,CanMirrorMove Description = The user throws the target and drags out another Pokémon in its party. In the wild, the battle ends. #------------------------------- @@ -2108,7 +2108,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is attacked with a shock wave. It may also leave the target with paralysis. @@ -2122,7 +2122,7 @@ Accuracy = 100 TotalPP = 10 Target = NearOther Priority = -4 -FunctionCode = 081 +FunctionCode = DoublePowerIfUserLostHPThisTurn Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that inflicts double the damage if the user has been hurt by the foe in the same turn. #------------------------------- @@ -2134,7 +2134,7 @@ BaseDamage = 60 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user lashes out with a quick, spinning kick. It may also make the target flinch. @@ -2147,7 +2147,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0A0 +FunctionCode = AlwaysCriticalHit Flags = Contact,CanProtect,CanMirrorMove Description = The user strikes the target with a fierce blow. This attack always results in a critical hit. #------------------------------- @@ -2159,7 +2159,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The target is attacked with a sharp chop. Critical hits land more easily. #------------------------------- @@ -2172,7 +2172,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user throws a punch at blinding speed. It is certain to strike first. #------------------------------- @@ -2184,7 +2184,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 100 Description = Striking opponents repeatedly makes the user's fists harder, raising the user's Attack stat. @@ -2197,7 +2197,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 50 Description = The user attacks with a punch that can shatter a rock. It may also lower the foe's Defense stat. @@ -2211,7 +2211,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user whirls its fists to send a wave of pure vacuum at the target. This move always goes first. #------------------------------- @@ -2223,7 +2223,7 @@ BaseDamage = 30 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = Contact,CanProtect,CanMirrorMove Description = The target is quickly kicked twice in succession using both feet. #------------------------------- @@ -2235,7 +2235,7 @@ BaseDamage = 15 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user looses a flurry of open-palmed arm thrusts that hit two to five times in a row. #------------------------------- @@ -2247,7 +2247,7 @@ BaseDamage = 10 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0BF +FunctionCode = HitThreeTimesPowersUpWithEachHit Flags = Contact,CanProtect,CanMirrorMove Description = A consecutive three-kick attack that becomes more powerful with each successive hit. #------------------------------- @@ -2260,7 +2260,7 @@ Accuracy = 100 TotalPP = 20 Target = None Priority = -5 -FunctionCode = 071 +FunctionCode = CounterPhysicalDamage Flags = Contact,CanProtect Description = A retaliation move that counters any physical attack, inflicting double the damage taken. #------------------------------- @@ -2272,7 +2272,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 0E1 +FunctionCode = UserFaintsFixedDamageUserHP Flags = CanProtect Description = The user risks all to attack the foe. The user faints but does damage equal to its HP. #------------------------------- @@ -2284,7 +2284,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 09A +FunctionCode = PowerHigherWithTargetWeight Flags = Contact,CanProtect,CanMirrorMove Description = A powerful low kick that makes the foe fall over. It inflicts greater damage on heavier foes. #------------------------------- @@ -2296,7 +2296,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 098 +FunctionCode = PowerLowerWithUserHP Flags = Contact,CanProtect,CanMirrorMove Description = An all-out attack that becomes more powerful the less HP the user has. #------------------------------- @@ -2308,7 +2308,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 06D +FunctionCode = FixedDamageUserLevel Flags = Contact,CanProtect,CanMirrorMove Description = The target is thrown using the power of gravity. It inflicts damage equal to the user's level. #------------------------------- @@ -2319,7 +2319,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 024 +FunctionCode = RaiseUserAtkDef1 Description = The user tenses its muscles to bulk up its body, boosting both its Attack and Defense stats. #------------------------------- [COACHING] @@ -2329,7 +2329,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = AllAllies -FunctionCode = 17B +FunctionCode = RaiseUserAndAlliesAtkDef1 Flags = CanMirrorMove Description = The user properly coaches its ally Pokémon, boosting their Attack and Defense stats. #------------------------------- @@ -2341,7 +2341,7 @@ Accuracy = 0 TotalPP = 5 Target = User Priority = 4 -FunctionCode = 0AA +FunctionCode = ProtectUser Description = It enables the user to evade all attacks. Its chance of failing rises if it is used in succession. #------------------------------- [MATBLOCK] @@ -2351,7 +2351,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = UserSide -FunctionCode = 149 +FunctionCode = ProtectUserSideFromDamagingMovesIfUserFirstTurn Description = Using a pulled-up mat as a shield, the user protects itself and its allies from damaging moves. #------------------------------- [NORETREAT] @@ -2361,7 +2361,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 179 +FunctionCode = RaiseUserMainStats1TrapUserInBattle Description = This move raises all the user's stats but prevents the user from switching out or fleeing. #------------------------------- [OCTOLOCK] @@ -2371,7 +2371,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 18F +FunctionCode = TrapTargetInBattleLowerTargetDefSpDef1EachTurn Flags = CanProtect,CanMirrorMove Description = Locks the target in and prevents it from fleeing. Also lowers the target's Defense and Sp. Def each turn. #------------------------------- @@ -2383,7 +2383,7 @@ Accuracy = 0 TotalPP = 15 Target = UserSide Priority = 3 -FunctionCode = 0AB +FunctionCode = ProtectUserSideFromPriorityMoves Description = The user protects itself and its allies from priority moves. If may fail if used in succession. #------------------------------- [VCREATE] @@ -2394,7 +2394,7 @@ BaseDamage = 180 Accuracy = 95 TotalPP = 5 Target = NearOther -FunctionCode = 03D +FunctionCode = LowerUserDefSpDefSpd1 Flags = Contact,CanProtect,CanMirrorMove Description = With a fiery forehead, the user hurls itself at the foe. It lowers the user's Defense, Sp. Def, and Speed. #------------------------------- @@ -2406,7 +2406,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The target is razed by a fiery explosion. The user must rest on the next turn, however. #------------------------------- @@ -2418,7 +2418,7 @@ BaseDamage = 150 Accuracy = 100 TotalPP = 5 Target = AllNearFoes -FunctionCode = 08B +FunctionCode = PowerHigherWithUserHP Flags = CanProtect,CanMirrorMove Description = The user attacks in an explosive fury. The lower the user's HP, the less powerful this attack becomes. #------------------------------- @@ -2430,7 +2430,7 @@ BaseDamage = 150 Accuracy = 100 TotalPP = 5 Target = AllNearOthers -FunctionCode = 170 +FunctionCode = UserLosesHalfOfTotalHPExplosive Flags = CanProtect,CanMirrorMove Description = The user attacks everything by causing its own head to explode. This also damages the user. #------------------------------- @@ -2443,7 +2443,7 @@ Accuracy = 100 TotalPP = 5 Target = AllNearFoes Priority = -3 -FunctionCode = 171 +FunctionCode = UsedAfterUserTakesPhysicalDamage Flags = CanProtect Description = The user sets a shell trap. If it is hit by a physical move, the trap explodes and hurt the attacker. #------------------------------- @@ -2455,7 +2455,7 @@ BaseDamage = 130 Accuracy = 85 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The user attacks by engulfing the foe in a beautiful, yet intense, blue flame. It may also burn the foe. @@ -2468,7 +2468,7 @@ BaseDamage = 130 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 162 +FunctionCode = UserLosesFireType Flags = CanProtect,CanMirrorMove,ThawsUser Description = To inflict massive damage, the user burns itself out. The user will no longer be Fire type. #------------------------------- @@ -2480,7 +2480,7 @@ BaseDamage = 130 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 03F +FunctionCode = LowerUserSpAtk2 Flags = CanProtect,CanMirrorMove Description = The user attacks the target at full power. The attack's recoil sharply reduces the user's Sp. Atk stat. #------------------------------- @@ -2492,7 +2492,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FE +FunctionCode = RecoilThirdOfDamageDealtBurnTarget Flags = Contact,CanProtect,CanMirrorMove,ThawsUser EffectChance = 10 Description = The user cloaks itself in fire and charges at the foe. The user also takes damage and may burn the target. @@ -2505,7 +2505,7 @@ BaseDamage = 120 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove,ThawsUser,Bomb EffectChance = 10 Description = Attacks by igniting a small stone and launching it as a fiery ball. May also burn the target. @@ -2518,7 +2518,7 @@ BaseDamage = 110 Accuracy = 85 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The foe is attacked with an intense blast of all-consuming fire. It may also leave the target with a burn. @@ -2531,7 +2531,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 07A +FunctionCode = DoublePowerAfterFusionBolt Flags = CanProtect,CanMirrorMove,ThawsUser Description = The user brings down a giant flame. It does more damage if influenced by an enormous thunderbolt. #------------------------------- @@ -2543,7 +2543,7 @@ BaseDamage = 100 Accuracy = 50 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks by engulfing the target in an intense fire. It leaves the target with a burn. @@ -2556,7 +2556,7 @@ BaseDamage = 100 Accuracy = 75 TotalPP = 5 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = CanProtect,CanMirrorMove Description = The target becomes trapped within a maelstrom of fire that rages for four to five turns. #------------------------------- @@ -2568,7 +2568,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove,ThawsUser EffectChance = 50 Description = The target is razed with a mystical fire of great intensity. It may also leave the target with a burn. @@ -2581,7 +2581,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = AllNearOthers -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 30 Description = An inferno of scarlet flames torches everything around the user. It may leave the foe with a burn. @@ -2594,7 +2594,7 @@ BaseDamage = 95 Accuracy = 90 TotalPP = 10 Target = AllNearFoes -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks by exhaling hot breath on the opposing team. It may also leave targets with a burn. @@ -2607,7 +2607,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is scorched with an intense blast of fire. It may also leave the target with a burn. @@ -2620,7 +2620,7 @@ BaseDamage = 85 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate EffectChance = 10 Description = The user launches a kick with a high critical-hit ratio. It may also leave the target with a burn. @@ -2633,7 +2633,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 020 +FunctionCode = RaiseUserSpAtk1 Flags = CanProtect,CanMirrorMove,Dance EffectChance = 50 Description = Cloaked in flames, the user dances and flaps its wings. It may also raise the user's Sp. Atk stat. @@ -2646,7 +2646,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user strikes the target with a burning lash. This also lowers the target's Defense stat. @@ -2659,7 +2659,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 107 +FunctionCode = FirePledge Flags = CanProtect,CanMirrorMove Description = A column of fire hits opposing Pokémon. When used with its Grass equivalent, it makes a sea of fire. #------------------------------- @@ -2671,7 +2671,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = AllNearOthers -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = An inferno of scarlet flames torches everything around the user. It may leave targets with a burn. @@ -2684,7 +2684,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 10 Description = The target is punched with a fiery fist. It may leave the target with a burn. @@ -2697,7 +2697,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks by breathing a special, hot fire. This also lowers the target's Sp. Atk stat. @@ -2710,7 +2710,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 5 Target = AllNearFoes -FunctionCode = 177 +FunctionCode = BurnTargetIfTargetStatsRaisedThisTurn Flags = CanProtect,CanMirrorMove Description = The user attacks with energy from jealousy. This burns all foes that had their stats boosted this turn. #------------------------------- @@ -2722,7 +2722,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 074 +FunctionCode = DamageTargetAlly Flags = CanProtect,CanMirrorMove Description = The user attacks the foe with a bursting flame. It also damages Pokémon next to the target. #------------------------------- @@ -2734,7 +2734,7 @@ BaseDamage = 65 Accuracy = 95 TotalPP = 15 Target = NearOther -FunctionCode = 00B +FunctionCode = BurnFlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 100 Description = The user bites with flame-cloaked fangs. It may also make the target flinch or leave it burned. @@ -2747,7 +2747,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = Contact,CanProtect,CanMirrorMove,ThawsUser EffectChance = 10 Description = The user cloaks itself in fire and charges at the target. It may also leave the target with a burn. @@ -2760,7 +2760,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 15 Target = AllNearFoes -FunctionCode = 0F5 +FunctionCode = DestroyTargetBerryOrGem Flags = CanProtect,CanMirrorMove Description = The user attacks the foe with fire. The target's held Berry becomes burnt up and unusable. #------------------------------- @@ -2772,7 +2772,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 01F +FunctionCode = RaiseUserSpeed1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user cloaks itself in flame and attacks. Building up more power, it raises the user's Speed stat. @@ -2785,7 +2785,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is attacked with small flames. It may also leave the target with a burn. @@ -2798,7 +2798,7 @@ BaseDamage = 35 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = CanProtect,CanMirrorMove Description = The target becomes trapped within a fierce vortex of fire that rages for four to five turns. #------------------------------- @@ -2810,7 +2810,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 09B +FunctionCode = PowerHigherWithUserHeavierThanTarget Flags = Contact,CanProtect,CanMirrorMove Description = The user slams the foe with its flaming body. The heavier the user is, the greater the damage. #------------------------------- @@ -2821,7 +2821,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = BothSides -FunctionCode = 0FF +FunctionCode = StartSunWeather Description = The user intensifies the sun for five turns, powering up Fire-type moves. #------------------------------- [WILLOWISP] @@ -2831,7 +2831,7 @@ Category = Status Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove Description = The user shoots a sinister, bluish-white flame at the target to inflict a burn. #------------------------------- @@ -2843,7 +2843,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = Other -FunctionCode = 0C7 +FunctionCode = TwoTurnAttackFlinchTarget Flags = CanProtect,CanMirrorMove,HighCriticalHitRate EffectChance = 30 Description = A second-turn attack move where critical hits land more easily. It may also make the target flinch. @@ -2856,7 +2856,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = Other -FunctionCode = 0FB +FunctionCode = RecoilThirdOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user tucks in its wings and charges from a low altitude. The user also takes serious damage. #------------------------------- @@ -2868,7 +2868,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 03C +FunctionCode = LowerUserDefSpDef1 Flags = Contact,CanProtect,CanMirrorMove Description = The user soars upward and drops at high speeds. Its Defense and Sp. Def stats are lowered. #------------------------------- @@ -2880,7 +2880,7 @@ BaseDamage = 110 Accuracy = 70 TotalPP = 10 Target = Other -FunctionCode = 015 +FunctionCode = ConfuseTargetAlwaysHitsInRainHitsTargetInSky Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user wraps its foe in a fierce wind that flies up into the sky. It may also confuse the foe. @@ -2893,7 +2893,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 5 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = A vortex of air is shot at the target to inflict damage. Critical hits land more easily. #------------------------------- @@ -2905,7 +2905,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 172 +FunctionCode = BurnAttackerBeforeUserActs Flags = CanProtect,Bomb Description = The user heats up its beak before attacking. Making contact in this time results in a burn. #------------------------------- @@ -2917,7 +2917,7 @@ BaseDamage = 90 Accuracy = 95 TotalPP = 15 Target = Other -FunctionCode = 0C9 +FunctionCode = TwoTurnAttackInvulnerableInSky Flags = Contact,CanProtect,CanMirrorMove Description = The user soars, then strikes on the second turn. It can also be used for flying to any familiar town. #------------------------------- @@ -2929,7 +2929,7 @@ BaseDamage = 85 Accuracy = 85 TotalPP = 5 Target = Other -FunctionCode = 0CC +FunctionCode = TwoTurnAttackInvulnerableInSkyParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user bounces up high, then drops on the foe on the second turn. It may also paralyze the foe. @@ -2942,7 +2942,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 20 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = A corkscrewing attack with the sharp beak acting as a drill. #------------------------------- @@ -2954,7 +2954,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = Other -FunctionCode = 14F +FunctionCode = HealUserByThreeQuartersOfDamageDone Flags = CanProtect,CanMirrorMove Description = The user absorbs its target's HP. The user's HP is restored by over half of the damage dealt. #------------------------------- @@ -2966,7 +2966,7 @@ BaseDamage = 75 Accuracy = 95 TotalPP = 15 Target = Other -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks with a blade of air that slices even the sky. It may also make the target flinch. @@ -2979,7 +2979,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = Other -FunctionCode = 014 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove,Sound EffectChance = 100 Description = The user attacks using a sound wave based on words it has learned. It may also confuse the target. @@ -2992,7 +2992,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = Other -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user confounds the foe with speed, then slashes. The attack lands without fail. #------------------------------- @@ -3004,7 +3004,7 @@ BaseDamage = 60 Accuracy = 95 TotalPP = 25 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user launches razor-like wind to slash the opposing team. Critical hits land more easily. #------------------------------- @@ -3016,7 +3016,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = Other -FunctionCode = 0F4 +FunctionCode = UserConsumeTargetBerry Flags = Contact,CanProtect,CanMirrorMove Description = The user pecks the target. If the target is holding a Berry, the user eats it and gains its effect. #------------------------------- @@ -3028,7 +3028,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 10 Target = Other -FunctionCode = 0CE +FunctionCode = TwoTurnAttackInvulnerableInSkyTargetCannotAct Flags = Contact,CanProtect,CanMirrorMove Description = The user takes the foe into the sky, then drops it on the next turn. The foe cannot attack while airborne. #------------------------------- @@ -3040,7 +3040,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 35 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is struck with large, imposing wings spread wide to inflict damage. #------------------------------- @@ -3052,7 +3052,7 @@ BaseDamage = 55 Accuracy = 100 TotalPP = 15 Target = Other -FunctionCode = 086 +FunctionCode = DoublePowerIfUserHasNoItem Flags = Contact,CanProtect,CanMirrorMove Description = The user nimbly strikes the foe. This attack does more damage if the user is not holding an item. #------------------------------- @@ -3064,7 +3064,7 @@ BaseDamage = 40 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user slams the target with its wings. The target is hit twice in a row. #------------------------------- @@ -3076,7 +3076,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 35 Target = Other -FunctionCode = 077 +FunctionCode = DoublePowerIfTargetInSky Flags = CanProtect,CanMirrorMove Description = A gust of wind is whipped up by wings and launched at the target to inflict damage. #------------------------------- @@ -3088,7 +3088,7 @@ BaseDamage = 35 Accuracy = 100 TotalPP = 35 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is jabbed with a sharply pointed beak or horn. #------------------------------- @@ -3099,7 +3099,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 049 +FunctionCode = LowerTargetEvasion1RemoveSideEffects Flags = CanProtect,CanMirrorMove Description = A strong wind blows away the foe's obstacles such as Light Screen. It also lowers their evasion. #------------------------------- @@ -3110,7 +3110,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 04B +FunctionCode = LowerTargetAttack2 Flags = CanProtect,CanMirrorMove,Dance Description = The user covers the target's body with a mass of down that harshly lowers its Attack stat. #------------------------------- @@ -3121,7 +3121,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0AE +FunctionCode = UseLastMoveUsedByTarget Description = The user counters the target by mimicking the target's last move. #------------------------------- [ROOST] @@ -3131,7 +3131,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D6 +FunctionCode = HealUserHalfOfTotalHPLoseFlyingTypeThisTurn Description = The user lands and rests its body. It restores the user's HP by up to half of its max HP. #------------------------------- [TAILWIND] @@ -3141,7 +3141,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = UserSide -FunctionCode = 05B +FunctionCode = StartUserSideDoubleSpeed Description = The user whips up a turbulent whirlwind that ups the Speed of all party Pokémon for four turns. #------------------------------- [ASTRALBARRAGE] @@ -3152,7 +3152,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user attacks by sending a frightful amount of small ghosts at opposing Pokémon. #------------------------------- @@ -3164,7 +3164,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 0CD +FunctionCode = TwoTurnAttackInvulnerableRemoveProtections Flags = Contact,CanMirrorMove Description = The user disappears, then strikes the foe on the second turn. It hits even if the foe protects itself. #------------------------------- @@ -3176,7 +3176,7 @@ BaseDamage = 110 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 196 +FunctionCode = FailsIfTargetHasNoItem Flags = CanProtect,CanMirrorMove Description = Attacks the target by controlling its item. The move fails if the target doesn't have an item. #------------------------------- @@ -3188,7 +3188,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 163 +FunctionCode = IgnoreTargetAbility Flags = CanProtect,CanMirrorMove Description = The user emits a sinister ray. This move can be used on the target regardless of its Abilities. #------------------------------- @@ -3200,7 +3200,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 14D +FunctionCode = TwoTurnAttackInvulnerableRemoveProtections Flags = Contact,CanMirrorMove Description = The user vanishes somewhere, then strikes on the next turn. Hits through protections. #------------------------------- @@ -3212,7 +3212,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 15D +FunctionCode = UserStealTargetPositiveStatStages Flags = Contact,CanProtect,CanMirrorMove Description = The user hides in the target's shadow, steals the target's stat boosts, and then attacks. #------------------------------- @@ -3224,7 +3224,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The user beats the target with a bone containing a spirit. May lower the target's Defense stat. @@ -3237,7 +3237,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 20 Description = The user hurls a shadowy blob at the target. It may also lower the target's Sp. Def stat. @@ -3250,7 +3250,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks while also stitching the target's shadow to the ground to prevent it fleeing. @@ -3263,7 +3263,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user slashes with a sharp claw made from shadows. Critical hits land more easily. #------------------------------- @@ -3275,7 +3275,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 07F +FunctionCode = DoublePowerIfTargetStatusProblem Flags = CanProtect,CanMirrorMove Description = This relentless attack does massive damage to a target affected by status problems. #------------------------------- @@ -3287,7 +3287,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 02D +FunctionCode = RaiseUserMainStats1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user blasts the target with a gust of repulsive wind. It may also raise all the user's stats at once. @@ -3300,7 +3300,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user throws a punch from the shadows. The punch lands without fail. #------------------------------- @@ -3313,7 +3313,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user extends its shadow and attacks the target from behind. This move always goes first. #------------------------------- @@ -3325,7 +3325,7 @@ BaseDamage = 30 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks the target while shouting in a startling fashion. It may also make the target flinch. @@ -3338,7 +3338,7 @@ BaseDamage = 30 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is licked with a long tongue, causing damage. It may also leave the target with paralysis. @@ -3351,7 +3351,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 06D +FunctionCode = FixedDamageUserLevel Flags = CanProtect,CanMirrorMove Description = The user makes the foe see a frightening mirage. It inflicts damage matching the user's level. #------------------------------- @@ -3362,7 +3362,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove Description = The target is exposed to a sinister ray that triggers confusion. #------------------------------- @@ -3373,7 +3373,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 10D +FunctionCode = CurseTargetOrLowerUserSpd1RaiseUserAtkDef1 Description = A move that works differently for the Ghost type than for all the other types. #------------------------------- [DESTINYBOND] @@ -3383,7 +3383,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0E7 +FunctionCode = AttackerFaintsIfUserFaints Description = When this move is used, if the user faints, the foe that landed the knockout hit also faints. #------------------------------- [GRUDGE] @@ -3393,7 +3393,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0E6 +FunctionCode = SetAttackerMovePPTo0IfUserFaints Description = If the user faints, the user's grudge fully depletes the PP of the foe's move that knocked it out. #------------------------------- [NIGHTMARE] @@ -3403,7 +3403,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 10F +FunctionCode = StartDamageTargetEachTurnIfTargetAsleep Flags = CanProtect,CanMirrorMove Description = A sleeping target sees a nightmare that inflicts some damage every turn. #------------------------------- @@ -3414,7 +3414,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 10E +FunctionCode = LowerPPOfTargetLastMoveBy4 Flags = CanProtect,CanMirrorMove Description = The user unleashes its grudge on the move last used by the target by cutting 4 PP from it. #------------------------------- @@ -3425,7 +3425,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 142 +FunctionCode = AddGhostTypeToTarget Flags = CanProtect,CanMirrorMove Description = The user takes the target trick-or-treating. This adds Ghost type to the target's type. #------------------------------- @@ -3437,7 +3437,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The user slams the target with an enormous tree. The user can't move on the next turn. #------------------------------- @@ -3449,7 +3449,7 @@ BaseDamage = 130 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 03F +FunctionCode = LowerUserSpAtk2 Flags = CanProtect,CanMirrorMove Description = A storm of sharp is whipped up. The attack's recoil harshly reduces the user's Sp. Atk stat. #------------------------------- @@ -3461,7 +3461,7 @@ BaseDamage = 125 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0C4 +FunctionCode = TwoTurnAttackOneTurnInSun Flags = Contact,CanProtect,CanMirrorMove Description = The user gathers light energy into a blade, attacking the target on the next turn. #------------------------------- @@ -3473,7 +3473,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = RandomNearFoe -FunctionCode = 0D2 +FunctionCode = MultiTurnAttackConfuseUserAtEnd Flags = Contact,CanProtect,CanMirrorMove,Dance Description = The user attacks by scattering petals for two to three turns. The user then becomes confused. #------------------------------- @@ -3485,7 +3485,7 @@ BaseDamage = 120 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user violently whirls its vines or tentacles to harshly lash the target. #------------------------------- @@ -3497,7 +3497,7 @@ BaseDamage = 120 Accuracy = 85 TotalPP = 5 Target = NearOther -FunctionCode = 04F +FunctionCode = LowerTargetSpDef2 Flags = CanProtect,CanMirrorMove EffectChance = 40 Description = The user generates a shock wave from within its body. It may harshly lower the target's Sp. Def. @@ -3510,7 +3510,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0C4 +FunctionCode = TwoTurnAttackOneTurnInSun Flags = CanProtect,CanMirrorMove Description = A two-turn attack. The user gathers light, then blasts a bundled beam on the second turn. #------------------------------- @@ -3522,7 +3522,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FB +FunctionCode = RecoilThirdOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user slams its rugged body into the target to attack. The user also sustains serious damage. #------------------------------- @@ -3534,7 +3534,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 10 Description = The user draws power from nature and fires it at the target. It may also lower the target's Sp. Def. @@ -3547,7 +3547,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user handles a sharp leaf like a sword and attacks by slashing. It has a high critical-hit ratio. #------------------------------- @@ -3559,7 +3559,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = AllNearOthers -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user stirs up a violent petal blizzard and attacks everything around it. #------------------------------- @@ -3571,7 +3571,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = Attacks with an acidic liquid created from tart apples. This also lowers the target's Sp. Def. @@ -3584,7 +3584,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user plays its drum, controlling roots to attack. This also lowers the target's Speed stat. @@ -3597,7 +3597,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 106 +FunctionCode = GrassPledge Flags = CanProtect,CanMirrorMove Description = A column of grass hits the foes. When used with its water equivalent, it creates a vast swamp. #------------------------------- @@ -3609,7 +3609,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 17D +FunctionCode = LowerTargetDefense1DoublePowerInGravity Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user inflicts damage by dropping an apple from high above. This also lowers the target's Defense. @@ -3622,7 +3622,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Bomb Description = The user slams a barrage of hard-shelled seeds down on the target from above. #------------------------------- @@ -3634,7 +3634,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = CanProtect,CanMirrorMove Description = A nutrient-draining attack. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -3646,7 +3646,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = Contact,CanProtect,CanMirrorMove Description = The user drains the foe's energy with its horns. The user's HP is restored by half the damage inflicted. #------------------------------- @@ -3658,7 +3658,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 185 +FunctionCode = HigherPriorityInGrassyTerrain Flags = Contact,CanProtect,CanMirrorMove Description = Gliding on the ground, the user attacks the target. This move always goes first on Grassy Terrain. #------------------------------- @@ -3670,7 +3670,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user lands an intense tropical kick on the target. This also lowers the target's Attack stat. @@ -3683,7 +3683,7 @@ BaseDamage = 65 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 50 Description = The user attacks its foe by encircling it in sharp leaves. This attack may also lower the foe's accuracy. @@ -3696,7 +3696,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user scatters curious leaves that chase the target. This attack will not miss. #------------------------------- @@ -3708,7 +3708,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks by wildly swinging its thorny arms. It may also make the target flinch. @@ -3721,7 +3721,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 25 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = Sharp-edged leaves are launched to slash at the opposing team. Critical hits land more easily. #------------------------------- @@ -3733,7 +3733,7 @@ BaseDamage = 45 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is struck with slender, whiplike vines to inflict damage. #------------------------------- @@ -3745,7 +3745,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 40 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks the target by poking it with a sharply pointed branch. #------------------------------- @@ -3757,7 +3757,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 40 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user attacks by pelting the target with leaves. #------------------------------- @@ -3769,7 +3769,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = CanProtect,CanMirrorMove Description = A nutrient-draining attack. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -3781,7 +3781,7 @@ BaseDamage = 35 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = Contact,CanProtect,CanMirrorMove Description = The user snares the target in a snap trap for four to five turns. #------------------------------- @@ -3793,7 +3793,7 @@ BaseDamage = 25 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove,Bomb Description = The user forcefully shoots seeds at the target. Two to five seeds are shot in rapid succession. #------------------------------- @@ -3805,7 +3805,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = CanProtect,CanMirrorMove Description = A nutrient-draining attack. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -3817,7 +3817,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 09A +FunctionCode = PowerHigherWithTargetWeight Flags = Contact,CanProtect,CanMirrorMove Description = The user snares the target with grass and trips it. The heavier the target, the greater the damage. #------------------------------- @@ -3828,7 +3828,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = UserAndAllies -FunctionCode = 019 +FunctionCode = CureUserPartyStatus Description = The user releases a soothing scent that heals all status problems affecting the user's party. #------------------------------- [COTTONGUARD] @@ -3838,7 +3838,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 038 +FunctionCode = RaiseUserDefense3 Description = The user protects itself by wrapping its body in soft cotton, drastically raising its Defense stat. #------------------------------- [COTTONSPORE] @@ -3848,7 +3848,7 @@ Category = Status Accuracy = 100 TotalPP = 40 Target = AllNearFoes -FunctionCode = 04D +FunctionCode = LowerTargetSpeed2 Flags = CanProtect,CanMirrorMove,Powder Description = The user releases cotton-like spores that cling to the foe, harshly reducing its Speed stat. #------------------------------- @@ -3859,7 +3859,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 143 +FunctionCode = AddGrassTypeToTarget Flags = CanProtect,CanMirrorMove Description = The user puts a forest curse on the target. The target is now Grass type as well. #------------------------------- @@ -3870,7 +3870,7 @@ Category = Status Accuracy = 55 TotalPP = 15 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove,Sound Description = The user plays a pleasant melody that lulls the target into a deep sleep. #------------------------------- @@ -3881,7 +3881,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 155 +FunctionCode = StartGrassyTerrain Description = The user turns the ground to grass for five turns. Grounded Pokémon restore a little HP every turn. #------------------------------- [INGRAIN] @@ -3891,7 +3891,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 0DB +FunctionCode = StartHealUserEachTurnTrapUserInBattle Description = The user lays roots that restore its HP on every turn. Because it is rooted, it can't switch out. #------------------------------- [JUNGLEHEALING] @@ -3901,7 +3901,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = UserAndAllies -FunctionCode = 18D +FunctionCode = HealUserAndAlliesQuarterOfTotalHPCureStatus Description = The user becomes one with the jungle, and restores HP and cures status conditions of itself and allies. #------------------------------- [LEECHSEED] @@ -3911,7 +3911,7 @@ Category = Status Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0DC +FunctionCode = StartLeechSeedTarget Flags = CanProtect,CanMirrorMove Description = A seed is planted on the target. It steals some HP from the target every turn. #------------------------------- @@ -3922,7 +3922,7 @@ Category = Status Accuracy = 75 TotalPP = 15 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove,Powder Description = The user scatters a big cloud of sleep-inducing dust around the target. #------------------------------- @@ -3934,7 +3934,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 14C +FunctionCode = ProtectUserFromTargetingMovesSpikyShield Description = Protects the user from attacks. Also damages attackers that make contact with the user. #------------------------------- [SPORE] @@ -3944,7 +3944,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove,Powder Description = The user scatters bursts of spores that induce sleep. #------------------------------- @@ -3955,7 +3955,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 160 +FunctionCode = HealUserByTargetAttackLowerTargetAttack1 Flags = CanProtect,CanMirrorMove Description = The user restores its HP by the target's Attack stat amount. Then lowers the target's Attack stat. #------------------------------- @@ -3966,7 +3966,7 @@ Category = Status Accuracy = 75 TotalPP = 30 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove,Powder Description = The user scatters a cloud of paralyzing powder. It may leave the target with paralysis. #------------------------------- @@ -3977,7 +3977,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0D8 +FunctionCode = HealUserDependingOnWeather Description = The user restores its own HP. The amount of HP regained varies with the weather. #------------------------------- [WORRYSEED] @@ -3987,7 +3987,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 064 +FunctionCode = SetTargetAbilityToInsomnia Flags = CanProtect,CanMirrorMove Description = A seed that causes worry is planted on the foe. It prevents sleep by making its Ability Insomnia. #------------------------------- @@ -3999,7 +3999,7 @@ BaseDamage = 120 Accuracy = 85 TotalPP = 10 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user attacks its foes by manifesting the power of the land in fearsome blades of stone. #------------------------------- @@ -4011,7 +4011,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 10 Target = AllNearOthers -FunctionCode = 076 +FunctionCode = DoublePowerIfTargetUnderground Flags = CanProtect,CanMirrorMove Description = The user sets off an earthquake that strikes every Pokémon around it. #------------------------------- @@ -4023,7 +4023,7 @@ BaseDamage = 95 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user fiercely attacks the target using its entire body. #------------------------------- @@ -4035,7 +4035,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user makes the ground under the foe erupt with power. It may also lower the target's Sp. Def. @@ -4048,7 +4048,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user gathers the energy of the land and focuses that power on foes to damage them. #------------------------------- @@ -4060,7 +4060,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 11C +FunctionCode = HitsTargetInSkyGroundsTarget Flags = CanProtect,CanMirrorMove Description = This move also hits Pokémon that are in the air. Those Pokémon are knocked down to the ground. #------------------------------- @@ -4072,7 +4072,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = CanProtect,CanMirrorMove Description = The user attacks with a wave that crawls along the ground. Those it hits can't flee from battle. #------------------------------- @@ -4084,7 +4084,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0CA +FunctionCode = TwoTurnAttackInvulnerableUnderground Flags = Contact,CanProtect,CanMirrorMove Description = The user burrows, then attacks on the second turn. It can also be used to exit dungeons. #------------------------------- @@ -4096,7 +4096,7 @@ BaseDamage = 80 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user crashes into its target while rotating its body like a drill. Critical hits land more easily. #------------------------------- @@ -4108,7 +4108,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 166 +FunctionCode = DoublePowerIfUserLastMoveFailed Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks driven by frustration. Power increases if the user's previous move failed. #------------------------------- @@ -4120,7 +4120,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove,ThawsUser EffectChance = 30 Description = The user throws scorching sand at the target to attack. This may also burn the target. @@ -4133,7 +4133,7 @@ BaseDamage = 65 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user clubs the target with a bone. It may also make the target flinch. @@ -4146,7 +4146,7 @@ BaseDamage = 65 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 30 Description = The user launches a hard-packed mud ball to attack. It may also lower the target's accuracy. @@ -4159,7 +4159,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = AllNearOthers -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1WeakerInGrassyTerrain Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user strikes everything around it by stomping on the ground. It reduces hit Pokémon's Speed. @@ -4172,7 +4172,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 15 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks by hurling a blob of mud at the target. It also reduces the target's Speed. @@ -4185,7 +4185,7 @@ BaseDamage = 50 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = CanProtect,CanMirrorMove Description = The user throws the bone it holds. The bone loops to hit the target twice, coming and going. #------------------------------- @@ -4197,7 +4197,7 @@ BaseDamage = 35 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = CanProtect,CanMirrorMove Description = The user traps the target inside a harshly raging sandstorm for four to five turns. #------------------------------- @@ -4209,7 +4209,7 @@ BaseDamage = 25 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove Description = The user strikes the target with a hard bone two to five times in a row. #------------------------------- @@ -4221,7 +4221,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user hurls mud in the target's face to inflict damage and lower its accuracy. @@ -4234,7 +4234,7 @@ BaseDamage = 1 Accuracy = 30 TotalPP = 5 Target = NearOther -FunctionCode = 070 +FunctionCode = OHKOHitsTargetUnderground Flags = CanProtect,CanMirrorMove Description = The user opens up a fissure in the ground and drops the foe in. The target instantly faints if it hits. #------------------------------- @@ -4246,7 +4246,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 30 Target = AllNearOthers -FunctionCode = 095 +FunctionCode = RandomPowerDoublePowerIfTargetUnderground Flags = CanProtect,CanMirrorMove Description = The user looses a ground-shaking quake affecting everyone around the user. Its power varies. #------------------------------- @@ -4257,7 +4257,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = BothSides -FunctionCode = 09D +FunctionCode = StartWeakenElectricMoves Description = The user covers itself with mud. It weakens Electric-type moves while the user is in the battle. #------------------------------- [ROTOTILLER] @@ -4267,7 +4267,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = AllBattlers -FunctionCode = 13E +FunctionCode = RaiseGroundedGrassBattlersAtkSpAtk1 Description = The user tills the soil to encourage plant growth. This raises the Attack and Sp. Atk of Grass types. #------------------------------- [SANDATTACK] @@ -4277,7 +4277,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove Description = Sand is hurled in the target's face, reducing its accuracy. #------------------------------- @@ -4288,7 +4288,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 16D +FunctionCode = HealUserDependingOnSandstorm Description = The user regains up to half of its max HP. It restores more HP in a sandstorm. #------------------------------- [SPIKES] @@ -4298,7 +4298,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = FoeSide -FunctionCode = 103 +FunctionCode = AddSpikesToFoeSide Description = The user lays a trap of spikes at the foe's feet. The trap hurts foes that switch into battle. #------------------------------- [FREEZESHOCK] @@ -4309,7 +4309,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C5 +FunctionCode = TwoTurnAttackParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = On the second turn, the user hits the foe with electrically charged ice. It may also paralyze the foe. @@ -4322,7 +4322,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C6 +FunctionCode = TwoTurnAttackBurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = On the second turn, an ultracold, freezing wind surrounds the foe. This may leave it with a burn. @@ -4335,7 +4335,7 @@ BaseDamage = 130 Accuracy = 100 TotalPP = 5 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user attacks by hurling a blizzard-cloaked icicle lance at opposing Pokémon. #------------------------------- @@ -4347,7 +4347,7 @@ BaseDamage = 110 Accuracy = 70 TotalPP = 5 Target = AllNearFoes -FunctionCode = 00D +FunctionCode = FreezeTargetAlwaysHitsInHail Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A howling blizzard is summoned to strike the opposing team. It may also freeze them solid. @@ -4360,7 +4360,7 @@ BaseDamage = 100 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 03E +FunctionCode = LowerUserSpeed1 Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user swings and hits with its strong, heavy fist. It lowers the user's Speed, however. #------------------------------- @@ -4372,7 +4372,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 00C +FunctionCode = FreezeTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is struck with an icy-cold beam of energy. It may also freeze the target solid. @@ -4385,7 +4385,7 @@ BaseDamage = 85 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks by harshly dropping an icicle onto the foe. It may also make the target flinch. @@ -4398,7 +4398,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00C +FunctionCode = FreezeTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 10 Description = The target is punched with an icy fist. It may also leave the target frozen. @@ -4411,7 +4411,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 135 +FunctionCode = FreezeTargetSuperEffectiveAgainstWater Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user rapidly cools the target. This may freeze the target. Is super-effective on Water types. @@ -4424,7 +4424,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is hit with a rainbow-colored beam. This may also lower the target's Attack stat. @@ -4437,7 +4437,7 @@ BaseDamage = 65 Accuracy = 95 TotalPP = 10 Target = AllNearFoes -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks by blowing freezing cold air at the foe. This attack reduces the targets' Speed stat. @@ -4450,7 +4450,7 @@ BaseDamage = 65 Accuracy = 95 TotalPP = 15 Target = NearOther -FunctionCode = 00E +FunctionCode = FreezeFlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 100 Description = The user bites with cold-infused fangs. It may also make the target flinch or leave it frozen. @@ -4464,7 +4464,7 @@ Accuracy = 100 TotalPP = 10 Target = NearOther Priority = -4 -FunctionCode = 081 +FunctionCode = DoublePowerIfUserLostHPThisTurn Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that inflicts double the damage if the user has been hurt by the foe in the same turn. #------------------------------- @@ -4476,7 +4476,7 @@ BaseDamage = 60 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0A0 +FunctionCode = AlwaysCriticalHit Flags = CanProtect,CanMirrorMove Description = The user blows a cold breath on the target. This attack always results in a critical hit. #------------------------------- @@ -4488,7 +4488,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 15 Target = AllNearFoes -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks with a gust of chilled air. It also lowers the targets' Speed stat. @@ -4502,7 +4502,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user flash freezes chunks of ice and hurls them at the target. This move always goes first. #------------------------------- @@ -4514,7 +4514,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 25 Target = AllNearFoes -FunctionCode = 00C +FunctionCode = FreezeTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks with a chilling gust of powdery snow. It may also freeze the targets. @@ -4527,7 +4527,7 @@ BaseDamage = 30 Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 0D3 +FunctionCode = MultiTurnAttackPowersUpEachTurn Flags = Contact,CanProtect,CanMirrorMove,Bomb Description = The user continually rolls into the target over five turns. It becomes stronger each time it hits. #------------------------------- @@ -4539,7 +4539,7 @@ BaseDamage = 25 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove Description = The user launches sharp icicles at the target. It strikes two to five times in a row. #------------------------------- @@ -4551,7 +4551,7 @@ BaseDamage = 20 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0BF +FunctionCode = HitThreeTimesPowersUpWithEachHit Flags = Contact,CanProtect,CanMirrorMove Description = A consecutive three-kick attack that becomes more powerful with each successful hit. #------------------------------- @@ -4563,7 +4563,7 @@ BaseDamage = 1 Accuracy = 30 TotalPP = 5 Target = NearOther -FunctionCode = 070 +FunctionCode = OHKOIce Flags = CanProtect,CanMirrorMove Description = The foe is attacked with a blast of absolute-zero cold. The target instantly faints if it hits. #------------------------------- @@ -4574,7 +4574,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = UserSide -FunctionCode = 167 +FunctionCode = StartWeakenDamageAgainstUserSideIfHail Description = This move reduces damage from attacks for five turns. This can be used only in a hailstorm. #------------------------------- [HAIL] @@ -4584,7 +4584,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 102 +FunctionCode = StartHailWeather Description = The user summons a hail storm lasting five turns. It damages all Pokémon except the Ice type. #------------------------------- [HAZE] @@ -4594,7 +4594,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = BothSides -FunctionCode = 051 +FunctionCode = ResetAllBattlersStatStages Description = The user creates a haze that eliminates every stat change among all the Pokémon engaged in battle. #------------------------------- [MIST] @@ -4604,7 +4604,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserSide -FunctionCode = 056 +FunctionCode = StartUserSideImmunityToStatStageLowering Description = The user cloaks its body with a white mist that prevents any of its stats from being cut for five turns. #------------------------------- [EXPLOSION] @@ -4615,7 +4615,7 @@ BaseDamage = 250 Accuracy = 100 TotalPP = 5 Target = AllNearOthers -FunctionCode = 0E0 +FunctionCode = UserFaintsExplosive Flags = CanProtect,CanMirrorMove Description = The user explodes to inflict damage on those around it. The user faints upon using this move. #------------------------------- @@ -4627,7 +4627,7 @@ BaseDamage = 200 Accuracy = 100 TotalPP = 5 Target = AllNearOthers -FunctionCode = 0E0 +FunctionCode = UserFaintsExplosive Flags = CanProtect,CanMirrorMove Description = The user blows up to inflict damage on all Pokémon in battle. The user faints upon using this move. #------------------------------- @@ -4639,7 +4639,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = Contact,CanProtect,CanMirrorMove Description = The user charges at the target using every bit of its power. The user must rest on the next turn. #------------------------------- @@ -4651,7 +4651,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The foe is attacked with a powerful beam. The user must rest on the next turn to regain its energy. #------------------------------- @@ -4663,7 +4663,7 @@ BaseDamage = 140 Accuracy = 100 TotalPP = 10 Target = AllNearOthers -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Sound Description = The user attacks everything around it with the destructive power of a terrible, explosive sound. #------------------------------- @@ -4675,7 +4675,7 @@ BaseDamage = 140 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 125 +FunctionCode = FailsIfUserHasUnusedMove Flags = Contact,CanProtect,CanMirrorMove Description = This move can be used only after the user has used all the other moves it knows in the battle. #------------------------------- @@ -4687,7 +4687,7 @@ BaseDamage = 130 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0C8 +FunctionCode = TwoTurnAttackChargeRaiseUserDefense1 Flags = Contact,CanProtect,CanMirrorMove Description = The user tucks in its head to raise its Defense in the first turn, then rams the foe on the next turn. #------------------------------- @@ -4699,7 +4699,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FB +FunctionCode = RecoilThirdOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = A reckless, life-risking tackle. It also damages the user by a fairly large amount, however. #------------------------------- @@ -4711,7 +4711,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FA +FunctionCode = RecoilQuarterOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user charges its head into the foe, using its powerful guard hair. The user also takes damage. #------------------------------- @@ -4723,7 +4723,7 @@ BaseDamage = 120 Accuracy = 75 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is attacked by a kick launched with muscle-packed power. #------------------------------- @@ -4735,7 +4735,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 09F +FunctionCode = TypeDependsOnUserMemory Flags = Contact,CanProtect,CanMirrorMove Description = Cloaking itself in high energy, the user slams into the target. This move's type depends on the held memory. #------------------------------- @@ -4747,7 +4747,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 09F +FunctionCode = TypeDependsOnUserDrive Flags = CanProtect,CanMirrorMove Description = The user fires a beam of light at its target. The type changes depending on the Drive the user holds. #------------------------------- @@ -4759,7 +4759,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = RandomNearFoe -FunctionCode = 0D2 +FunctionCode = MultiTurnAttackConfuseUserAtEnd Flags = Contact,CanProtect,CanMirrorMove Description = The user rampages and attacks for two to three turns. It then becomes confused, however. #------------------------------- @@ -4771,7 +4771,7 @@ BaseDamage = 100 Accuracy = 75 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Bomb Description = A large egg is hurled at the target with maximum force to inflict damage. #------------------------------- @@ -4783,7 +4783,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 09F +FunctionCode = TypeDependsOnUserPlate Flags = CanProtect,CanMirrorMove Description = The user releases countless shots of light. Its type varies with the kind of Plate the user is holding. #------------------------------- @@ -4795,7 +4795,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Sound Description = The user lets loose a horribly echoing shout with the power to inflict damage. #------------------------------- @@ -4807,7 +4807,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 169 +FunctionCode = TypeIsUserFirstType Flags = CanProtect,CanMirrorMove,Dance Description = The user attacks the target by dancing very hard. The user's type determines the type of this move. #------------------------------- @@ -4819,7 +4819,7 @@ BaseDamage = 90 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user attacks the target by smashing into it with incredible force. It may also confuse the target. @@ -4832,7 +4832,7 @@ BaseDamage = 90 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 0FA +FunctionCode = RecoilQuarterOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = A reckless, full-body charge attack for slamming into the foe. It also damages the user a little. #------------------------------- @@ -4844,7 +4844,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = RandomNearFoe -FunctionCode = 0D1 +FunctionCode = MultiTurnAttackPreventSleeping Flags = CanProtect,CanMirrorMove,Sound Description = The user attacks in an uproar for three turns. Over that time, no one can fall asleep. #------------------------------- @@ -4856,7 +4856,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTargetTrampleMinimize Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user drops onto the target with its full body weight. It may leave the target with paralysis. @@ -4870,7 +4870,7 @@ Accuracy = 100 TotalPP = 5 Target = NearOther Priority = 2 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user charges the target at blinding speed. This attack always goes before any other move. #------------------------------- @@ -4882,7 +4882,7 @@ BaseDamage = 80 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 10 Description = The user bites hard on the target with its sharp front fangs. It may also make the target flinch. @@ -4895,7 +4895,7 @@ BaseDamage = 80 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The target is slugged by a punch thrown with muscle-packed power. #------------------------------- @@ -4907,7 +4907,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 0C3 +FunctionCode = TwoTurnAttack Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = A two-turn attack. Blades of wind hit the foe on the second turn. Critical hits land more easily. #------------------------------- @@ -4919,7 +4919,7 @@ BaseDamage = 80 Accuracy = 75 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is slammed with a long tail, vines, etc., to inflict damage. #------------------------------- @@ -4931,7 +4931,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is slugged with a punch thrown at maximum power. It can also be used to move heavy boulders. #------------------------------- @@ -4943,7 +4943,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 017 +FunctionCode = ParalyzeBurnOrFreezeTarget Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The user strikes with a simultaneous three-beam attack. May also paralyze, burn, or freeze the target. @@ -4956,7 +4956,7 @@ BaseDamage = 75 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 50 Description = The user slashes the target with hard and sharp claws. It may also lower the target's Defense. @@ -4969,7 +4969,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 003 +FunctionCode = SleepTargetChangeUserMeloettaForm Flags = CanProtect,CanMirrorMove,Sound EffectChance = 10 Description = An ancient song appeals to the hearts of those listening. It may also induce sleep. @@ -4982,7 +4982,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0A9 +FunctionCode = IgnoreTargetDefSpDefEvaStatStages Flags = Contact,CanProtect,CanMirrorMove Description = Seeking an opening, the user strikes continually. The foe's stat changes don't affect the damage. #------------------------------- @@ -4994,7 +4994,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 20 Description = The target is hit with rhythmically launched punches that may also leave it confused. @@ -5007,7 +5007,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 07E +FunctionCode = DoublePowerIfUserPoisonedBurnedParalyzed Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that doubles its power if the user is poisoned, burned, or has paralysis. #------------------------------- @@ -5019,7 +5019,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user sticks out its head and attacks by charging into the foe. It may also make the target flinch. @@ -5032,7 +5032,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 085 +FunctionCode = DoublePowerIfAllyFaintedLastTurn Flags = Contact,CanProtect,CanMirrorMove Description = Gets revenge for a fainted ally. If an ally fainted in the last turn, this attack's damage increases. #------------------------------- @@ -5044,7 +5044,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0A4 +FunctionCode = EffectDependsOnEnvironment Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks with a secret power. Its added effects vary depending on the user's environment. @@ -5057,7 +5057,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The target is attacked with a slash of claws or blades. Critical hits land more easily. #------------------------------- @@ -5069,7 +5069,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 07C +FunctionCode = DoublePowerIfTargetParalyzedCureTarget Flags = Contact,CanProtect,CanMirrorMove Description = This attack inflicts double damage on a paralyzed foe. It also cures the target's paralysis, however. #------------------------------- @@ -5081,7 +5081,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is jabbed with a sharply pointed horn to inflict damage. #------------------------------- @@ -5093,7 +5093,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 010 +FunctionCode = FlinchTargetTrampleMinimize Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is stomped with a big foot. It may also make the target flinch. @@ -5106,7 +5106,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 0F1 +FunctionCode = UserTakesTargetItem Flags = Contact,CanProtect,CanMirrorMove Description = The user endearingly approaches the target, then steals the target's held item. #------------------------------- @@ -5118,7 +5118,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 090 +FunctionCode = TypeDependsOnUserIVs Flags = CanProtect,CanMirrorMove Description = A unique attack that varies in type and intensity depending on the Pokémon using it. #------------------------------- @@ -5130,7 +5130,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 083 +FunctionCode = UsedAfterAllyRoundWithDoublePower Flags = CanProtect,CanMirrorMove,Sound Description = The user attacks with a song. Others can join in the Round and make the attack do greater damage. #------------------------------- @@ -5142,7 +5142,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = AllNearFoes -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = Star-shaped rays are shot at the opposing team. This attack never misses. #------------------------------- @@ -5154,7 +5154,7 @@ BaseDamage = 55 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is gripped and squeezed from both sides to inflict damage. #------------------------------- @@ -5166,7 +5166,7 @@ BaseDamage = 50 Accuracy = 95 TotalPP = 30 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is cut with a scythe or a claw. It can also be used to cut down thin trees. #------------------------------- @@ -5178,7 +5178,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 40 Target = NearOther -FunctionCode = 110 +FunctionCode = RemoveUserBindingAndEntryHazards Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = A spin attack that raises the user's Speed and eliminates the effects of Bind, Spikes, etc. @@ -5191,7 +5191,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 011 +FunctionCode = FlinchTargetFailsIfUserNotAsleep Flags = CanProtect,CanMirrorMove,Sound EffectChance = 30 Description = An attack that can be used only if the user is asleep. The harsh noise may also make the target flinch. @@ -5204,7 +5204,7 @@ BaseDamage = 50 Accuracy = 0 TotalPP = 1 Target = RandomNearFoe -FunctionCode = 002 +FunctionCode = Struggle Flags = Contact,CanProtect Description = An attack that is used in desperation only if the user has no PP. It also hurts the user slightly. #------------------------------- @@ -5216,7 +5216,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 182 +FunctionCode = TypeAndPowerDependOnTerrain Flags = CanProtect,CanMirrorMove,Pulse Description = Utilizes the power of the terrain to attack. This move's type and power vary with the terrain. #------------------------------- @@ -5228,7 +5228,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 087 +FunctionCode = TypeAndPowerDependOnWeather Flags = CanProtect,CanMirrorMove,Bomb Description = An attack move that varies in power and type depending on the weather. #------------------------------- @@ -5240,7 +5240,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 092 +FunctionCode = PowerHigherWithConsecutiveUseOnUserSide Flags = CanProtect,CanMirrorMove,Sound Description = The user attacks the foe with an echoing voice. If this move is used every turn, it does greater damage. #------------------------------- @@ -5253,7 +5253,7 @@ Accuracy = 100 TotalPP = 10 Target = NearOther Priority = 3 -FunctionCode = 012 +FunctionCode = FlinchTargetFailsIfNotUserFirstTurn Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = An attack that hits first and makes the target flinch. It only works the first turn the user is in battle. @@ -5266,7 +5266,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 40 Target = NearOther -FunctionCode = 0E9 +FunctionCode = CannotMakeTargetFaint Flags = Contact,CanProtect,CanMirrorMove Description = A restrained attack that prevents the target from fainting. The target is left with at least 1 HP. #------------------------------- @@ -5278,7 +5278,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 40 Target = NearOther -FunctionCode = 0E9 +FunctionCode = CannotMakeTargetFaint Flags = Contact,CanProtect,CanMirrorMove Description = The user holds back when it attacks, and the target is left with at least 1 HP. #------------------------------- @@ -5290,7 +5290,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 109 +FunctionCode = AddMoneyGainedFromBattle Flags = CanProtect,CanMirrorMove Description = Numerous coins are hurled at the target to inflict damage. Money is earned after battle. #------------------------------- @@ -5302,7 +5302,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is physically pounded with a long tail or a foreleg, etc. #------------------------------- @@ -5315,7 +5315,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user lunges at the target at a speed that makes it almost invisible. It is sure to strike first. #------------------------------- @@ -5327,7 +5327,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = Hard, pointed, and sharp claws rake the target to inflict damage. #------------------------------- @@ -5339,7 +5339,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = A physical attack in which the user charges and slams into the target with its whole body. #------------------------------- @@ -5351,7 +5351,7 @@ BaseDamage = 35 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user slams the target with a long tail, vines, or tentacle. The target is hit twice in a row. #------------------------------- @@ -5364,7 +5364,7 @@ Accuracy = 100 TotalPP = 10 Target = NearOther Priority = 2 -FunctionCode = 0AD +FunctionCode = RemoveProtections Flags = CanMirrorMove Description = An attack that hits a target using Protect or Detect. It also lifts the effects of those moves. #------------------------------- @@ -5376,7 +5376,7 @@ BaseDamage = 25 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks by striking the target with its hard tail. It hits the Pokémon two to five times in a row. #------------------------------- @@ -5388,7 +5388,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 093 +FunctionCode = StartRaiseUserAtk1WhenDamaged Flags = Contact,CanProtect,CanMirrorMove Description = As long as this move is in use, the user's Attack rises each time the user is hit in battle. #------------------------------- @@ -5400,7 +5400,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove Description = Sharp spikes are shot at the target in rapid succession. They hit two to five times in a row. #------------------------------- @@ -5412,7 +5412,7 @@ BaseDamage = 18 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The target is hit with a flurry of punches that strike two to five times in a row. #------------------------------- @@ -5424,7 +5424,7 @@ BaseDamage = 18 Accuracy = 80 TotalPP = 15 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The target is raked with sharp claws or scythes for two to five times in quick succession. #------------------------------- @@ -5436,7 +5436,7 @@ BaseDamage = 15 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove,Bomb Description = Round objects are hurled at the target to strike two to five times in a row. #------------------------------- @@ -5448,7 +5448,7 @@ BaseDamage = 15 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = Contact,CanProtect,CanMirrorMove Description = Things such as long bodies or tentacles are used to bind and squeeze the foe for four to five turns. #------------------------------- @@ -5460,7 +5460,7 @@ BaseDamage = 15 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The target is slapped repeatedly, back and forth, two to five times in a row. #------------------------------- @@ -5472,7 +5472,7 @@ BaseDamage = 15 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The target is jabbed repeatedly with a horn or beak two to five times in a row. #------------------------------- @@ -5484,7 +5484,7 @@ BaseDamage = 15 Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = Contact,CanProtect,CanMirrorMove Description = A long body or vines are used to wrap and squeeze the target for four to five turns. #------------------------------- @@ -5496,7 +5496,7 @@ BaseDamage = 10 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 10 Description = The foe is attacked with long, creeping tentacles or vines. It may also lower the target's Speed. @@ -5510,7 +5510,7 @@ Accuracy = 0 TotalPP = 10 Target = None Priority = 1 -FunctionCode = 0D4 +FunctionCode = MultiTurnAttackBideThenReturnDoubleDamage Flags = Contact,CanProtect Description = The user endures attacks for two turns, then strikes back to cause double the damage taken. #------------------------------- @@ -5522,7 +5522,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 08C +FunctionCode = PowerHigherWithTargetHP Flags = Contact,CanProtect,CanMirrorMove Description = The target is crushed with great force. The attack is more powerful the more HP the target has left. #------------------------------- @@ -5534,7 +5534,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 06E +FunctionCode = LowerTargetHPToUserHP Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that cuts down the target's HP to equal the user's HP. #------------------------------- @@ -5546,7 +5546,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 098 +FunctionCode = PowerLowerWithUserHP Flags = Contact,CanProtect,CanMirrorMove Description = The user flails about aimlessly to attack. It becomes more powerful the less HP the user has. #------------------------------- @@ -5558,7 +5558,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 08A +FunctionCode = PowerLowerWithUserHappiness Flags = Contact,CanProtect,CanMirrorMove Description = A full-power attack that grows more powerful the less the user likes its Trainer. #------------------------------- @@ -5570,7 +5570,7 @@ BaseDamage = 1 Accuracy = 30 TotalPP = 5 Target = NearOther -FunctionCode = 070 +FunctionCode = OHKO Flags = Contact,CanProtect,CanMirrorMove Description = A vicious, tearing attack with big pincers. The target will faint instantly if this attack hits. #------------------------------- @@ -5582,7 +5582,7 @@ BaseDamage = 1 Accuracy = 30 TotalPP = 5 Target = NearOther -FunctionCode = 070 +FunctionCode = OHKO Flags = Contact,CanProtect,CanMirrorMove Description = The user stabs the foe with a horn that rotates like a drill. If it hits, the target faints instantly. #------------------------------- @@ -5594,7 +5594,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 096 +FunctionCode = TypeAndPowerDependOnUserBerry Flags = CanProtect,CanMirrorMove Description = The user draws power to attack by using its held Berry. The Berry determines its type and power. #------------------------------- @@ -5606,7 +5606,7 @@ BaseDamage = 1 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 094 +FunctionCode = RandomlyDamageOrHealTarget Flags = CanProtect,CanMirrorMove Description = The user attacks by giving the target a gift with a hidden trap. It restores HP sometimes, however. #------------------------------- @@ -5618,7 +5618,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 089 +FunctionCode = PowerHigherWithUserHappiness Flags = Contact,CanProtect,CanMirrorMove Description = A full-power attack that grows more powerful the more the user likes its Trainer. #------------------------------- @@ -5630,7 +5630,7 @@ BaseDamage = 1 Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 06A +FunctionCode = FixedDamage20 Flags = CanProtect,CanMirrorMove Description = The target is hit with a destructive shock wave that always inflicts 20 HP damage. #------------------------------- @@ -5642,7 +5642,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 113 +FunctionCode = PowerDependsOnUserStockpile Flags = CanProtect Description = The power stored using the move Stockpile is released all at once in an attack. #------------------------------- @@ -5654,7 +5654,7 @@ BaseDamage = 1 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 06C +FunctionCode = FixedDamageHalfTargetHP Flags = Contact,CanProtect,CanMirrorMove Description = The user chomps hard on the target with its sharp front fangs. It cuts the target's HP to half. #------------------------------- @@ -5666,7 +5666,7 @@ BaseDamage = 1 Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 097 +FunctionCode = PowerHigherWithLessPP Flags = Contact,CanProtect,CanMirrorMove Description = The fewer PP this move has, the greater its attack power. #------------------------------- @@ -5678,7 +5678,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 08C +FunctionCode = PowerHigherWithTargetHP Flags = Contact,CanProtect,CanMirrorMove Description = The user powerfully wrings the foe. The more HP the foe has, the greater this attack's power. #------------------------------- @@ -5689,7 +5689,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserOrNearAlly -FunctionCode = 037 +FunctionCode = RaiseTargetRandomStat2 Description = The user applies pressure to stress points, sharply boosting one of its stats. #------------------------------- [AFTERYOU] @@ -5699,7 +5699,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 11D +FunctionCode = TargetActsNext Description = The user helps the target and makes it use its move right after the user. #------------------------------- [ASSIST] @@ -5709,7 +5709,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 0B5 +FunctionCode = UseRandomMoveFromUserParty Description = The user hurriedly and randomly uses a move among those known by other Pokémon in the party. #------------------------------- [ATTRACT] @@ -5719,7 +5719,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 016 +FunctionCode = AttractTarget Flags = CanProtect,CanMirrorMove Description = If it is the opposite gender of the user, the target becomes infatuated and less likely to attack. #------------------------------- @@ -5730,7 +5730,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 0ED +FunctionCode = SwitchOutUserPassOnEffects Description = The user switches places with a party Pokémon in waiting, passing along any stat changes. #------------------------------- [BELLYDRUM] @@ -5740,7 +5740,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 03A +FunctionCode = MaxUserAttackLoseHalfOfTotalHP Description = The user maximizes its Attack stat in exchange for HP equal to half its max HP. #------------------------------- [BESTOW] @@ -5750,7 +5750,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 0F3 +FunctionCode = TargetTakesUserItem Flags = CanMirrorMove Description = The user passes its held item to the target when the target isn't holding an item. #------------------------------- @@ -5761,7 +5761,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = CanMirrorMove Description = The user blocks the target's way with arms spread wide to prevent escape. #------------------------------- @@ -5772,7 +5772,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 060 +FunctionCode = SetUserTypesBasedOnEnvironment Description = The user's type is changed depending on its environment, such as at water's edge, in grass, or in a cave. #------------------------------- [CAPTIVATE] @@ -5782,7 +5782,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = AllNearFoes -FunctionCode = 04E +FunctionCode = LowerTargetSpAtk2IfCanAttract Flags = CanProtect,CanMirrorMove Description = If it is the opposite gender of the user, the target is charmed into harshly lowering its Sp. Atk stat. #------------------------------- @@ -5793,7 +5793,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 134 +FunctionCode = DoesNothingCongratuations Description = The Pokémon congratulates you on your special day! #------------------------------- [CONFIDE] @@ -5803,7 +5803,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 13C +FunctionCode = LowerTargetSpAtk1 Flags = CanMirrorMove,Sound Description = The user tells the target a secret. The target loses focus and its Sp. Atk stat is lowered. #------------------------------- @@ -5814,7 +5814,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 05E +FunctionCode = SetUserTypesToUserMoveType Description = The user changes its type to become the same type as one of its moves. #------------------------------- [CONVERSION2] @@ -5824,7 +5824,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = NearOther -FunctionCode = 05F +FunctionCode = SetUserTypesToResistLastAttack Description = The user changes its type to make itself resistant to the type of the attack the opponent used last. #------------------------------- [COPYCAT] @@ -5834,7 +5834,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 0AF +FunctionCode = UseLastMoveUsed Description = The user mimics the move used immediately before it. The move fails if no other move has been used yet. #------------------------------- [COURTCHANGE] @@ -5844,7 +5844,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = BothSides -FunctionCode = 198 +FunctionCode = SwapSideEffects Flags = CanMirrorMove Description = With its mysterious power, the user swaps the effects on either side of the field. #------------------------------- @@ -5855,7 +5855,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 01E +FunctionCode = RaiseUserDefense1CurlUpUser Description = The user curls up to conceal weak spots and raise its Defense stat. #------------------------------- [DISABLE] @@ -5865,7 +5865,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0B9 +FunctionCode = DisableTargetLastMoveUsed Flags = CanProtect,CanMirrorMove Description = For four turns, this move prevents the target from using the move it last used. #------------------------------- @@ -5876,7 +5876,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 022 +FunctionCode = RaiseUserEvasion1 Description = By moving rapidly, the user makes illusory copies of itself to raise its evasiveness. #------------------------------- [ENCORE] @@ -5886,7 +5886,7 @@ Category = Status Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 0BC +FunctionCode = DisableTargetUsingDifferentMove Flags = CanProtect,CanMirrorMove Description = The user compels the target to keep using only the move it last used for three turns. #------------------------------- @@ -5898,7 +5898,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 0E8 +FunctionCode = UserEnduresFaintingThisTurn Description = The user endures any attack with at least 1 HP. Its chance of failing rises if it is used in succession. #------------------------------- [ENTRAINMENT] @@ -5908,7 +5908,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 066 +FunctionCode = SetTargetAbilityToUserAbility Flags = CanProtect,CanMirrorMove Description = The user dances to compel the target to mimic it, making the target's Ability the same as the user's. #------------------------------- @@ -5919,7 +5919,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove Description = The user flashes a light that cuts the target's accuracy. It can also be used to illuminate caves. #------------------------------- @@ -5930,7 +5930,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 023 +FunctionCode = RaiseUserCriticalHitRate2 Description = The user takes a deep breath and focuses so that critical hits land more easily. #------------------------------- [FOLLOWME] @@ -5941,7 +5941,7 @@ Accuracy = 0 TotalPP = 20 Target = User Priority = 2 -FunctionCode = 117 +FunctionCode = RedirectAllMovesToUser Description = The user draws attention to itself, making all targets take aim only at the user. #------------------------------- [FORESIGHT] @@ -5951,7 +5951,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = NearOther -FunctionCode = 0A7 +FunctionCode = StartNegateTargetEvasionStatStageAndGhostImmunity Flags = CanProtect,CanMirrorMove Description = Enables the user to hit a Ghost type with any kind of move. It also enables the user to hit an evasive foe. #------------------------------- @@ -5962,7 +5962,7 @@ Category = Status Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove Description = The user intimidates the target with the pattern on its belly to cause paralysis. #------------------------------- @@ -5973,7 +5973,7 @@ Category = Status Accuracy = 100 TotalPP = 40 Target = AllNearFoes -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = CanProtect,CanMirrorMove,Sound Description = The user growls in an endearing way, making the foe less wary. The foe's Attack stat is lowered. #------------------------------- @@ -5984,7 +5984,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 028 +FunctionCode = RaiseUserAtkSpAtk1Or2InSun Description = The user's body grows all at once, raising the Atk and Sp. Atk stats. #------------------------------- [HAPPYHOUR] @@ -5994,7 +5994,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserSide -FunctionCode = 157 +FunctionCode = DoubleMoneyGainedFromBattle Description = Using Happy Hour doubles the amount of prize money received after battle. #------------------------------- [HARDEN] @@ -6004,7 +6004,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 01D +FunctionCode = RaiseUserDefense1 Description = The user stiffens all the muscles in its body to raise its Defense stat. #------------------------------- [HEALBELL] @@ -6014,7 +6014,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = UserAndAllies -FunctionCode = 019 +FunctionCode = CureUserPartyStatus Flags = Sound Description = The user makes a soothing bell chime to heal the status problems of all the party Pokémon. #------------------------------- @@ -6026,7 +6026,7 @@ Accuracy = 0 TotalPP = 20 Target = NearAlly Priority = 5 -FunctionCode = 09C +FunctionCode = PowerUpAllyMove Description = The user assists an ally by boosting the power of its attack. #------------------------------- [HOLDHANDS] @@ -6036,7 +6036,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = NearAlly -FunctionCode = 133 +FunctionCode = DoesNothingFailsIfNoAlly Description = The user and an ally hold hands. This makes them very happy. #------------------------------- [HOWL] @@ -6046,7 +6046,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = UserAndAllies -FunctionCode = 19A +FunctionCode = RaiseUserAndAlliesAttack1 Flags = Sound Description = The user howls loudly to raise the spirit of itself and allies, boosting their Attack stats. #------------------------------- @@ -6057,7 +6057,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 15E +FunctionCode = EnsureNextCriticalHit Description = The user focuses intensely. The attack on the next turn always results in a critical hit. #------------------------------- [LEER] @@ -6067,7 +6067,7 @@ Category = Status Accuracy = 100 TotalPP = 30 Target = AllNearFoes -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = CanProtect,CanMirrorMove Description = The user gains an intimidating leer with sharp eyes. The target's Defense stat is reduced. #------------------------------- @@ -6078,7 +6078,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 0A6 +FunctionCode = EnsureNextMoveAlwaysHits Flags = CanProtect,CanMirrorMove Description = The user takes sure aim at the target. It ensures the next attack does not fail to hit the target. #------------------------------- @@ -6089,7 +6089,7 @@ Category = Status Accuracy = 75 TotalPP = 10 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove Description = With a scary face, the user tries to force a kiss on the target. If it suceeds, the target falls asleep. #------------------------------- @@ -6100,7 +6100,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserSide -FunctionCode = 0A1 +FunctionCode = StartPreventCriticalHitsAgainstUserSide Description = The user chants an incantation toward the sky, preventing the foe from landing critical hits. #------------------------------- [MEFIRST] @@ -6110,7 +6110,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearFoe -FunctionCode = 0B0 +FunctionCode = UseMoveTargetIsAboutToUse Flags = CanProtect Description = The user tries to cut ahead of the foe to steal and use the foe's intended move with greater power. #------------------------------- @@ -6121,7 +6121,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = CanMirrorMove Description = The user pins the target with a dark, arresting look. The target becomes unable to flee. #------------------------------- @@ -6132,7 +6132,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0B6 +FunctionCode = UseRandomMove Description = The user waggles a finger and stimulates its brain into randomly using nearly any move. #------------------------------- [MILKDRINK] @@ -6142,7 +6142,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = The user restores its own HP by up to half of its maximum HP. May also be used in the field to heal HP. #------------------------------- [MIMIC] @@ -6152,7 +6152,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 05C +FunctionCode = ReplaceMoveThisBattleWithTargetLastMoveUsed Flags = CanProtect Description = The user copies the move last used by the foe. The move can be used until the user is switched out. #------------------------------- @@ -6163,7 +6163,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 0A6 +FunctionCode = EnsureNextMoveAlwaysHits Flags = CanProtect,CanMirrorMove Description = The user senses the foe's movements with its mind to ensure its next attack does not miss the foe. #------------------------------- @@ -6174,7 +6174,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 034 +FunctionCode = RaiseUserEvasion2MinimizeUser Description = The user compresses its body to make itself look smaller, which sharply raises its evasiveness. #------------------------------- [MORNINGSUN] @@ -6184,7 +6184,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0D8 +FunctionCode = HealUserDependingOnWeather Description = The user restores its own HP. The amount of HP regained varies with the weather. #------------------------------- [NATUREPOWER] @@ -6194,7 +6194,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0B3 +FunctionCode = UseMoveDependingOnEnvironment Description = An attack that makes use of nature's power. Its effects vary depending on the user's environment. #------------------------------- [NOBLEROAR] @@ -6204,7 +6204,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = NearOther -FunctionCode = 13A +FunctionCode = LowerTargetAtkSpAtk1 Flags = CanProtect,CanMirrorMove,Sound Description = Letting out a noble roar, the user intimidates the target and lowers its Attack and Sp. Atk. #------------------------------- @@ -6215,7 +6215,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = NearOther -FunctionCode = 0A7 +FunctionCode = StartNegateTargetEvasionStatStageAndGhostImmunity Flags = CanProtect,CanMirrorMove Description = Enables the user to hit a Ghost type with any type of move. It also enables the user to hit an evasive foe. #------------------------------- @@ -6226,7 +6226,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 05A +FunctionCode = UserTargetAverageHP Flags = CanProtect,CanMirrorMove Description = The user adds its HP to the target's HP, then equally shares the combined HP with the target. #------------------------------- @@ -6237,7 +6237,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = AllBattlers -FunctionCode = 0E5 +FunctionCode = StartPerishCountsForAllBattlers Flags = Sound Description = Any Pokémon that hears this song faints in three turns, unless it switches out of battle. #------------------------------- @@ -6248,7 +6248,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 139 +FunctionCode = LowerTargetAttack1BypassSubstitute Flags = CanMirrorMove Description = The user and target become friends. The target loses its will to fight, lowering its Attack stat. #------------------------------- @@ -6260,7 +6260,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 0AA +FunctionCode = ProtectUser Description = It enables the user to evade all attacks. Its chance of failing rises if it is used in succession. #------------------------------- [PSYCHUP] @@ -6270,7 +6270,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 055 +FunctionCode = UserCopyTargetStatStages Description = The user hypnotizes itself into copying any stat change made by the target. #------------------------------- [RECOVER] @@ -6280,7 +6280,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = Restoring its own cells, the user restores its own HP by half of its max HP. #------------------------------- [RECYCLE] @@ -6290,7 +6290,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0F6 +FunctionCode = RestoreUserConsumedItem Description = The user recycles a held item that has been used in battle so it can be used again. #------------------------------- [REFLECTTYPE] @@ -6300,7 +6300,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 062 +FunctionCode = SetUserTypesToTargetTypes Flags = CanProtect Description = The user reflects the target's type, making it the same type as the target. #------------------------------- @@ -6311,7 +6311,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 018 +FunctionCode = CureUserBurnPoisonParalysis Description = The user rests to cure itself of a poisoning, burn, or paralysis. #------------------------------- [ROAR] @@ -6322,7 +6322,7 @@ Accuracy = 0 TotalPP = 20 Target = NearOther Priority = -6 -FunctionCode = 0EB +FunctionCode = SwitchOutTargetStatusMove Flags = CanMirrorMove,Sound Description = The target is scared off and replaced by another Pokémon in its party. In the wild, the battle ends. #------------------------------- @@ -6333,7 +6333,7 @@ Category = Status Accuracy = 0 TotalPP = 25 Target = UserSide -FunctionCode = 01A +FunctionCode = StartUserSideImmunityToInflictedStatus Description = The user creates a protective field that prevents status problems for five turns. #------------------------------- [SCARYFACE] @@ -6343,7 +6343,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 04D +FunctionCode = LowerTargetSpeed2 Flags = CanProtect,CanMirrorMove Description = The user frightens the target with a scary face to harshly reduce its Speed stat. #------------------------------- @@ -6354,7 +6354,7 @@ Category = Status Accuracy = 85 TotalPP = 40 Target = NearOther -FunctionCode = 04C +FunctionCode = LowerTargetDefense2 Flags = CanProtect,CanMirrorMove,Sound Description = An earsplitting screech harshly reduces the target's Defense stat. #------------------------------- @@ -6365,7 +6365,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Description = The user reduces its polygon count to make itself more jagged, raising the Attack stat. #------------------------------- [SHELLSMASH] @@ -6375,7 +6375,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 035 +FunctionCode = LowerUserDefSpDef1RaiseUserAtkSpAtkSpd2 Description = The user breaks its shell, lowering its defenses but sharply raising attacking and Speed stats. #------------------------------- [SIMPLEBEAM] @@ -6385,7 +6385,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 063 +FunctionCode = SetTargetAbilityToSimple Flags = CanProtect,CanMirrorMove Description = The user's mysterious psychic wave changes the target's Ability to Simple. #------------------------------- @@ -6396,7 +6396,7 @@ Category = Status Accuracy = 55 TotalPP = 15 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove,Sound Description = A soothing lullaby is sung in a calming voice that puts the target into a deep slumber. #------------------------------- @@ -6407,7 +6407,7 @@ Category = Status Accuracy = 0 TotalPP = 1 Target = NearOther -FunctionCode = 05D +FunctionCode = ReplaceMoveWithTargetLastMoveUsed Description = It enables the user to permanently learn the move last used by the foe. Once used, Sketch disappears. #------------------------------- [SLACKOFF] @@ -6417,7 +6417,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = The user slacks off, restoring its own HP by up to half of its maximum HP. #------------------------------- [SLEEPTALK] @@ -6427,7 +6427,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0B4 +FunctionCode = UseRandomUserMoveIfAsleep Description = While it is asleep, the user randomly uses one of the moves it knows. #------------------------------- [SMOKESCREEN] @@ -6437,7 +6437,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove Description = The user releases an obscuring cloud of smoke or ink. It reduces the target's accuracy. #------------------------------- @@ -6448,7 +6448,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = The user restores its own HP by up to half of its maximum HP. May also be used in the field to heal HP. #------------------------------- [SPLASH] @@ -6458,7 +6458,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 001 +FunctionCode = DoesNothingUnusableInGravity Description = The user just flops and splashes around to no effect at all... #------------------------------- [SPOTLIGHT] @@ -6469,7 +6469,7 @@ Accuracy = 0 TotalPP = 15 Target = NearOther Priority = 3 -FunctionCode = 16A +FunctionCode = RedirectAllMovesToTarget Flags = CanProtect Description = The user shines a spotlight on the target so that only it will be attacked during the turn. #------------------------------- @@ -6480,7 +6480,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 112 +FunctionCode = UserAddStockpileRaiseDefSpDef1 Description = The user charges up power and raises both its Defense and Sp. Def. The move can be used three times. #------------------------------- [STUFFCHEEKS] @@ -6490,7 +6490,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 191 +FunctionCode = UserConsumeBerryRaiseDefense2 Description = The user eats its held Berry, then sharply raises its Defense stat. #------------------------------- [SUBSTITUTE] @@ -6500,7 +6500,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 10C +FunctionCode = UserMakeSubstitute Description = The user makes a copy of itself using some of its HP. The copy serves as the user's decoy. #------------------------------- [SUPERSONIC] @@ -6510,7 +6510,7 @@ Category = Status Accuracy = 55 TotalPP = 20 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove,Sound Description = The user generates odd sound waves from its body. It may confuse the target. #------------------------------- @@ -6521,7 +6521,7 @@ Category = Status Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 041 +FunctionCode = RaiseTargetAttack2ConfuseTarget Flags = CanProtect,CanMirrorMove Description = The user enrages and confuses the target. However, it also sharply raises the target's Attack stat. #------------------------------- @@ -6532,7 +6532,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 114 +FunctionCode = HealUserDependingOnUserStockpile Description = The power stored using the move Stockpile is absorbed by the user to heal its HP. #------------------------------- [SWEETSCENT] @@ -6542,7 +6542,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = AllNearFoes -FunctionCode = 048 +FunctionCode = LowerTargetEvasion2 Flags = CanProtect,CanMirrorMove Description = A sweet scent that lowers the foe's evasiveness. It also lures wild Pokémon if used in grass, etc. #------------------------------- @@ -6553,7 +6553,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 02E +FunctionCode = RaiseUserAttack2 Flags = Dance Description = A frenetic dance to uplift the fighting spirit. It sharply raises the user's Attack stat. #------------------------------- @@ -6564,7 +6564,7 @@ Category = Status Accuracy = 100 TotalPP = 30 Target = AllNearFoes -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = CanProtect,CanMirrorMove Description = The user wags its tail cutely, making opposing Pokémon less wary and lowering their Defense stat. #------------------------------- @@ -6575,7 +6575,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 13A +FunctionCode = LowerTargetAtkSpAtk1 Flags = CanMirrorMove Description = Gets teary eyed to make the target lose its will to fight. Lowers the target's Attack and Sp. Atk. #------------------------------- @@ -6586,7 +6586,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = AllBattlers -FunctionCode = 192 +FunctionCode = AllBattlersConsumeBerry Description = The user has teatime with all the Pokémon in the battle. Each Pokémon eats its held Berry. #------------------------------- [TEETERDANCE] @@ -6596,7 +6596,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = AllNearOthers -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove,Dance Description = The user performs a wobbly dance that confuses the Pokémon around it. #------------------------------- @@ -6607,7 +6607,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 04A +FunctionCode = LowerTargetAtkDef1 Flags = CanProtect,CanMirrorMove Description = The user tickles the target into laughing, reducing its Attack and Defense stats. #------------------------------- @@ -6618,7 +6618,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 069 +FunctionCode = TransformUserIntoTarget Description = The user transforms into a copy of the target right down to having the same move set. #------------------------------- [WHIRLWIND] @@ -6629,7 +6629,7 @@ Accuracy = 0 TotalPP = 20 Target = NearOther Priority = -6 -FunctionCode = 0EB +FunctionCode = SwitchOutTargetStatusMove Flags = CanMirrorMove Description = The foe is blown away, to be replaced by another Pokémon in its party. In the wild, the battle ends. #------------------------------- @@ -6640,7 +6640,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D7 +FunctionCode = HealUserPositionNextTurn Description = One turn after this move is used, the target's HP is restored by half the user's maximum HP. #------------------------------- [WORKUP] @@ -6650,7 +6650,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 027 +FunctionCode = RaiseUserAtkSpAtk1 Description = The user is roused, and its Attack and Sp. Atk stats increase. #------------------------------- [YAWN] @@ -6660,7 +6660,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 004 +FunctionCode = SleepTargetNextTurn Flags = CanProtect,CanMirrorMove Description = The user lets loose a huge yawn that lulls the target into falling asleep on the next turn. #------------------------------- @@ -6672,7 +6672,7 @@ BaseDamage = 120 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 158 +FunctionCode = FailsIfUserNotConsumedBerry Flags = CanProtect Description = The user lets out a damaging belch at the target. The user must eat a held Berry to use this move. #------------------------------- @@ -6684,7 +6684,7 @@ BaseDamage = 120 Accuracy = 80 TotalPP = 5 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user shoots filthy garbage at the target to attack. It may also poison the target. @@ -6697,7 +6697,7 @@ BaseDamage = 95 Accuracy = 100 TotalPP = 10 Target = AllNearOthers -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = It swamps the area around the user with a giant sludge wave. It may also poison those hit. @@ -6710,7 +6710,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 176 +FunctionCode = CategoryDependsOnHigherDamagePoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = Inflicts physical or special damage, whichever will be more effective. May also poison the target. @@ -6723,7 +6723,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 30 Description = Unsanitary sludge is hurled at the target. It may also poison the target. @@ -6736,7 +6736,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is stabbed with a tentacle or arm seeped with poison. It may also poison the target. @@ -6749,7 +6749,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate EffectChance = 10 Description = A slashing attack with a poisonous blade that may also poison the foe. Critical hits land more easily. @@ -6762,7 +6762,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = Unsanitary sludge is hurled at the target. It may also poison the target. @@ -6775,7 +6775,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 07B +FunctionCode = DoublePowerIfTargetPoisoned Flags = CanProtect,CanMirrorMove Description = The user drenches the foe in a special poisonous liquid. Its power doubles if the target is poisoned. #------------------------------- @@ -6787,7 +6787,7 @@ BaseDamage = 50 Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 050 +FunctionCode = ResetTargetStatStages Flags = CanProtect,CanMirrorMove Description = The user attacks by throwing a clump of special mud. All status changes are returned to normal. #------------------------------- @@ -6799,7 +6799,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 006 +FunctionCode = BadPoisonTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 50 Description = The user bites the target with toxic fangs. It may also leave the target badly poisoned. @@ -6812,7 +6812,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate EffectChance = 10 Description = The user hits the target with its tail. It may also poison the target. Critical hits land more easily. @@ -6825,7 +6825,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 30 Target = AllNearFoes -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The foe is attacked with a spray of harsh acid. It may also lower the target's Sp. Def stat. @@ -6838,7 +6838,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 04F +FunctionCode = LowerTargetSpDef2 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 100 Description = The user spits fluid that works to melt the target. This harshly reduces the target's Sp. Def stat. @@ -6851,7 +6851,7 @@ BaseDamage = 30 Accuracy = 70 TotalPP = 20 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 40 Description = The target is attacked with a discharge of filthy gases. It may also poison the target. @@ -6864,7 +6864,7 @@ BaseDamage = 15 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user stabs the target with a poisonous stinger. This may also poison the target. @@ -6876,7 +6876,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 02F +FunctionCode = RaiseUserDefense2 Description = The user alters its cellular structure to liquefy itself, sharply raising its Defense stat. #------------------------------- [BANEFULBUNKER] @@ -6887,7 +6887,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 168 +FunctionCode = ProtectUserBanefulBunker Description = Protects the user from attacks. Also poisons any attacker that makes contact with the user. #------------------------------- [COIL] @@ -6897,7 +6897,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 025 +FunctionCode = RaiseUserAtkDefAcc1 Description = The user coils up and concentrates. This raises its Attack and Defense stats as well as its accuracy. #------------------------------- [CORROSIVEGAS] @@ -6907,7 +6907,7 @@ Category = Status Accuracy = 100 TotalPP = 40 Target = AllNearOthers -FunctionCode = 193 +FunctionCode = CorrodeTargetItem Flags = CanProtect,CanMirrorMove Description = The user surrounds everything around it with highly acidic gas and melts away items they hold. #------------------------------- @@ -6918,7 +6918,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 068 +FunctionCode = NegateTargetAbility Flags = CanProtect,CanMirrorMove Description = The user hurls up its stomach acids on the foe. The fluid negates the effect of the target's Ability. #------------------------------- @@ -6929,7 +6929,7 @@ Category = Status Accuracy = 90 TotalPP = 40 Target = AllNearFoes -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove Description = A cloud of poison gas is sprayed in the face of opposing Pokémon. It may poison those hit. #------------------------------- @@ -6940,7 +6940,7 @@ Category = Status Accuracy = 75 TotalPP = 35 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove,Powder Description = The user scatters a cloud of poisonous dust on the target. It may poison the target. #------------------------------- @@ -6951,7 +6951,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 15B +FunctionCode = CureTargetStatusHealUserHalfOfTotalHP Flags = CanProtect,CanMirrorMove Description = The user heals the target's status condition. If so, it also restores the user's own HP. #------------------------------- @@ -6962,7 +6962,7 @@ Category = Status Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 006 +FunctionCode = BadPoisonTarget Flags = CanProtect,CanMirrorMove Description = A move that leaves the target badly poisoned. Its poison damage worsens every turn. #------------------------------- @@ -6973,7 +6973,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = FoeSide -FunctionCode = 104 +FunctionCode = AddToxicSpikesToFoeSide Description = The user lays a trap of poison spikes at the foe's feet. They poison foes that switch into battle. #------------------------------- [TOXICTHREAD] @@ -6983,7 +6983,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 159 +FunctionCode = PoisonTargetLowerTargetSpeed1 Flags = CanProtect,CanMirrorMove Description = The user shoots poisonous threads to poison the target and lower the target's Speed stat. #------------------------------- @@ -6994,7 +6994,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = AllNearFoes -FunctionCode = 140 +FunctionCode = LowerPoisonedTargetAtkSpAtkSpd1 Flags = CanProtect Description = Foes are drenched in an odd liquid that lowers the Attack, Sp. Atk, and Speed of poisoned Pokémon. #------------------------------- @@ -7006,7 +7006,7 @@ BaseDamage = 160 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The user shoots powerful lasers using the power of a prism. The user can't move on the next turn. #------------------------------- @@ -7018,7 +7018,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 03F +FunctionCode = LowerUserSpAtk2 Flags = CanProtect,CanMirrorMove Description = The user attacks the target at full power. The attack's recoil harshly reduces the user's Sp. Atk stat. #------------------------------- @@ -7030,7 +7030,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 111 +FunctionCode = AttackTwoTurnsLater Description = Two turns after this move is used, a hunk of psychic energy attacks the target. #------------------------------- [SYNCHRONOISE] @@ -7041,7 +7041,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = AllNearOthers -FunctionCode = 123 +FunctionCode = FailsUnlessTargetSharesTypeWithUser Flags = CanProtect,CanMirrorMove Description = Using an odd shock wave, the user damages any Pokémon of the same type as the user. #------------------------------- @@ -7053,7 +7053,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0DE +FunctionCode = HealUserByHalfOfDamageDoneIfTargetAsleep Flags = CanProtect,CanMirrorMove Description = The user eats the dreams of a sleeping foe. It absorbs half the damage caused to heal the user's HP. #------------------------------- @@ -7065,7 +7065,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 164 +FunctionCode = CategoryDependsOnHigherDamageIgnoreTargetAbility Flags = CanProtect,CanMirrorMove Description = The user attacks with a pillar of light. This move the higher of the user's Attack or Sp. Atk stat. #------------------------------- @@ -7077,7 +7077,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 122 +FunctionCode = UseTargetDefenseInsteadOfTargetSpDef Flags = CanProtect,CanMirrorMove Description = The user materializes an odd psychic wave to attack the target. This attack does physical damage. #------------------------------- @@ -7089,7 +7089,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 00C +FunctionCode = FreezeTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user shoots its psychic power from its eyes to attack. This may also leave the target frozen. @@ -7102,7 +7102,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is hit by a strong telekinetic force. It may also reduce the target's Sp. Def stat. @@ -7115,7 +7115,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 10A +FunctionCode = RemoveScreens Flags = Contact,CanProtect,CanMirrorMove,Biting Description = The user bites the target using psychic capabilities. This can also destroy Light Screen and Reflect. #------------------------------- @@ -7127,7 +7127,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 195 +FunctionCode = LowerPPOfTargetLastMoveBy3 Flags = CanProtect,CanMirrorMove,Sound Description = The user attacks with tremendous psychic power. This also removes 3 PP from the target's last move. #------------------------------- @@ -7139,7 +7139,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 181 +FunctionCode = HitsAllFoesAndPowersUpInPsychicTerrain Flags = CanProtect,CanMirrorMove Description = The user attacks the target with psychic power. Powers up and hits all foes on Psychic Terrain. #------------------------------- @@ -7151,7 +7151,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks with an odd, unseeable power. It may also make the target flinch. @@ -7164,7 +7164,7 @@ BaseDamage = 80 Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 147 +FunctionCode = RemoveProtectionsBypassSubstitute Flags = CanMirrorMove Description = Using a hyperspace hole, the user appears right next to the target and strikes. Skips protections. #------------------------------- @@ -7176,7 +7176,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 122 +FunctionCode = UseTargetDefenseInsteadOfTargetSpDef Flags = CanProtect,CanMirrorMove Description = The user materializes an odd psychic wave to attack the target. This attack does physical damage. #------------------------------- @@ -7188,7 +7188,7 @@ BaseDamage = 80 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user focuses its willpower to its head and attacks the foe. It may also make the target flinch. @@ -7201,7 +7201,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 50 Description = The user lets loose a damaging burst of light. It may also reduce the target's Sp. Def stat. @@ -7214,7 +7214,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 50 Description = A mistlike flurry of down envelops and damages the target. It may also lower the target's Sp. Atk. @@ -7227,7 +7227,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user tears at the target with blades formed by psychic power. Critical hits land more easily. #------------------------------- @@ -7239,7 +7239,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is attacked with a peculiar ray. It may also cause confusion. @@ -7252,7 +7252,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user unleashes a vicious blow after its cute act makes the foe less wary. It may also cause flinching. @@ -7265,7 +7265,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is hit by a weak telekinetic force. It may also leave the target confused. @@ -7278,7 +7278,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 08E +FunctionCode = PowerHigherWithUserPositiveStatStages Flags = CanProtect,CanMirrorMove Description = The user attacks with stored power. The more the user's stats are raised, the greater the damage. #------------------------------- @@ -7291,7 +7291,7 @@ Accuracy = 100 TotalPP = 20 Target = None Priority = -5 -FunctionCode = 072 +FunctionCode = CounterSpecialDamage Flags = CanProtect Description = A retaliation move that counters any special attack, inflicting double the damage taken. #------------------------------- @@ -7303,7 +7303,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 06F +FunctionCode = FixedDamageUserLevelRandom Flags = CanProtect,CanMirrorMove Description = The target is attacked with an odd psychic wave. The attack varies in intensity. #------------------------------- @@ -7314,7 +7314,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 030 +FunctionCode = RaiseUserSpeed2 Description = The user relaxes and lightens its body to move faster. It sharply boosts the Speed stat. #------------------------------- [ALLYSWITCH] @@ -7325,7 +7325,7 @@ Accuracy = 0 TotalPP = 15 Target = User Priority = 2 -FunctionCode = 120 +FunctionCode = UserSwapsPositionsWithAlly Description = The user teleports using a strange power and switches its place with one of its allies. #------------------------------- [AMNESIA] @@ -7335,7 +7335,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 033 +FunctionCode = RaiseUserSpDef2 Description = The user temporarily empties its mind to forget its concerns. It sharply raises the user's Sp. Def stat. #------------------------------- [BARRIER] @@ -7345,7 +7345,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 02F +FunctionCode = RaiseUserDefense2 Description = The user throws up a sturdy wall that sharply raises its Defense stat. #------------------------------- [CALMMIND] @@ -7355,7 +7355,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 02C +FunctionCode = RaiseUserSpAtkSpDef1 Description = The user quietly focuses its mind and calms its spirit to raise its Sp. Atk and Sp. Def stats. #------------------------------- [COSMICPOWER] @@ -7365,7 +7365,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 02A +FunctionCode = RaiseUserDefSpDef1 Description = The user absorbs a mystical power from space to raise its Defense and Sp. Def stats. #------------------------------- [GRAVITY] @@ -7375,7 +7375,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = BothSides -FunctionCode = 118 +FunctionCode = StartGravity Description = Gravity is intensified for five turns, making moves involving flying unusable and negating Levitation. #------------------------------- [GUARDSPLIT] @@ -7385,7 +7385,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 059 +FunctionCode = UserTargetAverageBaseDefSpDef Flags = CanProtect Description = The user employs its psychic power to average its Defense and Sp. Def stats with those of its target. #------------------------------- @@ -7396,7 +7396,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 053 +FunctionCode = UserTargetSwapDefSpDefStages Flags = CanProtect,CanMirrorMove Description = The user employs its psychic power to switch changes to its Defense and Sp. Def with the target. #------------------------------- @@ -7407,7 +7407,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = AllNearFoes -FunctionCode = 0BB +FunctionCode = DisableTargetHealingMoves Flags = CanProtect,CanMirrorMove Description = For five turns, the foe is prevented from using any moves, Abilities, or held items that recover HP. #------------------------------- @@ -7418,7 +7418,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = Other -FunctionCode = 0DF +FunctionCode = HealTargetHalfOfTotalHP Flags = CanProtect,Pulse Description = The user emits a healing pulse which restores the target's HP by up to half of its max HP. #------------------------------- @@ -7429,7 +7429,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0E3 +FunctionCode = UserFaintsHealAndCureReplacement Description = The user faints. In return, the Pokémon taking its place will have its HP restored and status cured. #------------------------------- [HEARTSWAP] @@ -7439,7 +7439,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 054 +FunctionCode = UserTargetSwapStatStages Flags = CanProtect,CanMirrorMove Description = The user employs its psychic power to switch stat changes with the target. #------------------------------- @@ -7450,7 +7450,7 @@ Category = Status Accuracy = 60 TotalPP = 20 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove Description = The user employs hypnotic suggestion to make the target fall into a deep sleep. #------------------------------- @@ -7461,7 +7461,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0B8 +FunctionCode = DisableTargetMovesKnownByUser Description = If the foe knows any move also known by the user, the foe is prevented from using it. #------------------------------- [INSTRUCT] @@ -7471,7 +7471,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 16B +FunctionCode = TargetUsesItsLastUsedMoveAgain Flags = CanProtect Description = The user instructs the target to use the target's last move again. #------------------------------- @@ -7482,7 +7482,7 @@ Category = Status Accuracy = 80 TotalPP = 15 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove Description = The user distracts the target by bending a spoon. It lowers the target's accuracy. #------------------------------- @@ -7493,7 +7493,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserSide -FunctionCode = 0A3 +FunctionCode = StartWeakenSpecialDamageAgainstUserSide Description = A wondrous wall of light is put up to suppress damage from special attacks for five turns. #------------------------------- [LUNARDANCE] @@ -7503,7 +7503,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0E4 +FunctionCode = UserFaintsHealAndCureReplacementRestorePP Flags = Dance Description = The user faints. In return, the Pokémon taking its place will have its status and HP fully restored. #------------------------------- @@ -7515,7 +7515,7 @@ Accuracy = 0 TotalPP = 15 Target = User Priority = 4 -FunctionCode = 0B1 +FunctionCode = BounceBackProblemCausingStatusMoves Description = A barrier reflects back to the target moves like Leech Seed and moves that damage status. #------------------------------- [MAGICPOWDER] @@ -7525,7 +7525,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 17F +FunctionCode = SetTargetTypesToPsychic Flags = CanProtect,CanMirrorMove,Powder Description = The user scatters a cloud of magic powder that changes the target to Psychic type. #------------------------------- @@ -7536,7 +7536,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 0F9 +FunctionCode = StartNegateHeldItems Flags = CanMirrorMove Description = The user creates a bizarre area in which Pokémon's held items lose their effects for five turns. #------------------------------- @@ -7547,7 +7547,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Description = The user meditates to awaken the power deep within its body and raise its Attack stat. #------------------------------- [MIRACLEEYE] @@ -7557,7 +7557,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = NearOther -FunctionCode = 0A8 +FunctionCode = StartNegateTargetEvasionStatStageAndDarkImmunity Flags = CanProtect,CanMirrorMove Description = Enables the user to hit a Dark type with any type of move. It also enables the user to hit an evasive foe. #------------------------------- @@ -7568,7 +7568,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 058 +FunctionCode = UserTargetAverageBaseAtkSpAtk Flags = CanProtect Description = The user employs its psychic power to average its Attack and Sp. Atk stats with those of the target. #------------------------------- @@ -7579,7 +7579,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 052 +FunctionCode = UserTargetSwapAtkSpAtkStages Flags = CanProtect,CanMirrorMove Description = The user employs its psychic power to switch changes to its Attack and Sp. Atk with the target. #------------------------------- @@ -7590,7 +7590,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 057 +FunctionCode = UserSwapBaseAtkDef Description = The user employs its psychic power to switch its Attack with its Defense stat. #------------------------------- [PSYCHICTERRAIN] @@ -7600,7 +7600,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 173 +FunctionCode = StartPsychicTerrain Description = Protects grounded Pokémon from priority moves and powers up Psychic-type moves for five turns. #------------------------------- [PSYCHOSHIFT] @@ -7610,7 +7610,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 01B +FunctionCode = GiveUserStatusToTarget Flags = CanProtect,CanMirrorMove Description = Using its psychic power of suggestion, the user transfers its status problems to the target. #------------------------------- @@ -7621,7 +7621,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = UserSide -FunctionCode = 0A2 +FunctionCode = StartWeakenPhysicalDamageAgainstUserSide Description = A wondrous wall of light is put up to suppress damage from physical attacks for five turns. #------------------------------- [REST] @@ -7631,7 +7631,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D9 +FunctionCode = HealUserFullyAndFallAsleep Description = The user goes to sleep for two turns. It fully restores the user's HP and heals any status problem. #------------------------------- [ROLEPLAY] @@ -7641,7 +7641,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 065 +FunctionCode = SetUserAbilityToTargetAbility Description = The user mimics the target completely, copying the target's natural Ability. #------------------------------- [SKILLSWAP] @@ -7651,7 +7651,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 067 +FunctionCode = UserTargetSwapAbilities Flags = CanProtect,CanMirrorMove Description = The user employs its psychic power to exchange Abilities with the target. #------------------------------- @@ -7662,7 +7662,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 161 +FunctionCode = UserTargetSwapBaseSpeed Flags = CanProtect,CanMirrorMove Description = The user exchanges Speed stats with the target. #------------------------------- @@ -7673,7 +7673,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 11A +FunctionCode = StartTargetAirborneAndAlwaysHitByMoves Flags = CanProtect,CanMirrorMove Description = The user makes the target float with its psychic power. The target is easier to hit for three turns. #------------------------------- @@ -7685,7 +7685,7 @@ Accuracy = 0 TotalPP = 20 Target = User Priority = -6 -FunctionCode = 0EA +FunctionCode = SwitchOutUserStatusMove Description = The user switches place with a party Pokémon. Also warps to the last Pokémon Center visited. #------------------------------- [TRICK] @@ -7695,7 +7695,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0F2 +FunctionCode = UserTargetSwapItems Flags = CanProtect,CanMirrorMove Description = The user catches the target off guard and swaps its held item with its own. #------------------------------- @@ -7707,7 +7707,7 @@ Accuracy = 0 TotalPP = 5 Target = BothSides Priority = -7 -FunctionCode = 11F +FunctionCode = StartSlowerBattlersActFirst Flags = CanMirrorMove Description = The user creates a bizarre area in which slower Pokémon get to move first for five turns. #------------------------------- @@ -7719,7 +7719,7 @@ Accuracy = 0 TotalPP = 10 Target = BothSides Priority = -7 -FunctionCode = 124 +FunctionCode = StartSwapAllBattlersBaseDefensiveStats Flags = CanMirrorMove Description = The user creates a bizarre area in which Pokémon's Defense and Sp. Def stats are swapped for 5 turns. #------------------------------- @@ -7731,7 +7731,7 @@ BaseDamage = 150 Accuracy = 80 TotalPP = 5 Target = NearOther -FunctionCode = 0FC +FunctionCode = RecoilHalfOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks the foe with a hazardous, full-power headbutt. The user also takes terrible damage. #------------------------------- @@ -7743,7 +7743,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove,Bomb Description = The user launches a huge boulder at the target to attack. It must rest on the next turn, however. #------------------------------- @@ -7755,7 +7755,7 @@ BaseDamage = 120 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 18B +FunctionCode = TwoTurnAttackChargeRaiseUserSpAtk1 Flags = CanProtect,CanMirrorMove Description = Gathers space power and boosts its Sp. Atk stat on the first turn, attacks on the next turn. #------------------------------- @@ -7767,7 +7767,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 5 Target = AllNearFoes -FunctionCode = 136 +FunctionCode = RaiseUserDefense2 Flags = CanProtect,CanMirrorMove EffectChance = 50 Description = The user whips up a storm of diamonds to damage foes. This may also sharply raise the user's Defense stat. @@ -7780,7 +7780,7 @@ BaseDamage = 100 Accuracy = 80 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user stabs the foe with sharpened stones from below. It has a high critical-hit ratio. #------------------------------- @@ -7792,7 +7792,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user attacks with a ray of light that sparkles as if it were made of gemstones. #------------------------------- @@ -7804,7 +7804,7 @@ BaseDamage = 75 Accuracy = 90 TotalPP = 10 Target = AllNearFoes -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = Large boulders are hurled at the foes to inflict damage. It may also make the targets flinch. @@ -7817,7 +7817,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 02D +FunctionCode = RaiseUserMainStats1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks with a prehistoric power. It may also raise all the user's stats at once. @@ -7830,7 +7830,7 @@ BaseDamage = 60 Accuracy = 95 TotalPP = 15 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = Boulders are hurled at the target. It also lowers the target's Speed by preventing its movement. @@ -7843,7 +7843,7 @@ BaseDamage = 50 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user picks up and throws a small rock at the target to attack. #------------------------------- @@ -7855,7 +7855,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 11C +FunctionCode = HitsTargetInSkyGroundsTarget Flags = CanProtect,CanMirrorMove Description = The user throws a stone or projectile to attack. A flying Pokémon will fall to the ground when hit. #------------------------------- @@ -7868,7 +7868,7 @@ Accuracy = 100 TotalPP = 20 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user smashes into the target at high speed. This move always goes first. #------------------------------- @@ -7880,7 +7880,7 @@ BaseDamage = 30 Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 0D3 +FunctionCode = MultiTurnAttackPowersUpEachTurn Flags = Contact,CanProtect,CanMirrorMove Description = The user continually rolls into the target over five turns. It becomes stronger each time it hits. #------------------------------- @@ -7892,7 +7892,7 @@ BaseDamage = 25 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove,Bomb Description = The user hurls hard rocks at the target. Two to five rocks are launched in quick succession. #------------------------------- @@ -7903,7 +7903,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 030 +FunctionCode = RaiseUserSpeed2 Description = The user polishes its body to reduce drag. It can sharply raise the Speed stat. #------------------------------- [SANDSTORM] @@ -7913,7 +7913,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 101 +FunctionCode = StartSandstormWeather Description = Summons a five-turn sandstorm to hurt all combatants except the Rock, Ground, and Steel types. #------------------------------- [STEALTHROCK] @@ -7923,7 +7923,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = FoeSide -FunctionCode = 105 +FunctionCode = AddStealthRocksToFoeSide Description = The user lays a trap of levitating stones around the foe. The trap hurts foes that switch into battle. #------------------------------- [TARSHOT] @@ -7933,7 +7933,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 17E +FunctionCode = LowerTargetSpeed1MakeTargetWeakerToFire Flags = CanProtect,CanMirrorMove Description = Pours sticky tar over the target, lowering its Speed and making it weaker to Fire-type moves. #------------------------------- @@ -7945,7 +7945,7 @@ Accuracy = 0 TotalPP = 10 Target = UserSide Priority = 3 -FunctionCode = 0AC +FunctionCode = ProtectUserSideFromMultiTargetDamagingMoves Description = The user and its allies are protected from wide-ranging attacks for a turn. May fail if used in succession. #------------------------------- [DOOMDESIRE] @@ -7956,7 +7956,7 @@ BaseDamage = 140 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 111 +FunctionCode = AttackTwoTurnsLater Description = Two turns after this move is used, the user blasts the target with a concentrated bundle of light. #------------------------------- [STEELBEAM] @@ -7967,7 +7967,7 @@ BaseDamage = 140 Accuracy = 95 TotalPP = 5 Target = NearOther -FunctionCode = 194 +FunctionCode = UserLosesHalfOfTotalHP Flags = CanProtect,CanMirrorMove Description = The user fires a beam of steel that it collected from its entire body. This also damages the user. #------------------------------- @@ -7979,7 +7979,7 @@ BaseDamage = 130 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 199 +FunctionCode = RemoveTerrain Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks while destroying the terrain. This move fails when the ground isn't a terrain. #------------------------------- @@ -7991,7 +7991,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user becomes a gigantic shield and slams into the target. #------------------------------- @@ -8003,7 +8003,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user becomes a gigantic sword and cuts the target. #------------------------------- @@ -8015,7 +8015,7 @@ BaseDamage = 100 Accuracy = 75 TotalPP = 15 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is slammed with a steel-hard tail. It may also lower the target's Defense stat. @@ -8028,7 +8028,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 163 +FunctionCode = IgnoreTargetAbility Flags = Contact,CanProtect,CanMirrorMove Description = The user slams into the target with the force of a meteor. Can't be stopped by the target's Ability. #------------------------------- @@ -8040,7 +8040,7 @@ BaseDamage = 90 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 20 Description = The target is hit with a hard punch fired like a meteor. It may also raise the user's Attack. @@ -8053,7 +8053,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user entangles the target with its anchor chain. The target becomes unable to flee. @@ -8066,7 +8066,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user gathers all its light energy and releases it at once. It may also lower the target's Sp. Def stat. @@ -8079,7 +8079,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The foe slams the target with its steel-hard head. It may also make the target flinch. @@ -8092,7 +8092,7 @@ BaseDamage = 70 Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user stabs the target with a sharp horn. This attack never misses. #------------------------------- @@ -8104,7 +8104,7 @@ BaseDamage = 70 Accuracy = 90 TotalPP = 25 Target = NearOther -FunctionCode = 01D +FunctionCode = RaiseUserDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 10 Description = The target is hit with wings of steel. It may also raise the user's Defense stat. @@ -8117,7 +8117,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 175 +FunctionCode = HitTwoTimesFlinchTarget Flags = Contact,CanProtect,Punching EffectChance = 30 Description = The user rotates, centering the hex nut in its chest, and then strikes twice. May cause flinching. @@ -8130,7 +8130,7 @@ BaseDamage = 65 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user looses a flash of energy from its polished body. It may also lower the target's accuracy. @@ -8143,7 +8143,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Bomb Description = The user launches steel bombs that stick to the target. This attack will not miss. #------------------------------- @@ -8155,7 +8155,7 @@ BaseDamage = 50 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks by throwing two steel gears at its target. #------------------------------- @@ -8167,7 +8167,7 @@ BaseDamage = 50 Accuracy = 95 TotalPP = 35 Target = NearOther -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 10 Description = The target is raked with steel claws. It may also raise the user's Attack stat. @@ -8181,7 +8181,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user strikes the target with tough punches as fast as bullets. This move always goes first. #------------------------------- @@ -8193,7 +8193,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 08D +FunctionCode = PowerHigherWithTargetFasterThanUser Flags = Contact,CanProtect,CanMirrorMove,Bomb Description = The user tackles the target with a high-speed spin. The slower the user, the greater the damage. #------------------------------- @@ -8205,7 +8205,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 09B +FunctionCode = PowerHigherWithUserHeavierThanTarget Flags = Contact,CanProtect,CanMirrorMove Description = The user slams into the foe with its heavy body. The heavier the user, the greater the damage. #------------------------------- @@ -8217,7 +8217,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = None -FunctionCode = 073 +FunctionCode = CounterDamagePlusHalf Flags = CanProtect,CanMirrorMove Description = The user retaliates with much greater power against the target that last inflicted damage on it. #------------------------------- @@ -8228,7 +8228,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 031 +FunctionCode = RaiseUserSpeed2LowerUserWeight Description = The user sheds part of its body to make itself lighter and sharply raise its Speed stat. #------------------------------- [GEARUP] @@ -8238,7 +8238,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = UserAndAllies -FunctionCode = 15C +FunctionCode = RaisePlusMinusUserAndAlliesAtkSpAtk1 Description = The user engages its gears to raise the Attack and Sp. Atk of allies with the Plus or Minus Ability. #------------------------------- [IRONDEFENSE] @@ -8248,7 +8248,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 02F +FunctionCode = RaiseUserDefense2 Description = The user hardens its body's surface like iron, sharply raising its Defense stat. #------------------------------- [KINGSSHIELD] @@ -8259,7 +8259,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 14B +FunctionCode = ProtectUserFromDamagingMovesKingsShield Description = Protects itself from damage. It also harshly lowers the Attack of attackers that make contact. #------------------------------- [METALSOUND] @@ -8269,7 +8269,7 @@ Category = Status Accuracy = 85 TotalPP = 40 Target = NearOther -FunctionCode = 04F +FunctionCode = LowerTargetSpDef2 Flags = CanProtect,CanMirrorMove,Sound Description = A horrible sound like scraping metal harshly reduces the target's Sp. Def stat. #------------------------------- @@ -8280,7 +8280,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 036 +FunctionCode = RaiseUserAtk1Spd2 Description = The user rotates its gears, raising its Attack and sharply raising its Speed. #------------------------------- [HYDROCANNON] @@ -8291,7 +8291,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The target is hit with a watery blast. The user must rest on the next turn, however. #------------------------------- @@ -8303,7 +8303,7 @@ BaseDamage = 150 Accuracy = 100 TotalPP = 5 Target = AllNearFoes -FunctionCode = 08B +FunctionCode = PowerHigherWithUserHP Flags = CanProtect,CanMirrorMove Description = The user spouts water to damage the foe. The lower the user's HP, the less powerful it becomes. #------------------------------- @@ -8315,7 +8315,7 @@ BaseDamage = 110 Accuracy = 80 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The target is blasted by a huge volume of water launched under great pressure. #------------------------------- @@ -8327,7 +8327,7 @@ BaseDamage = 110 Accuracy = 85 TotalPP = 10 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Pulse Description = The user attacks opposing Pokémon with countless beams of light that glow a deep and brilliant blue. #------------------------------- @@ -8339,7 +8339,7 @@ BaseDamage = 110 Accuracy = 95 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove,ThawsUser EffectChance = 30 Description = The user immerses the target in superheated steam. This may also leave the target with a burn. @@ -8352,7 +8352,7 @@ BaseDamage = 100 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The target is hammered with a large pincer. Critical hits land more easily. #------------------------------- @@ -8364,7 +8364,7 @@ BaseDamage = 90 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks by swinging its tail as if it were a vicious wave in a raging storm. #------------------------------- @@ -8376,7 +8376,7 @@ BaseDamage = 90 Accuracy = 85 TotalPP = 10 Target = AllNearFoes -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks by shooting muddy water at the opposing team. It may also lower the target's accuracy. @@ -8389,7 +8389,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = AllNearOthers -FunctionCode = 15A +FunctionCode = CureTargetBurn Flags = CanProtect,CanMirrorMove,Sound EffectChance = 100 Description = The user bursts into song, emitting many bubbles. Any burnt Pokémon will be healed by these bubbles. @@ -8402,7 +8402,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = AllNearOthers -FunctionCode = 075 +FunctionCode = DoublePowerIfTargetUnderwater Flags = CanProtect,CanMirrorMove Description = It swamps the area around the user with a giant wave. It can also be used for crossing water. #------------------------------- @@ -8414,7 +8414,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 183 +FunctionCode = DoublePowerIfTargetNotActed Flags = Contact,CanProtect,CanMirrorMove Description = The user rends the target with its hard gills. Power doubles if the user moves first. #------------------------------- @@ -8426,7 +8426,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user slams into the target using a full-force blast of water. May lower the target's Defense. @@ -8439,7 +8439,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0CB +FunctionCode = TwoTurnAttackInvulnerableUnderwater Flags = Contact,CanProtect,CanMirrorMove Description = Diving on the first turn, the user rises and hits on the next turn. It can be used to dive in the ocean. #------------------------------- @@ -8451,7 +8451,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove,ThawsUser EffectChance = 30 Description = The user shoots boiling hot water at its target. It may also leave the target with a burn. @@ -8464,7 +8464,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 187 +FunctionCode = CannotBeRedirected Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user ignores any effects that redirect moves, allowing this move to hit the chosen target. #------------------------------- @@ -8476,7 +8476,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 108 +FunctionCode = WaterPledge Flags = CanProtect,CanMirrorMove Description = A column of water strikes the target. When combined with its fire equivalent, it makes a rainbow. #------------------------------- @@ -8488,7 +8488,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user charges at the target and may make it flinch. It can also be used to climb a waterfall. @@ -8501,7 +8501,7 @@ BaseDamage = 75 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 50 Description = The user cuts the foe with sharp shells. It may also lower the target's Defense stat. @@ -8514,7 +8514,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 080 +FunctionCode = DoublePowerIfTargetHPLessThanHalf Flags = CanProtect,CanMirrorMove Description = If the target's HP is down to about half, this attack will hit with double the power. #------------------------------- @@ -8526,7 +8526,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A spray of bubbles is forcefully ejected at the target. It may also lower its Speed stat. @@ -8539,7 +8539,7 @@ BaseDamage = 65 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 50 Description = The user attacks by spraying ink in the foe's face or eyes. It may also lower the target's accuracy. @@ -8552,7 +8552,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0EE +FunctionCode = SwitchOutUserDamagingMove Flags = Contact,CanProtect,CanMirrorMove Description = After making its attack, the user rushes back to switch places with a party Pokémon in waiting. #------------------------------- @@ -8564,7 +8564,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = Other -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove,Pulse EffectChance = 20 Description = The user attacks the target with a pulsing blast of water. It may also confuse the target. @@ -8578,7 +8578,7 @@ Accuracy = 100 TotalPP = 20 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user lunges at the target at a speed that makes it almost invisible. It is sure to strike first. #------------------------------- @@ -8590,7 +8590,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 30 Target = AllNearFoes -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A spray of countless bubbles is jetted at the opposing team. It may also lower the targets' Speed stats. @@ -8603,7 +8603,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The target is blasted with a forceful shot of water. #------------------------------- @@ -8615,7 +8615,7 @@ BaseDamage = 35 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = Contact,CanProtect,CanMirrorMove Description = The target is clamped and squeezed by the user's very thick and sturdy shell for four to five turns. #------------------------------- @@ -8627,7 +8627,7 @@ BaseDamage = 35 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0D0 +FunctionCode = BindTargetDoublePowerIfTargetUnderwater Flags = CanProtect,CanMirrorMove Description = Traps foes in a violent swirling whirlpool for four to five turns. #------------------------------- @@ -8639,7 +8639,7 @@ BaseDamage = 25 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 189 +FunctionCode = HitThreeTimesAlwaysCriticalHit Flags = Contact,CanProtect,CanMirrorMove Description = Hits three times in a row with mastery of the Water style. This attack always deals critical hits. #------------------------------- @@ -8652,7 +8652,7 @@ Accuracy = 100 TotalPP = 20 Target = NearOther Priority = 1 -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimesOrThreeForAshGreninja Flags = CanProtect,CanMirrorMove Description = The user hits the target with throwing stars 2-5 times in a row. This move always goes first. #------------------------------- @@ -8663,7 +8663,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 0DA +FunctionCode = StartHealUserEachTurn Description = The user envelops itself in a veil made of water. It regains some HP on every turn. #------------------------------- [LIFEDEW] @@ -8673,7 +8673,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = UserAndAllies -FunctionCode = 18C +FunctionCode = HealUserAndAlliesQuarterOfTotalHP Description = The user scatters mysterious water around and restores the HP of itself and its allies. #------------------------------- [RAINDANCE] @@ -8683,7 +8683,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = BothSides -FunctionCode = 100 +FunctionCode = StartRainWeather Description = The user summons a heavy rain that falls for five turns, powering up Water-type moves. #------------------------------- [SOAK] @@ -8693,7 +8693,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 061 +FunctionCode = SetTargetTypesToWater Flags = CanProtect,CanMirrorMove Description = The user shoots a torrent of water at the target and changes the target's type to Water. #------------------------------- @@ -8704,7 +8704,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = BothSides -FunctionCode = 09E +FunctionCode = StartWeakenFireMoves Description = The user soaks itself with water. The move weakens Fire-type moves while the user is in the battle. #------------------------------- [WITHDRAW] @@ -8714,5 +8714,5 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 01D +FunctionCode = RaiseUserDefense1 Description = The user withdraws its body into its hard shell, raising its Defense stat. diff --git a/PBS/moves.txt b/PBS/moves.txt index 59acf64dc..2d6717bdd 100644 --- a/PBS/moves.txt +++ b/PBS/moves.txt @@ -8,7 +8,7 @@ BaseDamage = 120 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = Using its tough and impressive horn, the user rams into the target with no letup. #------------------------------- @@ -20,7 +20,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user calls out its underlings to pummel the target. Critical hits land more easily. #------------------------------- @@ -32,7 +32,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove,Sound EffectChance = 10 Description = The user vibrates its wings to generate a damaging sound wave. It may also lower the target's Sp. Def stat. @@ -46,7 +46,7 @@ Accuracy = 100 TotalPP = 10 Target = NearOther Priority = 2 -FunctionCode = 174 +FunctionCode = FailsIfNotUserFirstTurn Flags = Contact,CanProtect,CanMirrorMove Description = Although this move has great power, it only works the first turn the user is in battle. #------------------------------- @@ -58,7 +58,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 16F +FunctionCode = HealAllyOrDamageFoe Flags = CanProtect,CanMirrorMove,Bomb Description = Fires an exploding pollen puff at enemies, or a HP-restoring one at allies. #------------------------------- @@ -70,7 +70,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = Contact,CanProtect,CanMirrorMove Description = The user drains the target's blood. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -82,7 +82,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user makes a lunge at the target, attacking with full force. This lowers the target's Attack stat. @@ -95,7 +95,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user slashes at the foe by crossing its scythes or claws as if they were a pair of scissors. #------------------------------- @@ -107,7 +107,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks with a sinister beam of light. It may also confuse the target. @@ -120,7 +120,7 @@ BaseDamage = 70 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user skitters behind the target to attack. This also lowers the target's Sp. Atk stat. @@ -133,7 +133,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0EE +FunctionCode = SwitchOutUserDamagingMove Flags = Contact,CanProtect,CanMirrorMove Description = After making its attack, the user rushes back to switch places with a party Pokémon in waiting. #------------------------------- @@ -145,7 +145,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 010 +FunctionCode = FlinchTargetTrampleMinimize Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user crushes its foes by rolling over them. This attack may make the target flinch. @@ -158,7 +158,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0F4 +FunctionCode = UserConsumeTargetBerry Flags = Contact,CanProtect,CanMirrorMove Description = The user bites the target. If the target is holding a Berry, the user eats it and gains its effect. #------------------------------- @@ -170,7 +170,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 02D +FunctionCode = RaiseUserMainStats1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The foe is attacked with powdery scales blown by wind. It may also raise all the user's stats. @@ -183,7 +183,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 150 +FunctionCode = RaiseUserAttack3IfTargetFaints Flags = Contact,CanProtect,CanMirrorMove Description = When the user knocks out a target with this move, the user's Attack stat rises drastically. #------------------------------- @@ -195,7 +195,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 20 Target = AllNearFoes -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = While resisting, the user attacks the opposing Pokémon. The targets' Sp. Atk stat is reduced. @@ -208,7 +208,7 @@ BaseDamage = 40 Accuracy = 95 TotalPP = 20 Target = NearOther -FunctionCode = 091 +FunctionCode = PowerHigherWithConsecutiveUse Flags = Contact,CanProtect,CanMirrorMove Description = The target is slashed with scythes or claws. Its power increases if it hits in succession. #------------------------------- @@ -220,7 +220,7 @@ BaseDamage = 25 Accuracy = 95 TotalPP = 20 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove Description = Sharp spikes are shot at the target in rapid succession. They hit two to five times in a row. #------------------------------- @@ -232,7 +232,7 @@ BaseDamage = 25 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0BE +FunctionCode = HitTwoTimesPoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The foe is stabbed twice by a pair of stingers. It may also poison the target. @@ -245,7 +245,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = Contact,CanProtect,CanMirrorMove Description = The target is infested and unable to flee for four to five turns. #------------------------------- @@ -256,7 +256,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 02A +FunctionCode = RaiseUserDefSpDef1 Description = The user calls out its underlings to shield its body, raising its Defense and Sp. Def stats. #------------------------------- [HEALORDER] @@ -266,7 +266,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = The user calls out its underlings to heal it. The user regains up to half of its max HP. #------------------------------- [POWDER] @@ -276,7 +276,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 148 +FunctionCode = TargetNextFireMoveDamagesTarget Flags = CanProtect,CanMirrorMove,Powder Description = The target is covered in a powder that explodes and damages it if it uses a Fire-type move. #------------------------------- @@ -287,7 +287,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 02B +FunctionCode = RaiseUserSpAtkSpDefSpd1 Flags = Dance Description = The user performs a beautiful dance. It boosts the user's Sp. Atk, Sp. Def, and Speed stats. #------------------------------- @@ -299,7 +299,7 @@ Accuracy = 0 TotalPP = 20 Target = User Priority = 2 -FunctionCode = 117 +FunctionCode = RedirectAllMovesToUser Flags = Powder Description = The user scatters irritating powder to draw attention to itself. Opponents aim only at the user. #------------------------------- @@ -310,7 +310,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = CanMirrorMove Description = The user ensnares the target with thin, gooey silk so it can't flee from battle. #------------------------------- @@ -321,7 +321,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = FoeSide -FunctionCode = 153 +FunctionCode = AddStickyWebToFoeSide Description = Weaves a sticky net around the opposing team, which lowers their Speed stats upon switching in. #------------------------------- [STRINGSHOT] @@ -331,7 +331,7 @@ Category = Status Accuracy = 95 TotalPP = 40 Target = AllNearFoes -FunctionCode = 04D +FunctionCode = LowerTargetSpeed2 Flags = CanProtect,CanMirrorMove Description = The foe is bound with silk blown from the user's mouth. This silk reduces the target's Speed. #------------------------------- @@ -342,7 +342,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 039 +FunctionCode = RaiseUserSpAtk3 Description = The user stares at flashing lights to focus its mind, drastically raising its Sp. Atk stat. #------------------------------- [HYPERSPACEFURY] @@ -353,7 +353,7 @@ BaseDamage = 100 Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 13B +FunctionCode = HoopaRemoveProtectionsBypassSubstituteLowerUserDef1 Flags = CanMirrorMove Description = Unleashes a barrage of multi-arm attacks, skipping protections. The user's Defense stat falls. #------------------------------- @@ -365,7 +365,7 @@ BaseDamage = 95 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 121 +FunctionCode = UseTargetAttackInsteadOfUserAttack Flags = Contact,CanProtect,CanMirrorMove Description = The user turns the foe's power against it. It does more damage the higher the target's Attack stat. #------------------------------- @@ -377,7 +377,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The user transforms its wrath into a fire-like aura to attack. This may also make foes flinch. @@ -390,7 +390,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0A9 +FunctionCode = IgnoreTargetDefSpDefEvaStatStages Flags = Contact,CanProtect,CanMirrorMove Description = The user swings both arms and hits the target. Ignores the target's stat changes. #------------------------------- @@ -402,7 +402,7 @@ BaseDamage = 85 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 40 Description = The user lets loose a pitch-black shock wave at its target. It may also lower the target's accuracy. @@ -415,7 +415,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 20 Description = The user crunches up the target with sharp fangs. It may also lower the target's Defense stat. @@ -428,7 +428,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = Other -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove,Pulse EffectChance = 20 Description = The user releases a horrible aura imbued with dark thoughts. It may also make the target flinch. @@ -441,7 +441,7 @@ BaseDamage = 80 Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user pretends to bow its head, but then it stabs the target with its disheveled hair. Never misses. #------------------------------- @@ -453,7 +453,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 190 +FunctionCode = TrapUserAndTargetInBattle Flags = Contact,CanProtect,CanMirrorMove Description = This move prevents the user and the target from switching out until either of them faints. #------------------------------- @@ -465,7 +465,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 16C +FunctionCode = DisableTargetSoundMoves Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks the target's throat. The target cannot use sound-based moves for two turns. @@ -478,7 +478,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 0A0 +FunctionCode = AlwaysCriticalHit Flags = Contact,CanProtect,CanMirrorMove Description = Strikes with a fierce blow through mastery of the Dark style. Always results in a critical hit. #------------------------------- @@ -490,7 +490,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 184 +FunctionCode = DoublePowerIfUserStatsLoweredThisTurn Flags = Contact,CanProtect,CanMirrorMove Description = The user lashes out to vent its frustration. Power is doubled if its stats dropped this turn. #------------------------------- @@ -502,7 +502,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user slashes the target the instant an opportunity arises. Critical hits land more easily. #------------------------------- @@ -515,7 +515,7 @@ Accuracy = 100 TotalPP = 5 Target = NearOther Priority = 1 -FunctionCode = 116 +FunctionCode = FailsIfTargetActed Flags = Contact,CanProtect,CanMirrorMove Description = This move enables the user to attack first. It fails if the target is not readying an attack, however. #------------------------------- @@ -527,7 +527,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0F0 +FunctionCode = RemoveTargetItem Flags = Contact,CanProtect,CanMirrorMove Description = The user slaps down the target's held item, preventing that item from being used in the battle. #------------------------------- @@ -539,7 +539,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 082 +FunctionCode = DoublePowerIfTargetLostHPThisTurn Flags = Contact,CanProtect,CanMirrorMove Description = If the target has already taken some damage in the same turn, this attack's power is doubled. #------------------------------- @@ -551,7 +551,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 30 Description = The target is bitten with viciously sharp fangs. It may make the target flinch. @@ -564,7 +564,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = AllNearOthers -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user swings its body around violently to inflict damage on everything in its vicinity. #------------------------------- @@ -576,7 +576,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user draws up to the foe disarmingly, then throws a sucker punch. It hits without fail. #------------------------------- @@ -588,7 +588,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 0F1 +FunctionCode = UserTakesTargetItem Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks and steals the foe's held item simultaneously. It can't steal if the user holds an item. #------------------------------- @@ -600,7 +600,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 15 Target = AllNearFoes -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = CanProtect,CanMirrorMove,Sound EffectChance = 100 Description = The user yells as if it is ranting about something, making the target's Sp. Atk stat decrease. @@ -613,7 +613,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 084 +FunctionCode = DoublePowerIfTargetActed Flags = Contact,CanProtect,CanMirrorMove Description = If the user moves after the target, this attack's power will be doubled. #------------------------------- @@ -625,7 +625,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 088 +FunctionCode = PursueSwitchingFoe Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that inflicts double damage if used on a target that is switching out of battle. #------------------------------- @@ -637,7 +637,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0C1 +FunctionCode = HitOncePerUserTeamMember Flags = CanProtect,CanMirrorMove Description = The user gets all the party Pokémon to attack the foe. The more party Pokémon, the more damage. #------------------------------- @@ -649,7 +649,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0F7 +FunctionCode = ThrowUserItemAtTarget Flags = CanProtect,CanMirrorMove Description = The user flings its held item at the target to attack. Its power and effects depend on the item. #------------------------------- @@ -661,7 +661,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 08E +FunctionCode = PowerHigherWithUserPositiveStatStages Flags = Contact,CanProtect,CanMirrorMove Description = The user boasts of its strength. Power increases the more the user's stats are raised. #------------------------------- @@ -673,7 +673,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 08F +FunctionCode = PowerHigherWithTargetPositiveStatStages Flags = Contact,CanProtect,CanMirrorMove Description = This attack's power increases the more the target has powered up with stat changes. #------------------------------- @@ -684,7 +684,7 @@ Category = Status Accuracy = 50 TotalPP = 10 Target = AllNearFoes -FunctionCode = 003 +FunctionCode = SleepTargetIfUserDarkrai Flags = CanProtect,CanMirrorMove Description = Opposing Pokémon are dragged into a world of total darkness that makes them sleep. #------------------------------- @@ -695,7 +695,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0F8 +FunctionCode = StartTargetCannotUseItem Flags = CanProtect,CanMirrorMove Description = It prevents the target from using its held item. Its Trainer is also prevented from using items on it. #------------------------------- @@ -706,7 +706,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 04F +FunctionCode = LowerTargetSpDef2 Flags = CanProtect,CanMirrorMove Description = The user feigns crying to fluster the target, harshly lowering its Sp. Def stat. #------------------------------- @@ -717,7 +717,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 040 +FunctionCode = RaiseTargetSpAtk1ConfuseTarget Flags = CanProtect,CanMirrorMove Description = Flattery is used to confuse the target. However, it also raises the target's Sp. Atk stat. #------------------------------- @@ -728,7 +728,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 029 +FunctionCode = RaiseUserAtkAcc1 Description = The user sharpens its claws to boost its Attack stat and accuracy. #------------------------------- [MEMENTO] @@ -738,7 +738,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0E2 +FunctionCode = UserFaintsLowerTargetAtkSpAtk2 Flags = CanProtect,CanMirrorMove Description = The user faints when using this move. In return, it harshly lowers the target's Attack and Sp. Atk. #------------------------------- @@ -749,7 +749,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 032 +FunctionCode = RaiseUserSpAtk2 Description = The user stimulates its brain by thinking bad thoughts. It sharply raises the user's Sp. Atk. #------------------------------- [OBSTRUCT] @@ -760,7 +760,7 @@ Accuracy = 100 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 186 +FunctionCode = ProtectUserFromDamagingMovesObstruct Description = The user protects itself from all attacks. Direct contact lowers the attacker's Defense. #------------------------------- [PARTINGSHOT] @@ -770,7 +770,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 151 +FunctionCode = LowerTargetAtkSpAtk1SwitchOutUser Flags = CanProtect,CanMirrorMove,Sound Description = With a parting threat, the user lowers the target's Attack and Sp. Atk stats. Then it switches out. #------------------------------- @@ -781,7 +781,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 11E +FunctionCode = TargetActsLast Flags = CanProtect,CanMirrorMove Description = The user suppresses the target and makes its move go last. #------------------------------- @@ -793,7 +793,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 0B2 +FunctionCode = StealAndUseBeneficialStatusMove Description = The user steals the effects of any healing or stat-changing move the foe attempts to use. #------------------------------- [SWITCHEROO] @@ -803,7 +803,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0F2 +FunctionCode = UserTargetSwapItems Flags = CanProtect,CanMirrorMove Description = The user trades held items with the target faster than the eye can follow. #------------------------------- @@ -814,7 +814,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0BA +FunctionCode = DisableTargetStatusMoves Flags = CanProtect,CanMirrorMove Description = The target is taunted into a rage that allows it to use only attack moves for three turns. #------------------------------- @@ -825,7 +825,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 141 +FunctionCode = InvertTargetStatStages Flags = CanProtect,CanMirrorMove Description = All stat changes affecting the target turn topsy-turvy and become the opposite of what they were. #------------------------------- @@ -836,7 +836,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0B7 +FunctionCode = DisableTargetUsingSameMoveConsecutively Flags = CanProtect,CanMirrorMove Description = The user torments and enrages the foe, making it incapable of using the same move twice in a row. #------------------------------- @@ -848,7 +848,7 @@ BaseDamage = 160 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = This is Eternatus's most powerful attack in its original form. The user can't move on the next turn. #------------------------------- @@ -860,7 +860,7 @@ BaseDamage = 150 Accuracy = 100 TotalPP = 5 Target = AllNearFoes -FunctionCode = 08B +FunctionCode = PowerHigherWithUserHP Flags = CanProtect,CanMirrorMove Description = Converts life-force into power to attack. The lower the user's HP, the lower the move's power. #------------------------------- @@ -872,7 +872,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The user blasts the target with power that distorts even time. The user must rest on the next turn. #------------------------------- @@ -884,7 +884,7 @@ BaseDamage = 130 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 03F +FunctionCode = LowerUserSpAtk2 Flags = CanProtect,CanMirrorMove Description = Comets are summoned down from the sky. The attack's recoil harshly reduces the user's Sp. Atk stat. #------------------------------- @@ -896,7 +896,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = RandomNearFoe -FunctionCode = 0D2 +FunctionCode = MultiTurnAttackConfuseUserAtEnd Flags = Contact,CanProtect,CanMirrorMove Description = The user rampages and attacks for two to three turns. It then becomes confused, however. #------------------------------- @@ -908,7 +908,7 @@ BaseDamage = 110 Accuracy = 100 TotalPP = 5 Target = AllNearFoes -FunctionCode = 15F +FunctionCode = LowerUserDefense1 Flags = CanProtect,CanMirrorMove,Sound Description = The user rubs its scales and makes a huge noise. Also lowers the user's Defense stat. #------------------------------- @@ -920,7 +920,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 165 +FunctionCode = NegateTargetAbilityIfTargetActed Flags = CanProtect,CanMirrorMove Description = If the target has already moved this turn, the effect of its Ability is negated. #------------------------------- @@ -932,7 +932,7 @@ BaseDamage = 100 Accuracy = 75 TotalPP = 10 Target = NearOther -FunctionCode = 010 +FunctionCode = FlinchTargetTrampleMinimize Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user tackles the foe while exhibiting overwhelming menace. It may also make the target flinch. @@ -945,7 +945,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect Description = The user unleashes a strong beam from its core. #------------------------------- @@ -957,7 +957,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user tears the target along with the space around it. Critical hits land more easily. #------------------------------- @@ -969,7 +969,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user uses its body like a hammer to attack the target and inflict damage. #------------------------------- @@ -981,7 +981,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Pulse Description = The target is attacked with a shock wave generated by the user's gaping mouth. #------------------------------- @@ -993,7 +993,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user slashes the target with huge, sharp claws. #------------------------------- @@ -1005,7 +1005,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 15 Target = AllNearFoes -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user swings its tough tail wildly and attacks all foes. This also lowers their Attack stats. @@ -1018,7 +1018,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user exhales a mighty gust that inflicts damage. It may also leave the target with paralysis. @@ -1032,7 +1032,7 @@ Accuracy = 90 TotalPP = 10 Target = NearOther Priority = -6 -FunctionCode = 0EC +FunctionCode = SwitchOutTargetDamagingMove Flags = Contact,CanProtect,CanMirrorMove Description = The user knocks away the target and drags out another Pokémon in its party. In the wild, the battle ends. #------------------------------- @@ -1044,7 +1044,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 188 +FunctionCode = HitTwoTimesTargetThenTargetAlly Flags = CanProtect,CanMirrorMove Description = The user attacks twice using Dreepy. If there are two targets, this move hits each one once. #------------------------------- @@ -1056,7 +1056,7 @@ BaseDamage = 40 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks its target by hitting it with brutal strikes. The target is hit twice in a row. #------------------------------- @@ -1068,7 +1068,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 20 Target = AllNearFoes -FunctionCode = 078 +FunctionCode = FlinchTargetDoublePowerIfTargetInSky Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The user whips up a vicious tornado to tear at the opposing team. It may also make targets flinch. @@ -1081,7 +1081,7 @@ BaseDamage = 25 Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 18A +FunctionCode = HitTwoToFiveTimesRaiseUserSpd1LowerUserDef1 Flags = CanProtect,CanMirrorMove Description = Attacks by shooting scales two to five times in a row. Boosts the user's Speed but lowers its Defense. #------------------------------- @@ -1093,7 +1093,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 06B +FunctionCode = FixedDamage40 Flags = CanProtect,CanMirrorMove Description = This attack hits the target with a shock wave of pure rage. This attack always inflicts 40 HP damage. #------------------------------- @@ -1104,7 +1104,7 @@ Category = Status Accuracy = 100 TotalPP = 5 Target = User -FunctionCode = 17A +FunctionCode = RaiseUserMainStats1LoseThirdOfTotalHP Flags = Sound Description = The user raises all its stats by using some of its HP. #------------------------------- @@ -1115,7 +1115,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 026 +FunctionCode = RaiseUserAtkSpd1 Flags = Dance Description = The user vigorously performs a mystic, powerful dance that boosts its Attack and Speed stats. #------------------------------- @@ -1127,7 +1127,7 @@ BaseDamage = 130 Accuracy = 85 TotalPP = 5 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user charges at its foe, surrounding itself with lightning. It may also leave the target paralyzed. @@ -1140,7 +1140,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FD +FunctionCode = RecoilThirdOfDamageDealtParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 10 Description = The user electrifies itself, then charges at the foe. It causes considerable damage to the user as well. @@ -1153,7 +1153,7 @@ BaseDamage = 120 Accuracy = 50 TotalPP = 5 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 100 Description = The user fires an electric blast like a cannon to inflict damage and cause paralysis. @@ -1166,7 +1166,7 @@ BaseDamage = 110 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 178 +FunctionCode = TypeDependsOnUserMorpekoFormRaiseUserSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = Morpeko attacks and raises its Speed with energy stored in its cheeks. Type changes with the user's form. @@ -1179,7 +1179,7 @@ BaseDamage = 110 Accuracy = 70 TotalPP = 10 Target = NearOther -FunctionCode = 008 +FunctionCode = ParalyzeTargetAlwaysHitsInRainHitsTargetInSky Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = A wicked thunderbolt is dropped on the foe to inflict damage. It may also leave the target paralyzed. @@ -1192,7 +1192,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 079 +FunctionCode = DoublePowerAfterFusionFlare Flags = CanProtect,CanMirrorMove Description = The user throws down a giant thunderbolt. It does more damage if influenced by an enormous flame. #------------------------------- @@ -1204,7 +1204,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 146 +FunctionCode = NormalMovesBecomeElectric Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user attacks with electrically charged fists. Normal-type moves become Electric-type. #------------------------------- @@ -1216,7 +1216,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A strong electric blast is loosed at the target. It may also leave the target with paralysis. @@ -1229,7 +1229,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FA +FunctionCode = RecoilQuarterOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user shrouds itself in electricity and smashes into its foe. It also damages the user a little. #------------------------------- @@ -1241,7 +1241,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 183 +FunctionCode = DoublePowerIfTargetNotActed Flags = Contact,CanProtect,CanMirrorMove Description = Stabs the target with an electrified beak. Power is doubled if the user attacks first. #------------------------------- @@ -1253,7 +1253,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = AllNearOthers -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = A flare of electricity is loosed to strike the area around the user. It may also cause paralysis. @@ -1266,7 +1266,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Sound Description = The user attacks all foes by twanging a guitar or bass guitar, causing a huge echo and strong vibration. #------------------------------- @@ -1278,7 +1278,7 @@ BaseDamage = 80 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = CanProtect,CanMirrorMove Description = The user traps the target in a cage of sparking electricity for four to five turns. #------------------------------- @@ -1290,7 +1290,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = A strong electric blast crashes down on the target. This may also make the target flinch. @@ -1303,7 +1303,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 10 Description = The target is punched with an electrified fist. It may also leave the target with paralysis. @@ -1316,7 +1316,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 180 +FunctionCode = DoublePowerInElectricTerrain Flags = CanProtect,CanMirrorMove Description = The user attacks with electric voltage rising from the ground. Power is doubled on Electric Terrain. #------------------------------- @@ -1328,7 +1328,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0EE +FunctionCode = SwitchOutUserDamagingMove Flags = CanProtect,CanMirrorMove Description = After making its attack, the user rushes back to switch places with a party Pokémon in waiting. #------------------------------- @@ -1340,7 +1340,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = AllNearOthers -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = CanProtect,CanMirrorMove Description = The user attacks everything around it. The user's HP is restored by half the damage dealt. #------------------------------- @@ -1352,7 +1352,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user throws an electrically charged tackle at the target. It may also leave the target with paralysis. @@ -1365,7 +1365,7 @@ BaseDamage = 65 Accuracy = 95 TotalPP = 15 Target = NearOther -FunctionCode = 009 +FunctionCode = ParalyzeFlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 100 Description = The user bites with electrified fangs. It may also make the target flinch or leave it with paralysis. @@ -1378,7 +1378,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user strikes the target with a quick jolt of electricity. This attack cannot be evaded. #------------------------------- @@ -1390,7 +1390,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 15 Target = AllNearFoes -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user captures and attacks foes by using an electric net, which lowers their Speed stat. @@ -1403,7 +1403,7 @@ BaseDamage = 50 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 020 +FunctionCode = RaiseUserSpAtk1 Flags = CanProtect,CanMirrorMove EffectChance = 70 Description = The user fires a concentrated bundle of electricity. It may also raise the user's Sp. Atk stat. @@ -1416,7 +1416,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A jolt of electricity is hurled at the foe to inflict damage. It may also leave the target with paralysis. @@ -1429,7 +1429,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user nuzzles its electrified cheeks against the target. This also leaves the target with paralysis. @@ -1442,7 +1442,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 099 +FunctionCode = PowerHigherWithUserFasterThanTarget Flags = CanProtect,CanMirrorMove,Bomb Description = The user hurls an electric orb at the foe. It does more damage the faster the user is. #------------------------------- @@ -1453,7 +1453,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 021 +FunctionCode = RaiseUserSpDef1PowerUpElectricMove Description = The user boosts the power of the Electric move it uses next. It also raises the user's Sp. Def stat. #------------------------------- [EERIEIMPULSE] @@ -1463,7 +1463,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 13D +FunctionCode = LowerTargetSpAtk2 Flags = CanProtect,CanMirrorMove Description = The user's body generates an eerie impulse. Harshly lowers the target's Sp. Atk stat. #------------------------------- @@ -1474,7 +1474,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 154 +FunctionCode = StartElectricTerrain Description = The user electrifies the ground for five turns. Pokémon on the ground no longer fall asleep. #------------------------------- [ELECTRIFY] @@ -1484,7 +1484,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 145 +FunctionCode = TargetMovesBecomeElectric Flags = CanProtect,CanMirrorMove Description = If the target uses a move after being electrified, that move becomes Electric-type. #------------------------------- @@ -1496,7 +1496,7 @@ Accuracy = 0 TotalPP = 25 Target = BothSides Priority = 1 -FunctionCode = 146 +FunctionCode = NormalMovesBecomeElectric Description = The user disperses electrically charged particles. Normal-type moves become Electric-type. #------------------------------- [MAGNETRISE] @@ -1506,7 +1506,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 119 +FunctionCode = StartUserAirborne Description = The user levitates using electrically generated magnetism for five turns. #------------------------------- [MAGNETICFLUX] @@ -1516,7 +1516,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = UserAndAllies -FunctionCode = 137 +FunctionCode = RaisePlusMinusUserAndAlliesDefSpDef1 Description = Manipulates magnetic fields to raise the Defense and Sp. Def stats of allies with Plus or Minus Abilities. #------------------------------- [THUNDERWAVE] @@ -1526,7 +1526,7 @@ Category = Status Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTargetIfNotTypeImmune Flags = CanProtect,CanMirrorMove Description = A weak electric charge is launched at the target. It causes paralysis if it hits. #------------------------------- @@ -1538,7 +1538,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0FC +FunctionCode = RecoilHalfOfDamageDealt Flags = CanProtect,CanMirrorMove Description = Fires a powerful beam of light drawn from the Eternal Flower. It also damages the user a lot. #------------------------------- @@ -1550,7 +1550,7 @@ BaseDamage = 130 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 03F +FunctionCode = LowerUserSpAtk2 Flags = CanProtect,CanMirrorMove Description = The user unleashes a strong beam. The attack's recoil harshly lowers the user's Sp. Atk stat. #------------------------------- @@ -1562,7 +1562,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = AllNearOthers -FunctionCode = 18E +FunctionCode = UserFaintsPowersUpInMistyTerrainExplosive Flags = CanProtect,CanMirrorMove Description = The user attacks everything around and faints upon using this move. Power increases on Misty Terrain. #------------------------------- @@ -1574,7 +1574,7 @@ BaseDamage = 95 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks by borrowing the power of the moon. This may also lower the target's Sp. Atk stat. @@ -1587,7 +1587,7 @@ BaseDamage = 90 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 10 Description = The user plays rough with the target and attacks it. This may also lower the target's Attack stat. @@ -1600,7 +1600,7 @@ BaseDamage = 90 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The user attacks the target by emitting steam. This may also confuse the target. @@ -1613,7 +1613,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user damages opposing Pokémon by emitting a powerful flash. #------------------------------- @@ -1625,7 +1625,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks the target with immense force. This also lowers the target's Sp. Atk stat. @@ -1638,7 +1638,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 14F +FunctionCode = HealUserByThreeQuartersOfDamageDone Flags = Contact,CanProtect,CanMirrorMove Description = The user steals the target's HP with a kiss. The user's HP is restored by over half of the damage dealt. #------------------------------- @@ -1650,7 +1650,7 @@ BaseDamage = 40 Accuracy = 0 TotalPP = 15 Target = AllNearFoes -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Sound Description = Letting out a charming cry, the user does emotional damage to foes. This attack never misses. #------------------------------- @@ -1662,7 +1662,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user stirs up a fairy wind and strikes the target with it. #------------------------------- @@ -1674,7 +1674,7 @@ BaseDamage = 1 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 06C +FunctionCode = FixedDamageHalfTargetHP Flags = CanProtect,CanMirrorMove Description = The user hits the target with the force of nature. It halves the target's HP. #------------------------------- @@ -1685,7 +1685,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearAlly -FunctionCode = 138 +FunctionCode = RaiseAllySpDef1 Description = The user raises the Sp. Def stat of an ally Pokémon by using a mysterious aroma. #------------------------------- [BABYDOLLEYES] @@ -1696,7 +1696,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = CanProtect,CanMirrorMove Description = The user stares with its baby-doll eyes, which lowers the target's Attack stat. Always goes first. #------------------------------- @@ -1707,7 +1707,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 04B +FunctionCode = LowerTargetAttack2 Flags = CanProtect,CanMirrorMove Description = The user charmingly gazes at the foe, making it less wary. The target's Attack is harshly lowered. #------------------------------- @@ -1719,7 +1719,7 @@ Accuracy = 0 TotalPP = 10 Target = UserSide Priority = 3 -FunctionCode = 14A +FunctionCode = ProtectUserSideFromStatusMoves Description = The user protects itself and its allies from status moves with a mysterious power. #------------------------------- [DECORATE] @@ -1729,7 +1729,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 17C +FunctionCode = RaiseTargetAtkSpAtk2 Description = The user sharply raises the target's Attack and Sp. Atk stats by decorating the target. #------------------------------- [FAIRYLOCK] @@ -1739,7 +1739,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 152 +FunctionCode = TrapAllBattlersInBattleForOneTurn Flags = CanMirrorMove Description = By locking down the battlefield, the user keeps all Pokémon from fleeing during the next turn. #------------------------------- @@ -1750,7 +1750,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 16E +FunctionCode = HealTargetDependingOnGrassyTerrain Flags = CanProtect Description = The user restores the target's HP by up to half of its max HP. It restores more HP when the terrain is grass. #------------------------------- @@ -1761,7 +1761,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = AllBattlers -FunctionCode = 13F +FunctionCode = RaiseGrassBattlersDef1 Description = The user raises the Defense stats of all Grass-type Pokémon in battle with a mysterious power. #------------------------------- [GEOMANCY] @@ -1771,7 +1771,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 14E +FunctionCode = TwoTurnAttackRaiseUserSpAtkSpDefSpd2 Description = The user absorbs energy and sharply raises its Sp. Atk, Sp. Def, and Speed stats on the next turn. #------------------------------- [MISTYTERRAIN] @@ -1781,7 +1781,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 156 +FunctionCode = StartMistyTerrain Description = The user covers the ground with mist for five turns. Grounded Pokémon can't gain status conditions. #------------------------------- [MOONLIGHT] @@ -1791,7 +1791,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0D8 +FunctionCode = HealUserDependingOnWeather Description = The user restores its own HP. The amount of HP regained varies with the weather. #------------------------------- [SWEETKISS] @@ -1801,7 +1801,7 @@ Category = Status Accuracy = 75 TotalPP = 10 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove Description = The user kisses the target with a sweet, angelic cuteness that causes confusion. #------------------------------- @@ -1814,7 +1814,7 @@ Accuracy = 100 TotalPP = 20 Target = NearOther Priority = -3 -FunctionCode = 115 +FunctionCode = FailsIfUserDamagedThisTurn Flags = Contact,CanProtect,Punching Description = The user focuses its mind before launching a punch. It will fail if the user is hit before it is used. #------------------------------- @@ -1826,7 +1826,7 @@ BaseDamage = 150 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The user attacks wildly with its thick leek. The user can't move on the next turn. #------------------------------- @@ -1838,7 +1838,7 @@ BaseDamage = 130 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 10B +FunctionCode = CrashDamageIfFailsUnusableInGravity Flags = Contact,CanProtect,CanMirrorMove Description = The target is attacked with a knee kick from a jump. If it misses, the user is hurt instead. #------------------------------- @@ -1850,7 +1850,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 03C +FunctionCode = LowerUserDefSpDef1 Flags = Contact,CanProtect,CanMirrorMove Description = The user fights the foe up close without guarding itself. It also cuts the user's Defense and Sp. Def. #------------------------------- @@ -1862,7 +1862,7 @@ BaseDamage = 120 Accuracy = 70 TotalPP = 5 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 10 Description = The user heightens its mental focus and unleashes its power. It may also lower the target's Sp. Def. @@ -1875,7 +1875,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 03B +FunctionCode = LowerUserAtkDef1 Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks the target with great power. However, it also lowers the user's Attack and Defense. #------------------------------- @@ -1887,7 +1887,7 @@ BaseDamage = 100 Accuracy = 80 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user delivers a double chop with its forearms crossed. Critical hits land more easily. #------------------------------- @@ -1899,7 +1899,7 @@ BaseDamage = 100 Accuracy = 50 TotalPP = 5 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 100 Description = The user punches the target with full, concentrated power. It confuses the target if it hits. @@ -1912,7 +1912,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 10 Target = Other -FunctionCode = 144 +FunctionCode = EffectivenessIncludesFlyingType Flags = Contact,CanProtect,CanMirrorMove Description = The user dives down onto the target from the sky. This move is Fighting and Flying type simultaneously. #------------------------------- @@ -1924,7 +1924,7 @@ BaseDamage = 100 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 03E +FunctionCode = LowerUserSpeed1 Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user swings and hits with its strong and heavy fist. It lowers the user's Speed, however. #------------------------------- @@ -1936,7 +1936,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 10B +FunctionCode = CrashDamageIfFailsUnusableInGravity Flags = Contact,CanProtect,CanMirrorMove Description = The user jumps up high, then strikes with a kick. If the kick misses, the user hurts itself. #------------------------------- @@ -1948,7 +1948,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0A9 +FunctionCode = IgnoreTargetDefSpDefEvaStatStages Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks by slicing with its long horns. The target's stat changes don't affect the damage. #------------------------------- @@ -1960,7 +1960,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = Overwhelms the target with lightning-like movement, then kicks. Lowers the target's Defense stat. @@ -1973,7 +1973,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 122 +FunctionCode = UseTargetDefenseInsteadOfTargetSpDef Flags = CanProtect,CanMirrorMove Description = The user cuts with its long horn. The odd power contained in it does physical damage to the foe. #------------------------------- @@ -1985,7 +1985,7 @@ BaseDamage = 85 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 11B +FunctionCode = HitsTargetInSky Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user attacks the target with an uppercut thrown skyward with force. #------------------------------- @@ -1997,7 +1997,7 @@ BaseDamage = 80 Accuracy = 0 TotalPP = 20 Target = Other -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Pulse,Bomb Description = The user looses a blast of aura power from deep within its body. This move is certain to hit. #------------------------------- @@ -2009,7 +2009,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 197 +FunctionCode = UseUserBaseDefenseInsteadOfUserBaseAttack Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks by slamming its body into the target. Power increases the higher the user's Defense is. #------------------------------- @@ -2021,7 +2021,7 @@ BaseDamage = 80 Accuracy = 80 TotalPP = 20 Target = NearOther -FunctionCode = 0FA +FunctionCode = RecoilQuarterOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user grabs the target and recklessly dives for the ground. It also hurts the user slightly. #------------------------------- @@ -2033,7 +2033,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 10A +FunctionCode = RemoveScreens Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks with a swift chop. It can also break any barrier such as Light Screen and Reflect. #------------------------------- @@ -2045,7 +2045,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = Contact,CanProtect,CanMirrorMove,Punching Description = An energy-draining punch. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -2058,7 +2058,7 @@ Accuracy = 0 TotalPP = 10 Target = NearOther Priority = -1 -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks last. In return, this throw move is guaranteed not to miss. #------------------------------- @@ -2070,7 +2070,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 07D +FunctionCode = DoublePowerIfTargetAsleepCureTarget Flags = Contact,CanProtect,CanMirrorMove Description = This attack inflicts big damage on a sleeping target. It also wakes the target up, however. #------------------------------- @@ -2082,7 +2082,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks the target's legs swiftly, reducing the target's Speed stat. @@ -2096,7 +2096,7 @@ Accuracy = 90 TotalPP = 10 Target = NearOther Priority = -6 -FunctionCode = 0EC +FunctionCode = SwitchOutTargetDamagingMove Flags = Contact,CanProtect,CanMirrorMove Description = The user throws the target and drags out another Pokémon in its party. In the wild, the battle ends. #------------------------------- @@ -2108,7 +2108,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is attacked with a shock wave. It may also leave the target with paralysis. @@ -2122,7 +2122,7 @@ Accuracy = 100 TotalPP = 10 Target = NearOther Priority = -4 -FunctionCode = 081 +FunctionCode = DoublePowerIfUserLostHPThisTurn Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that inflicts double the damage if the user has been hurt by the foe in the same turn. #------------------------------- @@ -2134,7 +2134,7 @@ BaseDamage = 60 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user lashes out with a quick, spinning kick. It may also make the target flinch. @@ -2147,7 +2147,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0A0 +FunctionCode = AlwaysCriticalHit Flags = Contact,CanProtect,CanMirrorMove Description = The user strikes the target with a fierce blow. This attack always results in a critical hit. #------------------------------- @@ -2159,7 +2159,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The target is attacked with a sharp chop. Critical hits land more easily. #------------------------------- @@ -2172,7 +2172,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user throws a punch at blinding speed. It is certain to strike first. #------------------------------- @@ -2184,7 +2184,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 100 Description = Striking opponents repeatedly makes the user's fists harder, raising the user's Attack stat. @@ -2197,7 +2197,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 50 Description = The user attacks with a punch that can shatter a rock. It may also lower the foe's Defense stat. @@ -2211,7 +2211,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user whirls its fists to send a wave of pure vacuum at the target. This move always goes first. #------------------------------- @@ -2223,7 +2223,7 @@ BaseDamage = 30 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = Contact,CanProtect,CanMirrorMove Description = The target is quickly kicked twice in succession using both feet. #------------------------------- @@ -2235,7 +2235,7 @@ BaseDamage = 15 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user looses a flurry of open-palmed arm thrusts that hit two to five times in a row. #------------------------------- @@ -2247,7 +2247,7 @@ BaseDamage = 10 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0BF +FunctionCode = HitThreeTimesPowersUpWithEachHit Flags = Contact,CanProtect,CanMirrorMove Description = A consecutive three-kick attack that becomes more powerful with each successive hit. #------------------------------- @@ -2260,7 +2260,7 @@ Accuracy = 100 TotalPP = 20 Target = None Priority = -5 -FunctionCode = 071 +FunctionCode = CounterPhysicalDamage Flags = Contact,CanProtect Description = A retaliation move that counters any physical attack, inflicting double the damage taken. #------------------------------- @@ -2272,7 +2272,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 0E1 +FunctionCode = UserFaintsFixedDamageUserHP Flags = CanProtect Description = The user risks all to attack the foe. The user faints but does damage equal to its HP. #------------------------------- @@ -2284,7 +2284,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 09A +FunctionCode = PowerHigherWithTargetWeight Flags = Contact,CanProtect,CanMirrorMove Description = A powerful low kick that makes the foe fall over. It inflicts greater damage on heavier foes. #------------------------------- @@ -2296,7 +2296,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 098 +FunctionCode = PowerLowerWithUserHP Flags = Contact,CanProtect,CanMirrorMove Description = An all-out attack that becomes more powerful the less HP the user has. #------------------------------- @@ -2308,7 +2308,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 06D +FunctionCode = FixedDamageUserLevel Flags = Contact,CanProtect,CanMirrorMove Description = The target is thrown using the power of gravity. It inflicts damage equal to the user's level. #------------------------------- @@ -2319,7 +2319,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 024 +FunctionCode = RaiseUserAtkDef1 Description = The user tenses its muscles to bulk up its body, boosting both its Attack and Defense stats. #------------------------------- [COACHING] @@ -2329,7 +2329,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = AllAllies -FunctionCode = 17B +FunctionCode = RaiseUserAndAlliesAtkDef1 Flags = CanMirrorMove Description = The user properly coaches its ally Pokémon, boosting their Attack and Defense stats. #------------------------------- @@ -2341,7 +2341,7 @@ Accuracy = 0 TotalPP = 5 Target = User Priority = 4 -FunctionCode = 0AA +FunctionCode = ProtectUser Description = It enables the user to evade all attacks. Its chance of failing rises if it is used in succession. #------------------------------- [MATBLOCK] @@ -2351,7 +2351,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = UserSide -FunctionCode = 149 +FunctionCode = ProtectUserSideFromDamagingMovesIfUserFirstTurn Description = Using a pulled-up mat as a shield, the user protects itself and its allies from damaging moves. #------------------------------- [NORETREAT] @@ -2361,7 +2361,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 179 +FunctionCode = RaiseUserMainStats1TrapUserInBattle Description = This move raises all the user's stats but prevents the user from switching out or fleeing. #------------------------------- [OCTOLOCK] @@ -2371,7 +2371,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 18F +FunctionCode = TrapTargetInBattleLowerTargetDefSpDef1EachTurn Flags = CanProtect,CanMirrorMove Description = Locks the target in and prevents it from fleeing. Also lowers the target's Defense and Sp. Def each turn. #------------------------------- @@ -2383,7 +2383,7 @@ Accuracy = 0 TotalPP = 15 Target = UserSide Priority = 3 -FunctionCode = 0AB +FunctionCode = ProtectUserSideFromPriorityMoves Description = The user protects itself and its allies from priority moves. If may fail if used in succession. #------------------------------- [VCREATE] @@ -2394,7 +2394,7 @@ BaseDamage = 180 Accuracy = 95 TotalPP = 5 Target = NearOther -FunctionCode = 03D +FunctionCode = LowerUserDefSpDefSpd1 Flags = Contact,CanProtect,CanMirrorMove Description = With a fiery forehead, the user hurls itself at the foe. It lowers the user's Defense, Sp. Def, and Speed. #------------------------------- @@ -2406,7 +2406,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The target is razed by a fiery explosion. The user must rest on the next turn, however. #------------------------------- @@ -2418,7 +2418,7 @@ BaseDamage = 150 Accuracy = 100 TotalPP = 5 Target = AllNearFoes -FunctionCode = 08B +FunctionCode = PowerHigherWithUserHP Flags = CanProtect,CanMirrorMove Description = The user attacks in an explosive fury. The lower the user's HP, the less powerful this attack becomes. #------------------------------- @@ -2430,7 +2430,7 @@ BaseDamage = 150 Accuracy = 100 TotalPP = 5 Target = AllNearOthers -FunctionCode = 170 +FunctionCode = UserLosesHalfOfTotalHPExplosive Flags = CanProtect,CanMirrorMove Description = The user attacks everything by causing its own head to explode. This also damages the user. #------------------------------- @@ -2443,7 +2443,7 @@ Accuracy = 100 TotalPP = 5 Target = AllNearFoes Priority = -3 -FunctionCode = 171 +FunctionCode = UsedAfterUserTakesPhysicalDamage Flags = CanProtect Description = The user sets a shell trap. If it is hit by a physical move, the trap explodes and hurt the attacker. #------------------------------- @@ -2455,7 +2455,7 @@ BaseDamage = 130 Accuracy = 85 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The user attacks by engulfing the foe in a beautiful, yet intense, blue flame. It may also burn the foe. @@ -2468,7 +2468,7 @@ BaseDamage = 130 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 162 +FunctionCode = UserLosesFireType Flags = CanProtect,CanMirrorMove,ThawsUser Description = To inflict massive damage, the user burns itself out. The user will no longer be Fire type. #------------------------------- @@ -2480,7 +2480,7 @@ BaseDamage = 130 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 03F +FunctionCode = LowerUserSpAtk2 Flags = CanProtect,CanMirrorMove Description = The user attacks the target at full power. The attack's recoil sharply reduces the user's Sp. Atk stat. #------------------------------- @@ -2492,7 +2492,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FE +FunctionCode = RecoilThirdOfDamageDealtBurnTarget Flags = Contact,CanProtect,CanMirrorMove,ThawsUser EffectChance = 10 Description = The user cloaks itself in fire and charges at the foe. The user also takes damage and may burn the target. @@ -2505,7 +2505,7 @@ BaseDamage = 120 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove,ThawsUser,Bomb EffectChance = 10 Description = Attacks by igniting a small stone and launching it as a fiery ball. May also burn the target. @@ -2518,7 +2518,7 @@ BaseDamage = 110 Accuracy = 85 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The foe is attacked with an intense blast of all-consuming fire. It may also leave the target with a burn. @@ -2531,7 +2531,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 07A +FunctionCode = DoublePowerAfterFusionBolt Flags = CanProtect,CanMirrorMove,ThawsUser Description = The user brings down a giant flame. It does more damage if influenced by an enormous thunderbolt. #------------------------------- @@ -2543,7 +2543,7 @@ BaseDamage = 100 Accuracy = 50 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks by engulfing the target in an intense fire. It leaves the target with a burn. @@ -2556,7 +2556,7 @@ BaseDamage = 100 Accuracy = 75 TotalPP = 5 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = CanProtect,CanMirrorMove Description = The target becomes trapped within a maelstrom of fire that rages for four to five turns. #------------------------------- @@ -2568,7 +2568,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove,ThawsUser EffectChance = 50 Description = The target is razed with a mystical fire of great intensity. It may also leave the target with a burn. @@ -2581,7 +2581,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = AllNearOthers -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 30 Description = An inferno of scarlet flames torches everything around the user. It may leave the foe with a burn. @@ -2594,7 +2594,7 @@ BaseDamage = 95 Accuracy = 90 TotalPP = 10 Target = AllNearFoes -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks by exhaling hot breath on the opposing team. It may also leave targets with a burn. @@ -2607,7 +2607,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is scorched with an intense blast of fire. It may also leave the target with a burn. @@ -2620,7 +2620,7 @@ BaseDamage = 85 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate EffectChance = 10 Description = The user launches a kick with a high critical-hit ratio. It may also leave the target with a burn. @@ -2633,7 +2633,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 020 +FunctionCode = RaiseUserSpAtk1 Flags = CanProtect,CanMirrorMove,Dance EffectChance = 50 Description = Cloaked in flames, the user dances and flaps its wings. It may also raise the user's Sp. Atk stat. @@ -2646,7 +2646,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user strikes the target with a burning lash. This also lowers the target's Defense stat. @@ -2659,7 +2659,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 107 +FunctionCode = FirePledge Flags = CanProtect,CanMirrorMove Description = A column of fire hits opposing Pokémon. When used with its Grass equivalent, it makes a sea of fire. #------------------------------- @@ -2671,7 +2671,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = AllNearOthers -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = An inferno of scarlet flames torches everything around the user. It may leave targets with a burn. @@ -2684,7 +2684,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 10 Description = The target is punched with a fiery fist. It may leave the target with a burn. @@ -2697,7 +2697,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks by breathing a special, hot fire. This also lowers the target's Sp. Atk stat. @@ -2710,7 +2710,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 5 Target = AllNearFoes -FunctionCode = 177 +FunctionCode = BurnTargetIfTargetStatsRaisedThisTurn Flags = CanProtect,CanMirrorMove Description = The user attacks with energy from jealousy. This burns all foes that had their stats boosted this turn. #------------------------------- @@ -2722,7 +2722,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 074 +FunctionCode = DamageTargetAlly Flags = CanProtect,CanMirrorMove Description = The user attacks the foe with a bursting flame. It also damages Pokémon next to the target. #------------------------------- @@ -2734,7 +2734,7 @@ BaseDamage = 65 Accuracy = 95 TotalPP = 15 Target = NearOther -FunctionCode = 00B +FunctionCode = BurnFlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 100 Description = The user bites with flame-cloaked fangs. It may also make the target flinch or leave it burned. @@ -2747,7 +2747,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = Contact,CanProtect,CanMirrorMove,ThawsUser EffectChance = 10 Description = The user cloaks itself in fire and charges at the target. It may also leave the target with a burn. @@ -2760,7 +2760,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 15 Target = AllNearFoes -FunctionCode = 0F5 +FunctionCode = DestroyTargetBerryOrGem Flags = CanProtect,CanMirrorMove Description = The user attacks the foe with fire. The target's held Berry becomes burnt up and unusable. #------------------------------- @@ -2772,7 +2772,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 01F +FunctionCode = RaiseUserSpeed1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user cloaks itself in flame and attacks. Building up more power, it raises the user's Speed stat. @@ -2785,7 +2785,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is attacked with small flames. It may also leave the target with a burn. @@ -2798,7 +2798,7 @@ BaseDamage = 35 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = CanProtect,CanMirrorMove Description = The target becomes trapped within a fierce vortex of fire that rages for four to five turns. #------------------------------- @@ -2810,7 +2810,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 09B +FunctionCode = PowerHigherWithUserHeavierThanTarget Flags = Contact,CanProtect,CanMirrorMove Description = The user slams the foe with its flaming body. The heavier the user is, the greater the damage. #------------------------------- @@ -2821,7 +2821,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = BothSides -FunctionCode = 0FF +FunctionCode = StartSunWeather Description = The user intensifies the sun for five turns, powering up Fire-type moves. #------------------------------- [WILLOWISP] @@ -2831,7 +2831,7 @@ Category = Status Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove Description = The user shoots a sinister, bluish-white flame at the target to inflict a burn. #------------------------------- @@ -2843,7 +2843,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = Other -FunctionCode = 0C7 +FunctionCode = TwoTurnAttackFlinchTarget Flags = CanProtect,CanMirrorMove,HighCriticalHitRate EffectChance = 30 Description = A second-turn attack move where critical hits land more easily. It may also make the target flinch. @@ -2856,7 +2856,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = Other -FunctionCode = 0FB +FunctionCode = RecoilThirdOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user tucks in its wings and charges from a low altitude. The user also takes serious damage. #------------------------------- @@ -2868,7 +2868,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 03C +FunctionCode = LowerUserDefSpDef1 Flags = Contact,CanProtect,CanMirrorMove Description = The user soars upward and drops at high speeds. Its Defense and Sp. Def stats are lowered. #------------------------------- @@ -2880,7 +2880,7 @@ BaseDamage = 110 Accuracy = 70 TotalPP = 10 Target = Other -FunctionCode = 015 +FunctionCode = ConfuseTargetAlwaysHitsInRainHitsTargetInSky Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user wraps its foe in a fierce wind that flies up into the sky. It may also confuse the foe. @@ -2893,7 +2893,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 5 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = A vortex of air is shot at the target to inflict damage. Critical hits land more easily. #------------------------------- @@ -2905,7 +2905,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 172 +FunctionCode = BurnAttackerBeforeUserActs Flags = CanProtect,Bomb Description = The user heats up its beak before attacking. Making contact in this time results in a burn. #------------------------------- @@ -2917,7 +2917,7 @@ BaseDamage = 90 Accuracy = 95 TotalPP = 15 Target = Other -FunctionCode = 0C9 +FunctionCode = TwoTurnAttackInvulnerableInSky Flags = Contact,CanProtect,CanMirrorMove Description = The user soars, then strikes on the second turn. It can also be used for flying to any familiar town. #------------------------------- @@ -2929,7 +2929,7 @@ BaseDamage = 85 Accuracy = 85 TotalPP = 5 Target = Other -FunctionCode = 0CC +FunctionCode = TwoTurnAttackInvulnerableInSkyParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user bounces up high, then drops on the foe on the second turn. It may also paralyze the foe. @@ -2942,7 +2942,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 20 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = A corkscrewing attack with the sharp beak acting as a drill. #------------------------------- @@ -2954,7 +2954,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = Other -FunctionCode = 14F +FunctionCode = HealUserByThreeQuartersOfDamageDone Flags = CanProtect,CanMirrorMove Description = The user absorbs its target's HP. The user's HP is restored by over half of the damage dealt. #------------------------------- @@ -2966,7 +2966,7 @@ BaseDamage = 75 Accuracy = 95 TotalPP = 15 Target = Other -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks with a blade of air that slices even the sky. It may also make the target flinch. @@ -2979,7 +2979,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = Other -FunctionCode = 014 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove,Sound EffectChance = 100 Description = The user attacks using a sound wave based on words it has learned. It may also confuse the target. @@ -2992,7 +2992,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = Other -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user confounds the foe with speed, then slashes. The attack lands without fail. #------------------------------- @@ -3004,7 +3004,7 @@ BaseDamage = 60 Accuracy = 95 TotalPP = 25 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user launches razor-like wind to slash the opposing team. Critical hits land more easily. #------------------------------- @@ -3016,7 +3016,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = Other -FunctionCode = 0F4 +FunctionCode = UserConsumeTargetBerry Flags = Contact,CanProtect,CanMirrorMove Description = The user pecks the target. If the target is holding a Berry, the user eats it and gains its effect. #------------------------------- @@ -3028,7 +3028,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 10 Target = Other -FunctionCode = 0CE +FunctionCode = TwoTurnAttackInvulnerableInSkyTargetCannotAct Flags = Contact,CanProtect,CanMirrorMove Description = The user takes the foe into the sky, then drops it on the next turn. The foe cannot attack while airborne. #------------------------------- @@ -3040,7 +3040,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 35 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is struck with large, imposing wings spread wide to inflict damage. #------------------------------- @@ -3052,7 +3052,7 @@ BaseDamage = 55 Accuracy = 100 TotalPP = 15 Target = Other -FunctionCode = 086 +FunctionCode = DoublePowerIfUserHasNoItem Flags = Contact,CanProtect,CanMirrorMove Description = The user nimbly strikes the foe. This attack does more damage if the user is not holding an item. #------------------------------- @@ -3064,7 +3064,7 @@ BaseDamage = 40 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user slams the target with its wings. The target is hit twice in a row. #------------------------------- @@ -3076,7 +3076,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 35 Target = Other -FunctionCode = 077 +FunctionCode = DoublePowerIfTargetInSky Flags = CanProtect,CanMirrorMove Description = A gust of wind is whipped up by wings and launched at the target to inflict damage. #------------------------------- @@ -3088,7 +3088,7 @@ BaseDamage = 35 Accuracy = 100 TotalPP = 35 Target = Other -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is jabbed with a sharply pointed beak or horn. #------------------------------- @@ -3099,7 +3099,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 049 +FunctionCode = LowerTargetEvasion1RemoveSideEffects Flags = CanProtect,CanMirrorMove Description = A strong wind blows away the foe's obstacles such as Light Screen. It also lowers their evasion. #------------------------------- @@ -3110,7 +3110,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 04B +FunctionCode = LowerTargetAttack2 Flags = CanProtect,CanMirrorMove,Dance Description = The user covers the target's body with a mass of down that harshly lowers its Attack stat. #------------------------------- @@ -3121,7 +3121,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0AE +FunctionCode = UseLastMoveUsedByTarget Description = The user counters the target by mimicking the target's last move. #------------------------------- [ROOST] @@ -3131,7 +3131,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D6 +FunctionCode = HealUserHalfOfTotalHPLoseFlyingTypeThisTurn Description = The user lands and rests its body. It restores the user's HP by up to half of its max HP. #------------------------------- [TAILWIND] @@ -3141,7 +3141,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = UserSide -FunctionCode = 05B +FunctionCode = StartUserSideDoubleSpeed Description = The user whips up a turbulent whirlwind that ups the Speed of all party Pokémon for four turns. #------------------------------- [ASTRALBARRAGE] @@ -3152,7 +3152,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user attacks by sending a frightful amount of small ghosts at opposing Pokémon. #------------------------------- @@ -3164,7 +3164,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 0CD +FunctionCode = TwoTurnAttackInvulnerableRemoveProtections Flags = Contact,CanMirrorMove Description = The user disappears, then strikes the foe on the second turn. It hits even if the foe protects itself. #------------------------------- @@ -3176,7 +3176,7 @@ BaseDamage = 110 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 196 +FunctionCode = FailsIfTargetHasNoItem Flags = CanProtect,CanMirrorMove Description = Attacks the target by controlling its item. The move fails if the target doesn't have an item. #------------------------------- @@ -3188,7 +3188,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 163 +FunctionCode = IgnoreTargetAbility Flags = CanProtect,CanMirrorMove Description = The user emits a sinister ray. This move can be used on the target regardless of its Abilities. #------------------------------- @@ -3200,7 +3200,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 14D +FunctionCode = TwoTurnAttackInvulnerableRemoveProtections Flags = Contact,CanMirrorMove Description = The user vanishes somewhere, then strikes on the next turn. Hits through protections. #------------------------------- @@ -3212,7 +3212,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 15D +FunctionCode = UserStealTargetPositiveStatStages Flags = Contact,CanProtect,CanMirrorMove Description = The user hides in the target's shadow, steals the target's stat boosts, and then attacks. #------------------------------- @@ -3224,7 +3224,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The user beats the target with a bone containing a spirit. May lower the target's Defense stat. @@ -3237,7 +3237,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 20 Description = The user hurls a shadowy blob at the target. It may also lower the target's Sp. Def stat. @@ -3250,7 +3250,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks while also stitching the target's shadow to the ground to prevent it fleeing. @@ -3263,7 +3263,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user slashes with a sharp claw made from shadows. Critical hits land more easily. #------------------------------- @@ -3275,7 +3275,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 07F +FunctionCode = DoublePowerIfTargetStatusProblem Flags = CanProtect,CanMirrorMove Description = This relentless attack does massive damage to a target affected by status problems. #------------------------------- @@ -3287,7 +3287,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 02D +FunctionCode = RaiseUserMainStats1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user blasts the target with a gust of repulsive wind. It may also raise all the user's stats at once. @@ -3300,7 +3300,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user throws a punch from the shadows. The punch lands without fail. #------------------------------- @@ -3313,7 +3313,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user extends its shadow and attacks the target from behind. This move always goes first. #------------------------------- @@ -3325,7 +3325,7 @@ BaseDamage = 30 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks the target while shouting in a startling fashion. It may also make the target flinch. @@ -3338,7 +3338,7 @@ BaseDamage = 30 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is licked with a long tongue, causing damage. It may also leave the target with paralysis. @@ -3351,7 +3351,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 06D +FunctionCode = FixedDamageUserLevel Flags = CanProtect,CanMirrorMove Description = The user makes the foe see a frightening mirage. It inflicts damage matching the user's level. #------------------------------- @@ -3362,7 +3362,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove Description = The target is exposed to a sinister ray that triggers confusion. #------------------------------- @@ -3373,7 +3373,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 10D +FunctionCode = CurseTargetOrLowerUserSpd1RaiseUserAtkDef1 Description = A move that works differently for the Ghost type than for all the other types. #------------------------------- [DESTINYBOND] @@ -3383,7 +3383,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0E7 +FunctionCode = AttackerFaintsIfUserFaints Description = When this move is used, if the user faints, the foe that landed the knockout hit also faints. #------------------------------- [GRUDGE] @@ -3393,7 +3393,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0E6 +FunctionCode = SetAttackerMovePPTo0IfUserFaints Description = If the user faints, the user's grudge fully depletes the PP of the foe's move that knocked it out. #------------------------------- [NIGHTMARE] @@ -3403,7 +3403,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 10F +FunctionCode = StartDamageTargetEachTurnIfTargetAsleep Flags = CanProtect,CanMirrorMove Description = A sleeping target sees a nightmare that inflicts some damage every turn. #------------------------------- @@ -3414,7 +3414,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 10E +FunctionCode = LowerPPOfTargetLastMoveBy4 Flags = CanProtect,CanMirrorMove Description = The user unleashes its grudge on the move last used by the target by cutting 4 PP from it. #------------------------------- @@ -3425,7 +3425,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 142 +FunctionCode = AddGhostTypeToTarget Flags = CanProtect,CanMirrorMove Description = The user takes the target trick-or-treating. This adds Ghost type to the target's type. #------------------------------- @@ -3437,7 +3437,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The user slams the target with an enormous tree. The user can't move on the next turn. #------------------------------- @@ -3449,7 +3449,7 @@ BaseDamage = 130 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 03F +FunctionCode = LowerUserSpAtk2 Flags = CanProtect,CanMirrorMove Description = A storm of sharp is whipped up. The attack's recoil harshly reduces the user's Sp. Atk stat. #------------------------------- @@ -3461,7 +3461,7 @@ BaseDamage = 125 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0C4 +FunctionCode = TwoTurnAttackOneTurnInSun Flags = Contact,CanProtect,CanMirrorMove Description = The user gathers light energy into a blade, attacking the target on the next turn. #------------------------------- @@ -3473,7 +3473,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = RandomNearFoe -FunctionCode = 0D2 +FunctionCode = MultiTurnAttackConfuseUserAtEnd Flags = Contact,CanProtect,CanMirrorMove,Dance Description = The user attacks by scattering petals for two to three turns. The user then becomes confused. #------------------------------- @@ -3485,7 +3485,7 @@ BaseDamage = 120 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user violently whirls its vines or tentacles to harshly lash the target. #------------------------------- @@ -3497,7 +3497,7 @@ BaseDamage = 120 Accuracy = 85 TotalPP = 5 Target = NearOther -FunctionCode = 04F +FunctionCode = LowerTargetSpDef2 Flags = CanProtect,CanMirrorMove EffectChance = 40 Description = The user generates a shock wave from within its body. It may harshly lower the target's Sp. Def. @@ -3510,7 +3510,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0C4 +FunctionCode = TwoTurnAttackOneTurnInSun Flags = CanProtect,CanMirrorMove Description = A two-turn attack. The user gathers light, then blasts a bundled beam on the second turn. #------------------------------- @@ -3522,7 +3522,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FB +FunctionCode = RecoilThirdOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user slams its rugged body into the target to attack. The user also sustains serious damage. #------------------------------- @@ -3534,7 +3534,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 10 Description = The user draws power from nature and fires it at the target. It may also lower the target's Sp. Def. @@ -3547,7 +3547,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user handles a sharp leaf like a sword and attacks by slashing. It has a high critical-hit ratio. #------------------------------- @@ -3559,7 +3559,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = AllNearOthers -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user stirs up a violent petal blizzard and attacks everything around it. #------------------------------- @@ -3571,7 +3571,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = Attacks with an acidic liquid created from tart apples. This also lowers the target's Sp. Def. @@ -3584,7 +3584,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user plays its drum, controlling roots to attack. This also lowers the target's Speed stat. @@ -3597,7 +3597,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 106 +FunctionCode = GrassPledge Flags = CanProtect,CanMirrorMove Description = A column of grass hits the foes. When used with its water equivalent, it creates a vast swamp. #------------------------------- @@ -3609,7 +3609,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 17D +FunctionCode = LowerTargetDefense1DoublePowerInGravity Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user inflicts damage by dropping an apple from high above. This also lowers the target's Defense. @@ -3622,7 +3622,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Bomb Description = The user slams a barrage of hard-shelled seeds down on the target from above. #------------------------------- @@ -3634,7 +3634,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = CanProtect,CanMirrorMove Description = A nutrient-draining attack. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -3646,7 +3646,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = Contact,CanProtect,CanMirrorMove Description = The user drains the foe's energy with its horns. The user's HP is restored by half the damage inflicted. #------------------------------- @@ -3658,7 +3658,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 185 +FunctionCode = HigherPriorityInGrassyTerrain Flags = Contact,CanProtect,CanMirrorMove Description = Gliding on the ground, the user attacks the target. This move always goes first on Grassy Terrain. #------------------------------- @@ -3670,7 +3670,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user lands an intense tropical kick on the target. This also lowers the target's Attack stat. @@ -3683,7 +3683,7 @@ BaseDamage = 65 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 50 Description = The user attacks its foe by encircling it in sharp leaves. This attack may also lower the foe's accuracy. @@ -3696,7 +3696,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user scatters curious leaves that chase the target. This attack will not miss. #------------------------------- @@ -3708,7 +3708,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks by wildly swinging its thorny arms. It may also make the target flinch. @@ -3721,7 +3721,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 25 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = Sharp-edged leaves are launched to slash at the opposing team. Critical hits land more easily. #------------------------------- @@ -3733,7 +3733,7 @@ BaseDamage = 45 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is struck with slender, whiplike vines to inflict damage. #------------------------------- @@ -3745,7 +3745,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 40 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks the target by poking it with a sharply pointed branch. #------------------------------- @@ -3757,7 +3757,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 40 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user attacks by pelting the target with leaves. #------------------------------- @@ -3769,7 +3769,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = CanProtect,CanMirrorMove Description = A nutrient-draining attack. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -3781,7 +3781,7 @@ BaseDamage = 35 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = Contact,CanProtect,CanMirrorMove Description = The user snares the target in a snap trap for four to five turns. #------------------------------- @@ -3793,7 +3793,7 @@ BaseDamage = 25 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove,Bomb Description = The user forcefully shoots seeds at the target. Two to five seeds are shot in rapid succession. #------------------------------- @@ -3805,7 +3805,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 0DD +FunctionCode = HealUserByHalfOfDamageDone Flags = CanProtect,CanMirrorMove Description = A nutrient-draining attack. The user's HP is restored by half the damage taken by the target. #------------------------------- @@ -3817,7 +3817,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 09A +FunctionCode = PowerHigherWithTargetWeight Flags = Contact,CanProtect,CanMirrorMove Description = The user snares the target with grass and trips it. The heavier the target, the greater the damage. #------------------------------- @@ -3828,7 +3828,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = UserAndAllies -FunctionCode = 019 +FunctionCode = CureUserPartyStatus Description = The user releases a soothing scent that heals all status problems affecting the user's party. #------------------------------- [COTTONGUARD] @@ -3838,7 +3838,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 038 +FunctionCode = RaiseUserDefense3 Description = The user protects itself by wrapping its body in soft cotton, drastically raising its Defense stat. #------------------------------- [COTTONSPORE] @@ -3848,7 +3848,7 @@ Category = Status Accuracy = 100 TotalPP = 40 Target = AllNearFoes -FunctionCode = 04D +FunctionCode = LowerTargetSpeed2 Flags = CanProtect,CanMirrorMove,Powder Description = The user releases cotton-like spores that cling to the foe, harshly reducing its Speed stat. #------------------------------- @@ -3859,7 +3859,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 143 +FunctionCode = AddGrassTypeToTarget Flags = CanProtect,CanMirrorMove Description = The user puts a forest curse on the target. The target is now Grass type as well. #------------------------------- @@ -3870,7 +3870,7 @@ Category = Status Accuracy = 55 TotalPP = 15 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove,Sound Description = The user plays a pleasant melody that lulls the target into a deep sleep. #------------------------------- @@ -3881,7 +3881,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 155 +FunctionCode = StartGrassyTerrain Description = The user turns the ground to grass for five turns. Grounded Pokémon restore a little HP every turn. #------------------------------- [INGRAIN] @@ -3891,7 +3891,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 0DB +FunctionCode = StartHealUserEachTurnTrapUserInBattle Description = The user lays roots that restore its HP on every turn. Because it is rooted, it can't switch out. #------------------------------- [JUNGLEHEALING] @@ -3901,7 +3901,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = UserAndAllies -FunctionCode = 18D +FunctionCode = HealUserAndAlliesQuarterOfTotalHPCureStatus Description = The user becomes one with the jungle, and restores HP and cures status conditions of itself and allies. #------------------------------- [LEECHSEED] @@ -3911,7 +3911,7 @@ Category = Status Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0DC +FunctionCode = StartLeechSeedTarget Flags = CanProtect,CanMirrorMove Description = A seed is planted on the target. It steals some HP from the target every turn. #------------------------------- @@ -3922,7 +3922,7 @@ Category = Status Accuracy = 75 TotalPP = 15 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove,Powder Description = The user scatters a big cloud of sleep-inducing dust around the target. #------------------------------- @@ -3934,7 +3934,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 14C +FunctionCode = ProtectUserFromTargetingMovesSpikyShield Description = Protects the user from attacks. Also damages attackers that make contact with the user. #------------------------------- [SPORE] @@ -3944,7 +3944,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove,Powder Description = The user scatters bursts of spores that induce sleep. #------------------------------- @@ -3955,7 +3955,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 160 +FunctionCode = HealUserByTargetAttackLowerTargetAttack1 Flags = CanProtect,CanMirrorMove Description = The user restores its HP by the target's Attack stat amount. Then lowers the target's Attack stat. #------------------------------- @@ -3966,7 +3966,7 @@ Category = Status Accuracy = 75 TotalPP = 30 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove,Powder Description = The user scatters a cloud of paralyzing powder. It may leave the target with paralysis. #------------------------------- @@ -3977,7 +3977,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0D8 +FunctionCode = HealUserDependingOnWeather Description = The user restores its own HP. The amount of HP regained varies with the weather. #------------------------------- [WORRYSEED] @@ -3987,7 +3987,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 064 +FunctionCode = SetTargetAbilityToInsomnia Flags = CanProtect,CanMirrorMove Description = A seed that causes worry is planted on the foe. It prevents sleep by making its Ability Insomnia. #------------------------------- @@ -3999,7 +3999,7 @@ BaseDamage = 120 Accuracy = 85 TotalPP = 10 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user attacks its foes by manifesting the power of the land in fearsome blades of stone. #------------------------------- @@ -4011,7 +4011,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 10 Target = AllNearOthers -FunctionCode = 076 +FunctionCode = DoublePowerIfTargetUnderground Flags = CanProtect,CanMirrorMove Description = The user sets off an earthquake that strikes every Pokémon around it. #------------------------------- @@ -4023,7 +4023,7 @@ BaseDamage = 95 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user fiercely attacks the target using its entire body. #------------------------------- @@ -4035,7 +4035,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user makes the ground under the foe erupt with power. It may also lower the target's Sp. Def. @@ -4048,7 +4048,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user gathers the energy of the land and focuses that power on foes to damage them. #------------------------------- @@ -4060,7 +4060,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 11C +FunctionCode = HitsTargetInSkyGroundsTarget Flags = CanProtect,CanMirrorMove Description = This move also hits Pokémon that are in the air. Those Pokémon are knocked down to the ground. #------------------------------- @@ -4072,7 +4072,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = CanProtect,CanMirrorMove Description = The user attacks with a wave that crawls along the ground. Those it hits can't flee from battle. #------------------------------- @@ -4084,7 +4084,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0CA +FunctionCode = TwoTurnAttackInvulnerableUnderground Flags = Contact,CanProtect,CanMirrorMove Description = The user burrows, then attacks on the second turn. It can also be used to exit dungeons. #------------------------------- @@ -4096,7 +4096,7 @@ BaseDamage = 80 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user crashes into its target while rotating its body like a drill. Critical hits land more easily. #------------------------------- @@ -4108,7 +4108,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 166 +FunctionCode = DoublePowerIfUserLastMoveFailed Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks driven by frustration. Power increases if the user's previous move failed. #------------------------------- @@ -4120,7 +4120,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove,ThawsUser EffectChance = 30 Description = The user throws scorching sand at the target to attack. This may also burn the target. @@ -4133,7 +4133,7 @@ BaseDamage = 65 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user clubs the target with a bone. It may also make the target flinch. @@ -4146,7 +4146,7 @@ BaseDamage = 65 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 30 Description = The user launches a hard-packed mud ball to attack. It may also lower the target's accuracy. @@ -4159,7 +4159,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = AllNearOthers -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1WeakerInGrassyTerrain Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user strikes everything around it by stomping on the ground. It reduces hit Pokémon's Speed. @@ -4172,7 +4172,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 15 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks by hurling a blob of mud at the target. It also reduces the target's Speed. @@ -4185,7 +4185,7 @@ BaseDamage = 50 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = CanProtect,CanMirrorMove Description = The user throws the bone it holds. The bone loops to hit the target twice, coming and going. #------------------------------- @@ -4197,7 +4197,7 @@ BaseDamage = 35 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = CanProtect,CanMirrorMove Description = The user traps the target inside a harshly raging sandstorm for four to five turns. #------------------------------- @@ -4209,7 +4209,7 @@ BaseDamage = 25 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove Description = The user strikes the target with a hard bone two to five times in a row. #------------------------------- @@ -4221,7 +4221,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user hurls mud in the target's face to inflict damage and lower its accuracy. @@ -4234,7 +4234,7 @@ BaseDamage = 1 Accuracy = 30 TotalPP = 5 Target = NearOther -FunctionCode = 070 +FunctionCode = OHKOHitsTargetUnderground Flags = CanProtect,CanMirrorMove Description = The user opens up a fissure in the ground and drops the foe in. The target instantly faints if it hits. #------------------------------- @@ -4246,7 +4246,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 30 Target = AllNearOthers -FunctionCode = 095 +FunctionCode = RandomPowerDoublePowerIfTargetUnderground Flags = CanProtect,CanMirrorMove Description = The user looses a ground-shaking quake affecting everyone around the user. Its power varies. #------------------------------- @@ -4257,7 +4257,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = BothSides -FunctionCode = 09D +FunctionCode = StartWeakenElectricMoves Description = The user covers itself with mud. It weakens Electric-type moves while the user is in the battle. #------------------------------- [ROTOTILLER] @@ -4267,7 +4267,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = AllBattlers -FunctionCode = 13E +FunctionCode = RaiseGroundedGrassBattlersAtkSpAtk1 Description = The user tills the soil to encourage plant growth. This raises the Attack and Sp. Atk of Grass types. #------------------------------- [SANDATTACK] @@ -4277,7 +4277,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove Description = Sand is hurled in the target's face, reducing its accuracy. #------------------------------- @@ -4288,7 +4288,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 16D +FunctionCode = HealUserDependingOnSandstorm Description = The user regains up to half of its max HP. It restores more HP in a sandstorm. #------------------------------- [SPIKES] @@ -4298,7 +4298,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = FoeSide -FunctionCode = 103 +FunctionCode = AddSpikesToFoeSide Description = The user lays a trap of spikes at the foe's feet. The trap hurts foes that switch into battle. #------------------------------- [FREEZESHOCK] @@ -4309,7 +4309,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C5 +FunctionCode = TwoTurnAttackParalyzeTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = On the second turn, the user hits the foe with electrically charged ice. It may also paralyze the foe. @@ -4322,7 +4322,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C6 +FunctionCode = TwoTurnAttackBurnTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = On the second turn, an ultracold, freezing wind surrounds the foe. This may leave it with a burn. @@ -4335,7 +4335,7 @@ BaseDamage = 130 Accuracy = 100 TotalPP = 5 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user attacks by hurling a blizzard-cloaked icicle lance at opposing Pokémon. #------------------------------- @@ -4347,7 +4347,7 @@ BaseDamage = 110 Accuracy = 70 TotalPP = 5 Target = AllNearFoes -FunctionCode = 00D +FunctionCode = FreezeTargetAlwaysHitsInHail Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A howling blizzard is summoned to strike the opposing team. It may also freeze them solid. @@ -4360,7 +4360,7 @@ BaseDamage = 100 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 03E +FunctionCode = LowerUserSpeed1 Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user swings and hits with its strong, heavy fist. It lowers the user's Speed, however. #------------------------------- @@ -4372,7 +4372,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 00C +FunctionCode = FreezeTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is struck with an icy-cold beam of energy. It may also freeze the target solid. @@ -4385,7 +4385,7 @@ BaseDamage = 85 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks by harshly dropping an icicle onto the foe. It may also make the target flinch. @@ -4398,7 +4398,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00C +FunctionCode = FreezeTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 10 Description = The target is punched with an icy fist. It may also leave the target frozen. @@ -4411,7 +4411,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 135 +FunctionCode = FreezeTargetSuperEffectiveAgainstWater Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user rapidly cools the target. This may freeze the target. Is super-effective on Water types. @@ -4424,7 +4424,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is hit with a rainbow-colored beam. This may also lower the target's Attack stat. @@ -4437,7 +4437,7 @@ BaseDamage = 65 Accuracy = 95 TotalPP = 10 Target = AllNearFoes -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks by blowing freezing cold air at the foe. This attack reduces the targets' Speed stat. @@ -4450,7 +4450,7 @@ BaseDamage = 65 Accuracy = 95 TotalPP = 15 Target = NearOther -FunctionCode = 00E +FunctionCode = FreezeFlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 100 Description = The user bites with cold-infused fangs. It may also make the target flinch or leave it frozen. @@ -4464,7 +4464,7 @@ Accuracy = 100 TotalPP = 10 Target = NearOther Priority = -4 -FunctionCode = 081 +FunctionCode = DoublePowerIfUserLostHPThisTurn Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that inflicts double the damage if the user has been hurt by the foe in the same turn. #------------------------------- @@ -4476,7 +4476,7 @@ BaseDamage = 60 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0A0 +FunctionCode = AlwaysCriticalHit Flags = CanProtect,CanMirrorMove Description = The user blows a cold breath on the target. This attack always results in a critical hit. #------------------------------- @@ -4488,7 +4488,7 @@ BaseDamage = 55 Accuracy = 95 TotalPP = 15 Target = AllNearFoes -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = The user attacks with a gust of chilled air. It also lowers the targets' Speed stat. @@ -4502,7 +4502,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user flash freezes chunks of ice and hurls them at the target. This move always goes first. #------------------------------- @@ -4514,7 +4514,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 25 Target = AllNearFoes -FunctionCode = 00C +FunctionCode = FreezeTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks with a chilling gust of powdery snow. It may also freeze the targets. @@ -4527,7 +4527,7 @@ BaseDamage = 30 Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 0D3 +FunctionCode = MultiTurnAttackPowersUpEachTurn Flags = Contact,CanProtect,CanMirrorMove,Bomb Description = The user continually rolls into the target over five turns. It becomes stronger each time it hits. #------------------------------- @@ -4539,7 +4539,7 @@ BaseDamage = 25 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove Description = The user launches sharp icicles at the target. It strikes two to five times in a row. #------------------------------- @@ -4551,7 +4551,7 @@ BaseDamage = 20 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0BF +FunctionCode = HitThreeTimesPowersUpWithEachHit Flags = Contact,CanProtect,CanMirrorMove Description = A consecutive three-kick attack that becomes more powerful with each successful hit. #------------------------------- @@ -4563,7 +4563,7 @@ BaseDamage = 1 Accuracy = 30 TotalPP = 5 Target = NearOther -FunctionCode = 070 +FunctionCode = OHKOIce Flags = CanProtect,CanMirrorMove Description = The foe is attacked with a blast of absolute-zero cold. The target instantly faints if it hits. #------------------------------- @@ -4574,7 +4574,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = UserSide -FunctionCode = 167 +FunctionCode = StartWeakenDamageAgainstUserSideIfHail Description = This move reduces damage from attacks for five turns. This can be used only in a hailstorm. #------------------------------- [HAIL] @@ -4584,7 +4584,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 102 +FunctionCode = StartHailWeather Description = The user summons a hail storm lasting five turns. It damages all Pokémon except the Ice type. #------------------------------- [HAZE] @@ -4594,7 +4594,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = BothSides -FunctionCode = 051 +FunctionCode = ResetAllBattlersStatStages Description = The user creates a haze that eliminates every stat change among all the Pokémon engaged in battle. #------------------------------- [MIST] @@ -4604,7 +4604,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserSide -FunctionCode = 056 +FunctionCode = StartUserSideImmunityToStatStageLowering Description = The user cloaks its body with a white mist that prevents any of its stats from being cut for five turns. #------------------------------- [EXPLOSION] @@ -4615,7 +4615,7 @@ BaseDamage = 250 Accuracy = 100 TotalPP = 5 Target = AllNearOthers -FunctionCode = 0E0 +FunctionCode = UserFaintsExplosive Flags = CanProtect,CanMirrorMove Description = The user explodes to inflict damage on those around it. The user faints upon using this move. #------------------------------- @@ -4627,7 +4627,7 @@ BaseDamage = 200 Accuracy = 100 TotalPP = 5 Target = AllNearOthers -FunctionCode = 0E0 +FunctionCode = UserFaintsExplosive Flags = CanProtect,CanMirrorMove Description = The user blows up to inflict damage on all Pokémon in battle. The user faints upon using this move. #------------------------------- @@ -4639,7 +4639,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = Contact,CanProtect,CanMirrorMove Description = The user charges at the target using every bit of its power. The user must rest on the next turn. #------------------------------- @@ -4651,7 +4651,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The foe is attacked with a powerful beam. The user must rest on the next turn to regain its energy. #------------------------------- @@ -4663,7 +4663,7 @@ BaseDamage = 140 Accuracy = 100 TotalPP = 10 Target = AllNearOthers -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Sound Description = The user attacks everything around it with the destructive power of a terrible, explosive sound. #------------------------------- @@ -4675,7 +4675,7 @@ BaseDamage = 140 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 125 +FunctionCode = FailsIfUserHasUnusedMove Flags = Contact,CanProtect,CanMirrorMove Description = This move can be used only after the user has used all the other moves it knows in the battle. #------------------------------- @@ -4687,7 +4687,7 @@ BaseDamage = 130 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0C8 +FunctionCode = TwoTurnAttackChargeRaiseUserDefense1 Flags = Contact,CanProtect,CanMirrorMove Description = The user tucks in its head to raise its Defense in the first turn, then rams the foe on the next turn. #------------------------------- @@ -4699,7 +4699,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FB +FunctionCode = RecoilThirdOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = A reckless, life-risking tackle. It also damages the user by a fairly large amount, however. #------------------------------- @@ -4711,7 +4711,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0FA +FunctionCode = RecoilQuarterOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user charges its head into the foe, using its powerful guard hair. The user also takes damage. #------------------------------- @@ -4723,7 +4723,7 @@ BaseDamage = 120 Accuracy = 75 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is attacked by a kick launched with muscle-packed power. #------------------------------- @@ -4735,7 +4735,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 09F +FunctionCode = TypeDependsOnUserMemory Flags = Contact,CanProtect,CanMirrorMove Description = Cloaking itself in high energy, the user slams into the target. This move's type depends on the held memory. #------------------------------- @@ -4747,7 +4747,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 09F +FunctionCode = TypeDependsOnUserDrive Flags = CanProtect,CanMirrorMove Description = The user fires a beam of light at its target. The type changes depending on the Drive the user holds. #------------------------------- @@ -4759,7 +4759,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = RandomNearFoe -FunctionCode = 0D2 +FunctionCode = MultiTurnAttackConfuseUserAtEnd Flags = Contact,CanProtect,CanMirrorMove Description = The user rampages and attacks for two to three turns. It then becomes confused, however. #------------------------------- @@ -4771,7 +4771,7 @@ BaseDamage = 100 Accuracy = 75 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Bomb Description = A large egg is hurled at the target with maximum force to inflict damage. #------------------------------- @@ -4783,7 +4783,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 09F +FunctionCode = TypeDependsOnUserPlate Flags = CanProtect,CanMirrorMove Description = The user releases countless shots of light. Its type varies with the kind of Plate the user is holding. #------------------------------- @@ -4795,7 +4795,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Sound Description = The user lets loose a horribly echoing shout with the power to inflict damage. #------------------------------- @@ -4807,7 +4807,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 169 +FunctionCode = TypeIsUserFirstType Flags = CanProtect,CanMirrorMove,Dance Description = The user attacks the target by dancing very hard. The user's type determines the type of this move. #------------------------------- @@ -4819,7 +4819,7 @@ BaseDamage = 90 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user attacks the target by smashing into it with incredible force. It may also confuse the target. @@ -4832,7 +4832,7 @@ BaseDamage = 90 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 0FA +FunctionCode = RecoilQuarterOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = A reckless, full-body charge attack for slamming into the foe. It also damages the user a little. #------------------------------- @@ -4844,7 +4844,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = RandomNearFoe -FunctionCode = 0D1 +FunctionCode = MultiTurnAttackPreventSleeping Flags = CanProtect,CanMirrorMove,Sound Description = The user attacks in an uproar for three turns. Over that time, no one can fall asleep. #------------------------------- @@ -4856,7 +4856,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTargetTrampleMinimize Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user drops onto the target with its full body weight. It may leave the target with paralysis. @@ -4870,7 +4870,7 @@ Accuracy = 100 TotalPP = 5 Target = NearOther Priority = 2 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user charges the target at blinding speed. This attack always goes before any other move. #------------------------------- @@ -4882,7 +4882,7 @@ BaseDamage = 80 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 10 Description = The user bites hard on the target with its sharp front fangs. It may also make the target flinch. @@ -4895,7 +4895,7 @@ BaseDamage = 80 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The target is slugged by a punch thrown with muscle-packed power. #------------------------------- @@ -4907,7 +4907,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 0C3 +FunctionCode = TwoTurnAttack Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = A two-turn attack. Blades of wind hit the foe on the second turn. Critical hits land more easily. #------------------------------- @@ -4919,7 +4919,7 @@ BaseDamage = 80 Accuracy = 75 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is slammed with a long tail, vines, etc., to inflict damage. #------------------------------- @@ -4931,7 +4931,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is slugged with a punch thrown at maximum power. It can also be used to move heavy boulders. #------------------------------- @@ -4943,7 +4943,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 017 +FunctionCode = ParalyzeBurnOrFreezeTarget Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = The user strikes with a simultaneous three-beam attack. May also paralyze, burn, or freeze the target. @@ -4956,7 +4956,7 @@ BaseDamage = 75 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 50 Description = The user slashes the target with hard and sharp claws. It may also lower the target's Defense. @@ -4969,7 +4969,7 @@ BaseDamage = 75 Accuracy = 100 TotalPP = 10 Target = AllNearFoes -FunctionCode = 003 +FunctionCode = SleepTargetChangeUserMeloettaForm Flags = CanProtect,CanMirrorMove,Sound EffectChance = 10 Description = An ancient song appeals to the hearts of those listening. It may also induce sleep. @@ -4982,7 +4982,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0A9 +FunctionCode = IgnoreTargetDefSpDefEvaStatStages Flags = Contact,CanProtect,CanMirrorMove Description = Seeking an opening, the user strikes continually. The foe's stat changes don't affect the damage. #------------------------------- @@ -4994,7 +4994,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 20 Description = The target is hit with rhythmically launched punches that may also leave it confused. @@ -5007,7 +5007,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 07E +FunctionCode = DoublePowerIfUserPoisonedBurnedParalyzed Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that doubles its power if the user is poisoned, burned, or has paralysis. #------------------------------- @@ -5019,7 +5019,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user sticks out its head and attacks by charging into the foe. It may also make the target flinch. @@ -5032,7 +5032,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 085 +FunctionCode = DoublePowerIfAllyFaintedLastTurn Flags = Contact,CanProtect,CanMirrorMove Description = Gets revenge for a fainted ally. If an ally fainted in the last turn, this attack's damage increases. #------------------------------- @@ -5044,7 +5044,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0A4 +FunctionCode = EffectDependsOnEnvironment Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks with a secret power. Its added effects vary depending on the user's environment. @@ -5057,7 +5057,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The target is attacked with a slash of claws or blades. Critical hits land more easily. #------------------------------- @@ -5069,7 +5069,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 07C +FunctionCode = DoublePowerIfTargetParalyzedCureTarget Flags = Contact,CanProtect,CanMirrorMove Description = This attack inflicts double damage on a paralyzed foe. It also cures the target's paralysis, however. #------------------------------- @@ -5081,7 +5081,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is jabbed with a sharply pointed horn to inflict damage. #------------------------------- @@ -5093,7 +5093,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 010 +FunctionCode = FlinchTargetTrampleMinimize Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is stomped with a big foot. It may also make the target flinch. @@ -5106,7 +5106,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 0F1 +FunctionCode = UserTakesTargetItem Flags = Contact,CanProtect,CanMirrorMove Description = The user endearingly approaches the target, then steals the target's held item. #------------------------------- @@ -5118,7 +5118,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 090 +FunctionCode = TypeDependsOnUserIVs Flags = CanProtect,CanMirrorMove Description = A unique attack that varies in type and intensity depending on the Pokémon using it. #------------------------------- @@ -5130,7 +5130,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 083 +FunctionCode = UsedAfterAllyRoundWithDoublePower Flags = CanProtect,CanMirrorMove,Sound Description = The user attacks with a song. Others can join in the Round and make the attack do greater damage. #------------------------------- @@ -5142,7 +5142,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = AllNearFoes -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = Star-shaped rays are shot at the opposing team. This attack never misses. #------------------------------- @@ -5154,7 +5154,7 @@ BaseDamage = 55 Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is gripped and squeezed from both sides to inflict damage. #------------------------------- @@ -5166,7 +5166,7 @@ BaseDamage = 50 Accuracy = 95 TotalPP = 30 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is cut with a scythe or a claw. It can also be used to cut down thin trees. #------------------------------- @@ -5178,7 +5178,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 40 Target = NearOther -FunctionCode = 110 +FunctionCode = RemoveUserBindingAndEntryHazards Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = A spin attack that raises the user's Speed and eliminates the effects of Bind, Spikes, etc. @@ -5191,7 +5191,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 011 +FunctionCode = FlinchTargetFailsIfUserNotAsleep Flags = CanProtect,CanMirrorMove,Sound EffectChance = 30 Description = An attack that can be used only if the user is asleep. The harsh noise may also make the target flinch. @@ -5204,7 +5204,7 @@ BaseDamage = 50 Accuracy = 0 TotalPP = 1 Target = RandomNearFoe -FunctionCode = 002 +FunctionCode = Struggle Flags = Contact,CanProtect Description = An attack that is used in desperation only if the user has no PP. It also hurts the user slightly. #------------------------------- @@ -5216,7 +5216,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 182 +FunctionCode = TypeAndPowerDependOnTerrain Flags = CanProtect,CanMirrorMove,Pulse Description = Utilizes the power of the terrain to attack. This move's type and power vary with the terrain. #------------------------------- @@ -5228,7 +5228,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 087 +FunctionCode = TypeAndPowerDependOnWeather Flags = CanProtect,CanMirrorMove,Bomb Description = An attack move that varies in power and type depending on the weather. #------------------------------- @@ -5240,7 +5240,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 092 +FunctionCode = PowerHigherWithConsecutiveUseOnUserSide Flags = CanProtect,CanMirrorMove,Sound Description = The user attacks the foe with an echoing voice. If this move is used every turn, it does greater damage. #------------------------------- @@ -5253,7 +5253,7 @@ Accuracy = 100 TotalPP = 10 Target = NearOther Priority = 3 -FunctionCode = 012 +FunctionCode = FlinchTargetFailsIfNotUserFirstTurn Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = An attack that hits first and makes the target flinch. It only works the first turn the user is in battle. @@ -5266,7 +5266,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 40 Target = NearOther -FunctionCode = 0E9 +FunctionCode = CannotMakeTargetFaint Flags = Contact,CanProtect,CanMirrorMove Description = A restrained attack that prevents the target from fainting. The target is left with at least 1 HP. #------------------------------- @@ -5278,7 +5278,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 40 Target = NearOther -FunctionCode = 0E9 +FunctionCode = CannotMakeTargetFaint Flags = Contact,CanProtect,CanMirrorMove Description = The user holds back when it attacks, and the target is left with at least 1 HP. #------------------------------- @@ -5290,7 +5290,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 109 +FunctionCode = AddMoneyGainedFromBattle Flags = CanProtect,CanMirrorMove Description = Numerous coins are hurled at the target to inflict damage. Money is earned after battle. #------------------------------- @@ -5302,7 +5302,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The target is physically pounded with a long tail or a foreleg, etc. #------------------------------- @@ -5315,7 +5315,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user lunges at the target at a speed that makes it almost invisible. It is sure to strike first. #------------------------------- @@ -5327,7 +5327,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = Hard, pointed, and sharp claws rake the target to inflict damage. #------------------------------- @@ -5339,7 +5339,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = A physical attack in which the user charges and slams into the target with its whole body. #------------------------------- @@ -5351,7 +5351,7 @@ BaseDamage = 35 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user slams the target with a long tail, vines, or tentacle. The target is hit twice in a row. #------------------------------- @@ -5364,7 +5364,7 @@ Accuracy = 100 TotalPP = 10 Target = NearOther Priority = 2 -FunctionCode = 0AD +FunctionCode = RemoveProtections Flags = CanMirrorMove Description = An attack that hits a target using Protect or Detect. It also lifts the effects of those moves. #------------------------------- @@ -5376,7 +5376,7 @@ BaseDamage = 25 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks by striking the target with its hard tail. It hits the Pokémon two to five times in a row. #------------------------------- @@ -5388,7 +5388,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 093 +FunctionCode = StartRaiseUserAtk1WhenDamaged Flags = Contact,CanProtect,CanMirrorMove Description = As long as this move is in use, the user's Attack rises each time the user is hit in battle. #------------------------------- @@ -5400,7 +5400,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove Description = Sharp spikes are shot at the target in rapid succession. They hit two to five times in a row. #------------------------------- @@ -5412,7 +5412,7 @@ BaseDamage = 18 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The target is hit with a flurry of punches that strike two to five times in a row. #------------------------------- @@ -5424,7 +5424,7 @@ BaseDamage = 18 Accuracy = 80 TotalPP = 15 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The target is raked with sharp claws or scythes for two to five times in quick succession. #------------------------------- @@ -5436,7 +5436,7 @@ BaseDamage = 15 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove,Bomb Description = Round objects are hurled at the target to strike two to five times in a row. #------------------------------- @@ -5448,7 +5448,7 @@ BaseDamage = 15 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = Contact,CanProtect,CanMirrorMove Description = Things such as long bodies or tentacles are used to bind and squeeze the foe for four to five turns. #------------------------------- @@ -5460,7 +5460,7 @@ BaseDamage = 15 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The target is slapped repeatedly, back and forth, two to five times in a row. #------------------------------- @@ -5472,7 +5472,7 @@ BaseDamage = 15 Accuracy = 85 TotalPP = 20 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = Contact,CanProtect,CanMirrorMove Description = The target is jabbed repeatedly with a horn or beak two to five times in a row. #------------------------------- @@ -5484,7 +5484,7 @@ BaseDamage = 15 Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = Contact,CanProtect,CanMirrorMove Description = A long body or vines are used to wrap and squeeze the target for four to five turns. #------------------------------- @@ -5496,7 +5496,7 @@ BaseDamage = 10 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 10 Description = The foe is attacked with long, creeping tentacles or vines. It may also lower the target's Speed. @@ -5510,7 +5510,7 @@ Accuracy = 0 TotalPP = 10 Target = None Priority = 1 -FunctionCode = 0D4 +FunctionCode = MultiTurnAttackBideThenReturnDoubleDamage Flags = Contact,CanProtect Description = The user endures attacks for two turns, then strikes back to cause double the damage taken. #------------------------------- @@ -5522,7 +5522,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 08C +FunctionCode = PowerHigherWithTargetHP Flags = Contact,CanProtect,CanMirrorMove Description = The target is crushed with great force. The attack is more powerful the more HP the target has left. #------------------------------- @@ -5534,7 +5534,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 06E +FunctionCode = LowerTargetHPToUserHP Flags = Contact,CanProtect,CanMirrorMove Description = An attack move that cuts down the target's HP to equal the user's HP. #------------------------------- @@ -5546,7 +5546,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 098 +FunctionCode = PowerLowerWithUserHP Flags = Contact,CanProtect,CanMirrorMove Description = The user flails about aimlessly to attack. It becomes more powerful the less HP the user has. #------------------------------- @@ -5558,7 +5558,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 08A +FunctionCode = PowerLowerWithUserHappiness Flags = Contact,CanProtect,CanMirrorMove Description = A full-power attack that grows more powerful the less the user likes its Trainer. #------------------------------- @@ -5570,7 +5570,7 @@ BaseDamage = 1 Accuracy = 30 TotalPP = 5 Target = NearOther -FunctionCode = 070 +FunctionCode = OHKO Flags = Contact,CanProtect,CanMirrorMove Description = A vicious, tearing attack with big pincers. The target will faint instantly if this attack hits. #------------------------------- @@ -5582,7 +5582,7 @@ BaseDamage = 1 Accuracy = 30 TotalPP = 5 Target = NearOther -FunctionCode = 070 +FunctionCode = OHKO Flags = Contact,CanProtect,CanMirrorMove Description = The user stabs the foe with a horn that rotates like a drill. If it hits, the target faints instantly. #------------------------------- @@ -5594,7 +5594,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 096 +FunctionCode = TypeAndPowerDependOnUserBerry Flags = CanProtect,CanMirrorMove Description = The user draws power to attack by using its held Berry. The Berry determines its type and power. #------------------------------- @@ -5606,7 +5606,7 @@ BaseDamage = 1 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 094 +FunctionCode = RandomlyDamageOrHealTarget Flags = CanProtect,CanMirrorMove Description = The user attacks by giving the target a gift with a hidden trap. It restores HP sometimes, however. #------------------------------- @@ -5618,7 +5618,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 089 +FunctionCode = PowerHigherWithUserHappiness Flags = Contact,CanProtect,CanMirrorMove Description = A full-power attack that grows more powerful the more the user likes its Trainer. #------------------------------- @@ -5630,7 +5630,7 @@ BaseDamage = 1 Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 06A +FunctionCode = FixedDamage20 Flags = CanProtect,CanMirrorMove Description = The target is hit with a destructive shock wave that always inflicts 20 HP damage. #------------------------------- @@ -5642,7 +5642,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 113 +FunctionCode = PowerDependsOnUserStockpile Flags = CanProtect Description = The power stored using the move Stockpile is released all at once in an attack. #------------------------------- @@ -5654,7 +5654,7 @@ BaseDamage = 1 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 06C +FunctionCode = FixedDamageHalfTargetHP Flags = Contact,CanProtect,CanMirrorMove Description = The user chomps hard on the target with its sharp front fangs. It cuts the target's HP to half. #------------------------------- @@ -5666,7 +5666,7 @@ BaseDamage = 1 Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 097 +FunctionCode = PowerHigherWithLessPP Flags = Contact,CanProtect,CanMirrorMove Description = The fewer PP this move has, the greater its attack power. #------------------------------- @@ -5678,7 +5678,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 08C +FunctionCode = PowerHigherWithTargetHP Flags = Contact,CanProtect,CanMirrorMove Description = The user powerfully wrings the foe. The more HP the foe has, the greater this attack's power. #------------------------------- @@ -5689,7 +5689,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserOrNearAlly -FunctionCode = 037 +FunctionCode = RaiseTargetRandomStat2 Description = The user applies pressure to stress points, sharply boosting one of its stats. #------------------------------- [AFTERYOU] @@ -5699,7 +5699,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 11D +FunctionCode = TargetActsNext Description = The user helps the target and makes it use its move right after the user. #------------------------------- [ASSIST] @@ -5709,7 +5709,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 0B5 +FunctionCode = UseRandomMoveFromUserParty Description = The user hurriedly and randomly uses a move among those known by other Pokémon in the party. #------------------------------- [ATTRACT] @@ -5719,7 +5719,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 016 +FunctionCode = AttractTarget Flags = CanProtect,CanMirrorMove Description = If it is the opposite gender of the user, the target becomes infatuated and less likely to attack. #------------------------------- @@ -5730,7 +5730,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 0ED +FunctionCode = SwitchOutUserPassOnEffects Description = The user switches places with a party Pokémon in waiting, passing along any stat changes. #------------------------------- [BELLYDRUM] @@ -5740,7 +5740,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 03A +FunctionCode = MaxUserAttackLoseHalfOfTotalHP Description = The user maximizes its Attack stat in exchange for HP equal to half its max HP. #------------------------------- [BESTOW] @@ -5750,7 +5750,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 0F3 +FunctionCode = TargetTakesUserItem Flags = CanMirrorMove Description = The user passes its held item to the target when the target isn't holding an item. #------------------------------- @@ -5761,7 +5761,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = CanMirrorMove Description = The user blocks the target's way with arms spread wide to prevent escape. #------------------------------- @@ -5772,7 +5772,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 060 +FunctionCode = SetUserTypesBasedOnEnvironment Description = The user's type is changed depending on its environment, such as at water's edge, in grass, or in a cave. #------------------------------- [CAPTIVATE] @@ -5782,7 +5782,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = AllNearFoes -FunctionCode = 04E +FunctionCode = LowerTargetSpAtk2IfCanAttract Flags = CanProtect,CanMirrorMove Description = If it is the opposite gender of the user, the target is charmed into harshly lowering its Sp. Atk stat. #------------------------------- @@ -5793,7 +5793,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 134 +FunctionCode = DoesNothingCongratuations Description = The Pokémon congratulates you on your special day! #------------------------------- [CONFIDE] @@ -5803,7 +5803,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 13C +FunctionCode = LowerTargetSpAtk1 Flags = CanMirrorMove,Sound Description = The user tells the target a secret. The target loses focus and its Sp. Atk stat is lowered. #------------------------------- @@ -5814,7 +5814,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 05E +FunctionCode = SetUserTypesToUserMoveType Description = The user changes its type to become the same type as one of its moves. #------------------------------- [CONVERSION2] @@ -5824,7 +5824,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = NearOther -FunctionCode = 05F +FunctionCode = SetUserTypesToResistLastAttack Description = The user changes its type to make itself resistant to the type of the attack the opponent used last. #------------------------------- [COPYCAT] @@ -5834,7 +5834,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 0AF +FunctionCode = UseLastMoveUsed Description = The user mimics the move used immediately before it. The move fails if no other move has been used yet. #------------------------------- [COURTCHANGE] @@ -5844,7 +5844,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = BothSides -FunctionCode = 198 +FunctionCode = SwapSideEffects Flags = CanMirrorMove Description = With its mysterious power, the user swaps the effects on either side of the field. #------------------------------- @@ -5855,7 +5855,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 01E +FunctionCode = RaiseUserDefense1CurlUpUser Description = The user curls up to conceal weak spots and raise its Defense stat. #------------------------------- [DISABLE] @@ -5865,7 +5865,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0B9 +FunctionCode = DisableTargetLastMoveUsed Flags = CanProtect,CanMirrorMove Description = For four turns, this move prevents the target from using the move it last used. #------------------------------- @@ -5876,7 +5876,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 022 +FunctionCode = RaiseUserEvasion1 Description = By moving rapidly, the user makes illusory copies of itself to raise its evasiveness. #------------------------------- [ENCORE] @@ -5886,7 +5886,7 @@ Category = Status Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 0BC +FunctionCode = DisableTargetUsingDifferentMove Flags = CanProtect,CanMirrorMove Description = The user compels the target to keep using only the move it last used for three turns. #------------------------------- @@ -5898,7 +5898,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 0E8 +FunctionCode = UserEnduresFaintingThisTurn Description = The user endures any attack with at least 1 HP. Its chance of failing rises if it is used in succession. #------------------------------- [ENTRAINMENT] @@ -5908,7 +5908,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 066 +FunctionCode = SetTargetAbilityToUserAbility Flags = CanProtect,CanMirrorMove Description = The user dances to compel the target to mimic it, making the target's Ability the same as the user's. #------------------------------- @@ -5919,7 +5919,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove Description = The user flashes a light that cuts the target's accuracy. It can also be used to illuminate caves. #------------------------------- @@ -5930,7 +5930,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 023 +FunctionCode = RaiseUserCriticalHitRate2 Description = The user takes a deep breath and focuses so that critical hits land more easily. #------------------------------- [FOLLOWME] @@ -5941,7 +5941,7 @@ Accuracy = 0 TotalPP = 20 Target = User Priority = 2 -FunctionCode = 117 +FunctionCode = RedirectAllMovesToUser Description = The user draws attention to itself, making all targets take aim only at the user. #------------------------------- [FORESIGHT] @@ -5951,7 +5951,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = NearOther -FunctionCode = 0A7 +FunctionCode = StartNegateTargetEvasionStatStageAndGhostImmunity Flags = CanProtect,CanMirrorMove Description = Enables the user to hit a Ghost type with any kind of move. It also enables the user to hit an evasive foe. #------------------------------- @@ -5962,7 +5962,7 @@ Category = Status Accuracy = 100 TotalPP = 30 Target = NearOther -FunctionCode = 007 +FunctionCode = ParalyzeTarget Flags = CanProtect,CanMirrorMove Description = The user intimidates the target with the pattern on its belly to cause paralysis. #------------------------------- @@ -5973,7 +5973,7 @@ Category = Status Accuracy = 100 TotalPP = 40 Target = AllNearFoes -FunctionCode = 042 +FunctionCode = LowerTargetAttack1 Flags = CanProtect,CanMirrorMove,Sound Description = The user growls in an endearing way, making the foe less wary. The foe's Attack stat is lowered. #------------------------------- @@ -5984,7 +5984,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 028 +FunctionCode = RaiseUserAtkSpAtk1Or2InSun Description = The user's body grows all at once, raising the Atk and Sp. Atk stats. #------------------------------- [HAPPYHOUR] @@ -5994,7 +5994,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserSide -FunctionCode = 157 +FunctionCode = DoubleMoneyGainedFromBattle Description = Using Happy Hour doubles the amount of prize money received after battle. #------------------------------- [HARDEN] @@ -6004,7 +6004,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 01D +FunctionCode = RaiseUserDefense1 Description = The user stiffens all the muscles in its body to raise its Defense stat. #------------------------------- [HEALBELL] @@ -6014,7 +6014,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = UserAndAllies -FunctionCode = 019 +FunctionCode = CureUserPartyStatus Flags = Sound Description = The user makes a soothing bell chime to heal the status problems of all the party Pokémon. #------------------------------- @@ -6026,7 +6026,7 @@ Accuracy = 0 TotalPP = 20 Target = NearAlly Priority = 5 -FunctionCode = 09C +FunctionCode = PowerUpAllyMove Description = The user assists an ally by boosting the power of its attack. #------------------------------- [HOLDHANDS] @@ -6036,7 +6036,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = NearAlly -FunctionCode = 133 +FunctionCode = DoesNothingFailsIfNoAlly Description = The user and an ally hold hands. This makes them very happy. #------------------------------- [HOWL] @@ -6046,7 +6046,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = UserAndAllies -FunctionCode = 19A +FunctionCode = RaiseUserAndAlliesAttack1 Flags = Sound Description = The user howls loudly to raise the spirit of itself and allies, boosting their Attack stats. #------------------------------- @@ -6057,7 +6057,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 15E +FunctionCode = EnsureNextCriticalHit Description = The user focuses intensely. The attack on the next turn always results in a critical hit. #------------------------------- [LEER] @@ -6067,7 +6067,7 @@ Category = Status Accuracy = 100 TotalPP = 30 Target = AllNearFoes -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = CanProtect,CanMirrorMove Description = The user gains an intimidating leer with sharp eyes. The target's Defense stat is reduced. #------------------------------- @@ -6078,7 +6078,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 0A6 +FunctionCode = EnsureNextMoveAlwaysHits Flags = CanProtect,CanMirrorMove Description = The user takes sure aim at the target. It ensures the next attack does not fail to hit the target. #------------------------------- @@ -6089,7 +6089,7 @@ Category = Status Accuracy = 75 TotalPP = 10 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove Description = With a scary face, the user tries to force a kiss on the target. If it suceeds, the target falls asleep. #------------------------------- @@ -6100,7 +6100,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserSide -FunctionCode = 0A1 +FunctionCode = StartPreventCriticalHitsAgainstUserSide Description = The user chants an incantation toward the sky, preventing the foe from landing critical hits. #------------------------------- [MEFIRST] @@ -6110,7 +6110,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearFoe -FunctionCode = 0B0 +FunctionCode = UseMoveTargetIsAboutToUse Flags = CanProtect Description = The user tries to cut ahead of the foe to steal and use the foe's intended move with greater power. #------------------------------- @@ -6121,7 +6121,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = CanMirrorMove Description = The user pins the target with a dark, arresting look. The target becomes unable to flee. #------------------------------- @@ -6132,7 +6132,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0B6 +FunctionCode = UseRandomMove Description = The user waggles a finger and stimulates its brain into randomly using nearly any move. #------------------------------- [MILKDRINK] @@ -6142,7 +6142,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = The user restores its own HP by up to half of its maximum HP. May also be used in the field to heal HP. #------------------------------- [MIMIC] @@ -6152,7 +6152,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 05C +FunctionCode = ReplaceMoveThisBattleWithTargetLastMoveUsed Flags = CanProtect Description = The user copies the move last used by the foe. The move can be used until the user is switched out. #------------------------------- @@ -6163,7 +6163,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 0A6 +FunctionCode = EnsureNextMoveAlwaysHits Flags = CanProtect,CanMirrorMove Description = The user senses the foe's movements with its mind to ensure its next attack does not miss the foe. #------------------------------- @@ -6174,7 +6174,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 034 +FunctionCode = RaiseUserEvasion2MinimizeUser Description = The user compresses its body to make itself look smaller, which sharply raises its evasiveness. #------------------------------- [MORNINGSUN] @@ -6184,7 +6184,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = User -FunctionCode = 0D8 +FunctionCode = HealUserDependingOnWeather Description = The user restores its own HP. The amount of HP regained varies with the weather. #------------------------------- [NATUREPOWER] @@ -6194,7 +6194,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0B3 +FunctionCode = UseMoveDependingOnEnvironment Description = An attack that makes use of nature's power. Its effects vary depending on the user's environment. #------------------------------- [NOBLEROAR] @@ -6204,7 +6204,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = NearOther -FunctionCode = 13A +FunctionCode = LowerTargetAtkSpAtk1 Flags = CanProtect,CanMirrorMove,Sound Description = Letting out a noble roar, the user intimidates the target and lowers its Attack and Sp. Atk. #------------------------------- @@ -6215,7 +6215,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = NearOther -FunctionCode = 0A7 +FunctionCode = StartNegateTargetEvasionStatStageAndGhostImmunity Flags = CanProtect,CanMirrorMove Description = Enables the user to hit a Ghost type with any type of move. It also enables the user to hit an evasive foe. #------------------------------- @@ -6226,7 +6226,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 05A +FunctionCode = UserTargetAverageHP Flags = CanProtect,CanMirrorMove Description = The user adds its HP to the target's HP, then equally shares the combined HP with the target. #------------------------------- @@ -6237,7 +6237,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = AllBattlers -FunctionCode = 0E5 +FunctionCode = StartPerishCountsForAllBattlers Flags = Sound Description = Any Pokémon that hears this song faints in three turns, unless it switches out of battle. #------------------------------- @@ -6248,7 +6248,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 139 +FunctionCode = LowerTargetAttack1BypassSubstitute Flags = CanMirrorMove Description = The user and target become friends. The target loses its will to fight, lowering its Attack stat. #------------------------------- @@ -6260,7 +6260,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 0AA +FunctionCode = ProtectUser Description = It enables the user to evade all attacks. Its chance of failing rises if it is used in succession. #------------------------------- [PSYCHUP] @@ -6270,7 +6270,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 055 +FunctionCode = UserCopyTargetStatStages Description = The user hypnotizes itself into copying any stat change made by the target. #------------------------------- [RECOVER] @@ -6280,7 +6280,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = Restoring its own cells, the user restores its own HP by half of its max HP. #------------------------------- [RECYCLE] @@ -6290,7 +6290,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0F6 +FunctionCode = RestoreUserConsumedItem Description = The user recycles a held item that has been used in battle so it can be used again. #------------------------------- [REFLECTTYPE] @@ -6300,7 +6300,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 062 +FunctionCode = SetUserTypesToTargetTypes Flags = CanProtect Description = The user reflects the target's type, making it the same type as the target. #------------------------------- @@ -6311,7 +6311,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 018 +FunctionCode = CureUserBurnPoisonParalysis Description = The user rests to cure itself of a poisoning, burn, or paralysis. #------------------------------- [ROAR] @@ -6322,7 +6322,7 @@ Accuracy = 0 TotalPP = 20 Target = NearOther Priority = -6 -FunctionCode = 0EB +FunctionCode = SwitchOutTargetStatusMove Flags = CanMirrorMove,Sound Description = The target is scared off and replaced by another Pokémon in its party. In the wild, the battle ends. #------------------------------- @@ -6333,7 +6333,7 @@ Category = Status Accuracy = 0 TotalPP = 25 Target = UserSide -FunctionCode = 01A +FunctionCode = StartUserSideImmunityToInflictedStatus Description = The user creates a protective field that prevents status problems for five turns. #------------------------------- [SCARYFACE] @@ -6343,7 +6343,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 04D +FunctionCode = LowerTargetSpeed2 Flags = CanProtect,CanMirrorMove Description = The user frightens the target with a scary face to harshly reduce its Speed stat. #------------------------------- @@ -6354,7 +6354,7 @@ Category = Status Accuracy = 85 TotalPP = 40 Target = NearOther -FunctionCode = 04C +FunctionCode = LowerTargetDefense2 Flags = CanProtect,CanMirrorMove,Sound Description = An earsplitting screech harshly reduces the target's Defense stat. #------------------------------- @@ -6365,7 +6365,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Description = The user reduces its polygon count to make itself more jagged, raising the Attack stat. #------------------------------- [SHELLSMASH] @@ -6375,7 +6375,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 035 +FunctionCode = LowerUserDefSpDef1RaiseUserAtkSpAtkSpd2 Description = The user breaks its shell, lowering its defenses but sharply raising attacking and Speed stats. #------------------------------- [SIMPLEBEAM] @@ -6385,7 +6385,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 063 +FunctionCode = SetTargetAbilityToSimple Flags = CanProtect,CanMirrorMove Description = The user's mysterious psychic wave changes the target's Ability to Simple. #------------------------------- @@ -6396,7 +6396,7 @@ Category = Status Accuracy = 55 TotalPP = 15 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove,Sound Description = A soothing lullaby is sung in a calming voice that puts the target into a deep slumber. #------------------------------- @@ -6407,7 +6407,7 @@ Category = Status Accuracy = 0 TotalPP = 1 Target = NearOther -FunctionCode = 05D +FunctionCode = ReplaceMoveWithTargetLastMoveUsed Description = It enables the user to permanently learn the move last used by the foe. Once used, Sketch disappears. #------------------------------- [SLACKOFF] @@ -6417,7 +6417,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = The user slacks off, restoring its own HP by up to half of its maximum HP. #------------------------------- [SLEEPTALK] @@ -6427,7 +6427,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0B4 +FunctionCode = UseRandomUserMoveIfAsleep Description = While it is asleep, the user randomly uses one of the moves it knows. #------------------------------- [SMOKESCREEN] @@ -6437,7 +6437,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove Description = The user releases an obscuring cloud of smoke or ink. It reduces the target's accuracy. #------------------------------- @@ -6448,7 +6448,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D5 +FunctionCode = HealUserHalfOfTotalHP Description = The user restores its own HP by up to half of its maximum HP. May also be used in the field to heal HP. #------------------------------- [SPLASH] @@ -6458,7 +6458,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 001 +FunctionCode = DoesNothingUnusableInGravity Description = The user just flops and splashes around to no effect at all... #------------------------------- [SPOTLIGHT] @@ -6469,7 +6469,7 @@ Accuracy = 0 TotalPP = 15 Target = NearOther Priority = 3 -FunctionCode = 16A +FunctionCode = RedirectAllMovesToTarget Flags = CanProtect Description = The user shines a spotlight on the target so that only it will be attacked during the turn. #------------------------------- @@ -6480,7 +6480,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 112 +FunctionCode = UserAddStockpileRaiseDefSpDef1 Description = The user charges up power and raises both its Defense and Sp. Def. The move can be used three times. #------------------------------- [STUFFCHEEKS] @@ -6490,7 +6490,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 191 +FunctionCode = UserConsumeBerryRaiseDefense2 Description = The user eats its held Berry, then sharply raises its Defense stat. #------------------------------- [SUBSTITUTE] @@ -6500,7 +6500,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 10C +FunctionCode = UserMakeSubstitute Description = The user makes a copy of itself using some of its HP. The copy serves as the user's decoy. #------------------------------- [SUPERSONIC] @@ -6510,7 +6510,7 @@ Category = Status Accuracy = 55 TotalPP = 20 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove,Sound Description = The user generates odd sound waves from its body. It may confuse the target. #------------------------------- @@ -6521,7 +6521,7 @@ Category = Status Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 041 +FunctionCode = RaiseTargetAttack2ConfuseTarget Flags = CanProtect,CanMirrorMove Description = The user enrages and confuses the target. However, it also sharply raises the target's Attack stat. #------------------------------- @@ -6532,7 +6532,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 114 +FunctionCode = HealUserDependingOnUserStockpile Description = The power stored using the move Stockpile is absorbed by the user to heal its HP. #------------------------------- [SWEETSCENT] @@ -6542,7 +6542,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = AllNearFoes -FunctionCode = 048 +FunctionCode = LowerTargetEvasion2 Flags = CanProtect,CanMirrorMove Description = A sweet scent that lowers the foe's evasiveness. It also lures wild Pokémon if used in grass, etc. #------------------------------- @@ -6553,7 +6553,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 02E +FunctionCode = RaiseUserAttack2 Flags = Dance Description = A frenetic dance to uplift the fighting spirit. It sharply raises the user's Attack stat. #------------------------------- @@ -6564,7 +6564,7 @@ Category = Status Accuracy = 100 TotalPP = 30 Target = AllNearFoes -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = CanProtect,CanMirrorMove Description = The user wags its tail cutely, making opposing Pokémon less wary and lowering their Defense stat. #------------------------------- @@ -6575,7 +6575,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 13A +FunctionCode = LowerTargetAtkSpAtk1 Flags = CanMirrorMove Description = Gets teary eyed to make the target lose its will to fight. Lowers the target's Attack and Sp. Atk. #------------------------------- @@ -6586,7 +6586,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = AllBattlers -FunctionCode = 192 +FunctionCode = AllBattlersConsumeBerry Description = The user has teatime with all the Pokémon in the battle. Each Pokémon eats its held Berry. #------------------------------- [TEETERDANCE] @@ -6596,7 +6596,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = AllNearOthers -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove,Dance Description = The user performs a wobbly dance that confuses the Pokémon around it. #------------------------------- @@ -6607,7 +6607,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 04A +FunctionCode = LowerTargetAtkDef1 Flags = CanProtect,CanMirrorMove Description = The user tickles the target into laughing, reducing its Attack and Defense stats. #------------------------------- @@ -6618,7 +6618,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 069 +FunctionCode = TransformUserIntoTarget Description = The user transforms into a copy of the target right down to having the same move set. #------------------------------- [WHIRLWIND] @@ -6629,7 +6629,7 @@ Accuracy = 0 TotalPP = 20 Target = NearOther Priority = -6 -FunctionCode = 0EB +FunctionCode = SwitchOutTargetStatusMove Flags = CanMirrorMove Description = The foe is blown away, to be replaced by another Pokémon in its party. In the wild, the battle ends. #------------------------------- @@ -6640,7 +6640,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D7 +FunctionCode = HealUserPositionNextTurn Description = One turn after this move is used, the target's HP is restored by half the user's maximum HP. #------------------------------- [WORKUP] @@ -6650,7 +6650,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 027 +FunctionCode = RaiseUserAtkSpAtk1 Description = The user is roused, and its Attack and Sp. Atk stats increase. #------------------------------- [YAWN] @@ -6660,7 +6660,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 004 +FunctionCode = SleepTargetNextTurn Flags = CanProtect,CanMirrorMove Description = The user lets loose a huge yawn that lulls the target into falling asleep on the next turn. #------------------------------- @@ -6672,7 +6672,7 @@ BaseDamage = 120 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 158 +FunctionCode = FailsIfUserNotConsumedBerry Flags = CanProtect Description = The user lets out a damaging belch at the target. The user must eat a held Berry to use this move. #------------------------------- @@ -6684,7 +6684,7 @@ BaseDamage = 120 Accuracy = 80 TotalPP = 5 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user shoots filthy garbage at the target to attack. It may also poison the target. @@ -6697,7 +6697,7 @@ BaseDamage = 95 Accuracy = 100 TotalPP = 10 Target = AllNearOthers -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = It swamps the area around the user with a giant sludge wave. It may also poison those hit. @@ -6710,7 +6710,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 176 +FunctionCode = CategoryDependsOnHigherDamagePoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 20 Description = Inflicts physical or special damage, whichever will be more effective. May also poison the target. @@ -6723,7 +6723,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 30 Description = Unsanitary sludge is hurled at the target. It may also poison the target. @@ -6736,7 +6736,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is stabbed with a tentacle or arm seeped with poison. It may also poison the target. @@ -6749,7 +6749,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate EffectChance = 10 Description = A slashing attack with a poisonous blade that may also poison the foe. Critical hits land more easily. @@ -6762,7 +6762,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = Unsanitary sludge is hurled at the target. It may also poison the target. @@ -6775,7 +6775,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 07B +FunctionCode = DoublePowerIfTargetPoisoned Flags = CanProtect,CanMirrorMove Description = The user drenches the foe in a special poisonous liquid. Its power doubles if the target is poisoned. #------------------------------- @@ -6787,7 +6787,7 @@ BaseDamage = 50 Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 050 +FunctionCode = ResetTargetStatStages Flags = CanProtect,CanMirrorMove Description = The user attacks by throwing a clump of special mud. All status changes are returned to normal. #------------------------------- @@ -6799,7 +6799,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 006 +FunctionCode = BadPoisonTarget Flags = Contact,CanProtect,CanMirrorMove,Biting EffectChance = 50 Description = The user bites the target with toxic fangs. It may also leave the target badly poisoned. @@ -6812,7 +6812,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate EffectChance = 10 Description = The user hits the target with its tail. It may also poison the target. Critical hits land more easily. @@ -6825,7 +6825,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 30 Target = AllNearFoes -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The foe is attacked with a spray of harsh acid. It may also lower the target's Sp. Def stat. @@ -6838,7 +6838,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 04F +FunctionCode = LowerTargetSpDef2 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 100 Description = The user spits fluid that works to melt the target. This harshly reduces the target's Sp. Def stat. @@ -6851,7 +6851,7 @@ BaseDamage = 30 Accuracy = 70 TotalPP = 20 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 40 Description = The target is attacked with a discharge of filthy gases. It may also poison the target. @@ -6864,7 +6864,7 @@ BaseDamage = 15 Accuracy = 100 TotalPP = 35 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user stabs the target with a poisonous stinger. This may also poison the target. @@ -6876,7 +6876,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 02F +FunctionCode = RaiseUserDefense2 Description = The user alters its cellular structure to liquefy itself, sharply raising its Defense stat. #------------------------------- [BANEFULBUNKER] @@ -6887,7 +6887,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 168 +FunctionCode = ProtectUserBanefulBunker Description = Protects the user from attacks. Also poisons any attacker that makes contact with the user. #------------------------------- [COIL] @@ -6897,7 +6897,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 025 +FunctionCode = RaiseUserAtkDefAcc1 Description = The user coils up and concentrates. This raises its Attack and Defense stats as well as its accuracy. #------------------------------- [CORROSIVEGAS] @@ -6907,7 +6907,7 @@ Category = Status Accuracy = 100 TotalPP = 40 Target = AllNearOthers -FunctionCode = 193 +FunctionCode = CorrodeTargetItem Flags = CanProtect,CanMirrorMove Description = The user surrounds everything around it with highly acidic gas and melts away items they hold. #------------------------------- @@ -6918,7 +6918,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 068 +FunctionCode = NegateTargetAbility Flags = CanProtect,CanMirrorMove Description = The user hurls up its stomach acids on the foe. The fluid negates the effect of the target's Ability. #------------------------------- @@ -6929,7 +6929,7 @@ Category = Status Accuracy = 90 TotalPP = 40 Target = AllNearFoes -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove Description = A cloud of poison gas is sprayed in the face of opposing Pokémon. It may poison those hit. #------------------------------- @@ -6940,7 +6940,7 @@ Category = Status Accuracy = 75 TotalPP = 35 Target = NearOther -FunctionCode = 005 +FunctionCode = PoisonTarget Flags = CanProtect,CanMirrorMove,Powder Description = The user scatters a cloud of poisonous dust on the target. It may poison the target. #------------------------------- @@ -6951,7 +6951,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 15B +FunctionCode = CureTargetStatusHealUserHalfOfTotalHP Flags = CanProtect,CanMirrorMove Description = The user heals the target's status condition. If so, it also restores the user's own HP. #------------------------------- @@ -6962,7 +6962,7 @@ Category = Status Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 006 +FunctionCode = BadPoisonTarget Flags = CanProtect,CanMirrorMove Description = A move that leaves the target badly poisoned. Its poison damage worsens every turn. #------------------------------- @@ -6973,7 +6973,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = FoeSide -FunctionCode = 104 +FunctionCode = AddToxicSpikesToFoeSide Description = The user lays a trap of poison spikes at the foe's feet. They poison foes that switch into battle. #------------------------------- [TOXICTHREAD] @@ -6983,7 +6983,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 159 +FunctionCode = PoisonTargetLowerTargetSpeed1 Flags = CanProtect,CanMirrorMove Description = The user shoots poisonous threads to poison the target and lower the target's Speed stat. #------------------------------- @@ -6994,7 +6994,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = AllNearFoes -FunctionCode = 140 +FunctionCode = LowerPoisonedTargetAtkSpAtkSpd1 Flags = CanProtect Description = Foes are drenched in an odd liquid that lowers the Attack, Sp. Atk, and Speed of poisoned Pokémon. #------------------------------- @@ -7006,7 +7006,7 @@ BaseDamage = 160 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The user shoots powerful lasers using the power of a prism. The user can't move on the next turn. #------------------------------- @@ -7018,7 +7018,7 @@ BaseDamage = 140 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 03F +FunctionCode = LowerUserSpAtk2 Flags = CanProtect,CanMirrorMove Description = The user attacks the target at full power. The attack's recoil harshly reduces the user's Sp. Atk stat. #------------------------------- @@ -7030,7 +7030,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 111 +FunctionCode = AttackTwoTurnsLater Description = Two turns after this move is used, a hunk of psychic energy attacks the target. #------------------------------- [SYNCHRONOISE] @@ -7041,7 +7041,7 @@ BaseDamage = 120 Accuracy = 100 TotalPP = 10 Target = AllNearOthers -FunctionCode = 123 +FunctionCode = FailsUnlessTargetSharesTypeWithUser Flags = CanProtect,CanMirrorMove Description = Using an odd shock wave, the user damages any Pokémon of the same type as the user. #------------------------------- @@ -7053,7 +7053,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 0DE +FunctionCode = HealUserByHalfOfDamageDoneIfTargetAsleep Flags = CanProtect,CanMirrorMove Description = The user eats the dreams of a sleeping foe. It absorbs half the damage caused to heal the user's HP. #------------------------------- @@ -7065,7 +7065,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 164 +FunctionCode = CategoryDependsOnHigherDamageIgnoreTargetAbility Flags = CanProtect,CanMirrorMove Description = The user attacks with a pillar of light. This move the higher of the user's Attack or Sp. Atk stat. #------------------------------- @@ -7077,7 +7077,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 122 +FunctionCode = UseTargetDefenseInsteadOfTargetSpDef Flags = CanProtect,CanMirrorMove Description = The user materializes an odd psychic wave to attack the target. This attack does physical damage. #------------------------------- @@ -7089,7 +7089,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 00C +FunctionCode = FreezeTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user shoots its psychic power from its eyes to attack. This may also leave the target frozen. @@ -7102,7 +7102,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is hit by a strong telekinetic force. It may also reduce the target's Sp. Def stat. @@ -7115,7 +7115,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 10A +FunctionCode = RemoveScreens Flags = Contact,CanProtect,CanMirrorMove,Biting Description = The user bites the target using psychic capabilities. This can also destroy Light Screen and Reflect. #------------------------------- @@ -7127,7 +7127,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 195 +FunctionCode = LowerPPOfTargetLastMoveBy3 Flags = CanProtect,CanMirrorMove,Sound Description = The user attacks with tremendous psychic power. This also removes 3 PP from the target's last move. #------------------------------- @@ -7139,7 +7139,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 181 +FunctionCode = HitsAllFoesAndPowersUpInPsychicTerrain Flags = CanProtect,CanMirrorMove Description = The user attacks the target with psychic power. Powers up and hits all foes on Psychic Terrain. #------------------------------- @@ -7151,7 +7151,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks with an odd, unseeable power. It may also make the target flinch. @@ -7164,7 +7164,7 @@ BaseDamage = 80 Accuracy = 0 TotalPP = 5 Target = NearOther -FunctionCode = 147 +FunctionCode = RemoveProtectionsBypassSubstitute Flags = CanMirrorMove Description = Using a hyperspace hole, the user appears right next to the target and strikes. Skips protections. #------------------------------- @@ -7176,7 +7176,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 122 +FunctionCode = UseTargetDefenseInsteadOfTargetSpDef Flags = CanProtect,CanMirrorMove Description = The user materializes an odd psychic wave to attack the target. This attack does physical damage. #------------------------------- @@ -7188,7 +7188,7 @@ BaseDamage = 80 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user focuses its willpower to its head and attacks the foe. It may also make the target flinch. @@ -7201,7 +7201,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 50 Description = The user lets loose a damaging burst of light. It may also reduce the target's Sp. Def stat. @@ -7214,7 +7214,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 045 +FunctionCode = LowerTargetSpAtk1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 50 Description = A mistlike flurry of down envelops and damages the target. It may also lower the target's Sp. Atk. @@ -7227,7 +7227,7 @@ BaseDamage = 70 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user tears at the target with blades formed by psychic power. Critical hits land more easily. #------------------------------- @@ -7239,7 +7239,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is attacked with a peculiar ray. It may also cause confusion. @@ -7252,7 +7252,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The user unleashes a vicious blow after its cute act makes the foe less wary. It may also cause flinching. @@ -7265,7 +7265,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The target is hit by a weak telekinetic force. It may also leave the target confused. @@ -7278,7 +7278,7 @@ BaseDamage = 20 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 08E +FunctionCode = PowerHigherWithUserPositiveStatStages Flags = CanProtect,CanMirrorMove Description = The user attacks with stored power. The more the user's stats are raised, the greater the damage. #------------------------------- @@ -7291,7 +7291,7 @@ Accuracy = 100 TotalPP = 20 Target = None Priority = -5 -FunctionCode = 072 +FunctionCode = CounterSpecialDamage Flags = CanProtect Description = A retaliation move that counters any special attack, inflicting double the damage taken. #------------------------------- @@ -7303,7 +7303,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 06F +FunctionCode = FixedDamageUserLevelRandom Flags = CanProtect,CanMirrorMove Description = The target is attacked with an odd psychic wave. The attack varies in intensity. #------------------------------- @@ -7314,7 +7314,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = User -FunctionCode = 030 +FunctionCode = RaiseUserSpeed2 Description = The user relaxes and lightens its body to move faster. It sharply boosts the Speed stat. #------------------------------- [ALLYSWITCH] @@ -7325,7 +7325,7 @@ Accuracy = 0 TotalPP = 15 Target = User Priority = 2 -FunctionCode = 120 +FunctionCode = UserSwapsPositionsWithAlly Description = The user teleports using a strange power and switches its place with one of its allies. #------------------------------- [AMNESIA] @@ -7335,7 +7335,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 033 +FunctionCode = RaiseUserSpDef2 Description = The user temporarily empties its mind to forget its concerns. It sharply raises the user's Sp. Def stat. #------------------------------- [BARRIER] @@ -7345,7 +7345,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 02F +FunctionCode = RaiseUserDefense2 Description = The user throws up a sturdy wall that sharply raises its Defense stat. #------------------------------- [CALMMIND] @@ -7355,7 +7355,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 02C +FunctionCode = RaiseUserSpAtkSpDef1 Description = The user quietly focuses its mind and calms its spirit to raise its Sp. Atk and Sp. Def stats. #------------------------------- [COSMICPOWER] @@ -7365,7 +7365,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 02A +FunctionCode = RaiseUserDefSpDef1 Description = The user absorbs a mystical power from space to raise its Defense and Sp. Def stats. #------------------------------- [GRAVITY] @@ -7375,7 +7375,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = BothSides -FunctionCode = 118 +FunctionCode = StartGravity Description = Gravity is intensified for five turns, making moves involving flying unusable and negating Levitation. #------------------------------- [GUARDSPLIT] @@ -7385,7 +7385,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 059 +FunctionCode = UserTargetAverageBaseDefSpDef Flags = CanProtect Description = The user employs its psychic power to average its Defense and Sp. Def stats with those of its target. #------------------------------- @@ -7396,7 +7396,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 053 +FunctionCode = UserTargetSwapDefSpDefStages Flags = CanProtect,CanMirrorMove Description = The user employs its psychic power to switch changes to its Defense and Sp. Def with the target. #------------------------------- @@ -7407,7 +7407,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = AllNearFoes -FunctionCode = 0BB +FunctionCode = DisableTargetHealingMoves Flags = CanProtect,CanMirrorMove Description = For five turns, the foe is prevented from using any moves, Abilities, or held items that recover HP. #------------------------------- @@ -7418,7 +7418,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = Other -FunctionCode = 0DF +FunctionCode = HealTargetHalfOfTotalHP Flags = CanProtect,Pulse Description = The user emits a healing pulse which restores the target's HP by up to half of its max HP. #------------------------------- @@ -7429,7 +7429,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0E3 +FunctionCode = UserFaintsHealAndCureReplacement Description = The user faints. In return, the Pokémon taking its place will have its HP restored and status cured. #------------------------------- [HEARTSWAP] @@ -7439,7 +7439,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 054 +FunctionCode = UserTargetSwapStatStages Flags = CanProtect,CanMirrorMove Description = The user employs its psychic power to switch stat changes with the target. #------------------------------- @@ -7450,7 +7450,7 @@ Category = Status Accuracy = 60 TotalPP = 20 Target = NearOther -FunctionCode = 003 +FunctionCode = SleepTarget Flags = CanProtect,CanMirrorMove Description = The user employs hypnotic suggestion to make the target fall into a deep sleep. #------------------------------- @@ -7461,7 +7461,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0B8 +FunctionCode = DisableTargetMovesKnownByUser Description = If the foe knows any move also known by the user, the foe is prevented from using it. #------------------------------- [INSTRUCT] @@ -7471,7 +7471,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 16B +FunctionCode = TargetUsesItsLastUsedMoveAgain Flags = CanProtect Description = The user instructs the target to use the target's last move again. #------------------------------- @@ -7482,7 +7482,7 @@ Category = Status Accuracy = 80 TotalPP = 15 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove Description = The user distracts the target by bending a spoon. It lowers the target's accuracy. #------------------------------- @@ -7493,7 +7493,7 @@ Category = Status Accuracy = 0 TotalPP = 30 Target = UserSide -FunctionCode = 0A3 +FunctionCode = StartWeakenSpecialDamageAgainstUserSide Description = A wondrous wall of light is put up to suppress damage from special attacks for five turns. #------------------------------- [LUNARDANCE] @@ -7503,7 +7503,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0E4 +FunctionCode = UserFaintsHealAndCureReplacementRestorePP Flags = Dance Description = The user faints. In return, the Pokémon taking its place will have its status and HP fully restored. #------------------------------- @@ -7515,7 +7515,7 @@ Accuracy = 0 TotalPP = 15 Target = User Priority = 4 -FunctionCode = 0B1 +FunctionCode = BounceBackProblemCausingStatusMoves Description = A barrier reflects back to the target moves like Leech Seed and moves that damage status. #------------------------------- [MAGICPOWDER] @@ -7525,7 +7525,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 17F +FunctionCode = SetTargetTypesToPsychic Flags = CanProtect,CanMirrorMove,Powder Description = The user scatters a cloud of magic powder that changes the target to Psychic type. #------------------------------- @@ -7536,7 +7536,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 0F9 +FunctionCode = StartNegateHeldItems Flags = CanMirrorMove Description = The user creates a bizarre area in which Pokémon's held items lose their effects for five turns. #------------------------------- @@ -7547,7 +7547,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Description = The user meditates to awaken the power deep within its body and raise its Attack stat. #------------------------------- [MIRACLEEYE] @@ -7557,7 +7557,7 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = NearOther -FunctionCode = 0A8 +FunctionCode = StartNegateTargetEvasionStatStageAndDarkImmunity Flags = CanProtect,CanMirrorMove Description = Enables the user to hit a Dark type with any type of move. It also enables the user to hit an evasive foe. #------------------------------- @@ -7568,7 +7568,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 058 +FunctionCode = UserTargetAverageBaseAtkSpAtk Flags = CanProtect Description = The user employs its psychic power to average its Attack and Sp. Atk stats with those of the target. #------------------------------- @@ -7579,7 +7579,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 052 +FunctionCode = UserTargetSwapAtkSpAtkStages Flags = CanProtect,CanMirrorMove Description = The user employs its psychic power to switch changes to its Attack and Sp. Atk with the target. #------------------------------- @@ -7590,7 +7590,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 057 +FunctionCode = UserSwapBaseAtkDef Description = The user employs its psychic power to switch its Attack with its Defense stat. #------------------------------- [PSYCHICTERRAIN] @@ -7600,7 +7600,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 173 +FunctionCode = StartPsychicTerrain Description = Protects grounded Pokémon from priority moves and powers up Psychic-type moves for five turns. #------------------------------- [PSYCHOSHIFT] @@ -7610,7 +7610,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 01B +FunctionCode = GiveUserStatusToTarget Flags = CanProtect,CanMirrorMove Description = Using its psychic power of suggestion, the user transfers its status problems to the target. #------------------------------- @@ -7621,7 +7621,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = UserSide -FunctionCode = 0A2 +FunctionCode = StartWeakenPhysicalDamageAgainstUserSide Description = A wondrous wall of light is put up to suppress damage from physical attacks for five turns. #------------------------------- [REST] @@ -7631,7 +7631,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 0D9 +FunctionCode = HealUserFullyAndFallAsleep Description = The user goes to sleep for two turns. It fully restores the user's HP and heals any status problem. #------------------------------- [ROLEPLAY] @@ -7641,7 +7641,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 065 +FunctionCode = SetUserAbilityToTargetAbility Description = The user mimics the target completely, copying the target's natural Ability. #------------------------------- [SKILLSWAP] @@ -7651,7 +7651,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 067 +FunctionCode = UserTargetSwapAbilities Flags = CanProtect,CanMirrorMove Description = The user employs its psychic power to exchange Abilities with the target. #------------------------------- @@ -7662,7 +7662,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 161 +FunctionCode = UserTargetSwapBaseSpeed Flags = CanProtect,CanMirrorMove Description = The user exchanges Speed stats with the target. #------------------------------- @@ -7673,7 +7673,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = NearOther -FunctionCode = 11A +FunctionCode = StartTargetAirborneAndAlwaysHitByMoves Flags = CanProtect,CanMirrorMove Description = The user makes the target float with its psychic power. The target is easier to hit for three turns. #------------------------------- @@ -7685,7 +7685,7 @@ Accuracy = 0 TotalPP = 20 Target = User Priority = -6 -FunctionCode = 0EA +FunctionCode = SwitchOutUserStatusMove Description = The user switches place with a party Pokémon. Also warps to the last Pokémon Center visited. #------------------------------- [TRICK] @@ -7695,7 +7695,7 @@ Category = Status Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0F2 +FunctionCode = UserTargetSwapItems Flags = CanProtect,CanMirrorMove Description = The user catches the target off guard and swaps its held item with its own. #------------------------------- @@ -7707,7 +7707,7 @@ Accuracy = 0 TotalPP = 5 Target = BothSides Priority = -7 -FunctionCode = 11F +FunctionCode = StartSlowerBattlersActFirst Flags = CanMirrorMove Description = The user creates a bizarre area in which slower Pokémon get to move first for five turns. #------------------------------- @@ -7719,7 +7719,7 @@ Accuracy = 0 TotalPP = 10 Target = BothSides Priority = -7 -FunctionCode = 124 +FunctionCode = StartSwapAllBattlersBaseDefensiveStats Flags = CanMirrorMove Description = The user creates a bizarre area in which Pokémon's Defense and Sp. Def stats are swapped for 5 turns. #------------------------------- @@ -7731,7 +7731,7 @@ BaseDamage = 150 Accuracy = 80 TotalPP = 5 Target = NearOther -FunctionCode = 0FC +FunctionCode = RecoilHalfOfDamageDealt Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks the foe with a hazardous, full-power headbutt. The user also takes terrible damage. #------------------------------- @@ -7743,7 +7743,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove,Bomb Description = The user launches a huge boulder at the target to attack. It must rest on the next turn, however. #------------------------------- @@ -7755,7 +7755,7 @@ BaseDamage = 120 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 18B +FunctionCode = TwoTurnAttackChargeRaiseUserSpAtk1 Flags = CanProtect,CanMirrorMove Description = Gathers space power and boosts its Sp. Atk stat on the first turn, attacks on the next turn. #------------------------------- @@ -7767,7 +7767,7 @@ BaseDamage = 100 Accuracy = 95 TotalPP = 5 Target = AllNearFoes -FunctionCode = 136 +FunctionCode = RaiseUserDefense2 Flags = CanProtect,CanMirrorMove EffectChance = 50 Description = The user whips up a storm of diamonds to damage foes. This may also sharply raise the user's Defense stat. @@ -7780,7 +7780,7 @@ BaseDamage = 100 Accuracy = 80 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user stabs the foe with sharpened stones from below. It has a high critical-hit ratio. #------------------------------- @@ -7792,7 +7792,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user attacks with a ray of light that sparkles as if it were made of gemstones. #------------------------------- @@ -7804,7 +7804,7 @@ BaseDamage = 75 Accuracy = 90 TotalPP = 10 Target = AllNearFoes -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = Large boulders are hurled at the foes to inflict damage. It may also make the targets flinch. @@ -7817,7 +7817,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 02D +FunctionCode = RaiseUserMainStats1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user attacks with a prehistoric power. It may also raise all the user's stats at once. @@ -7830,7 +7830,7 @@ BaseDamage = 60 Accuracy = 95 TotalPP = 15 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 100 Description = Boulders are hurled at the target. It also lowers the target's Speed by preventing its movement. @@ -7843,7 +7843,7 @@ BaseDamage = 50 Accuracy = 90 TotalPP = 15 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The user picks up and throws a small rock at the target to attack. #------------------------------- @@ -7855,7 +7855,7 @@ BaseDamage = 50 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 11C +FunctionCode = HitsTargetInSkyGroundsTarget Flags = CanProtect,CanMirrorMove Description = The user throws a stone or projectile to attack. A flying Pokémon will fall to the ground when hit. #------------------------------- @@ -7868,7 +7868,7 @@ Accuracy = 100 TotalPP = 20 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user smashes into the target at high speed. This move always goes first. #------------------------------- @@ -7880,7 +7880,7 @@ BaseDamage = 30 Accuracy = 90 TotalPP = 20 Target = NearOther -FunctionCode = 0D3 +FunctionCode = MultiTurnAttackPowersUpEachTurn Flags = Contact,CanProtect,CanMirrorMove Description = The user continually rolls into the target over five turns. It becomes stronger each time it hits. #------------------------------- @@ -7892,7 +7892,7 @@ BaseDamage = 25 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimes Flags = CanProtect,CanMirrorMove,Bomb Description = The user hurls hard rocks at the target. Two to five rocks are launched in quick succession. #------------------------------- @@ -7903,7 +7903,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 030 +FunctionCode = RaiseUserSpeed2 Description = The user polishes its body to reduce drag. It can sharply raise the Speed stat. #------------------------------- [SANDSTORM] @@ -7913,7 +7913,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = BothSides -FunctionCode = 101 +FunctionCode = StartSandstormWeather Description = Summons a five-turn sandstorm to hurt all combatants except the Rock, Ground, and Steel types. #------------------------------- [STEALTHROCK] @@ -7923,7 +7923,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = FoeSide -FunctionCode = 105 +FunctionCode = AddStealthRocksToFoeSide Description = The user lays a trap of levitating stones around the foe. The trap hurts foes that switch into battle. #------------------------------- [TARSHOT] @@ -7933,7 +7933,7 @@ Category = Status Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 17E +FunctionCode = LowerTargetSpeed1MakeTargetWeakerToFire Flags = CanProtect,CanMirrorMove Description = Pours sticky tar over the target, lowering its Speed and making it weaker to Fire-type moves. #------------------------------- @@ -7945,7 +7945,7 @@ Accuracy = 0 TotalPP = 10 Target = UserSide Priority = 3 -FunctionCode = 0AC +FunctionCode = ProtectUserSideFromMultiTargetDamagingMoves Description = The user and its allies are protected from wide-ranging attacks for a turn. May fail if used in succession. #------------------------------- [DOOMDESIRE] @@ -7956,7 +7956,7 @@ BaseDamage = 140 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 111 +FunctionCode = AttackTwoTurnsLater Description = Two turns after this move is used, the user blasts the target with a concentrated bundle of light. #------------------------------- [STEELBEAM] @@ -7967,7 +7967,7 @@ BaseDamage = 140 Accuracy = 95 TotalPP = 5 Target = NearOther -FunctionCode = 194 +FunctionCode = UserLosesHalfOfTotalHP Flags = CanProtect,CanMirrorMove Description = The user fires a beam of steel that it collected from its entire body. This also damages the user. #------------------------------- @@ -7979,7 +7979,7 @@ BaseDamage = 130 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 199 +FunctionCode = RemoveTerrain Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks while destroying the terrain. This move fails when the ground isn't a terrain. #------------------------------- @@ -7991,7 +7991,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user becomes a gigantic shield and slams into the target. #------------------------------- @@ -8003,7 +8003,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user becomes a gigantic sword and cuts the target. #------------------------------- @@ -8015,7 +8015,7 @@ BaseDamage = 100 Accuracy = 75 TotalPP = 15 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The target is slammed with a steel-hard tail. It may also lower the target's Defense stat. @@ -8028,7 +8028,7 @@ BaseDamage = 100 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 163 +FunctionCode = IgnoreTargetAbility Flags = Contact,CanProtect,CanMirrorMove Description = The user slams into the target with the force of a meteor. Can't be stopped by the target's Ability. #------------------------------- @@ -8040,7 +8040,7 @@ BaseDamage = 90 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Flags = Contact,CanProtect,CanMirrorMove,Punching EffectChance = 20 Description = The target is hit with a hard punch fired like a meteor. It may also raise the user's Attack. @@ -8053,7 +8053,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0EF +FunctionCode = TrapTargetInBattle Flags = Contact,CanProtect,CanMirrorMove EffectChance = 100 Description = The user entangles the target with its anchor chain. The target becomes unable to flee. @@ -8066,7 +8066,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 046 +FunctionCode = LowerTargetSpDef1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = The user gathers all its light energy and releases it at once. It may also lower the target's Sp. Def stat. @@ -8079,7 +8079,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 30 Description = The foe slams the target with its steel-hard head. It may also make the target flinch. @@ -8092,7 +8092,7 @@ BaseDamage = 70 Accuracy = 0 TotalPP = 10 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user stabs the target with a sharp horn. This attack never misses. #------------------------------- @@ -8104,7 +8104,7 @@ BaseDamage = 70 Accuracy = 90 TotalPP = 25 Target = NearOther -FunctionCode = 01D +FunctionCode = RaiseUserDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 10 Description = The target is hit with wings of steel. It may also raise the user's Defense stat. @@ -8117,7 +8117,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 175 +FunctionCode = HitTwoTimesFlinchTarget Flags = Contact,CanProtect,Punching EffectChance = 30 Description = The user rotates, centering the hex nut in its chest, and then strikes twice. May cause flinching. @@ -8130,7 +8130,7 @@ BaseDamage = 65 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user looses a flash of energy from its polished body. It may also lower the target's accuracy. @@ -8143,7 +8143,7 @@ BaseDamage = 60 Accuracy = 0 TotalPP = 20 Target = NearOther -FunctionCode = 0A5 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Bomb Description = The user launches steel bombs that stick to the target. This attack will not miss. #------------------------------- @@ -8155,7 +8155,7 @@ BaseDamage = 50 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0BD +FunctionCode = HitTwoTimes Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks by throwing two steel gears at its target. #------------------------------- @@ -8167,7 +8167,7 @@ BaseDamage = 50 Accuracy = 95 TotalPP = 35 Target = NearOther -FunctionCode = 01C +FunctionCode = RaiseUserAttack1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 10 Description = The target is raked with steel claws. It may also raise the user's Attack stat. @@ -8181,7 +8181,7 @@ Accuracy = 100 TotalPP = 30 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,Punching Description = The user strikes the target with tough punches as fast as bullets. This move always goes first. #------------------------------- @@ -8193,7 +8193,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 08D +FunctionCode = PowerHigherWithTargetFasterThanUser Flags = Contact,CanProtect,CanMirrorMove,Bomb Description = The user tackles the target with a high-speed spin. The slower the user, the greater the damage. #------------------------------- @@ -8205,7 +8205,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 09B +FunctionCode = PowerHigherWithUserHeavierThanTarget Flags = Contact,CanProtect,CanMirrorMove Description = The user slams into the foe with its heavy body. The heavier the user, the greater the damage. #------------------------------- @@ -8217,7 +8217,7 @@ BaseDamage = 1 Accuracy = 100 TotalPP = 10 Target = None -FunctionCode = 073 +FunctionCode = CounterDamagePlusHalf Flags = CanProtect,CanMirrorMove Description = The user retaliates with much greater power against the target that last inflicted damage on it. #------------------------------- @@ -8228,7 +8228,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 031 +FunctionCode = RaiseUserSpeed2LowerUserWeight Description = The user sheds part of its body to make itself lighter and sharply raise its Speed stat. #------------------------------- [GEARUP] @@ -8238,7 +8238,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = UserAndAllies -FunctionCode = 15C +FunctionCode = RaisePlusMinusUserAndAlliesAtkSpAtk1 Description = The user engages its gears to raise the Attack and Sp. Atk of allies with the Plus or Minus Ability. #------------------------------- [IRONDEFENSE] @@ -8248,7 +8248,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = User -FunctionCode = 02F +FunctionCode = RaiseUserDefense2 Description = The user hardens its body's surface like iron, sharply raising its Defense stat. #------------------------------- [KINGSSHIELD] @@ -8259,7 +8259,7 @@ Accuracy = 0 TotalPP = 10 Target = User Priority = 4 -FunctionCode = 14B +FunctionCode = ProtectUserFromDamagingMovesKingsShield Description = Protects itself from damage. It also harshly lowers the Attack of attackers that make contact. #------------------------------- [METALSOUND] @@ -8269,7 +8269,7 @@ Category = Status Accuracy = 85 TotalPP = 40 Target = NearOther -FunctionCode = 04F +FunctionCode = LowerTargetSpDef2 Flags = CanProtect,CanMirrorMove,Sound Description = A horrible sound like scraping metal harshly reduces the target's Sp. Def stat. #------------------------------- @@ -8280,7 +8280,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = User -FunctionCode = 036 +FunctionCode = RaiseUserAtk1Spd2 Description = The user rotates its gears, raising its Attack and sharply raising its Speed. #------------------------------- [HYDROCANNON] @@ -8291,7 +8291,7 @@ BaseDamage = 150 Accuracy = 90 TotalPP = 5 Target = NearOther -FunctionCode = 0C2 +FunctionCode = AttackAndSkipNextTurn Flags = CanProtect,CanMirrorMove Description = The target is hit with a watery blast. The user must rest on the next turn, however. #------------------------------- @@ -8303,7 +8303,7 @@ BaseDamage = 150 Accuracy = 100 TotalPP = 5 Target = AllNearFoes -FunctionCode = 08B +FunctionCode = PowerHigherWithUserHP Flags = CanProtect,CanMirrorMove Description = The user spouts water to damage the foe. The lower the user's HP, the less powerful it becomes. #------------------------------- @@ -8315,7 +8315,7 @@ BaseDamage = 110 Accuracy = 80 TotalPP = 5 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The target is blasted by a huge volume of water launched under great pressure. #------------------------------- @@ -8327,7 +8327,7 @@ BaseDamage = 110 Accuracy = 85 TotalPP = 10 Target = AllNearFoes -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove,Pulse Description = The user attacks opposing Pokémon with countless beams of light that glow a deep and brilliant blue. #------------------------------- @@ -8339,7 +8339,7 @@ BaseDamage = 110 Accuracy = 95 TotalPP = 5 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove,ThawsUser EffectChance = 30 Description = The user immerses the target in superheated steam. This may also leave the target with a burn. @@ -8352,7 +8352,7 @@ BaseDamage = 100 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove,HighCriticalHitRate Description = The target is hammered with a large pincer. Critical hits land more easily. #------------------------------- @@ -8364,7 +8364,7 @@ BaseDamage = 90 Accuracy = 90 TotalPP = 10 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user attacks by swinging its tail as if it were a vicious wave in a raging storm. #------------------------------- @@ -8376,7 +8376,7 @@ BaseDamage = 90 Accuracy = 85 TotalPP = 10 Target = AllNearFoes -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove EffectChance = 30 Description = The user attacks by shooting muddy water at the opposing team. It may also lower the target's accuracy. @@ -8389,7 +8389,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 10 Target = AllNearOthers -FunctionCode = 15A +FunctionCode = CureTargetBurn Flags = CanProtect,CanMirrorMove,Sound EffectChance = 100 Description = The user bursts into song, emitting many bubbles. Any burnt Pokémon will be healed by these bubbles. @@ -8402,7 +8402,7 @@ BaseDamage = 90 Accuracy = 100 TotalPP = 15 Target = AllNearOthers -FunctionCode = 075 +FunctionCode = DoublePowerIfTargetUnderwater Flags = CanProtect,CanMirrorMove Description = It swamps the area around the user with a giant wave. It can also be used for crossing water. #------------------------------- @@ -8414,7 +8414,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 183 +FunctionCode = DoublePowerIfTargetNotActed Flags = Contact,CanProtect,CanMirrorMove Description = The user rends the target with its hard gills. Power doubles if the user moves first. #------------------------------- @@ -8426,7 +8426,7 @@ BaseDamage = 85 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user slams into the target using a full-force blast of water. May lower the target's Defense. @@ -8439,7 +8439,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 0CB +FunctionCode = TwoTurnAttackInvulnerableUnderwater Flags = Contact,CanProtect,CanMirrorMove Description = Diving on the first turn, the user rises and hits on the next turn. It can be used to dive in the ocean. #------------------------------- @@ -8451,7 +8451,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00A +FunctionCode = BurnTarget Flags = CanProtect,CanMirrorMove,ThawsUser EffectChance = 30 Description = The user shoots boiling hot water at its target. It may also leave the target with a burn. @@ -8464,7 +8464,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 187 +FunctionCode = CannotBeRedirected Flags = CanProtect,CanMirrorMove,HighCriticalHitRate Description = The user ignores any effects that redirect moves, allowing this move to hit the chosen target. #------------------------------- @@ -8476,7 +8476,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 108 +FunctionCode = WaterPledge Flags = CanProtect,CanMirrorMove Description = A column of water strikes the target. When combined with its fire equivalent, it makes a rainbow. #------------------------------- @@ -8488,7 +8488,7 @@ BaseDamage = 80 Accuracy = 100 TotalPP = 15 Target = NearOther -FunctionCode = 00F +FunctionCode = FlinchTarget Flags = Contact,CanProtect,CanMirrorMove EffectChance = 20 Description = The user charges at the target and may make it flinch. It can also be used to climb a waterfall. @@ -8501,7 +8501,7 @@ BaseDamage = 75 Accuracy = 95 TotalPP = 10 Target = NearOther -FunctionCode = 043 +FunctionCode = LowerTargetDefense1 Flags = Contact,CanProtect,CanMirrorMove EffectChance = 50 Description = The user cuts the foe with sharp shells. It may also lower the target's Defense stat. @@ -8514,7 +8514,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 10 Target = NearOther -FunctionCode = 080 +FunctionCode = DoublePowerIfTargetHPLessThanHalf Flags = CanProtect,CanMirrorMove Description = If the target's HP is down to about half, this attack will hit with double the power. #------------------------------- @@ -8526,7 +8526,7 @@ BaseDamage = 65 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A spray of bubbles is forcefully ejected at the target. It may also lower its Speed stat. @@ -8539,7 +8539,7 @@ BaseDamage = 65 Accuracy = 85 TotalPP = 10 Target = NearOther -FunctionCode = 047 +FunctionCode = LowerTargetAccuracy1 Flags = CanProtect,CanMirrorMove,Bomb EffectChance = 50 Description = The user attacks by spraying ink in the foe's face or eyes. It may also lower the target's accuracy. @@ -8552,7 +8552,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 0EE +FunctionCode = SwitchOutUserDamagingMove Flags = Contact,CanProtect,CanMirrorMove Description = After making its attack, the user rushes back to switch places with a party Pokémon in waiting. #------------------------------- @@ -8564,7 +8564,7 @@ BaseDamage = 60 Accuracy = 100 TotalPP = 20 Target = Other -FunctionCode = 013 +FunctionCode = ConfuseTarget Flags = CanProtect,CanMirrorMove,Pulse EffectChance = 20 Description = The user attacks the target with a pulsing blast of water. It may also confuse the target. @@ -8578,7 +8578,7 @@ Accuracy = 100 TotalPP = 20 Target = NearOther Priority = 1 -FunctionCode = 000 +FunctionCode = None Flags = Contact,CanProtect,CanMirrorMove Description = The user lunges at the target at a speed that makes it almost invisible. It is sure to strike first. #------------------------------- @@ -8590,7 +8590,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 30 Target = AllNearFoes -FunctionCode = 044 +FunctionCode = LowerTargetSpeed1 Flags = CanProtect,CanMirrorMove EffectChance = 10 Description = A spray of countless bubbles is jetted at the opposing team. It may also lower the targets' Speed stats. @@ -8603,7 +8603,7 @@ BaseDamage = 40 Accuracy = 100 TotalPP = 25 Target = NearOther -FunctionCode = 000 +FunctionCode = None Flags = CanProtect,CanMirrorMove Description = The target is blasted with a forceful shot of water. #------------------------------- @@ -8615,7 +8615,7 @@ BaseDamage = 35 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0CF +FunctionCode = BindTarget Flags = Contact,CanProtect,CanMirrorMove Description = The target is clamped and squeezed by the user's very thick and sturdy shell for four to five turns. #------------------------------- @@ -8627,7 +8627,7 @@ BaseDamage = 35 Accuracy = 85 TotalPP = 15 Target = NearOther -FunctionCode = 0D0 +FunctionCode = BindTargetDoublePowerIfTargetUnderwater Flags = CanProtect,CanMirrorMove Description = Traps foes in a violent swirling whirlpool for four to five turns. #------------------------------- @@ -8639,7 +8639,7 @@ BaseDamage = 25 Accuracy = 100 TotalPP = 5 Target = NearOther -FunctionCode = 189 +FunctionCode = HitThreeTimesAlwaysCriticalHit Flags = Contact,CanProtect,CanMirrorMove Description = Hits three times in a row with mastery of the Water style. This attack always deals critical hits. #------------------------------- @@ -8652,7 +8652,7 @@ Accuracy = 100 TotalPP = 20 Target = NearOther Priority = 1 -FunctionCode = 0C0 +FunctionCode = HitTwoToFiveTimesOrThreeForAshGreninja Flags = CanProtect,CanMirrorMove Description = The user hits the target with throwing stars 2-5 times in a row. This move always goes first. #------------------------------- @@ -8663,7 +8663,7 @@ Category = Status Accuracy = 0 TotalPP = 20 Target = User -FunctionCode = 0DA +FunctionCode = StartHealUserEachTurn Description = The user envelops itself in a veil made of water. It regains some HP on every turn. #------------------------------- [LIFEDEW] @@ -8673,7 +8673,7 @@ Category = Status Accuracy = 0 TotalPP = 10 Target = UserAndAllies -FunctionCode = 18C +FunctionCode = HealUserAndAlliesQuarterOfTotalHP Description = The user scatters mysterious water around and restores the HP of itself and its allies. #------------------------------- [RAINDANCE] @@ -8683,7 +8683,7 @@ Category = Status Accuracy = 0 TotalPP = 5 Target = BothSides -FunctionCode = 100 +FunctionCode = StartRainWeather Description = The user summons a heavy rain that falls for five turns, powering up Water-type moves. #------------------------------- [SOAK] @@ -8693,7 +8693,7 @@ Category = Status Accuracy = 100 TotalPP = 20 Target = NearOther -FunctionCode = 061 +FunctionCode = SetTargetTypesToWater Flags = CanProtect,CanMirrorMove Description = The user shoots a torrent of water at the target and changes the target's type to Water. #------------------------------- @@ -8704,7 +8704,7 @@ Category = Status Accuracy = 0 TotalPP = 15 Target = BothSides -FunctionCode = 09E +FunctionCode = StartWeakenFireMoves Description = The user soaks itself with water. The move weakens Fire-type moves while the user is in the battle. #------------------------------- [WITHDRAW] @@ -8714,5 +8714,5 @@ Category = Status Accuracy = 0 TotalPP = 40 Target = User -FunctionCode = 01D +FunctionCode = RaiseUserDefense1 Description = The user withdraws its body into its hard shell, raising its Defense stat.