diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index fa89c29b9..890f30bb1 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -1821,6 +1821,10 @@ various BS_ATTACKER, VARIOUS_REMOVE_TERRAIN .endm + .macro trytoclearprimalweather + various BS_ATTACKER, VARIOUS_TRY_TO_CLEAR_PRIMAL_WEATHER + .endm + .macro getrototillertargets ptr:req various BS_ATTACKER, VARIOUS_GET_ROTOTILLER_TARGETS .4byte \ptr @@ -1830,7 +1834,7 @@ various \battler, VARIOUS_JUMP_IF_NOT_ROTOTILLER_AFFECTED .4byte \ptr .endm - + @ helpful macros .macro setstatchanger stat:req, stages:req, down:req setbyte sSTATCHANGER \stat | \stages << 3 | \down << 7 diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index d7de92096..4063885e0 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -823,6 +823,7 @@ gBattleAnims_General:: .4byte General_RestoreBg @ B_ANIM_RESTORE_BG .4byte General_TotemFlare @ B_ANIM_TOTEM_FLARE .4byte General_GulpMissile @ B_ANIM_GULP_MISSILE + .4byte General_StrongWinds @ B_ANIM_STRONG_WINDS .align 2 gBattleAnims_Special:: @@ -24412,6 +24413,17 @@ General_GulpMissile: @ Tackle anim (placeholder) blendoff end +General_StrongWinds:: + loadspritegfx ANIM_TAG_FLYING_DIRT + playsewithpan SE_M_GUST, 0 + createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_FLYING_DIRT, 0, 12, 12, RGB(20, 20, 20) + waitforvisualfinish + createvisualtask AnimTask_LoadWindstormBackground, 5, FALSE + delay 32 + waitforvisualfinish + stopsound + end + RainbowEndureEffect: launchtemplate gBlueEndureEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2 delay 0x3 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 9ed0d1fcc..278d18a9d 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -646,6 +646,9 @@ BattleScript_MoveEffectCoreEnforcer:: setgastroacid BattleScript_CoreEnforcerRet printstring STRINGID_PKMNSABILITYSUPPRESSED waitmessage B_WAIT_TIME_LONG + trytoclearprimalweather + printstring STRINGID_EMPTYSTRING3 + waitmessage 1 BattleScript_CoreEnforcerRet: return @@ -738,6 +741,9 @@ BattleScript_EffectPartingShotSwitch: getswitchedmondata BS_ATTACKER switchindataupdate BS_ATTACKER hpthresholds BS_ATTACKER + trytoclearprimalweather + printstring STRINGID_EMPTYSTRING3 + waitmessage 1 printstring STRINGID_SWITCHINMON switchinanim BS_ATTACKER, TRUE waitstate @@ -1748,6 +1754,9 @@ BattleScript_EffectSimpleBeam: waitanimation printstring STRINGID_PKMNACQUIREDSIMPLE waitmessage B_WAIT_TIME_LONG + trytoclearprimalweather + printstring STRINGID_EMPTYSTRING3 + waitmessage 1 goto BattleScript_MoveEnd BattleScript_EffectSuckerPunch: @@ -1796,6 +1805,9 @@ BattleScript_EffectHealingWish: getswitchedmondata BS_ATTACKER switchindataupdate BS_ATTACKER hpthresholds BS_ATTACKER + trytoclearprimalweather + printstring STRINGID_EMPTYSTRING3 + waitmessage 1 printstring STRINGID_SWITCHINMON switchinanim BS_ATTACKER, TRUE waitstate @@ -1833,6 +1845,9 @@ BattleScript_EffectWorrySeed: waitanimation printstring STRINGID_PKMNACQUIREDABILITY waitmessage B_WAIT_TIME_LONG + trytoclearprimalweather + printstring STRINGID_EMPTYSTRING3 + waitmessage 1 goto BattleScript_MoveEnd BattleScript_EffectPowerSplit: @@ -1961,6 +1976,9 @@ BattleScript_EffectGastroAcid: waitanimation printstring STRINGID_PKMNSABILITYSUPPRESSED waitmessage B_WAIT_TIME_LONG + trytoclearprimalweather + printstring STRINGID_EMPTYSTRING3 + waitmessage 1 goto BattleScript_MoveEnd BattleScript_EffectToxicSpikes: @@ -2155,6 +2173,9 @@ BattleScript_EffectHitEscape: getswitchedmondata BS_ATTACKER switchindataupdate BS_ATTACKER hpthresholds BS_ATTACKER + trytoclearprimalweather + printstring STRINGID_EMPTYSTRING3 + waitmessage 1 printstring STRINGID_SWITCHINMON switchinanim BS_ATTACKER, TRUE waitstate @@ -3093,6 +3114,9 @@ BattleScript_EffectTransform:: attackcanceler attackstring ppreduce + trytoclearprimalweather + printstring STRINGID_EMPTYSTRING3 + waitmessage 1 transformdataexecution attackanimation waitanimation @@ -3884,6 +3908,7 @@ BattleScript_PerishSongLoopIncrement:: goto BattleScript_MoveEnd BattleScript_PerishSongBlocked:: + copybyte sBATTLER, gBattlerTarget printstring STRINGID_PKMNSXBLOCKSY2 waitmessage B_WAIT_TIME_LONG goto BattleScript_PerishSongLoopIncrement @@ -3897,6 +3922,9 @@ BattleScript_EffectSandstorm:: attackcanceler attackstring ppreduce + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessened + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRain + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOn setsandstorm goto BattleScript_MoveWeatherChange @@ -4030,6 +4058,9 @@ BattleScript_EffectBatonPass:: getswitchedmondata BS_ATTACKER switchindataupdate BS_ATTACKER hpthresholds BS_ATTACKER + trytoclearprimalweather + printstring STRINGID_EMPTYSTRING3 + waitmessage 1 printstring STRINGID_SWITCHINMON switchinanim BS_ATTACKER, TRUE waitstate @@ -4099,6 +4130,9 @@ BattleScript_EffectRainDance:: attackcanceler attackstring ppreduce + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessened + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRain + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOn setrain BattleScript_MoveWeatherChange:: attackanimation @@ -4112,9 +4146,80 @@ BattleScript_EffectSunnyDay:: attackcanceler attackstring ppreduce + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessened + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRain + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOn setsunny goto BattleScript_MoveWeatherChange +BattleScript_ExtremelyHarshSunlightWasNotLessened: + pause B_WAIT_TIME_SHORT + printstring STRINGID_EXTREMELYHARSHSUNLIGHTWASNOTLESSENED + waitmessage B_WAIT_TIME_LONG + goto BattleScript_MoveEnd + +BattleScript_ExtremelyHarshSunlightWasNotLessenedEnd3: + pause B_WAIT_TIME_SHORT + printstring STRINGID_EXTREMELYHARSHSUNLIGHTWASNOTLESSENED + waitmessage B_WAIT_TIME_LONG + end3 + +BattleScript_ExtremelyHarshSunlightWasNotLessenedRet: + pause B_WAIT_TIME_SHORT + printstring STRINGID_EXTREMELYHARSHSUNLIGHTWASNOTLESSENED + waitmessage B_WAIT_TIME_LONG + return + +BattleScript_NoReliefFromHeavyRain: + pause B_WAIT_TIME_SHORT + printstring STRINGID_NORELIEFROMHEAVYRAIN + waitmessage B_WAIT_TIME_LONG + goto BattleScript_MoveEnd + +BattleScript_NoReliefFromHeavyRainEnd3: + pause B_WAIT_TIME_SHORT + printstring STRINGID_NORELIEFROMHEAVYRAIN + waitmessage B_WAIT_TIME_LONG + end3 + +BattleScript_NoReliefFromHeavyRainRet: + pause B_WAIT_TIME_SHORT + printstring STRINGID_NORELIEFROMHEAVYRAIN + waitmessage B_WAIT_TIME_LONG + return + +BattleScript_MysteriousAirCurrentBlowsOn: + pause B_WAIT_TIME_SHORT + printstring STRINGID_MYSTERIOUSAIRCURRENTBLOWSON + waitmessage B_WAIT_TIME_LONG + goto BattleScript_MoveEnd + +BattleScript_MysteriousAirCurrentBlowsOnEnd3: + pause B_WAIT_TIME_SHORT + printstring STRINGID_MYSTERIOUSAIRCURRENTBLOWSON + waitmessage B_WAIT_TIME_LONG + end3 + +BattleScript_MysteriousAirCurrentBlowsOnRet: + pause B_WAIT_TIME_SHORT + printstring STRINGID_MYSTERIOUSAIRCURRENTBLOWSON + waitmessage B_WAIT_TIME_LONG + return + +BattleScript_BlockedByPrimalWeatherEnd3:: + call BattleScript_AbilityPopUp + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessenedEnd3 + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRainEnd3 + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOnEnd3 + end3 + +BattleScript_BlockedByPrimalWeatherRet:: + call BattleScript_AbilityPopUp + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessenedRet + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRainRet + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOnRet + return + BattleScript_EffectDefenseUpHit:: setmoveeffect MOVE_EFFECT_DEF_PLUS_1 | MOVE_EFFECT_AFFECTS_USER goto BattleScript_EffectHit @@ -4472,6 +4577,9 @@ BattleScript_EffectHail:: attackcanceler attackstring ppreduce + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_PRIMAL, BattleScript_ExtremelyHarshSunlightWasNotLessened + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_RAIN_PRIMAL, BattleScript_NoReliefFromHeavyRain + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOn sethail goto BattleScript_MoveWeatherChange @@ -5238,6 +5346,9 @@ BattleScript_FaintedMonTryChooseAnother: getswitchedmondata BS_ATTACKER switchindataupdate BS_ATTACKER hpthresholds BS_ATTACKER + trytoclearprimalweather + printstring STRINGID_EMPTYSTRING3 + waitmessage 1 printstring STRINGID_SWITCHINMON hidepartystatussummary BS_ATTACKER switchinanim BS_ATTACKER, 0 @@ -5248,6 +5359,9 @@ BattleScript_FaintedMonChooseAnother: getswitchedmondata BS_FAINTED switchindataupdate BS_FAINTED hpthresholds BS_FAINTED + trytoclearprimalweather + printstring STRINGID_EMPTYSTRING3 + waitmessage 1 printstring STRINGID_SWITCHINMON hidepartystatussummary BS_FAINTED switchinanim BS_FAINTED, FALSE @@ -5280,6 +5394,9 @@ BattleScript_HandleFaintedMonLoop:: getswitchedmondata BS_FAINTED switchindataupdate BS_FAINTED hpthresholds BS_FAINTED + trytoclearprimalweather + printstring STRINGID_EMPTYSTRING3 + waitmessage 1 printstring STRINGID_SWITCHINMON hidepartystatussummary BS_FAINTED switchinanim BS_FAINTED, FALSE @@ -5482,6 +5599,9 @@ BattleScript_DoSwitchOut:: getswitchedmondata BS_ATTACKER switchindataupdate BS_ATTACKER hpthresholds BS_ATTACKER + trytoclearprimalweather + printstring STRINGID_EMPTYSTRING3 + waitmessage 1 printstring STRINGID_SWITCHINMON hidepartystatussummary BS_ATTACKER switchinanim BS_ATTACKER, FALSE @@ -5783,6 +5903,9 @@ BattleScript_RoarSuccessSwitch:: call BattleScript_RoarSuccessRet getswitchedmondata BS_TARGET switchindataupdate BS_TARGET + trytoclearprimalweather + printstring STRINGID_EMPTYSTRING3 + waitmessage 1 switchinanim BS_TARGET, FALSE waitstate printstring STRINGID_PKMNWASDRAGGEDOUT @@ -6681,7 +6804,7 @@ BattleScript_PowderMoveNoEffect:: pause B_WAIT_TIME_SHORT jumpiftype BS_TARGET, TYPE_GRASS, BattleScript_PowderMoveNoEffectPrint jumpifability BS_TARGET, ABILITY_OVERCOAT, BattleScript_PowderMoveNoEffectOvercoat - printstring STRINGID_SAFETYGOOGLESPROTECTED + printstring STRINGID_SAFETYGOGGLESPROTECTED goto BattleScript_PowderMoveNoEffectWaitMsg BattleScript_PowderMoveNoEffectOvercoat: call BattleScript_AbilityPopUp @@ -7224,6 +7347,56 @@ BattleScript_DroughtActivates:: call BattleScript_WeatherFormChanges end3 +BattleScript_DesolateLandActivates:: + pause B_WAIT_TIME_SHORT + call BattleScript_AbilityPopUp + printstring STRINGID_EXTREMELYHARSHSUNLIGHT + waitstate + playanimation BS_BATTLER_0, B_ANIM_SUN_CONTINUES, NULL + call BattleScript_WeatherFormChanges + end3 + +BattleScript_DesolateLandEvaporatesWaterTypeMoves:: + accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE + attackstring + pause B_WAIT_TIME_SHORT + ppreduce + printstring STRINGID_MOVEEVAPORATEDINTHEHARSHSUNLIGHT + waitmessage B_WAIT_TIME_LONG + goto BattleScript_MoveEnd + +BattleScript_PrimordialSeaActivates:: + pause B_WAIT_TIME_SHORT + call BattleScript_AbilityPopUp + printstring STRINGID_HEAVYRAIN + waitstate + playanimation BS_BATTLER_0, B_ANIM_RAIN_CONTINUES, NULL + call BattleScript_WeatherFormChanges + end3 + +BattleScript_PrimordialSeaFizzlesOutFireTypeMoves:: + accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE + attackstring + pause B_WAIT_TIME_SHORT + ppreduce + printstring STRINGID_MOVEFIZZLEDOUTINTHEHEAVYRAIN + waitmessage B_WAIT_TIME_LONG + goto BattleScript_MoveEnd + +BattleScript_DeltaStreamActivates:: + pause B_WAIT_TIME_SHORT + call BattleScript_AbilityPopUp + printstring STRINGID_MYSTERIOUSAIRCURRENT + waitstate + playanimation BS_ATTACKER, B_ANIM_STRONG_WINDS, NULL + end3 + +BattleScript_AttackWeakenedByStrongWinds:: + pause B_WAIT_TIME_SHORT + printstring STRINGID_ATTACKWEAKENEDBSTRONGWINDS + waitmessage B_WAIT_TIME_LONG + return + BattleScript_SnowWarningActivates:: pause B_WAIT_TIME_SHORT call BattleScript_AbilityPopUp @@ -8406,6 +8579,9 @@ BattleScript_EjectButtonActivates:: getswitchedmondata BS_SCRIPTING switchindataupdate BS_SCRIPTING hpthresholds BS_SCRIPTING + trytoclearprimalweather + printstring STRINGID_EMPTYSTRING3 + waitmessage 1 printstring 0x3 switchinanim BS_SCRIPTING 0x1 waitstate diff --git a/graphics/battle_anims/backgrounds/windstorm_brew.png b/graphics/battle_anims/backgrounds/windstorm_brew.png new file mode 100644 index 000000000..2a2895266 Binary files /dev/null and b/graphics/battle_anims/backgrounds/windstorm_brew.png differ diff --git a/graphics/battle_interface/ability_pop_up.pal b/graphics/battle_interface/ability_pop_up.pal new file mode 100644 index 000000000..19895d0bc --- /dev/null +++ b/graphics/battle_interface/ability_pop_up.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +1 177 91 +143 129 149 +103 91 111 +79 65 85 +59 31 81 +103 89 109 +231 239 245 +249 253 255 +0 0 0 +0 0 0 +107 115 115 +74 66 82 +0 0 0 +214 214 206 +132 140 140 +0 0 0 diff --git a/graphics/battle_interface/last_used_ball_l.png b/graphics/battle_interface/last_used_ball_l.png new file mode 100644 index 000000000..90fcef373 Binary files /dev/null and b/graphics/battle_interface/last_used_ball_l.png differ diff --git a/graphics/battle_interface/last_used_ball_r.png b/graphics/battle_interface/last_used_ball_r.png new file mode 100644 index 000000000..581569cf1 Binary files /dev/null and b/graphics/battle_interface/last_used_ball_r.png differ diff --git a/include/battle.h b/include/battle.h index 571df66c8..02bd47af3 100644 --- a/include/battle.h +++ b/include/battle.h @@ -37,6 +37,7 @@ #define B_ACTION_CANCEL_PARTNER 12 // when choosing an action #define B_ACTION_NOTHING_FAINTED 13 // when choosing an action #define B_ACTION_DEBUG 20 +#define B_ACTION_THROW_BALL 21 // R to throw last used ball #define B_ACTION_NONE 0xFF #define MAX_TRAINER_ITEMS 4 @@ -603,6 +604,7 @@ struct BattleStruct u8 quickClawBattlerId; struct StolenItem itemStolen[PARTY_SIZE]; // Player's team that had items stolen (two bytes per party member) u8 blunderPolicy:1; // should blunder policy activate + u8 ballSpriteIds[2]; // item gfx, window gfx }; #define GET_MOVE_TYPE(move, typeArg) \ @@ -906,5 +908,6 @@ extern u8 gNumberOfMovesToChoose; extern u8 gBattleControllerData[MAX_BATTLERS_COUNT]; extern bool8 gHasFetchedBall; extern u8 gLastUsedBall; +extern u16 gLastThrownBall; #endif // GUARD_BATTLE_H diff --git a/include/battle_interface.h b/include/battle_interface.h index 0bcadaaac..c852b776a 100644 --- a/include/battle_interface.h +++ b/include/battle_interface.h @@ -93,5 +93,9 @@ u8 GetScaledHPFraction(s16 hp, s16 maxhp, u8 scale); u8 GetHPBarLevel(s16 hp, s16 maxhp); void CreateAbilityPopUp(u8 battlerId, u32 ability, bool32 isDoubleBattle); void DestroyAbilityPopUp(u8 battlerId); +bool32 CanThrowLastUsedBall(void); +void TryHideLastUsedBall(void); +void TryRestoreLastUsedBall(void); +void TryAddLastUsedBallItemSprites(void); #endif // GUARD_BATTLE_INTERFACE_H diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 203be6519..cd4600543 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -389,5 +389,14 @@ extern const u8 BattleScript_DarkTypePreventsPrankster[]; extern const u8 BattleScript_GulpMissileGorging[]; extern const u8 BattleScript_GulpMissileGulping[]; extern const u8 BattleScript_BattleBondActivatesOnMoveEndAttacker[]; +extern const u8 BattleScript_DesolateLandActivates[]; +extern const u8 BattleScript_DesolateLandEvaporatesWaterTypeMoves[]; +extern const u8 BattleScript_PrimordialSeaActivates[]; +extern const u8 BattleScript_PrimordialSeaFizzlesOutFireTypeMoves[]; +extern const u8 BattleScript_DeltaStreamActivates[]; +extern const u8 BattleScript_MysteriousAirCurrentBlowsOn[]; +extern const u8 BattleScript_AttackWeakenedByStrongWinds[]; +extern const u8 BattleScript_BlockedByPrimalWeatherEnd3[]; +extern const u8 BattleScript_BlockedByPrimalWeatherRet[]; #endif // GUARD_BATTLE_SCRIPTS_H diff --git a/include/battle_util.h b/include/battle_util.h index 43f66db6b..273618b62 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -47,6 +47,7 @@ struct TypePower extern const struct TypePower gNaturalGiftTable[]; +void HandleAction_ThrowBall(void); bool32 IsAffectedByFollowMe(u32 battlerAtk, u32 defSide, u32 move); void HandleAction_UseMove(void); void HandleAction_Switch(void); diff --git a/include/constants/battle.h b/include/constants/battle.h index ec6f57d70..90294b4b4 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -257,24 +257,31 @@ #define WEATHER_RAIN_TEMPORARY (1 << 0) #define WEATHER_RAIN_DOWNPOUR (1 << 1) // unused #define WEATHER_RAIN_PERMANENT (1 << 2) -#define WEATHER_RAIN_ANY (WEATHER_RAIN_TEMPORARY | WEATHER_RAIN_DOWNPOUR | WEATHER_RAIN_PERMANENT) -#define WEATHER_SANDSTORM_TEMPORARY (1 << 3) -#define WEATHER_SANDSTORM_PERMANENT (1 << 4) +#define WEATHER_RAIN_PRIMAL (1 << 3) +#define WEATHER_RAIN_ANY (WEATHER_RAIN_TEMPORARY | WEATHER_RAIN_DOWNPOUR | WEATHER_RAIN_PERMANENT | WEATHER_RAIN_PRIMAL) +#define WEATHER_SANDSTORM_TEMPORARY (1 << 4) +#define WEATHER_SANDSTORM_PERMANENT (1 << 5) #define WEATHER_SANDSTORM_ANY (WEATHER_SANDSTORM_TEMPORARY | WEATHER_SANDSTORM_PERMANENT) -#define WEATHER_SUN_TEMPORARY (1 << 5) -#define WEATHER_SUN_PERMANENT (1 << 6) -#define WEATHER_SUN_ANY (WEATHER_SUN_TEMPORARY | WEATHER_SUN_PERMANENT) -#define WEATHER_HAIL_TEMPORARY (1 << 7) -#define WEATHER_HAIL_PERMANENT (1 << 8) +#define WEATHER_SUN_TEMPORARY (1 << 6) +#define WEATHER_SUN_PERMANENT (1 << 7) +#define WEATHER_SUN_PRIMAL (1 << 8) +#define WEATHER_SUN_ANY (WEATHER_SUN_TEMPORARY | WEATHER_SUN_PERMANENT | WEATHER_SUN_PRIMAL) +#define WEATHER_HAIL_TEMPORARY (1 << 9) +#define WEATHER_HAIL_PERMANENT (1 << 10) #define WEATHER_HAIL_ANY (WEATHER_HAIL_TEMPORARY | WEATHER_HAIL_PERMANENT) -#define WEATHER_ANY (WEATHER_RAIN_ANY | WEATHER_SANDSTORM_ANY | WEATHER_SUN_ANY | WEATHER_HAIL_ANY) +#define WEATHER_STRONG_WINDS (1 << 11) +#define WEATHER_ANY (WEATHER_RAIN_ANY | WEATHER_SANDSTORM_ANY | WEATHER_SUN_ANY | WEATHER_HAIL_ANY | WEATHER_STRONG_WINDS) +#define WEATHER_PRIMAL_ANY (WEATHER_RAIN_PRIMAL | WEATHER_SUN_PRIMAL | WEATHER_STRONG_WINDS) // Battle Weather as enum -#define ENUM_WEATHER_NONE 0 -#define ENUM_WEATHER_RAIN 1 -#define ENUM_WEATHER_SUN 2 -#define ENUM_WEATHER_SANDSTORM 3 -#define ENUM_WEATHER_HAIL 4 +#define ENUM_WEATHER_NONE 0 +#define ENUM_WEATHER_RAIN 1 +#define ENUM_WEATHER_SUN 2 +#define ENUM_WEATHER_SANDSTORM 3 +#define ENUM_WEATHER_HAIL 4 +#define ENUM_WEATHER_SUN_PRIMAL 5 +#define ENUM_WEATHER_RAIN_PRIMAL 6 +#define ENUM_WEATHER_STRONG_WINDS 7 // Move Effects #define MOVE_EFFECT_SLEEP 0x1 diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 39e1feda9..72f4fcd66 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -524,6 +524,7 @@ #define B_ANIM_RESTORE_BG 27 // for Terrain Endings #define B_ANIM_TOTEM_FLARE 28 // Totem boosts aura flare #define B_ANIM_GULP_MISSILE 29 +#define B_ANIM_STRONG_WINDS 30 // special animations table (gBattleAnims_Special) #define B_ANIM_LVL_UP 0 diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index 10669e36b..bcf4491f9 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -166,6 +166,10 @@ // Item Theft Settings #define B_TRAINERS_KNOCK_OFF_ITEMS TRUE // If TRUE, trainers can steal/swap your items (non-berries are restored after battle). In vanilla games trainers cannot steal items. +// Last Used Ball +#define B_LAST_USED_BALL TRUE // If TRUE, the "last used ball" feature from Gen 7 will be implemented +#define B_LAST_USED_BALL_BUTTON R_BUTTON // If last used ball is implemented, this button (or button combo) will trigger throwing the last used ball. + // Other #define B_DOUBLE_WILD_CHANCE 0 // % chance of encountering two Pokémon in a Wild Encounter. #define B_SLEEP_TURNS GEN_7 // In Gen5+, sleep lasts for 1-3 turns instead of 2-5 turns. diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index 961498e9f..96818a876 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -184,8 +184,9 @@ #define VARIOUS_TRY_HEAL_QUARTER_HP 112 #define VARIOUS_REMOVE_TERRAIN 113 #define VARIOUS_JUMP_IF_PRANKSTER_BLOCKED 114 -#define VARIOUS_GET_ROTOTILLER_TARGETS 115 -#define VARIOUS_JUMP_IF_NOT_ROTOTILLER_AFFECTED 116 +#define VARIOUS_TRY_TO_CLEAR_PRIMAL_WEATHER 115 +#define VARIOUS_GET_ROTOTILLER_TARGETS 116 +#define VARIOUS_JUMP_IF_NOT_ROTOTILLER_AFFECTED 117 // Cmd_manipulatedamage #define DMG_CHANGE_SIGN 0 diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index ff5eb5366..e8fe7e359 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -12,576 +12,588 @@ #define STRINGID_TRAINERSLIDE 6 // todo: make some of those names less vague: attacker/target vs pkmn, etc. -#define STRINGID_TRAINER1LOSETEXT 12 -#define STRINGID_PKMNGAINEDEXP 13 -#define STRINGID_PKMNGREWTOLV 14 -#define STRINGID_PKMNLEARNEDMOVE 15 -#define STRINGID_TRYTOLEARNMOVE1 16 -#define STRINGID_TRYTOLEARNMOVE2 17 -#define STRINGID_TRYTOLEARNMOVE3 18 -#define STRINGID_PKMNFORGOTMOVE 19 -#define STRINGID_STOPLEARNINGMOVE 20 -#define STRINGID_DIDNOTLEARNMOVE 21 -#define STRINGID_PKMNLEARNEDMOVE2 22 -#define STRINGID_ATTACKMISSED 23 -#define STRINGID_PKMNPROTECTEDITSELF 24 -#define STRINGID_STATSWONTINCREASE2 25 -#define STRINGID_AVOIDEDDAMAGE 26 -#define STRINGID_ITDOESNTAFFECT 27 -#define STRINGID_ATTACKERFAINTED 28 -#define STRINGID_TARGETFAINTED 29 -#define STRINGID_PLAYERGOTMONEY 30 -#define STRINGID_PLAYERWHITEOUT 31 -#define STRINGID_PLAYERWHITEOUT2 32 -#define STRINGID_PREVENTSESCAPE 33 -#define STRINGID_HITXTIMES 34 -#define STRINGID_PKMNFELLASLEEP 35 -#define STRINGID_PKMNMADESLEEP 36 -#define STRINGID_PKMNALREADYASLEEP 37 -#define STRINGID_PKMNALREADYASLEEP2 38 -#define STRINGID_PKMNWASNTAFFECTED 39 -#define STRINGID_PKMNWASPOISONED 40 -#define STRINGID_PKMNPOISONEDBY 41 -#define STRINGID_PKMNHURTBYPOISON 42 -#define STRINGID_PKMNALREADYPOISONED 43 -#define STRINGID_PKMNBADLYPOISONED 44 -#define STRINGID_PKMNENERGYDRAINED 45 -#define STRINGID_PKMNWASBURNED 46 -#define STRINGID_PKMNBURNEDBY 47 -#define STRINGID_PKMNHURTBYBURN 48 -#define STRINGID_PKMNWASFROZEN 49 -#define STRINGID_PKMNFROZENBY 50 -#define STRINGID_PKMNISFROZEN 51 -#define STRINGID_PKMNWASDEFROSTED 52 -#define STRINGID_PKMNWASDEFROSTED2 53 -#define STRINGID_PKMNWASDEFROSTEDBY 54 -#define STRINGID_PKMNWASPARALYZED 55 -#define STRINGID_PKMNWASPARALYZEDBY 56 -#define STRINGID_PKMNISPARALYZED 57 -#define STRINGID_PKMNISALREADYPARALYZED 58 -#define STRINGID_PKMNHEALEDPARALYSIS 59 -#define STRINGID_PKMNDREAMEATEN 60 -#define STRINGID_STATSWONTINCREASE 61 -#define STRINGID_STATSWONTDECREASE 62 -#define STRINGID_TEAMSTOPPEDWORKING 63 -#define STRINGID_FOESTOPPEDWORKING 64 -#define STRINGID_PKMNISCONFUSED 65 -#define STRINGID_PKMNHEALEDCONFUSION 66 -#define STRINGID_PKMNWASCONFUSED 67 -#define STRINGID_PKMNALREADYCONFUSED 68 -#define STRINGID_PKMNFELLINLOVE 69 -#define STRINGID_PKMNINLOVE 70 -#define STRINGID_PKMNIMMOBILIZEDBYLOVE 71 -#define STRINGID_PKMNBLOWNAWAY 72 -#define STRINGID_PKMNCHANGEDTYPE 73 -#define STRINGID_PKMNFLINCHED 74 -#define STRINGID_PKMNREGAINEDHEALTH 75 -#define STRINGID_PKMNHPFULL 76 -#define STRINGID_PKMNRAISEDSPDEF 77 -#define STRINGID_PKMNRAISEDDEF 78 -#define STRINGID_PKMNCOVEREDBYVEIL 79 -#define STRINGID_PKMNUSEDSAFEGUARD 80 -#define STRINGID_PKMNSAFEGUARDEXPIRED 81 -#define STRINGID_PKMNWENTTOSLEEP 82 -#define STRINGID_PKMNSLEPTHEALTHY 83 -#define STRINGID_PKMNWHIPPEDWHIRLWIND 84 -#define STRINGID_PKMNTOOKSUNLIGHT 85 -#define STRINGID_PKMNLOWEREDHEAD 86 -#define STRINGID_PKMNISGLOWING 87 -#define STRINGID_PKMNFLEWHIGH 88 -#define STRINGID_PKMNDUGHOLE 89 -#define STRINGID_PKMNSQUEEZEDBYBIND 90 -#define STRINGID_PKMNTRAPPEDINVORTEX 91 -#define STRINGID_PKMNWRAPPEDBY 92 -#define STRINGID_PKMNCLAMPED 93 -#define STRINGID_PKMNHURTBY 94 -#define STRINGID_PKMNFREEDFROM 95 -#define STRINGID_PKMNCRASHED 96 -#define STRINGID_PKMNSHROUDEDINMIST 97 -#define STRINGID_PKMNPROTECTEDBYMIST 98 -#define STRINGID_PKMNGETTINGPUMPED 99 -#define STRINGID_PKMNHITWITHRECOIL 100 -#define STRINGID_PKMNPROTECTEDITSELF2 101 -#define STRINGID_PKMNBUFFETEDBYSANDSTORM 102 -#define STRINGID_PKMNPELTEDBYHAIL 103 -#define STRINGID_PKMNSEEDED 104 -#define STRINGID_PKMNEVADEDATTACK 105 -#define STRINGID_PKMNSAPPEDBYLEECHSEED 106 -#define STRINGID_PKMNFASTASLEEP 107 -#define STRINGID_PKMNWOKEUP 108 -#define STRINGID_PKMNUPROARKEPTAWAKE 109 -#define STRINGID_PKMNWOKEUPINUPROAR 110 -#define STRINGID_PKMNCAUSEDUPROAR 111 -#define STRINGID_PKMNMAKINGUPROAR 112 -#define STRINGID_PKMNCALMEDDOWN 113 -#define STRINGID_PKMNCANTSLEEPINUPROAR 114 -#define STRINGID_PKMNSTOCKPILED 115 -#define STRINGID_PKMNCANTSTOCKPILE 116 -#define STRINGID_PKMNCANTSLEEPINUPROAR2 117 -#define STRINGID_UPROARKEPTPKMNAWAKE 118 -#define STRINGID_PKMNSTAYEDAWAKEUSING 119 -#define STRINGID_PKMNSTORINGENERGY 120 -#define STRINGID_PKMNUNLEASHEDENERGY 121 -#define STRINGID_PKMNFATIGUECONFUSION 122 -#define STRINGID_PLAYERPICKEDUPMONEY 123 -#define STRINGID_PKMNUNAFFECTED 124 -#define STRINGID_PKMNTRANSFORMEDINTO 125 -#define STRINGID_PKMNMADESUBSTITUTE 126 -#define STRINGID_PKMNHASSUBSTITUTE 127 -#define STRINGID_SUBSTITUTEDAMAGED 128 -#define STRINGID_PKMNSUBSTITUTEFADED 129 -#define STRINGID_PKMNMUSTRECHARGE 130 -#define STRINGID_PKMNRAGEBUILDING 131 -#define STRINGID_PKMNMOVEWASDISABLED 132 -#define STRINGID_PKMNMOVEISDISABLED 133 -#define STRINGID_PKMNMOVEDISABLEDNOMORE 134 -#define STRINGID_PKMNGOTENCORE 135 -#define STRINGID_PKMNENCOREENDED 136 -#define STRINGID_PKMNTOOKAIM 137 -#define STRINGID_PKMNSKETCHEDMOVE 138 -#define STRINGID_PKMNTRYINGTOTAKEFOE 139 -#define STRINGID_PKMNTOOKFOE 140 -#define STRINGID_PKMNREDUCEDPP 141 -#define STRINGID_PKMNSTOLEITEM 142 -#define STRINGID_TARGETCANTESCAPENOW 143 -#define STRINGID_PKMNFELLINTONIGHTMARE 144 -#define STRINGID_PKMNLOCKEDINNIGHTMARE 145 -#define STRINGID_PKMNLAIDCURSE 146 -#define STRINGID_PKMNAFFLICTEDBYCURSE 147 -#define STRINGID_SPIKESSCATTERED 148 -#define STRINGID_PKMNHURTBYSPIKES 149 -#define STRINGID_PKMNIDENTIFIED 150 -#define STRINGID_PKMNPERISHCOUNTFELL 151 -#define STRINGID_PKMNBRACEDITSELF 152 -#define STRINGID_PKMNENDUREDHIT 153 -#define STRINGID_MAGNITUDESTRENGTH 154 -#define STRINGID_PKMNCUTHPMAXEDATTACK 155 -#define STRINGID_PKMNCOPIEDSTATCHANGES 156 -#define STRINGID_PKMNGOTFREE 157 -#define STRINGID_PKMNSHEDLEECHSEED 158 -#define STRINGID_PKMNBLEWAWAYSPIKES 159 -#define STRINGID_PKMNFLEDFROMBATTLE 160 -#define STRINGID_PKMNFORESAWATTACK 161 -#define STRINGID_PKMNTOOKATTACK 162 -#define STRINGID_PKMNATTACK 163 -#define STRINGID_PKMNCENTERATTENTION 164 -#define STRINGID_PKMNCHARGINGPOWER 165 -#define STRINGID_NATUREPOWERTURNEDINTO 166 -#define STRINGID_PKMNSTATUSNORMAL 167 -#define STRINGID_PKMNHASNOMOVESLEFT 168 -#define STRINGID_PKMNSUBJECTEDTOTORMENT 169 -#define STRINGID_PKMNCANTUSEMOVETORMENT 170 -#define STRINGID_PKMNTIGHTENINGFOCUS 171 -#define STRINGID_PKMNFELLFORTAUNT 172 -#define STRINGID_PKMNCANTUSEMOVETAUNT 173 -#define STRINGID_PKMNREADYTOHELP 174 -#define STRINGID_PKMNSWITCHEDITEMS 175 -#define STRINGID_PKMNCOPIEDFOE 176 -#define STRINGID_PKMNMADEWISH 177 -#define STRINGID_PKMNWISHCAMETRUE 178 -#define STRINGID_PKMNPLANTEDROOTS 179 -#define STRINGID_PKMNABSORBEDNUTRIENTS 180 -#define STRINGID_PKMNANCHOREDITSELF 181 -#define STRINGID_PKMNWASMADEDROWSY 182 -#define STRINGID_PKMNKNOCKEDOFF 183 -#define STRINGID_PKMNSWAPPEDABILITIES 184 -#define STRINGID_PKMNSEALEDOPPONENTMOVE 185 -#define STRINGID_PKMNCANTUSEMOVESEALED 186 -#define STRINGID_PKMNWANTSGRUDGE 187 -#define STRINGID_PKMNLOSTPPGRUDGE 188 -#define STRINGID_PKMNSHROUDEDITSELF 189 -#define STRINGID_PKMNMOVEBOUNCED 190 -#define STRINGID_PKMNWAITSFORTARGET 191 -#define STRINGID_PKMNSNATCHEDMOVE 192 -#define STRINGID_PKMNMADEITRAIN 193 -#define STRINGID_PKMNRAISEDSPEED 194 -#define STRINGID_PKMNPROTECTEDBY 195 -#define STRINGID_PKMNPREVENTSUSAGE 196 -#define STRINGID_PKMNRESTOREDHPUSING 197 -#define STRINGID_PKMNCHANGEDTYPEWITH 198 -#define STRINGID_PKMNPREVENTSPARALYSISWITH 199 -#define STRINGID_PKMNPREVENTSROMANCEWITH 200 -#define STRINGID_PKMNPREVENTSPOISONINGWITH 201 -#define STRINGID_PKMNPREVENTSCONFUSIONWITH 202 -#define STRINGID_PKMNRAISEDFIREPOWERWITH 203 -#define STRINGID_PKMNANCHORSITSELFWITH 204 -#define STRINGID_PKMNCUTSATTACKWITH 205 -#define STRINGID_PKMNPREVENTSSTATLOSSWITH 206 -#define STRINGID_PKMNHURTSWITH 207 -#define STRINGID_PKMNTRACED 208 -#define STRINGID_STATSHARPLY 209 -#define STRINGID_STATROSE 210 -#define STRINGID_STATHARSHLY 211 -#define STRINGID_STATFELL 212 -#define STRINGID_ATTACKERSSTATROSE 213 -#define STRINGID_DEFENDERSSTATROSE 214 -#define STRINGID_ATTACKERSSTATFELL 215 -#define STRINGID_DEFENDERSSTATFELL 216 -#define STRINGID_CRITICALHIT 217 -#define STRINGID_ONEHITKO 218 -#define STRINGID_123POOF 219 -#define STRINGID_ANDELLIPSIS 220 -#define STRINGID_NOTVERYEFFECTIVE 221 -#define STRINGID_SUPEREFFECTIVE 222 -#define STRINGID_GOTAWAYSAFELY 223 -#define STRINGID_WILDPKMNFLED 224 -#define STRINGID_NORUNNINGFROMTRAINERS 225 -#define STRINGID_CANTESCAPE 226 -#define STRINGID_DONTLEAVEBIRCH 227 -#define STRINGID_BUTNOTHINGHAPPENED 228 -#define STRINGID_BUTITFAILED 229 -#define STRINGID_ITHURTCONFUSION 230 -#define STRINGID_MIRRORMOVEFAILED 231 -#define STRINGID_STARTEDTORAIN 232 -#define STRINGID_DOWNPOURSTARTED 233 -#define STRINGID_RAINCONTINUES 234 -#define STRINGID_DOWNPOURCONTINUES 235 -#define STRINGID_RAINSTOPPED 236 -#define STRINGID_SANDSTORMBREWED 237 -#define STRINGID_SANDSTORMRAGES 238 -#define STRINGID_SANDSTORMSUBSIDED 239 -#define STRINGID_SUNLIGHTGOTBRIGHT 240 -#define STRINGID_SUNLIGHTSTRONG 241 -#define STRINGID_SUNLIGHTFADED 242 -#define STRINGID_STARTEDHAIL 243 -#define STRINGID_HAILCONTINUES 244 -#define STRINGID_HAILSTOPPED 245 -#define STRINGID_FAILEDTOSPITUP 246 -#define STRINGID_FAILEDTOSWALLOW 247 -#define STRINGID_WINDBECAMEHEATWAVE 248 -#define STRINGID_STATCHANGESGONE 249 -#define STRINGID_COINSSCATTERED 250 -#define STRINGID_TOOWEAKFORSUBSTITUTE 251 -#define STRINGID_SHAREDPAIN 252 -#define STRINGID_BELLCHIMED 253 -#define STRINGID_FAINTINTHREE 254 -#define STRINGID_NOPPLEFT 255 -#define STRINGID_BUTNOPPLEFT 256 -#define STRINGID_PLAYERUSEDITEM 257 -#define STRINGID_WALLYUSEDITEM 258 -#define STRINGID_TRAINERBLOCKEDBALL 259 -#define STRINGID_DONTBEATHIEF 260 -#define STRINGID_ITDODGEDBALL 261 -#define STRINGID_YOUMISSEDPKMN 262 -#define STRINGID_PKMNBROKEFREE 263 -#define STRINGID_ITAPPEAREDCAUGHT 264 -#define STRINGID_AARGHALMOSTHADIT 265 -#define STRINGID_SHOOTSOCLOSE 266 -#define STRINGID_GOTCHAPKMNCAUGHT 267 -#define STRINGID_GOTCHAPKMNCAUGHT2 268 -#define STRINGID_GIVENICKNAMECAPTURED 269 -#define STRINGID_PKMNSENTTOPC 270 -#define STRINGID_PKMNDATAADDEDTODEX 271 -#define STRINGID_ITISRAINING 272 -#define STRINGID_SANDSTORMISRAGING 273 -#define STRINGID_CANTESCAPE2 274 -#define STRINGID_PKMNIGNORESASLEEP 275 -#define STRINGID_PKMNIGNOREDORDERS 276 -#define STRINGID_PKMNBEGANTONAP 277 -#define STRINGID_PKMNLOAFING 278 -#define STRINGID_PKMNWONTOBEY 279 -#define STRINGID_PKMNTURNEDAWAY 280 -#define STRINGID_PKMNPRETENDNOTNOTICE 281 -#define STRINGID_ENEMYABOUTTOSWITCHPKMN 282 -#define STRINGID_CREPTCLOSER 283 -#define STRINGID_CANTGETCLOSER 284 -#define STRINGID_PKMNWATCHINGCAREFULLY 285 -#define STRINGID_PKMNCURIOUSABOUTX 286 -#define STRINGID_PKMNENTHRALLEDBYX 287 -#define STRINGID_PKMNIGNOREDX 288 -#define STRINGID_THREWPOKEBLOCKATPKMN 289 -#define STRINGID_OUTOFSAFARIBALLS 290 -#define STRINGID_PKMNSITEMCUREDPARALYSIS 291 -#define STRINGID_PKMNSITEMCUREDPOISON 292 -#define STRINGID_PKMNSITEMHEALEDBURN 293 -#define STRINGID_PKMNSITEMDEFROSTEDIT 294 -#define STRINGID_PKMNSITEMWOKEIT 295 -#define STRINGID_PKMNSITEMSNAPPEDOUT 296 -#define STRINGID_PKMNSITEMCUREDPROBLEM 297 -#define STRINGID_PKMNSITEMRESTOREDHEALTH 298 -#define STRINGID_PKMNSITEMRESTOREDPP 299 -#define STRINGID_PKMNSITEMRESTOREDSTATUS 300 -#define STRINGID_PKMNSITEMRESTOREDHPALITTLE 301 -#define STRINGID_ITEMALLOWSONLYYMOVE 302 -#define STRINGID_PKMNHUNGONWITHX 303 -#define STRINGID_EMPTYSTRING3 304 -#define STRINGID_PKMNSXPREVENTSBURNS 305 -#define STRINGID_PKMNSXBLOCKSY 306 -#define STRINGID_PKMNSXRESTOREDHPALITTLE2 307 -#define STRINGID_PKMNSXWHIPPEDUPSANDSTORM 308 -#define STRINGID_PKMNSXPREVENTSYLOSS 309 -#define STRINGID_PKMNSXINFATUATEDY 310 -#define STRINGID_PKMNSXMADEYINEFFECTIVE 311 -#define STRINGID_PKMNSXCUREDYPROBLEM 312 -#define STRINGID_ITSUCKEDLIQUIDOOZE 313 -#define STRINGID_PKMNTRANSFORMED 314 -#define STRINGID_ELECTRICITYWEAKENED 315 -#define STRINGID_FIREWEAKENED 316 -#define STRINGID_PKMNHIDUNDERWATER 317 -#define STRINGID_PKMNSPRANGUP 318 -#define STRINGID_HMMOVESCANTBEFORGOTTEN 319 -#define STRINGID_XFOUNDONEY 320 -#define STRINGID_PLAYERDEFEATEDTRAINER1 321 -#define STRINGID_SOOTHINGAROMA 322 -#define STRINGID_ITEMSCANTBEUSEDNOW 323 -#define STRINGID_FORXCOMMAYZ 324 -#define STRINGID_USINGITEMSTATOFPKMNROSE 325 -#define STRINGID_PKMNUSEDXTOGETPUMPED 326 -#define STRINGID_PKMNSXMADEYUSELESS 327 -#define STRINGID_PKMNTRAPPEDBYSANDTOMB 328 -#define STRINGID_EMPTYSTRING4 329 -#define STRINGID_ABOOSTED 330 -#define STRINGID_PKMNSXINTENSIFIEDSUN 331 -#define STRINGID_PKMNMAKESGROUNDMISS 332 -#define STRINGID_YOUTHROWABALLNOWRIGHT 333 -#define STRINGID_PKMNSXTOOKATTACK 334 -#define STRINGID_PKMNCHOSEXASDESTINY 335 -#define STRINGID_PKMNLOSTFOCUS 336 -#define STRINGID_USENEXTPKMN 337 -#define STRINGID_PKMNFLEDUSINGITS 338 -#define STRINGID_PKMNFLEDUSING 339 -#define STRINGID_PKMNWASDRAGGEDOUT 340 -#define STRINGID_PREVENTEDFROMWORKING 341 -#define STRINGID_PKMNSITEMNORMALIZEDSTATUS 342 -#define STRINGID_TRAINER1USEDITEM 343 -#define STRINGID_BOXISFULL 344 -#define STRINGID_PKMNAVOIDEDATTACK 345 -#define STRINGID_PKMNSXMADEITINEFFECTIVE 346 -#define STRINGID_PKMNSXPREVENTSFLINCHING 347 -#define STRINGID_PKMNALREADYHASBURN 348 -#define STRINGID_STATSWONTDECREASE2 349 -#define STRINGID_PKMNSXBLOCKSY2 350 -#define STRINGID_PKMNSXWOREOFF 351 -#define STRINGID_PKMNRAISEDDEFALITTLE 352 -#define STRINGID_PKMNRAISEDSPDEFALITTLE 353 -#define STRINGID_THEWALLSHATTERED 354 -#define STRINGID_PKMNSXPREVENTSYSZ 355 -#define STRINGID_PKMNSXCUREDITSYPROBLEM 356 -#define STRINGID_ATTACKERCANTESCAPE 357 -#define STRINGID_PKMNOBTAINEDX 358 -#define STRINGID_PKMNOBTAINEDX2 359 -#define STRINGID_PKMNOBTAINEDXYOBTAINEDZ 360 -#define STRINGID_BUTNOEFFECT 361 -#define STRINGID_PKMNSXHADNOEFFECTONY 362 -#define STRINGID_TWOENEMIESDEFEATED 363 -#define STRINGID_TRAINER2LOSETEXT 364 -#define STRINGID_PKMNINCAPABLEOFPOWER 365 -#define STRINGID_GLINTAPPEARSINEYE 366 -#define STRINGID_PKMNGETTINGINTOPOSITION 367 -#define STRINGID_PKMNBEGANGROWLINGDEEPLY 368 -#define STRINGID_PKMNEAGERFORMORE 369 -#define STRINGID_DEFEATEDOPPONENTBYREFEREE 370 -#define STRINGID_LOSTTOOPPONENTBYREFEREE 371 -#define STRINGID_TIEDOPPONENTBYREFEREE 372 -#define STRINGID_QUESTIONFORFEITMATCH 373 -#define STRINGID_FORFEITEDMATCH 374 -#define STRINGID_PKMNTRANSFERREDSOMEONESPC 375 -#define STRINGID_PKMNTRANSFERREDLANETTESPC 376 -#define STRINGID_PKMNBOXSOMEONESPCFULL 377 -#define STRINGID_PKMNBOXLANETTESPCFULL 378 -#define STRINGID_TRAINER1WINTEXT 379 -#define STRINGID_TRAINER2WINTEXT 380 +#define STRINGID_TRAINER1LOSETEXT 12 +#define STRINGID_PKMNGAINEDEXP 13 +#define STRINGID_PKMNGREWTOLV 14 +#define STRINGID_PKMNLEARNEDMOVE 15 +#define STRINGID_TRYTOLEARNMOVE1 16 +#define STRINGID_TRYTOLEARNMOVE2 17 +#define STRINGID_TRYTOLEARNMOVE3 18 +#define STRINGID_PKMNFORGOTMOVE 19 +#define STRINGID_STOPLEARNINGMOVE 20 +#define STRINGID_DIDNOTLEARNMOVE 21 +#define STRINGID_PKMNLEARNEDMOVE2 22 +#define STRINGID_ATTACKMISSED 23 +#define STRINGID_PKMNPROTECTEDITSELF 24 +#define STRINGID_STATSWONTINCREASE2 25 +#define STRINGID_AVOIDEDDAMAGE 26 +#define STRINGID_ITDOESNTAFFECT 27 +#define STRINGID_ATTACKERFAINTED 28 +#define STRINGID_TARGETFAINTED 29 +#define STRINGID_PLAYERGOTMONEY 30 +#define STRINGID_PLAYERWHITEOUT 31 +#define STRINGID_PLAYERWHITEOUT2 32 +#define STRINGID_PREVENTSESCAPE 33 +#define STRINGID_HITXTIMES 34 +#define STRINGID_PKMNFELLASLEEP 35 +#define STRINGID_PKMNMADESLEEP 36 +#define STRINGID_PKMNALREADYASLEEP 37 +#define STRINGID_PKMNALREADYASLEEP2 38 +#define STRINGID_PKMNWASNTAFFECTED 39 +#define STRINGID_PKMNWASPOISONED 40 +#define STRINGID_PKMNPOISONEDBY 41 +#define STRINGID_PKMNHURTBYPOISON 42 +#define STRINGID_PKMNALREADYPOISONED 43 +#define STRINGID_PKMNBADLYPOISONED 44 +#define STRINGID_PKMNENERGYDRAINED 45 +#define STRINGID_PKMNWASBURNED 46 +#define STRINGID_PKMNBURNEDBY 47 +#define STRINGID_PKMNHURTBYBURN 48 +#define STRINGID_PKMNWASFROZEN 49 +#define STRINGID_PKMNFROZENBY 50 +#define STRINGID_PKMNISFROZEN 51 +#define STRINGID_PKMNWASDEFROSTED 52 +#define STRINGID_PKMNWASDEFROSTED2 53 +#define STRINGID_PKMNWASDEFROSTEDBY 54 +#define STRINGID_PKMNWASPARALYZED 55 +#define STRINGID_PKMNWASPARALYZEDBY 56 +#define STRINGID_PKMNISPARALYZED 57 +#define STRINGID_PKMNISALREADYPARALYZED 58 +#define STRINGID_PKMNHEALEDPARALYSIS 59 +#define STRINGID_PKMNDREAMEATEN 60 +#define STRINGID_STATSWONTINCREASE 61 +#define STRINGID_STATSWONTDECREASE 62 +#define STRINGID_TEAMSTOPPEDWORKING 63 +#define STRINGID_FOESTOPPEDWORKING 64 +#define STRINGID_PKMNISCONFUSED 65 +#define STRINGID_PKMNHEALEDCONFUSION 66 +#define STRINGID_PKMNWASCONFUSED 67 +#define STRINGID_PKMNALREADYCONFUSED 68 +#define STRINGID_PKMNFELLINLOVE 69 +#define STRINGID_PKMNINLOVE 70 +#define STRINGID_PKMNIMMOBILIZEDBYLOVE 71 +#define STRINGID_PKMNBLOWNAWAY 72 +#define STRINGID_PKMNCHANGEDTYPE 73 +#define STRINGID_PKMNFLINCHED 74 +#define STRINGID_PKMNREGAINEDHEALTH 75 +#define STRINGID_PKMNHPFULL 76 +#define STRINGID_PKMNRAISEDSPDEF 77 +#define STRINGID_PKMNRAISEDDEF 78 +#define STRINGID_PKMNCOVEREDBYVEIL 79 +#define STRINGID_PKMNUSEDSAFEGUARD 80 +#define STRINGID_PKMNSAFEGUARDEXPIRED 81 +#define STRINGID_PKMNWENTTOSLEEP 82 +#define STRINGID_PKMNSLEPTHEALTHY 83 +#define STRINGID_PKMNWHIPPEDWHIRLWIND 84 +#define STRINGID_PKMNTOOKSUNLIGHT 85 +#define STRINGID_PKMNLOWEREDHEAD 86 +#define STRINGID_PKMNISGLOWING 87 +#define STRINGID_PKMNFLEWHIGH 88 +#define STRINGID_PKMNDUGHOLE 89 +#define STRINGID_PKMNSQUEEZEDBYBIND 90 +#define STRINGID_PKMNTRAPPEDINVORTEX 91 +#define STRINGID_PKMNWRAPPEDBY 92 +#define STRINGID_PKMNCLAMPED 93 +#define STRINGID_PKMNHURTBY 94 +#define STRINGID_PKMNFREEDFROM 95 +#define STRINGID_PKMNCRASHED 96 +#define STRINGID_PKMNSHROUDEDINMIST 97 +#define STRINGID_PKMNPROTECTEDBYMIST 98 +#define STRINGID_PKMNGETTINGPUMPED 99 +#define STRINGID_PKMNHITWITHRECOIL 100 +#define STRINGID_PKMNPROTECTEDITSELF2 101 +#define STRINGID_PKMNBUFFETEDBYSANDSTORM 102 +#define STRINGID_PKMNPELTEDBYHAIL 103 +#define STRINGID_PKMNSEEDED 104 +#define STRINGID_PKMNEVADEDATTACK 105 +#define STRINGID_PKMNSAPPEDBYLEECHSEED 106 +#define STRINGID_PKMNFASTASLEEP 107 +#define STRINGID_PKMNWOKEUP 108 +#define STRINGID_PKMNUPROARKEPTAWAKE 109 +#define STRINGID_PKMNWOKEUPINUPROAR 110 +#define STRINGID_PKMNCAUSEDUPROAR 111 +#define STRINGID_PKMNMAKINGUPROAR 112 +#define STRINGID_PKMNCALMEDDOWN 113 +#define STRINGID_PKMNCANTSLEEPINUPROAR 114 +#define STRINGID_PKMNSTOCKPILED 115 +#define STRINGID_PKMNCANTSTOCKPILE 116 +#define STRINGID_PKMNCANTSLEEPINUPROAR2 117 +#define STRINGID_UPROARKEPTPKMNAWAKE 118 +#define STRINGID_PKMNSTAYEDAWAKEUSING 119 +#define STRINGID_PKMNSTORINGENERGY 120 +#define STRINGID_PKMNUNLEASHEDENERGY 121 +#define STRINGID_PKMNFATIGUECONFUSION 122 +#define STRINGID_PLAYERPICKEDUPMONEY 123 +#define STRINGID_PKMNUNAFFECTED 124 +#define STRINGID_PKMNTRANSFORMEDINTO 125 +#define STRINGID_PKMNMADESUBSTITUTE 126 +#define STRINGID_PKMNHASSUBSTITUTE 127 +#define STRINGID_SUBSTITUTEDAMAGED 128 +#define STRINGID_PKMNSUBSTITUTEFADED 129 +#define STRINGID_PKMNMUSTRECHARGE 130 +#define STRINGID_PKMNRAGEBUILDING 131 +#define STRINGID_PKMNMOVEWASDISABLED 132 +#define STRINGID_PKMNMOVEISDISABLED 133 +#define STRINGID_PKMNMOVEDISABLEDNOMORE 134 +#define STRINGID_PKMNGOTENCORE 135 +#define STRINGID_PKMNENCOREENDED 136 +#define STRINGID_PKMNTOOKAIM 137 +#define STRINGID_PKMNSKETCHEDMOVE 138 +#define STRINGID_PKMNTRYINGTOTAKEFOE 139 +#define STRINGID_PKMNTOOKFOE 140 +#define STRINGID_PKMNREDUCEDPP 141 +#define STRINGID_PKMNSTOLEITEM 142 +#define STRINGID_TARGETCANTESCAPENOW 143 +#define STRINGID_PKMNFELLINTONIGHTMARE 144 +#define STRINGID_PKMNLOCKEDINNIGHTMARE 145 +#define STRINGID_PKMNLAIDCURSE 146 +#define STRINGID_PKMNAFFLICTEDBYCURSE 147 +#define STRINGID_SPIKESSCATTERED 148 +#define STRINGID_PKMNHURTBYSPIKES 149 +#define STRINGID_PKMNIDENTIFIED 150 +#define STRINGID_PKMNPERISHCOUNTFELL 151 +#define STRINGID_PKMNBRACEDITSELF 152 +#define STRINGID_PKMNENDUREDHIT 153 +#define STRINGID_MAGNITUDESTRENGTH 154 +#define STRINGID_PKMNCUTHPMAXEDATTACK 155 +#define STRINGID_PKMNCOPIEDSTATCHANGES 156 +#define STRINGID_PKMNGOTFREE 157 +#define STRINGID_PKMNSHEDLEECHSEED 158 +#define STRINGID_PKMNBLEWAWAYSPIKES 159 +#define STRINGID_PKMNFLEDFROMBATTLE 160 +#define STRINGID_PKMNFORESAWATTACK 161 +#define STRINGID_PKMNTOOKATTACK 162 +#define STRINGID_PKMNATTACK 163 +#define STRINGID_PKMNCENTERATTENTION 164 +#define STRINGID_PKMNCHARGINGPOWER 165 +#define STRINGID_NATUREPOWERTURNEDINTO 166 +#define STRINGID_PKMNSTATUSNORMAL 167 +#define STRINGID_PKMNHASNOMOVESLEFT 168 +#define STRINGID_PKMNSUBJECTEDTOTORMENT 169 +#define STRINGID_PKMNCANTUSEMOVETORMENT 170 +#define STRINGID_PKMNTIGHTENINGFOCUS 171 +#define STRINGID_PKMNFELLFORTAUNT 172 +#define STRINGID_PKMNCANTUSEMOVETAUNT 173 +#define STRINGID_PKMNREADYTOHELP 174 +#define STRINGID_PKMNSWITCHEDITEMS 175 +#define STRINGID_PKMNCOPIEDFOE 176 +#define STRINGID_PKMNMADEWISH 177 +#define STRINGID_PKMNWISHCAMETRUE 178 +#define STRINGID_PKMNPLANTEDROOTS 179 +#define STRINGID_PKMNABSORBEDNUTRIENTS 180 +#define STRINGID_PKMNANCHOREDITSELF 181 +#define STRINGID_PKMNWASMADEDROWSY 182 +#define STRINGID_PKMNKNOCKEDOFF 183 +#define STRINGID_PKMNSWAPPEDABILITIES 184 +#define STRINGID_PKMNSEALEDOPPONENTMOVE 185 +#define STRINGID_PKMNCANTUSEMOVESEALED 186 +#define STRINGID_PKMNWANTSGRUDGE 187 +#define STRINGID_PKMNLOSTPPGRUDGE 188 +#define STRINGID_PKMNSHROUDEDITSELF 189 +#define STRINGID_PKMNMOVEBOUNCED 190 +#define STRINGID_PKMNWAITSFORTARGET 191 +#define STRINGID_PKMNSNATCHEDMOVE 192 +#define STRINGID_PKMNMADEITRAIN 193 +#define STRINGID_PKMNRAISEDSPEED 194 +#define STRINGID_PKMNPROTECTEDBY 195 +#define STRINGID_PKMNPREVENTSUSAGE 196 +#define STRINGID_PKMNRESTOREDHPUSING 197 +#define STRINGID_PKMNCHANGEDTYPEWITH 198 +#define STRINGID_PKMNPREVENTSPARALYSISWITH 199 +#define STRINGID_PKMNPREVENTSROMANCEWITH 200 +#define STRINGID_PKMNPREVENTSPOISONINGWITH 201 +#define STRINGID_PKMNPREVENTSCONFUSIONWITH 202 +#define STRINGID_PKMNRAISEDFIREPOWERWITH 203 +#define STRINGID_PKMNANCHORSITSELFWITH 204 +#define STRINGID_PKMNCUTSATTACKWITH 205 +#define STRINGID_PKMNPREVENTSSTATLOSSWITH 206 +#define STRINGID_PKMNHURTSWITH 207 +#define STRINGID_PKMNTRACED 208 +#define STRINGID_STATSHARPLY 209 +#define STRINGID_STATROSE 210 +#define STRINGID_STATHARSHLY 211 +#define STRINGID_STATFELL 212 +#define STRINGID_ATTACKERSSTATROSE 213 +#define STRINGID_DEFENDERSSTATROSE 214 +#define STRINGID_ATTACKERSSTATFELL 215 +#define STRINGID_DEFENDERSSTATFELL 216 +#define STRINGID_CRITICALHIT 217 +#define STRINGID_ONEHITKO 218 +#define STRINGID_123POOF 219 +#define STRINGID_ANDELLIPSIS 220 +#define STRINGID_NOTVERYEFFECTIVE 221 +#define STRINGID_SUPEREFFECTIVE 222 +#define STRINGID_GOTAWAYSAFELY 223 +#define STRINGID_WILDPKMNFLED 224 +#define STRINGID_NORUNNINGFROMTRAINERS 225 +#define STRINGID_CANTESCAPE 226 +#define STRINGID_DONTLEAVEBIRCH 227 +#define STRINGID_BUTNOTHINGHAPPENED 228 +#define STRINGID_BUTITFAILED 229 +#define STRINGID_ITHURTCONFUSION 230 +#define STRINGID_MIRRORMOVEFAILED 231 +#define STRINGID_STARTEDTORAIN 232 +#define STRINGID_DOWNPOURSTARTED 233 +#define STRINGID_RAINCONTINUES 234 +#define STRINGID_DOWNPOURCONTINUES 235 +#define STRINGID_RAINSTOPPED 236 +#define STRINGID_SANDSTORMBREWED 237 +#define STRINGID_SANDSTORMRAGES 238 +#define STRINGID_SANDSTORMSUBSIDED 239 +#define STRINGID_SUNLIGHTGOTBRIGHT 240 +#define STRINGID_SUNLIGHTSTRONG 241 +#define STRINGID_SUNLIGHTFADED 242 +#define STRINGID_STARTEDHAIL 243 +#define STRINGID_HAILCONTINUES 244 +#define STRINGID_HAILSTOPPED 245 +#define STRINGID_FAILEDTOSPITUP 246 +#define STRINGID_FAILEDTOSWALLOW 247 +#define STRINGID_WINDBECAMEHEATWAVE 248 +#define STRINGID_STATCHANGESGONE 249 +#define STRINGID_COINSSCATTERED 250 +#define STRINGID_TOOWEAKFORSUBSTITUTE 251 +#define STRINGID_SHAREDPAIN 252 +#define STRINGID_BELLCHIMED 253 +#define STRINGID_FAINTINTHREE 254 +#define STRINGID_NOPPLEFT 255 +#define STRINGID_BUTNOPPLEFT 256 +#define STRINGID_PLAYERUSEDITEM 257 +#define STRINGID_WALLYUSEDITEM 258 +#define STRINGID_TRAINERBLOCKEDBALL 259 +#define STRINGID_DONTBEATHIEF 260 +#define STRINGID_ITDODGEDBALL 261 +#define STRINGID_YOUMISSEDPKMN 262 +#define STRINGID_PKMNBROKEFREE 263 +#define STRINGID_ITAPPEAREDCAUGHT 264 +#define STRINGID_AARGHALMOSTHADIT 265 +#define STRINGID_SHOOTSOCLOSE 266 +#define STRINGID_GOTCHAPKMNCAUGHT 267 +#define STRINGID_GOTCHAPKMNCAUGHT2 268 +#define STRINGID_GIVENICKNAMECAPTURED 269 +#define STRINGID_PKMNSENTTOPC 270 +#define STRINGID_PKMNDATAADDEDTODEX 271 +#define STRINGID_ITISRAINING 272 +#define STRINGID_SANDSTORMISRAGING 273 +#define STRINGID_CANTESCAPE2 274 +#define STRINGID_PKMNIGNORESASLEEP 275 +#define STRINGID_PKMNIGNOREDORDERS 276 +#define STRINGID_PKMNBEGANTONAP 277 +#define STRINGID_PKMNLOAFING 278 +#define STRINGID_PKMNWONTOBEY 279 +#define STRINGID_PKMNTURNEDAWAY 280 +#define STRINGID_PKMNPRETENDNOTNOTICE 281 +#define STRINGID_ENEMYABOUTTOSWITCHPKMN 282 +#define STRINGID_CREPTCLOSER 283 +#define STRINGID_CANTGETCLOSER 284 +#define STRINGID_PKMNWATCHINGCAREFULLY 285 +#define STRINGID_PKMNCURIOUSABOUTX 286 +#define STRINGID_PKMNENTHRALLEDBYX 287 +#define STRINGID_PKMNIGNOREDX 288 +#define STRINGID_THREWPOKEBLOCKATPKMN 289 +#define STRINGID_OUTOFSAFARIBALLS 290 +#define STRINGID_PKMNSITEMCUREDPARALYSIS 291 +#define STRINGID_PKMNSITEMCUREDPOISON 292 +#define STRINGID_PKMNSITEMHEALEDBURN 293 +#define STRINGID_PKMNSITEMDEFROSTEDIT 294 +#define STRINGID_PKMNSITEMWOKEIT 295 +#define STRINGID_PKMNSITEMSNAPPEDOUT 296 +#define STRINGID_PKMNSITEMCUREDPROBLEM 297 +#define STRINGID_PKMNSITEMRESTOREDHEALTH 298 +#define STRINGID_PKMNSITEMRESTOREDPP 299 +#define STRINGID_PKMNSITEMRESTOREDSTATUS 300 +#define STRINGID_PKMNSITEMRESTOREDHPALITTLE 301 +#define STRINGID_ITEMALLOWSONLYYMOVE 302 +#define STRINGID_PKMNHUNGONWITHX 303 +#define STRINGID_EMPTYSTRING3 304 +#define STRINGID_PKMNSXPREVENTSBURNS 305 +#define STRINGID_PKMNSXBLOCKSY 306 +#define STRINGID_PKMNSXRESTOREDHPALITTLE2 307 +#define STRINGID_PKMNSXWHIPPEDUPSANDSTORM 308 +#define STRINGID_PKMNSXPREVENTSYLOSS 309 +#define STRINGID_PKMNSXINFATUATEDY 310 +#define STRINGID_PKMNSXMADEYINEFFECTIVE 311 +#define STRINGID_PKMNSXCUREDYPROBLEM 312 +#define STRINGID_ITSUCKEDLIQUIDOOZE 313 +#define STRINGID_PKMNTRANSFORMED 314 +#define STRINGID_ELECTRICITYWEAKENED 315 +#define STRINGID_FIREWEAKENED 316 +#define STRINGID_PKMNHIDUNDERWATER 317 +#define STRINGID_PKMNSPRANGUP 318 +#define STRINGID_HMMOVESCANTBEFORGOTTEN 319 +#define STRINGID_XFOUNDONEY 320 +#define STRINGID_PLAYERDEFEATEDTRAINER1 321 +#define STRINGID_SOOTHINGAROMA 322 +#define STRINGID_ITEMSCANTBEUSEDNOW 323 +#define STRINGID_FORXCOMMAYZ 324 +#define STRINGID_USINGITEMSTATOFPKMNROSE 325 +#define STRINGID_PKMNUSEDXTOGETPUMPED 326 +#define STRINGID_PKMNSXMADEYUSELESS 327 +#define STRINGID_PKMNTRAPPEDBYSANDTOMB 328 +#define STRINGID_EMPTYSTRING4 329 +#define STRINGID_ABOOSTED 330 +#define STRINGID_PKMNSXINTENSIFIEDSUN 331 +#define STRINGID_PKMNMAKESGROUNDMISS 332 +#define STRINGID_YOUTHROWABALLNOWRIGHT 333 +#define STRINGID_PKMNSXTOOKATTACK 334 +#define STRINGID_PKMNCHOSEXASDESTINY 335 +#define STRINGID_PKMNLOSTFOCUS 336 +#define STRINGID_USENEXTPKMN 337 +#define STRINGID_PKMNFLEDUSINGITS 338 +#define STRINGID_PKMNFLEDUSING 339 +#define STRINGID_PKMNWASDRAGGEDOUT 340 +#define STRINGID_PREVENTEDFROMWORKING 341 +#define STRINGID_PKMNSITEMNORMALIZEDSTATUS 342 +#define STRINGID_TRAINER1USEDITEM 343 +#define STRINGID_BOXISFULL 344 +#define STRINGID_PKMNAVOIDEDATTACK 345 +#define STRINGID_PKMNSXMADEITINEFFECTIVE 346 +#define STRINGID_PKMNSXPREVENTSFLINCHING 347 +#define STRINGID_PKMNALREADYHASBURN 348 +#define STRINGID_STATSWONTDECREASE2 349 +#define STRINGID_PKMNSXBLOCKSY2 350 +#define STRINGID_PKMNSXWOREOFF 351 +#define STRINGID_PKMNRAISEDDEFALITTLE 352 +#define STRINGID_PKMNRAISEDSPDEFALITTLE 353 +#define STRINGID_THEWALLSHATTERED 354 +#define STRINGID_PKMNSXPREVENTSYSZ 355 +#define STRINGID_PKMNSXCUREDITSYPROBLEM 356 +#define STRINGID_ATTACKERCANTESCAPE 357 +#define STRINGID_PKMNOBTAINEDX 358 +#define STRINGID_PKMNOBTAINEDX2 359 +#define STRINGID_PKMNOBTAINEDXYOBTAINEDZ 360 +#define STRINGID_BUTNOEFFECT 361 +#define STRINGID_PKMNSXHADNOEFFECTONY 362 +#define STRINGID_TWOENEMIESDEFEATED 363 +#define STRINGID_TRAINER2LOSETEXT 364 +#define STRINGID_PKMNINCAPABLEOFPOWER 365 +#define STRINGID_GLINTAPPEARSINEYE 366 +#define STRINGID_PKMNGETTINGINTOPOSITION 367 +#define STRINGID_PKMNBEGANGROWLINGDEEPLY 368 +#define STRINGID_PKMNEAGERFORMORE 369 +#define STRINGID_DEFEATEDOPPONENTBYREFEREE 370 +#define STRINGID_LOSTTOOPPONENTBYREFEREE 371 +#define STRINGID_TIEDOPPONENTBYREFEREE 372 +#define STRINGID_QUESTIONFORFEITMATCH 373 +#define STRINGID_FORFEITEDMATCH 374 +#define STRINGID_PKMNTRANSFERREDSOMEONESPC 375 +#define STRINGID_PKMNTRANSFERREDLANETTESPC 376 +#define STRINGID_PKMNBOXSOMEONESPCFULL 377 +#define STRINGID_PKMNBOXLANETTESPCFULL 378 +#define STRINGID_TRAINER1WINTEXT 379 +#define STRINGID_TRAINER2WINTEXT 380 + +#define STRINGID_ENDUREDSTURDY 381 +#define STRINGID_POWERHERB 382 +#define STRINGID_HURTBYITEM 383 +#define STRINGID_PSNBYITEM 384 +#define STRINGID_BRNBYITEM 385 +#define STRINGID_DEFABILITYIN 386 +#define STRINGID_GRAVITYINTENSIFIED 387 +#define STRINGID_TARGETIDENTIFIED 388 +#define STRINGID_TARGETWOKEUP 389 +#define STRINGID_PKMNSTOLEANDATEITEM 390 +#define STRINGID_TAILWINDBLEW 391 +#define STRINGID_PKMNWENTBACK 392 +#define STRINGID_PKMNCANTUSEITEMSANYMORE 393 +#define STRINGID_PKMNFLUNG 394 +#define STRINGID_PKMNPREVENTEDFROMHEALING 395 +#define STRINGID_PKMNSWITCHEDATKANDDEF 396 +#define STRINGID_PKMNSABILITYSUPPRESSED 397 +#define STRINGID_SHIELDEDFROMCRITICALHITS 398 +#define STRINGID_SWITCHEDATKANDSPATK 399 +#define STRINGID_SWITCHEDDEFANDSPDEF 400 +#define STRINGID_PKMNACQUIREDABILITY 401 +#define STRINGID_POISONSPIKESSCATTERED 402 +#define STRINGID_PKMNSWITCHEDSTATCHANGES 403 +#define STRINGID_PKMNSURROUNDEDWITHVEILOFWATER 404 +#define STRINGID_PKMNLEVITATEDONELECTROMAGNETISM 405 +#define STRINGID_PKMNTWISTEDDIMENSIONS 406 +#define STRINGID_POINTEDSTONESFLOAT 407 +#define STRINGID_CLOAKEDINMYSTICALMOONLIGHT 408 +#define STRINGID_TRAPPERBYSWIRLINGMAGMA 409 +#define STRINGID_VANISHEDINSTANTLY 410 +#define STRINGID_PROTECTEDTEAM 411 +#define STRINGID_SHAREDITSGUARD 412 +#define STRINGID_SHAREDITSPOWER 413 +#define STRINGID_SWAPSDEFANDSPDEFOFALLPOKEMON 414 +#define STRINGID_BECAMENIMBLE 415 +#define STRINGID_HURLEDINTOTHEAIR 416 +#define STRINGID_HELDITEMSLOSEEFFECTS 417 +#define STRINGID_FELLSTRAIGHTDOWN 418 +#define STRINGID_TRANSFORMEDINTOWATERTYPE 419 +#define STRINGID_PKMNACQUIREDSIMPLE 420 +#define STRINGID_EMPTYSTRING5 421 +#define STRINGID_KINDOFFER 422 +#define STRINGID_RESETSTARGETSSTATLEVELS 423 +#define STRINGID_EMPTYSTRING6 424 +#define STRINGID_ALLYSWITCHPOSITION 425 +#define STRINGID_RESTORETARGETSHEALTH 426 +#define STRINGID_TOOKPJMNINTOTHESKY 427 +#define STRINGID_FREEDFROMSKYDROP 428 +#define STRINGID_POSTPONETARGETMOVE 429 +#define STRINGID_REFLECTTARGETSTYPE 430 +#define STRINGID_TRANSFERHELDITEM 431 +#define STRINGID_EMBARGOENDS 432 +#define STRINGID_ELECTROMAGNETISM 433 +#define STRINGID_BUFFERENDS 434 +#define STRINGID_TELEKINESISENDS 435 +#define STRINGID_TAILWINDENDS 436 +#define STRINGID_LUCKYCHANTENDS 437 +#define STRINGID_TRICKROOMENDS 438 +#define STRINGID_WONDERROOMENDS 439 +#define STRINGID_MAGICROOMENDS 440 +#define STRINGID_MUDSPORTENDS 441 +#define STRINGID_WATERSPORTENDS 442 +#define STRINGID_GRAVITYENDS 443 +#define STRINGID_AQUARINGHEAL 444 +#define STRINGID_AURORAVEILENDS 445 +#define STRINGID_ELECTRICTERRAINENDS 446 +#define STRINGID_MISTYTERRAINENDS 447 +#define STRINGID_PSYCHICTERRAINENDS 448 +#define STRINGID_GRASSYTERRAINENDS 449 +#define STRINGID_TARGETABILITYSTATRAISE 450 +#define STRINGID_TARGETSSTATWASMAXEDOUT 451 +#define STRINGID_ATTACKERABILITYSTATRAISE 452 +#define STRINGID_POISONHEALHPUP 453 +#define STRINGID_BADDREAMSDMG 454 +#define STRINGID_MOLDBREAKERENTERS 455 +#define STRINGID_TERAVOLTENTERS 456 +#define STRINGID_TURBOBLAZEENTERS 457 +#define STRINGID_SLOWSTARTENTERS 458 +#define STRINGID_SLOWSTARTEND 459 +#define STRINGID_SOLARPOWERHPDROP 460 +#define STRINGID_AFTERMATHDMG 461 +#define STRINGID_ANTICIPATIONACTIVATES 462 +#define STRINGID_FOREWARNACTIVATES 463 +#define STRINGID_ICEBODYHPGAIN 464 +#define STRINGID_SNOWWARNINGHAIL 465 +#define STRINGID_FRISKACTIVATES 466 +#define STRINGID_UNNERVEENTERS 467 +#define STRINGID_HARVESTBERRY 468 +#define STRINGID_LASTABILITYRAISEDSTAT 469 +#define STRINGID_MAGICBOUNCEACTIVATES 470 +#define STRINGID_PROTEANTYPECHANGE 471 +#define STRINGID_SYMBIOSISITEMPASS 472 +#define STRINGID_STEALTHROCKDMG 473 +#define STRINGID_TOXICSPIKESABSORBED 474 +#define STRINGID_TOXICSPIKESPOISONED 475 +#define STRINGID_STICKYWEBSWITCHIN 476 +#define STRINGID_HEALINGWISHCAMETRUE 477 +#define STRINGID_HEALINGWISHHEALED 478 +#define STRINGID_LUNARDANCECAMETRUE 479 +#define STRINGID_CUSEDBODYDISABLED 480 +#define STRINGID_ATTACKERACQUIREDABILITY 481 +#define STRINGID_TARGETABILITYSTATLOWER 482 +#define STRINGID_TARGETSTATWONTGOHIGHER 483 +#define STRINGID_PKMNMOVEBOUNCEDABILITY 484 +#define STRINGID_IMPOSTERTRANSFORM 485 +#define STRINGID_ASSAULTVESTDOESNTALLOW 486 +#define STRINGID_GRAVITYPREVENTSUSAGE 487 +#define STRINGID_HEALBLOCKPREVENTSUSAGE 488 +#define STRINGID_NOTDONEYET 489 +#define STRINGID_STICKYWEBUSED 490 +#define STRINGID_QUASHSUCCESS 491 +#define STRINGID_PKMNBLEWAWAYTOXICSPIKES 492 +#define STRINGID_PKMNBLEWAWAYSTICKYWEB 493 +#define STRINGID_PKMNBLEWAWAYSTEALTHROCK 494 +#define STRINGID_IONDELUGEON 495 +#define STRINGID_TOPSYTURVYSWITCHEDSTATS 496 +#define STRINGID_TERRAINBECOMESMISTY 497 +#define STRINGID_TERRAINBECOMESGRASSY 498 +#define STRINGID_TERRAINBECOMESELECTRIC 499 +#define STRINGID_TERRAINBECOMESPSYCHIC 500 +#define STRINGID_TARGETELECTRIFIED 501 +#define STRINGID_MEGAEVOREACTING 502 +#define STRINGID_MEGAEVOEVOLVED 503 +#define STRINGID_DRASTICALLY 504 +#define STRINGID_SEVERELY 505 +#define STRINGID_INFESTATION 506 +#define STRINGID_NOEFFECTONTARGET 507 +#define STRINGID_BURSTINGFLAMESHIT 508 +#define STRINGID_BESTOWITEMGIVING 509 +#define STRINGID_THIRDTYPEADDED 510 +#define STRINGID_FELLFORFEINT 511 +#define STRINGID_POKEMONCANNOTUSEMOVE 512 +#define STRINGID_COVEREDINPOWDER 513 +#define STRINGID_POWDEREXPLODES 514 +#define STRINGID_BELCHCANTSELECT 515 +#define STRINGID_SPECTRALTHIEFSTEAL 516 +#define STRINGID_GRAVITYGROUNDING 517 +#define STRINGID_MISTYTERRAINPREVENTS 518 +#define STRINGID_GRASSYTERRAINHEALS 519 +#define STRINGID_ELECTRICTERRAINPREVENTS 520 +#define STRINGID_PSYCHICTERRAINPREVENTS 521 +#define STRINGID_SAFETYGOGGLESPROTECTED 522 +#define STRINGID_FLOWERVEILPROTECTED 523 +#define STRINGID_SWEETVEILPROTECTED 524 +#define STRINGID_AROMAVEILPROTECTED 525 +#define STRINGID_CELEBRATEMESSAGE 526 +#define STRINGID_USEDINSTRUCTEDMOVE 527 +#define STRINGID_THROATCHOPENDS 528 +#define STRINGID_PKMNCANTUSEMOVETHROATCHOP 529 +#define STRINGID_LASERFOCUS 530 +#define STRINGID_GEMACTIVATES 531 +#define STRINGID_BERRYDMGREDUCES 532 +#define STRINGID_TARGETATEITEM 533 +#define STRINGID_AIRBALLOONFLOAT 534 +#define STRINGID_AIRBALLOONPOP 535 +#define STRINGID_INCINERATEBURN 536 +#define STRINGID_BUGBITE 537 +#define STRINGID_ILLUSIONWOREOFF 538 +#define STRINGID_ATTACKERCUREDTARGETSTATUS 539 +#define STRINGID_ATTACKERLOSTFIRETYPE 540 +#define STRINGID_HEALERCURE 541 +#define STRINGID_SCRIPTINGABILITYSTATRAISE 542 +#define STRINGID_RECEIVERABILITYTAKEOVER 543 +#define STRINGID_PKNMABSORBINGPOWER 544 +#define STRINGID_NOONEWILLBEABLETORUNAWAY 545 +#define STRINGID_DESTINYKNOTACTIVATES 546 +#define STRINGID_CLOAKEDINAFREEZINGLIGHT 547 +#define STRINGID_STATWASNOTLOWERED 548 +#define STRINGID_FERVENTWISHREACHED 549 +#define STRINGID_AIRLOCKACTIVATES 550 +#define STRINGID_PRESSUREENTERS 551 +#define STRINGID_DARKAURAENTERS 552 +#define STRINGID_FAIRYAURAENTERS 553 +#define STRINGID_AURABREAKENTERS 554 +#define STRINGID_COMATOSEENTERS 555 +#define STRINGID_SCREENCLEANERENTERS 556 +#define STRINGID_FETCHEDPOKEBALL 557 +#define STRINGID_BATTLERABILITYRAISEDSTAT 558 +#define STRINGID_ASANDSTORMKICKEDUP 559 +#define STRINGID_PKMNSWILLPERISHIN3TURNS 560 +#define STRINGID_ABILITYRAISEDSTATDRASTICALLY 561 +#define STRINGID_AURAFLAREDTOLIFE 562 +#define STRINGID_ASONEENTERS 563 +#define STRINGID_CURIOUSMEDICINEENTERS 564 +#define STRINGID_CANACTFASTERTHANKSTO 565 +#define STRINGID_MICLEBERRYACTIVATES 566 +#define STRINGID_PKMNSHOOKOFFTHETAUNT 567 +#define STRINGID_PKMNGOTOVERITSINFATUATION 568 +#define STRINGID_ITEMCANNOTBEREMOVED 569 +#define STRINGID_STICKYBARBTRANSFER 570 +#define STRINGID_PKMNBURNHEALED 571 +#define STRINGID_REDCARDACTIVATE 572 +#define STRINGID_EJECTBUTTONACTIVATE 573 +#define STRINGID_ATKGOTOVERINFATUATION 574 +#define STRINGID_TORMENTEDNOMORE 575 +#define STRINGID_HEALBLOCKEDNOMORE 576 +#define STRINGID_ATTACKERBECAMEFULLYCHARGED 577 +#define STRINGID_ATTACKERBECAMEASHSPECIES 578 +#define STRINGID_EXTREMELYHARSHSUNLIGHT 579 +#define STRINGID_EXTREMESUNLIGHTFADED 580 +#define STRINGID_MOVEEVAPORATEDINTHEHARSHSUNLIGHT 581 +#define STRINGID_EXTREMELYHARSHSUNLIGHTWASNOTLESSENED 582 +#define STRINGID_HEAVYRAIN 583 +#define STRINGID_HEAVYRAINLIFTED 584 +#define STRINGID_MOVEFIZZLEDOUTINTHEHEAVYRAIN 585 +#define STRINGID_NORELIEFROMHEAVYRAIN 586 +#define STRINGID_MYSTERIOUSAIRCURRENT 587 +#define STRINGID_STRONGWINDSDISSIPATED 588 +#define STRINGID_MYSTERIOUSAIRCURRENTBLOWSON 589 +#define STRINGID_ATTACKWEAKENEDBSTRONGWINDS 590 -#define STRINGID_ENDUREDSTURDY 381 -#define STRINGID_POWERHERB 382 -#define STRINGID_HURTBYITEM 383 -#define STRINGID_PSNBYITEM 384 -#define STRINGID_BRNBYITEM 385 -#define STRINGID_DEFABILITYIN 386 -#define STRINGID_GRAVITYINTENSIFIED 387 -#define STRINGID_TARGETIDENTIFIED 388 -#define STRINGID_TARGETWOKEUP 389 -#define STRINGID_PKMNSTOLEANDATEITEM 390 -#define STRINGID_TAILWINDBLEW 391 -#define STRINGID_PKMNWENTBACK 392 -#define STRINGID_PKMNCANTUSEITEMSANYMORE 393 -#define STRINGID_PKMNFLUNG 394 -#define STRINGID_PKMNPREVENTEDFROMHEALING 395 -#define STRINGID_PKMNSWITCHEDATKANDDEF 396 -#define STRINGID_PKMNSABILITYSUPPRESSED 397 -#define STRINGID_SHIELDEDFROMCRITICALHITS 398 -#define STRINGID_SWITCHEDATKANDSPATK 399 -#define STRINGID_SWITCHEDDEFANDSPDEF 400 -#define STRINGID_PKMNACQUIREDABILITY 401 -#define STRINGID_POISONSPIKESSCATTERED 402 -#define STRINGID_PKMNSWITCHEDSTATCHANGES 403 -#define STRINGID_PKMNSURROUNDEDWITHVEILOFWATER 404 -#define STRINGID_PKMNLEVITATEDONELECTROMAGNETISM 405 -#define STRINGID_PKMNTWISTEDDIMENSIONS 406 -#define STRINGID_POINTEDSTONESFLOAT 407 -#define STRINGID_CLOAKEDINMYSTICALMOONLIGHT 408 -#define STRINGID_TRAPPERBYSWIRLINGMAGMA 409 -#define STRINGID_VANISHEDINSTANTLY 410 -#define STRINGID_PROTECTEDTEAM 411 -#define STRINGID_SHAREDITSGUARD 412 -#define STRINGID_SHAREDITSPOWER 413 -#define STRINGID_SWAPSDEFANDSPDEFOFALLPOKEMON 414 -#define STRINGID_BECAMENIMBLE 415 -#define STRINGID_HURLEDINTOTHEAIR 416 -#define STRINGID_HELDITEMSLOSEEFFECTS 417 -#define STRINGID_FELLSTRAIGHTDOWN 418 -#define STRINGID_TRANSFORMEDINTOWATERTYPE 419 -#define STRINGID_PKMNACQUIREDSIMPLE 420 -#define STRINGID_EMPTYSTRING5 421 -#define STRINGID_KINDOFFER 422 -#define STRINGID_RESETSTARGETSSTATLEVELS 423 -#define STRINGID_EMPTYSTRING6 424 -#define STRINGID_ALLYSWITCHPOSITION 425 -#define STRINGID_RESTORETARGETSHEALTH 426 -#define STRINGID_TOOKPJMNINTOTHESKY 427 -#define STRINGID_FREEDFROMSKYDROP 428 -#define STRINGID_POSTPONETARGETMOVE 429 -#define STRINGID_REFLECTTARGETSTYPE 430 -#define STRINGID_TRANSFERHELDITEM 431 -#define STRINGID_EMBARGOENDS 432 -#define STRINGID_ELECTROMAGNETISM 433 -#define STRINGID_BUFFERENDS 434 -#define STRINGID_TELEKINESISENDS 435 -#define STRINGID_TAILWINDENDS 436 -#define STRINGID_LUCKYCHANTENDS 437 -#define STRINGID_TRICKROOMENDS 438 -#define STRINGID_WONDERROOMENDS 439 -#define STRINGID_MAGICROOMENDS 440 -#define STRINGID_MUDSPORTENDS 441 -#define STRINGID_WATERSPORTENDS 442 -#define STRINGID_GRAVITYENDS 443 -#define STRINGID_AQUARINGHEAL 444 -#define STRINGID_AURORAVEILENDS 445 -#define STRINGID_ELECTRICTERRAINENDS 446 -#define STRINGID_MISTYTERRAINENDS 447 -#define STRINGID_PSYCHICTERRAINENDS 448 -#define STRINGID_GRASSYTERRAINENDS 449 -#define STRINGID_TARGETABILITYSTATRAISE 450 -#define STRINGID_TARGETSSTATWASMAXEDOUT 451 -#define STRINGID_ATTACKERABILITYSTATRAISE 452 -#define STRINGID_POISONHEALHPUP 453 -#define STRINGID_BADDREAMSDMG 454 -#define STRINGID_MOLDBREAKERENTERS 455 -#define STRINGID_TERAVOLTENTERS 456 -#define STRINGID_TURBOBLAZEENTERS 457 -#define STRINGID_SLOWSTARTENTERS 458 -#define STRINGID_SLOWSTARTEND 459 -#define STRINGID_SOLARPOWERHPDROP 460 -#define STRINGID_AFTERMATHDMG 461 -#define STRINGID_ANTICIPATIONACTIVATES 462 -#define STRINGID_FOREWARNACTIVATES 463 -#define STRINGID_ICEBODYHPGAIN 464 -#define STRINGID_SNOWWARNINGHAIL 465 -#define STRINGID_FRISKACTIVATES 466 -#define STRINGID_UNNERVEENTERS 467 -#define STRINGID_HARVESTBERRY 468 -#define STRINGID_LASTABILITYRAISEDSTAT 469 -#define STRINGID_MAGICBOUNCEACTIVATES 470 -#define STRINGID_PROTEANTYPECHANGE 471 -#define STRINGID_SYMBIOSISITEMPASS 472 -#define STRINGID_STEALTHROCKDMG 473 -#define STRINGID_TOXICSPIKESABSORBED 474 -#define STRINGID_TOXICSPIKESPOISONED 475 -#define STRINGID_STICKYWEBSWITCHIN 476 -#define STRINGID_HEALINGWISHCAMETRUE 477 -#define STRINGID_HEALINGWISHHEALED 478 -#define STRINGID_LUNARDANCECAMETRUE 479 -#define STRINGID_CUSEDBODYDISABLED 480 -#define STRINGID_ATTACKERACQUIREDABILITY 481 -#define STRINGID_TARGETABILITYSTATLOWER 482 -#define STRINGID_TARGETSTATWONTGOHIGHER 483 -#define STRINGID_PKMNMOVEBOUNCEDABILITY 484 -#define STRINGID_IMPOSTERTRANSFORM 485 -#define STRINGID_ASSAULTVESTDOESNTALLOW 486 -#define STRINGID_GRAVITYPREVENTSUSAGE 487 -#define STRINGID_HEALBLOCKPREVENTSUSAGE 488 -#define STRINGID_NOTDONEYET 489 -#define STRINGID_STICKYWEBUSED 490 -#define STRINGID_QUASHSUCCESS 491 -#define STRINGID_PKMNBLEWAWAYTOXICSPIKES 492 -#define STRINGID_PKMNBLEWAWAYSTICKYWEB 493 -#define STRINGID_PKMNBLEWAWAYSTEALTHROCK 494 -#define STRINGID_IONDELUGEON 495 -#define STRINGID_TOPSYTURVYSWITCHEDSTATS 496 -#define STRINGID_TERRAINBECOMESMISTY 497 -#define STRINGID_TERRAINBECOMESGRASSY 498 -#define STRINGID_TERRAINBECOMESELECTRIC 499 -#define STRINGID_TERRAINBECOMESPSYCHIC 500 -#define STRINGID_TARGETELECTRIFIED 501 -#define STRINGID_MEGAEVOREACTING 502 -#define STRINGID_MEGAEVOEVOLVED 503 -#define STRINGID_DRASTICALLY 504 -#define STRINGID_SEVERELY 505 -#define STRINGID_INFESTATION 506 -#define STRINGID_NOEFFECTONTARGET 507 -#define STRINGID_BURSTINGFLAMESHIT 508 -#define STRINGID_BESTOWITEMGIVING 509 -#define STRINGID_THIRDTYPEADDED 510 -#define STRINGID_FELLFORFEINT 511 -#define STRINGID_POKEMONCANNOTUSEMOVE 512 -#define STRINGID_COVEREDINPOWDER 513 -#define STRINGID_POWDEREXPLODES 514 -#define STRINGID_BELCHCANTSELECT 515 -#define STRINGID_SPECTRALTHIEFSTEAL 516 -#define STRINGID_GRAVITYGROUNDING 517 -#define STRINGID_MISTYTERRAINPREVENTS 518 -#define STRINGID_GRASSYTERRAINHEALS 519 -#define STRINGID_ELECTRICTERRAINPREVENTS 520 -#define STRINGID_PSYCHICTERRAINPREVENTS 521 -#define STRINGID_SAFETYGOOGLESPROTECTED 522 -#define STRINGID_FLOWERVEILPROTECTED 523 -#define STRINGID_SWEETVEILPROTECTED 524 -#define STRINGID_AROMAVEILPROTECTED 525 -#define STRINGID_CELEBRATEMESSAGE 526 -#define STRINGID_USEDINSTRUCTEDMOVE 527 -#define STRINGID_THROATCHOPENDS 528 -#define STRINGID_PKMNCANTUSEMOVETHROATCHOP 529 -#define STRINGID_LASERFOCUS 530 -#define STRINGID_GEMACTIVATES 531 -#define STRINGID_BERRYDMGREDUCES 532 -#define STRINGID_TARGETATEITEM 533 -#define STRINGID_AIRBALLOONFLOAT 534 -#define STRINGID_AIRBALLOONPOP 535 -#define STRINGID_INCINERATEBURN 536 -#define STRINGID_BUGBITE 537 -#define STRINGID_ILLUSIONWOREOFF 538 -#define STRINGID_ATTACKERCUREDTARGETSTATUS 539 -#define STRINGID_ATTACKERLOSTFIRETYPE 540 -#define STRINGID_HEALERCURE 541 -#define STRINGID_SCRIPTINGABILITYSTATRAISE 542 -#define STRINGID_RECEIVERABILITYTAKEOVER 543 -#define STRINGID_PKNMABSORBINGPOWER 544 -#define STRINGID_NOONEWILLBEABLETORUNAWAY 545 -#define STRINGID_DESTINYKNOTACTIVATES 546 -#define STRINGID_CLOAKEDINAFREEZINGLIGHT 547 -#define STRINGID_STATWASNOTLOWERED 548 -#define STRINGID_FERVENTWISHREACHED 549 -#define STRINGID_AIRLOCKACTIVATES 550 -#define STRINGID_PRESSUREENTERS 551 -#define STRINGID_DARKAURAENTERS 552 -#define STRINGID_FAIRYAURAENTERS 553 -#define STRINGID_AURABREAKENTERS 554 -#define STRINGID_COMATOSEENTERS 555 -#define STRINGID_SCREENCLEANERENTERS 556 -#define STRINGID_FETCHEDPOKEBALL 557 -#define STRINGID_BATTLERABILITYRAISEDSTAT 558 -#define STRINGID_ASANDSTORMKICKEDUP 559 -#define STRINGID_PKMNSWILLPERISHIN3TURNS 560 -#define STRINGID_ABILITYRAISEDSTATDRASTICALLY 561 -#define STRINGID_AURAFLAREDTOLIFE 562 -#define STRINGID_ASONEENTERS 563 -#define STRINGID_CURIOUSMEDICINEENTERS 564 -#define STRINGID_CANACTFASTERTHANKSTO 565 -#define STRINGID_MICLEBERRYACTIVATES 566 -#define STRINGID_PKMNSHOOKOFFTHETAUNT 567 -#define STRINGID_PKMNGOTOVERITSINFATUATION 568 -#define STRINGID_ITEMCANNOTBEREMOVED 569 -#define STRINGID_STICKYBARBTRANSFER 570 -#define STRINGID_PKMNBURNHEALED 571 -#define STRINGID_REDCARDACTIVATE 572 -#define STRINGID_EJECTBUTTONACTIVATE 573 -#define STRINGID_ATKGOTOVERINFATUATION 574 -#define STRINGID_TORMENTEDNOMORE 575 -#define STRINGID_HEALBLOCKEDNOMORE 576 -#define STRINGID_ATTACKERBECAMEFULLYCHARGED 577 -#define STRINGID_ATTACKERBECAMEASHSPECIES 578 - -#define BATTLESTRINGS_COUNT 579 +#define BATTLESTRINGS_COUNT 591 // The below IDs are all indexes into battle message tables, // used to determine which of a set of messages to print. diff --git a/include/constants/hold_effects.h b/include/constants/hold_effects.h index 3dc4a1389..d7d74d3e1 100644 --- a/include/constants/hold_effects.h +++ b/include/constants/hold_effects.h @@ -130,7 +130,7 @@ // Gen6 hold effects #define HOLD_EFFECT_FAIRY_POWER 139 #define HOLD_EFFECT_MEGA_STONE 140 -#define HOLD_EFFECT_SAFETY_GOOGLES 141 +#define HOLD_EFFECT_SAFETY_GOGGLES 141 #define HOLD_EFFECT_LUMINOUS_MOSS 142 #define HOLD_EFFECT_SNOWBALL 143 #define HOLD_EFFECT_WEAKNESS_POLICY 144 diff --git a/include/graphics.h b/include/graphics.h index dc020c401..6139e90cf 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4697,6 +4697,7 @@ extern const u32 gBattleAnimSpritePal_MagnifyingGlass[]; extern const u32 gBattleAnimSpritePal_BrownOrb[]; extern const u32 gBattleAnimSpritePal_MetalSoundWaves[]; extern const u32 gBattleAnimSpritePal_FlyingDirt[]; +extern const u32 gBattleAnimSpritePal_Windstorm[]; extern const u32 gBattleAnimSpritePal_IcicleSpear[]; extern const u32 gBattleAnimSpritePal_Hail[]; extern const u32 gBattleAnimSpritePal_GlowyRedOrb[]; @@ -5199,6 +5200,9 @@ extern const u16 gSlotMachineReelTimePikachu_Pal[]; extern const u32 gBattleAnimBgTilemap_Sandstorm[]; extern const u32 gBattleAnimBgImage_Sandstorm[]; +extern const u32 gBattleAnimBgTilemap_Windstorm[]; +extern const u32 gBattleAnimBgImage_Windstorm[]; + // Pokedex Area Screen extern const u32 gPokedexAreaScreenAreaUnknown_Gfx[]; extern const u16 gPokedexAreaScreenAreaUnknown_Pal[]; diff --git a/include/item_use.h b/include/item_use.h index f577f8d46..42db6ff10 100644 --- a/include/item_use.h +++ b/include/item_use.h @@ -33,5 +33,6 @@ void ItemUseInBattle_EnigmaBerry(u8); void Task_UseDigEscapeRopeOnField(u8 taskId); u8 CanUseDigOrEscapeRopeOnCurMap(void); u8 CheckIfItemIsTMHMOrEvolutionStone(u16 itemId); +u32 CanThrowBall(void); #endif // GUARD_ITEM_USE_H diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 42b8b9d40..2ab6e287e 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -512,7 +512,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) // move data u8 atkPriority = GetMovePriority(battlerAtk, move); u16 moveEffect = gBattleMoves[move].effect; - u8 moveType = gBattleMoves[move].type; + s32 moveType; u8 moveTarget = gBattleMoves[move].target; u16 accuracy = AI_GetMoveAccuracy(battlerAtk, battlerDef, AI_DATA->atkAbility, AI_DATA->defAbility, AI_DATA->atkHoldEffect, AI_DATA->defHoldEffect, move); u8 effectiveness = AI_GetMoveEffectiveness(move, battlerAtk, battlerDef); @@ -525,6 +525,8 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (IsTargetingPartner(battlerAtk, battlerDef)) return score; + + GET_MOVE_TYPE(move, moveType); // check non-user target if (!(gBattleMoves[move].target & MOVE_TARGET_USER)) @@ -751,7 +753,34 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (gStatuses3[battlerAtk] & STATUS3_HEAL_BLOCK && IsHealBlockPreventingMove(battlerAtk, move)) return 0; // Can't even select heal blocked move // primal weather check - //TODO + if (WEATHER_HAS_EFFECT) + { + if (gBattleWeather & WEATHER_PRIMAL_ANY) + { + switch (move) + { + case MOVE_SUNNY_DAY: + case MOVE_RAIN_DANCE: + case MOVE_HAIL: + case MOVE_SANDSTORM: + RETURN_SCORE_MINUS(30); + } + } + + if (!IS_MOVE_STATUS(move)) + { + if (gBattleWeather & WEATHER_SUN_PRIMAL) + { + if (moveType == TYPE_WATER) + RETURN_SCORE_MINUS(30); + } + else if (gBattleWeather & WEATHER_RAIN_PRIMAL) + { + if (moveType == TYPE_FIRE) + RETURN_SCORE_MINUS(30); + } + } + } // check move effects switch (moveEffect) @@ -2437,13 +2466,32 @@ static s16 AI_TryToFaint(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) switch (AI_GetMoveEffectiveness(move, battlerAtk, battlerDef)) { case AI_EFFECTIVENESS_x4: - score += 4; + if (WEATHER_HAS_EFFECT + && gBattleWeather & WEATHER_STRONG_WINDS + && IS_BATTLER_OF_TYPE(battlerDef, TYPE_FLYING)) + { + if (AI_RandLessThan(176)) //Consider it supereffective instead of hypereffective. + score += 2; + else + score++; + } + else + score += 4; break; case AI_EFFECTIVENESS_x2: - if (AI_RandLessThan(176)) - score += 2; + if (WEATHER_HAS_EFFECT + && gBattleWeather & WEATHER_STRONG_WINDS + && IS_BATTLER_OF_TYPE(battlerDef, TYPE_FLYING)) + { + break; // Don't increase score, consider it neutral. + } else - score++; + { + if (AI_RandLessThan(176)) + score += 2; + else + score++; + } break; } } diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index 95d979e94..fef6e6c6f 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -643,7 +643,7 @@ bool32 IsAffectedByPowder(u8 battler, u16 ability, u16 holdEffect) { if ((B_POWDER_GRASS >= GEN_6 && IS_BATTLER_OF_TYPE(battler, TYPE_GRASS)) || ability == ABILITY_OVERCOAT - || holdEffect == HOLD_EFFECT_SAFETY_GOOGLES) + || holdEffect == HOLD_EFFECT_SAFETY_GOGGLES) return FALSE; return TRUE; } @@ -1448,7 +1448,7 @@ bool32 ShouldSetSandstorm(u8 battler, u16 ability, u16 holdEffect) || ability == ABILITY_SAND_FORCE || ability == ABILITY_OVERCOAT || ability == ABILITY_MAGIC_GUARD - || holdEffect == HOLD_EFFECT_SAFETY_GOOGLES + || holdEffect == HOLD_EFFECT_SAFETY_GOGGLES || IS_BATTLER_OF_TYPE(battler, TYPE_ROCK) || IS_BATTLER_OF_TYPE(battler, TYPE_STEEL) || IS_BATTLER_OF_TYPE(battler, TYPE_GROUND) @@ -1473,7 +1473,7 @@ bool32 ShouldSetHail(u8 battler, u16 ability, u16 holdEffect) || ability == ABILITY_SLUSH_RUSH || ability == ABILITY_MAGIC_GUARD || ability == ABILITY_OVERCOAT - || holdEffect == HOLD_EFFECT_SAFETY_GOOGLES + || holdEffect == HOLD_EFFECT_SAFETY_GOGGLES || IS_BATTLER_OF_TYPE(battler, TYPE_ICE) || HasMove(battler, MOVE_BLIZZARD) || HasMoveEffect(battler, EFFECT_AURORA_VEIL) @@ -2273,7 +2273,7 @@ static u32 GetWeatherDamage(u8 battlerId) { if (BattlerAffectedBySandstorm(battlerId, ability) && !(gStatuses3[battlerId] & (STATUS3_UNDERGROUND | STATUS3_UNDERWATER)) - && holdEffect != HOLD_EFFECT_SAFETY_GOOGLES) + && holdEffect != HOLD_EFFECT_SAFETY_GOGGLES) { damage = gBattleMons[battlerId].maxHP / 16; if (damage == 0) @@ -2284,7 +2284,7 @@ static u32 GetWeatherDamage(u8 battlerId) { if (BattlerAffectedByHail(battlerId, ability) && !(gStatuses3[battlerId] & (STATUS3_UNDERGROUND | STATUS3_UNDERWATER)) - && holdEffect != HOLD_EFFECT_SAFETY_GOOGLES) + && holdEffect != HOLD_EFFECT_SAFETY_GOGGLES) { damage = gBattleMons[battlerId].maxHP / 16; if (damage == 0) diff --git a/src/battle_anim_flying.c b/src/battle_anim_flying.c index 2b93206ca..cce21c84e 100644 --- a/src/battle_anim_flying.c +++ b/src/battle_anim_flying.c @@ -5,6 +5,8 @@ #include "constants/battle_anim.h" #include "constants/rgb.h" #include "random.h" +#include "gpu_regs.h" +#include "graphics.h" extern const struct SpriteTemplate gFlashingHitSplatSpriteTemplate; @@ -30,7 +32,7 @@ static void AnimUnusedFlashingLight_Step(struct Sprite *); static void AnimSkyAttackBird(struct Sprite *); static void AnimSkyAttackBird_Step(struct Sprite *); static void AnimTask_AnimateGustTornadoPalette_Step(u8); - +static void AnimTask_LoadWindstormBackground_Step(u8 taskId); const struct SpriteTemplate gEllipticalGustSpriteTemplate = { @@ -1231,3 +1233,99 @@ static void AnimTask_SetAttackerVisibility(u8 taskId) } DestroyAnimVisualTask(taskId); } + +void AnimTask_LoadWindstormBackground(u8 taskId) +{ + int var0; + struct BattleAnimBgData animBg; + + var0 = 0; + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16)); + SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 1); + SetAnimBgAttribute(1, BG_ANIM_SCREEN_SIZE, 0); + + if (!IsContest()) + SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 1); + + gBattle_BG1_X = 0; + gBattle_BG1_Y = 0; + SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X); + SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y); + + GetBattleAnimBg1Data(&animBg); + AnimLoadCompressedBgGfx(animBg.bgId, gBattleAnimBgImage_Windstorm, animBg.tilesOffset); + AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimBgTilemap_Windstorm, 0); + LoadCompressedPalette(gBattleAnimSpritePal_Windstorm, animBg.paletteId * 16, 32); + + if (gBattleAnimArgs[0] && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) + var0 = 1; + + gTasks[taskId].data[0] = var0; + gTasks[taskId].func = AnimTask_LoadWindstormBackground_Step; +} + +static void AnimTask_LoadWindstormBackground_Step(u8 taskId) +{ + struct BattleAnimBgData animBg; + + if (gTasks[taskId].data[0] == 0) + gBattle_BG1_X += -6; + else + gBattle_BG1_X += 6; + + gBattle_BG1_Y += -1; + + switch (gTasks[taskId].data[12]) + { + case 0: + if (++gTasks[taskId].data[10] == 4) + { + gTasks[taskId].data[10] = 0; + gTasks[taskId].data[11]++; + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[11], 16 - gTasks[taskId].data[11])); + if (gTasks[taskId].data[11] == 7) + { + gTasks[taskId].data[12]++; + gTasks[taskId].data[11] = 0; + } + } + break; + case 1: + if (++gTasks[taskId].data[11] == 101) + { + gTasks[taskId].data[11] = 7; + gTasks[taskId].data[12]++; + } + break; + case 2: + if (++gTasks[taskId].data[10] == 4) + { + gTasks[taskId].data[10] = 0; + gTasks[taskId].data[11]--; + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[11], 16 - gTasks[taskId].data[11])); + if (gTasks[taskId].data[11] == 0) + { + gTasks[taskId].data[12]++; + gTasks[taskId].data[11] = 0; + } + } + break; + case 3: + GetBattleAnimBg1Data(&animBg); + ClearBattleAnimBg(animBg.bgId); + gTasks[taskId].data[12]++; + break; + case 4: + if (!IsContest()) + SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 0); + + gBattle_BG1_X = 0; + gBattle_BG1_Y = 0; + SetGpuReg(REG_OFFSET_BLDCNT, 0); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 1); + DestroyAnimVisualTask(taskId); + break; + } +} diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index fa53b222f..877e44750 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -249,7 +249,8 @@ static void HandleInputChooseAction(void) if (JOY_NEW(A_BUTTON)) { PlaySE(SE_SELECT); - + TryHideLastUsedBall(); + switch (gActionSelectionCursor[gActiveBattler]) { case 0: @@ -336,6 +337,15 @@ static void HandleInputChooseAction(void) BtlController_EmitTwoReturnValues(1, B_ACTION_DEBUG, 0); PlayerBufferExecCompleted(); } + #if B_LAST_USED_BALL == TRUE + else if (JOY_NEW(B_LAST_USED_BALL_BUTTON) && CanThrowLastUsedBall()) + { + PlaySE(SE_SELECT); + TryHideLastUsedBall(); + BtlController_EmitTwoReturnValues(1, B_ACTION_THROW_BALL, 0); + PlayerBufferExecCompleted(); + } + #endif } static void UnusedEndBounceEffect(void) @@ -372,6 +382,7 @@ static void HandleInputChooseTarget(void) else BtlController_EmitTwoReturnValues(1, 10, gMoveSelectionCursor[gActiveBattler] | (gMultiUsePlayerCursor << 8)); EndBounceEffect(gMultiUsePlayerCursor, BOUNCE_HEALTHBOX); + TryHideLastUsedBall(); HideMegaTriggerSprite(); PlayerBufferExecCompleted(); } @@ -555,6 +566,7 @@ static void HandleInputShowTargets(void) else BtlController_EmitTwoReturnValues(1, 10, gMoveSelectionCursor[gActiveBattler] | (gMultiUsePlayerCursor << 8)); HideMegaTriggerSprite(); + TryHideLastUsedBall(); PlayerBufferExecCompleted(); } else if (gMain.newKeys & B_BUTTON || gPlayerDpadHoldFrames > 59) @@ -660,6 +672,7 @@ static void HandleInputChooseMove(void) else BtlController_EmitTwoReturnValues(1, 10, gMoveSelectionCursor[gActiveBattler] | (gMultiUsePlayerCursor << 8)); HideMegaTriggerSprite(); + TryHideLastUsedBall(); PlayerBufferExecCompleted(); break; case 1: @@ -2752,6 +2765,7 @@ static void PlayerHandleChooseAction(void) for (i = 0; i < 4; i++) ActionSelectionDestroyCursorAt(i); + TryRestoreLastUsedBall(); ActionSelectionCreateCursorAt(gActionSelectionCursor[gActiveBattler], 0); BattleStringExpandPlaceholdersToDisplayedString(gText_WhatWillPkmnDo); BattlePutTextOnWindow(gDisplayedStringBattle, 1); diff --git a/src/battle_debug.c b/src/battle_debug.c index b9cfcdc03..ce5aa4a97 100644 --- a/src/battle_debug.c +++ b/src/battle_debug.c @@ -1951,7 +1951,7 @@ static const u8 sText_HoldEffectAbsorbBulb[] = _("Absorb Bulb"); static const u8 sText_HoldEffectCellBattery[] = _("Cell Battery"); static const u8 sText_HoldEffectFairyPower[] = _("Fairy Power"); static const u8 sText_HoldEffectMegaStone[] = _("Mega Stone"); -static const u8 sText_HoldEffectSafetyGoogles[] = _("Safety Googles"); +static const u8 sText_HoldEffectSafetyGoggles[] = _("Safety Goggles"); static const u8 sText_HoldEffectLuminousMoss[] = _("Luminous Moss"); static const u8 sText_HoldEffectSnowball[] = _("Snowball"); static const u8 sText_HoldEffectWeaknessPolicy[] = _("Weakness Policy"); @@ -2091,7 +2091,7 @@ static const u8 *const sHoldEffectNames[] = [HOLD_EFFECT_CELL_BATTERY] = sText_HoldEffectCellBattery, [HOLD_EFFECT_FAIRY_POWER] = sText_HoldEffectFairyPower, [HOLD_EFFECT_MEGA_STONE] = sText_HoldEffectMegaStone, - [HOLD_EFFECT_SAFETY_GOOGLES] = sText_HoldEffectSafetyGoogles, + [HOLD_EFFECT_SAFETY_GOGGLES] = sText_HoldEffectSafetyGoggles, [HOLD_EFFECT_LUMINOUS_MOSS] = sText_HoldEffectLuminousMoss, [HOLD_EFFECT_SNOWBALL] = sText_HoldEffectSnowball, [HOLD_EFFECT_WEAKNESS_POLICY] = sText_HoldEffectWeaknessPolicy, diff --git a/src/battle_interface.c b/src/battle_interface.c index 26d6fb27f..0e33455ac 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -27,6 +27,10 @@ #include "constants/battle_config.h" #include "data.h" #include "pokemon_summary_screen.h" +#include "item_icon.h" +#include "item_use.h" +#include "item.h" +#include "constants/items.h" enum { // Corresponds to gHealthboxElementsGfxTable (and the tables after it) in graphics.c @@ -196,6 +200,9 @@ static u8 CalcBarFilledPixels(s32 maxValue, s32 oldValue, s32 receivedValue, s32 static void SpriteCb_AbilityPopUp(struct Sprite *sprite); static void Task_FreeAbilityPopUpGfx(u8 taskId); +static void SpriteCB_LastUsedBall(struct Sprite *sprite); +static void SpriteCB_LastUsedBallWin(struct Sprite *sprite); + // const rom data static const struct OamData sUnknown_0832C138 = { @@ -723,6 +730,12 @@ u8 GetMegaIndicatorSpriteId(u32 healthboxSpriteId) return gSprites[spriteId].hOther_IndicatorSpriteId; } +static void InitLastUsedBallAssets(void) +{ + gBattleStruct->ballSpriteIds[0] = MAX_SPRITES; + gBattleStruct->ballSpriteIds[1] = MAX_SPRITES; +} + u8 CreateBattlerHealthboxSprites(u8 battlerId) { s16 data6 = 0; @@ -812,6 +825,9 @@ u8 CreateBattlerHealthboxSprites(u8 battlerId) gSprites[megaIndicatorSpriteId].invisible = TRUE; } + gBattleStruct->ballSpriteIds[0] = MAX_SPRITES; + gBattleStruct->ballSpriteIds[1] = MAX_SPRITES; + return healthboxLeftSpriteId; } @@ -3123,3 +3139,200 @@ static void Task_FreeAbilityPopUpGfx(u8 taskId) DestroyTask(taskId); } } + +// last used ball +#define LAST_BALL_WINDOW_TAG 0xD721 + +static const struct OamData sOamData_LastUsedBall = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = SPRITE_SHAPE(32x32), + .x = 0, + .matrixNum = 0, + .size = SPRITE_SIZE(32x32), + .tileNum = 0, + .priority = 1, + .paletteNum = 0, + .affineParam = 0, +}; + +static const struct SpriteTemplate sSpriteTemplate_LastUsedBallWindow = +{ + .tileTag = LAST_BALL_WINDOW_TAG, + .paletteTag = ABILITY_POP_UP_TAG, + .oam = &sOamData_LastUsedBall, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCB_LastUsedBallWin +}; + +#if B_LAST_USED_BALL_BUTTON == R_BUTTON + static const u8 sLastUsedBallWindowGfx[] = INCBIN_U8("graphics/battle_interface/last_used_ball_r.4bpp"); +#else + static const u8 sLastUsedBallWindowGfx[] = INCBIN_U8("graphics/battle_interface/last_used_ball_l.4bpp"); +#endif +static const struct SpriteSheet sSpriteSheet_LastUsedBallWindow = +{ + sLastUsedBallWindowGfx, sizeof(sLastUsedBallWindowGfx), LAST_BALL_WINDOW_TAG +}; + +#define LAST_USED_BALL_X_F 15 +#define LAST_USED_BALL_X_0 -15 +#define LAST_USED_BALL_Y ((IsDoubleBattle()) ? 78 : 68) + +#define LAST_BALL_WIN_X_F (LAST_USED_BALL_X_F - 1) +#define LAST_BALL_WIN_X_0 (LAST_USED_BALL_X_0 - 0) +#define LAST_USED_WIN_Y (LAST_USED_BALL_Y - 8) + +#define sHide data[0] + +bool32 CanThrowLastUsedBall(void) +{ + #if B_LAST_USED_BALL == FALSE + return FALSE; + #else + return (!(CanThrowBall() != 0 + || (gBattleTypeFlags & BATTLE_TYPE_TRAINER) + || !CheckBagHasItem(gLastThrownBall, 1))); + #endif +} + + +void TryAddLastUsedBallItemSprites(void) +{ + #if B_LAST_USED_BALL == TRUE + if (gLastThrownBall == 0 + || (gLastThrownBall != 0 && !CheckBagHasItem(gLastThrownBall, 1))) + { + // we're out of the last used ball, so just set it to the first ball in the bag + // we have to compact the bag first bc it is typically only compacted when you open it + CompactItemsInBagPocket(&gBagPockets[BALLS_POCKET]); + gLastThrownBall = gBagPockets[BALLS_POCKET].itemSlots[0].itemId; + } + + if (CanThrowBall() != 0 + || (gBattleTypeFlags & BATTLE_TYPE_TRAINER) + || !CheckBagHasItem(gLastThrownBall, 1)) + return; + + // ball + if (gBattleStruct->ballSpriteIds[0] == MAX_SPRITES) + { + gBattleStruct->ballSpriteIds[0] = AddItemIconSprite(102, 102, gLastThrownBall); + gSprites[gBattleStruct->ballSpriteIds[0]].x = LAST_USED_BALL_X_0; + gSprites[gBattleStruct->ballSpriteIds[0]].y = LAST_USED_BALL_Y; + gSprites[gBattleStruct->ballSpriteIds[0]].sHide = FALSE; // restore + gSprites[gBattleStruct->ballSpriteIds[0]].callback = SpriteCB_LastUsedBall; + } + + // window + LoadSpritePalette(&sSpritePalette_AbilityPopUp); + if (GetSpriteTileStartByTag(LAST_BALL_WINDOW_TAG) == 0xFFFF) + LoadSpriteSheet(&sSpriteSheet_LastUsedBallWindow); + + if (gBattleStruct->ballSpriteIds[1] == MAX_SPRITES) + { + gBattleStruct->ballSpriteIds[1] = CreateSprite(&sSpriteTemplate_LastUsedBallWindow, + LAST_BALL_WIN_X_0, + LAST_USED_WIN_Y, 5); + gSprites[gBattleStruct->ballSpriteIds[0]].sHide = FALSE; // restore + } + #endif +} + +static void DestroyLastUsedBallWinGfx(struct Sprite *sprite) +{ + FreeSpriteTilesByTag(LAST_BALL_WINDOW_TAG); + FreeSpritePaletteByTag(ABILITY_POP_UP_TAG); + DestroySprite(sprite); + gBattleStruct->ballSpriteIds[1] = MAX_SPRITES; +} + +static void DestroyLastUsedBallGfx(struct Sprite *sprite) +{ + FreeSpriteTilesByTag(102); + FreeSpritePaletteByTag(102); + DestroySprite(sprite); + gBattleStruct->ballSpriteIds[0] = MAX_SPRITES; +} + +static void SpriteCB_LastUsedBallWin(struct Sprite *sprite) +{ + if (sprite->sHide) + { + if (sprite->x != LAST_BALL_WIN_X_0) + sprite->x--; + + if (sprite->x == LAST_BALL_WIN_X_0) + DestroyLastUsedBallWinGfx(sprite); + } + else + { + if (sprite->x != LAST_BALL_WIN_X_F) + sprite->x++; + } +} + +static void SpriteCB_LastUsedBall(struct Sprite *sprite) +{ + if (sprite->sHide) + { + if (sprite->x != LAST_USED_BALL_X_0) + sprite->x--; + + if (sprite->x == LAST_USED_BALL_X_0) + DestroyLastUsedBallGfx(sprite); + } + else + { + if (sprite->x != LAST_USED_BALL_X_F) + sprite->x++; + } +} + +static void TryHideOrRestoreLastUsedBall(u8 caseId) +{ + #if B_LAST_USED_BALL == TRUE + if (gBattleStruct->ballSpriteIds[0] == MAX_SPRITES) + return; + + switch (caseId) + { + case 0: // hide + if (gBattleStruct->ballSpriteIds[0] != MAX_SPRITES) + gSprites[gBattleStruct->ballSpriteIds[0]].sHide = TRUE; // hide + if (gBattleStruct->ballSpriteIds[1] != MAX_SPRITES) + gSprites[gBattleStruct->ballSpriteIds[1]].sHide = TRUE; // hide + break; + case 1: // restore + if (gBattleStruct->ballSpriteIds[0] != MAX_SPRITES) + gSprites[gBattleStruct->ballSpriteIds[0]].sHide = FALSE; // restore + if (gBattleStruct->ballSpriteIds[1] != MAX_SPRITES) + gSprites[gBattleStruct->ballSpriteIds[1]].sHide = FALSE; // restore + break; + } + #endif +} + +void TryHideLastUsedBall(void) +{ + #if B_LAST_USED_BALL == TRUE + TryHideOrRestoreLastUsedBall(0); + #endif +} + +void TryRestoreLastUsedBall(void) +{ + #if B_LAST_USED_BALL == TRUE + if (gBattleStruct->ballSpriteIds[0] != MAX_SPRITES) + TryHideOrRestoreLastUsedBall(1); + else + TryAddLastUsedBallItemSprites(); + #endif +} + diff --git a/src/battle_main.c b/src/battle_main.c index 62662d1e4..055ec9bbe 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -230,6 +230,7 @@ EWRAM_DATA u16 gPartnerSpriteId = 0; EWRAM_DATA struct TotemBoost gTotemBoosts[MAX_BATTLERS_COUNT] = {0}; EWRAM_DATA bool8 gHasFetchedBall = FALSE; EWRAM_DATA u8 gLastUsedBall = 0; +EWRAM_DATA u16 gLastThrownBall = 0; // IWRAM common vars void (*gPreBattleCallback1)(void); @@ -401,6 +402,7 @@ static void (* const sTurnActionsFuncsTable[])(void) = [B_ACTION_TRY_FINISH] = HandleAction_TryFinish, [B_ACTION_FINISHED] = HandleAction_ActionFinished, [B_ACTION_NOTHING_FAINTED] = HandleAction_NothingIsFainted, + [B_ACTION_THROW_BALL] = HandleAction_ThrowBall, }; static void (* const sEndTurnFuncsTable[])(void) = @@ -4073,6 +4075,10 @@ static void HandleTurnActionSelectionState(void) case B_ACTION_SAFARI_BALL: gBattleCommunication[gActiveBattler]++; break; + case B_ACTION_THROW_BALL: + gBattleStruct->throwingPokeBall = TRUE; + gBattleCommunication[gActiveBattler]++; + break; case B_ACTION_SAFARI_POKEBLOCK: if ((gBattleResources->bufferB[gActiveBattler][1] | (gBattleResources->bufferB[gActiveBattler][2] << 8)) != 0) { @@ -4186,6 +4192,13 @@ static void HandleTurnActionSelectionState(void) if (gBattleCommunication[ACTIONS_CONFIRMED_COUNT] == gBattlersCount) { sub_818603C(1); + + if (WILD_DOUBLE_BATTLE && gBattleStruct->throwingPokeBall) { + // if we choose to throw a ball with our second mon, skip the action of the first + // (if we have chosen throw ball with first, second's is already skipped) + gChosenActionByBattler[B_POSITION_PLAYER_LEFT] = B_ACTION_NOTHING_FAINTED; + } + gBattleMainFunc = SetActionsAndBattlersTurnOrder; if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) @@ -4507,7 +4520,9 @@ static void SetActionsAndBattlersTurnOrder(void) { for (gActiveBattler = 0; gActiveBattler < gBattlersCount; gActiveBattler++) { - if (gChosenActionByBattler[gActiveBattler] == B_ACTION_USE_ITEM || gChosenActionByBattler[gActiveBattler] == B_ACTION_SWITCH) + if (gChosenActionByBattler[gActiveBattler] == B_ACTION_USE_ITEM + || gChosenActionByBattler[gActiveBattler] == B_ACTION_SWITCH + || gChosenActionByBattler[gActiveBattler] == B_ACTION_THROW_BALL) { gActionsByTurnOrder[turnOrderId] = gChosenActionByBattler[gActiveBattler]; gBattlerByTurnOrder[turnOrderId] = gActiveBattler; @@ -4516,7 +4531,9 @@ static void SetActionsAndBattlersTurnOrder(void) } for (gActiveBattler = 0; gActiveBattler < gBattlersCount; gActiveBattler++) { - if (gChosenActionByBattler[gActiveBattler] != B_ACTION_USE_ITEM && gChosenActionByBattler[gActiveBattler] != B_ACTION_SWITCH) + if (gChosenActionByBattler[gActiveBattler] != B_ACTION_USE_ITEM + && gChosenActionByBattler[gActiveBattler] != B_ACTION_SWITCH + && gChosenActionByBattler[gActiveBattler] != B_ACTION_THROW_BALL) { gActionsByTurnOrder[turnOrderId] = gChosenActionByBattler[gActiveBattler]; gBattlerByTurnOrder[turnOrderId] = gActiveBattler; @@ -4532,7 +4549,9 @@ static void SetActionsAndBattlersTurnOrder(void) if (gActionsByTurnOrder[i] != B_ACTION_USE_ITEM && gActionsByTurnOrder[j] != B_ACTION_USE_ITEM && gActionsByTurnOrder[i] != B_ACTION_SWITCH - && gActionsByTurnOrder[j] != B_ACTION_SWITCH) + && gActionsByTurnOrder[j] != B_ACTION_SWITCH + && gActionsByTurnOrder[i] != B_ACTION_THROW_BALL + && gActionsByTurnOrder[j] != B_ACTION_THROW_BALL) { if (GetWhoStrikesFirst(battler1, battler2, FALSE)) SwapTurnOrder(i, j); diff --git a/src/battle_message.c b/src/battle_message.c index 69829a731..69463ce69 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -653,7 +653,7 @@ static const u8 sText_MistyTerrainPreventsStatus[] = _("{B_DEF_NAME_WITH_PREFIX} static const u8 sText_GrassyTerrainHeals[] = _("{B_ATK_NAME_WITH_PREFIX} is healed\nby the grassy terrain!"); static const u8 sText_ElectricTerrainPreventsSleep[] = _("{B_DEF_NAME_WITH_PREFIX} surrounds itself\nwith electrified terrain!"); static const u8 sText_PsychicTerrainPreventsPriority[] = _("{B_DEF_NAME_WITH_PREFIX} surrounds itself\nwith psychic terrain!"); -static const u8 sText_SafetyGooglesProtected[] = _("{B_DEF_NAME_WITH_PREFIX} is not affected\nthanks to its {B_LAST_ITEM}!"); +static const u8 sText_SafetyGogglesProtected[] = _("{B_DEF_NAME_WITH_PREFIX} is not affected\nthanks to its {B_LAST_ITEM}!"); static const u8 sText_FlowerVeilProtected[] = _("{B_DEF_NAME_WITH_PREFIX} surrounded itself\nwith a veil of petals!"); static const u8 sText_SweetVeilProtected[] = _("{B_DEF_NAME_WITH_PREFIX} surrounded itself\nwith a veil of sweetness!"); static const u8 sText_AromaVeilProtected[] = _("{B_DEF_NAME_WITH_PREFIX} is protected\nby an aromatic veil!"); @@ -706,9 +706,33 @@ static const u8 sText_TormentedNoMore[] = _("{B_ATK_NAME_WITH_PREFIX} is\ntormen static const u8 sText_HealBlockedNoMore[] = _("{B_ATK_NAME_WITH_PREFIX} is cured of\nits heal block!"); static const u8 sText_AttackerBecameFullyCharged[] = _("{B_ATK_NAME_WITH_PREFIX} became fully charged\ndue to its bond with its trainer!\p"); static const u8 sText_AttackerBecameAshSpecies[] = _("{B_ATK_NAME_WITH_PREFIX} became Ash-{B_BUFF1}!\p"); +static const u8 sText_ExtremelyHarshSunlight[] = _("The sunlight turned\nextremely harsh!"); +static const u8 sText_ExtremeSunlightFaded[] = _("The extreme sunlight faded.{PAUSE 64}"); +static const u8 sText_MoveEvaporatedInTheHarshSunlight[] = _("The Water-type attack evaporated\nin the harsh sunlight!"); +static const u8 sText_ExtremelyHarshSunlightWasNotLessened[] = _("The extremely harsh sunlight\nwas not lessened at all!"); +static const u8 sText_HeavyRain[] = _("A heavy rain began to fall!"); +static const u8 sText_HeavyRainLifted[] = _("The heavy rain has lifted!{PAUSE 64}"); +static const u8 sText_MoveFizzledOutInTheHeavyRain[] = _("The Fire-type attack fizzled out\nin the heavy rain!"); +static const u8 sText_NoReliefFromHeavyRain[] = _("There is no relief from\nthis heavy rain!"); +static const u8 sText_MysteriousAirCurrent[] = _("A mysterious air current is\nprotecting Flying-type Pokémon!"); +static const u8 sText_StrongWindsDissipated[] = _("The mysterious strong winds\nhave dissipated!{PAUSE 64}"); +static const u8 sText_MysteriousAirCurrentBlowsOn[] = _("The mysterious air current\nblows on regardless!"); +static const u8 sText_AttackWeakenedByStrongWinds[] = _("The mysterious strong winds\nweakened the attack!"); const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { + [STRINGID_ATTACKWEAKENEDBSTRONGWINDS - 12] = sText_AttackWeakenedByStrongWinds, + [STRINGID_MYSTERIOUSAIRCURRENTBLOWSON - 12] = sText_MysteriousAirCurrentBlowsOn, + [STRINGID_STRONGWINDSDISSIPATED - 12] = sText_StrongWindsDissipated, + [STRINGID_MYSTERIOUSAIRCURRENT - 12] = sText_MysteriousAirCurrent, + [STRINGID_NORELIEFROMHEAVYRAIN - 12] = sText_NoReliefFromHeavyRain, + [STRINGID_MOVEFIZZLEDOUTINTHEHEAVYRAIN - 12] = sText_MoveFizzledOutInTheHeavyRain, + [STRINGID_HEAVYRAINLIFTED - 12] = sText_HeavyRainLifted, + [STRINGID_HEAVYRAIN - 12] = sText_HeavyRain, + [STRINGID_EXTREMELYHARSHSUNLIGHTWASNOTLESSENED - 12] = sText_ExtremelyHarshSunlightWasNotLessened, + [STRINGID_MOVEEVAPORATEDINTHEHARSHSUNLIGHT - 12] = sText_MoveEvaporatedInTheHarshSunlight, + [STRINGID_EXTREMESUNLIGHTFADED - 12] = sText_ExtremeSunlightFaded, + [STRINGID_EXTREMELYHARSHSUNLIGHT - 12] = sText_ExtremelyHarshSunlight, [STRINGID_ATTACKERBECAMEASHSPECIES - 12] = sText_AttackerBecameAshSpecies, [STRINGID_ATTACKERBECAMEFULLYCHARGED - 12] = sText_AttackerBecameFullyCharged, [STRINGID_HEALBLOCKEDNOMORE - 12] = sText_HealBlockedNoMore, @@ -756,7 +780,7 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = [STRINGID_AROMAVEILPROTECTED - 12] = sText_AromaVeilProtected, [STRINGID_SWEETVEILPROTECTED - 12] = sText_SweetVeilProtected, [STRINGID_FLOWERVEILPROTECTED - 12] = sText_FlowerVeilProtected, - [STRINGID_SAFETYGOOGLESPROTECTED - 12] = sText_SafetyGooglesProtected, + [STRINGID_SAFETYGOGGLESPROTECTED - 12] = sText_SafetyGogglesProtected, [STRINGID_SPECTRALTHIEFSTEAL - 12] = sText_SpectralThiefSteal, [STRINGID_BELCHCANTSELECT - 12] = sText_BelchCantUse, [STRINGID_TRAINER1LOSETEXT - 12] = sText_Trainer1LoseText, diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index e70b990eb..c96c636ff 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1334,6 +1334,28 @@ static void Cmd_attackcanceler(void) { s32 i, moveType; + GET_MOVE_TYPE(gCurrentMove, moveType); + + if (moveType == TYPE_FIRE + && (gBattleWeather & WEATHER_RAIN_PRIMAL) + && WEATHER_HAS_EFFECT + && gBattleMoves[gCurrentMove].power) + { + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_PrimordialSeaFizzlesOutFireTypeMoves; + return; + } + + if (moveType == TYPE_WATER + && (gBattleWeather & WEATHER_SUN_PRIMAL) + && WEATHER_HAS_EFFECT + && gBattleMoves[gCurrentMove].power) + { + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_DesolateLandEvaporatesWaterTypeMoves; + return; + } + if (gBattleOutcome != 0) { gCurrentActionFuncId = B_ACTION_FINISHED; @@ -1353,7 +1375,6 @@ static void Cmd_attackcanceler(void) return; // Check Protean activation. - GET_MOVE_TYPE(gCurrentMove, moveType); if ((GetBattlerAbility(gBattlerAttacker) == ABILITY_PROTEAN || GetBattlerAbility(gBattlerAttacker) == ABILITY_LIBERO) && (gBattleMons[gBattlerAttacker].type1 != moveType || gBattleMons[gBattlerAttacker].type2 != moveType || (gBattleMons[gBattlerAttacker].type3 != moveType && gBattleMons[gBattlerAttacker].type3 != TYPE_MYSTERY)) @@ -1893,6 +1914,9 @@ static void Cmd_typecalc(void) static void Cmd_adjustdamage(void) { u8 holdEffect, param; + u32 moveType; + + GET_MOVE_TYPE(gCurrentMove, moveType); if (DoesSubstituteBlockMove(gBattlerAttacker, gBattlerTarget, gCurrentMove)) goto END; @@ -1970,6 +1994,23 @@ END: gBattlescriptCurrInstr = BattleScript_GemActivates; gLastUsedItem = gBattleMons[gBattlerAttacker].item; } + + // WEATHER_STRONG_WINDS prints a string when it's about to reduce the power + // of a move that is Super Effective against a Flying-type Pokémon. + if (gBattleWeather & WEATHER_STRONG_WINDS) + { + if ((gBattleMons[gBattlerTarget].type1 == TYPE_FLYING + && GetTypeModifier(moveType, gBattleMons[gBattlerTarget].type1) >= UQ_4_12(2.0)) + || (gBattleMons[gBattlerTarget].type2 == TYPE_FLYING + && GetTypeModifier(moveType, gBattleMons[gBattlerTarget].type2) >= UQ_4_12(2.0)) + || (gBattleMons[gBattlerTarget].type3 == TYPE_FLYING + && GetTypeModifier(moveType, gBattleMons[gBattlerTarget].type3) >= UQ_4_12(2.0))) + { + gBattlerAbility = gBattlerTarget; + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_AttackWeakenedByStrongWinds; + } + } } static void Cmd_multihitresultmessage(void) @@ -5139,7 +5180,7 @@ static void Cmd_moveend(void) // Attacker is the damage-dealer, battler is mon to be switched out if (IsBattlerAlive(battler) && GetBattlerHoldEffect(battler, TRUE) == HOLD_EFFECT_EJECT_BUTTON - && !DoesSubstituteBlockMove(gCurrentMove, gBattlerAttacker, battler) + && !DoesSubstituteBlockMove(gBattlerAttacker, battler, gCurrentMove) && (gSpecialStatuses[battler].physicalDmg != 0 || gSpecialStatuses[battler].specialDmg != 0) && CountUsablePartyMons(battler) > 0) // Has mon to switch into { @@ -5173,7 +5214,7 @@ static void Cmd_moveend(void) // Attacker is the one to be switched out, battler is one with red card if (battler != gBattlerAttacker && IsBattlerAlive(battler) - && !DoesSubstituteBlockMove(gCurrentMove, gBattlerAttacker, battler) + && !DoesSubstituteBlockMove(gBattlerAttacker, battler, gCurrentMove) && GetBattlerHoldEffect(battler, TRUE) == HOLD_EFFECT_RED_CARD && (gSpecialStatuses[battler].physicalDmg != 0 || gSpecialStatuses[battler].specialDmg != 0) && CanBattlerSwitch(gBattlerAttacker)) @@ -5240,7 +5281,7 @@ static void Cmd_moveend(void) if (battler != gBattlerAttacker // Cannot pickpocket yourself && GetBattlerAbility(battler) == ABILITY_PICKPOCKET // Target must have pickpocket ability && BATTLER_DAMAGED(battler) // Target needs to have been damaged - && !DoesSubstituteBlockMove(gCurrentMove, gBattlerAttacker, battler) // Subsitute unaffected + && !DoesSubstituteBlockMove(gBattlerAttacker, battler, gCurrentMove) // Subsitute unaffected && IsBattlerAlive(battler) // Battler must be alive to pickpocket && gBattleMons[battler].item == ITEM_NONE // Pickpocketer can't have an item already && CanStealItem(battler, gBattlerAttacker, gBattleMons[gBattlerAttacker].item)) // Cannot steal plates, mega stones, etc @@ -8763,6 +8804,39 @@ static void Cmd_various(void) else gBattlescriptCurrInstr += 7; return; + case VARIOUS_TRY_TO_CLEAR_PRIMAL_WEATHER: + { + bool8 shouldNotClear = FALSE; + + for (i = 0; i < gBattlersCount; i++) + { + if (((GetBattlerAbility(i) == ABILITY_DESOLATE_LAND && gBattleWeather & WEATHER_SUN_PRIMAL) + || (GetBattlerAbility(i) == ABILITY_PRIMORDIAL_SEA && gBattleWeather & WEATHER_RAIN_PRIMAL) + || (GetBattlerAbility(i) == ABILITY_DELTA_STREAM && gBattleWeather & WEATHER_STRONG_WINDS)) + && IsBattlerAlive(i) + && !(gStatuses3[i] & STATUS3_GASTRO_ACID)) + shouldNotClear = TRUE; + } + if (gBattleWeather & WEATHER_SUN_PRIMAL && !shouldNotClear) + { + gBattleWeather &= ~WEATHER_SUN_PRIMAL; + PrepareStringBattle(STRINGID_EXTREMESUNLIGHTFADED, gActiveBattler); + gBattleCommunication[MSG_DISPLAY] = 1; + } + else if (gBattleWeather & WEATHER_RAIN_PRIMAL && !shouldNotClear) + { + gBattleWeather &= ~WEATHER_RAIN_PRIMAL; + PrepareStringBattle(STRINGID_HEAVYRAINLIFTED, gActiveBattler); + gBattleCommunication[MSG_DISPLAY] = 1; + } + else if (gBattleWeather & WEATHER_STRONG_WINDS && !shouldNotClear) + { + gBattleWeather &= ~WEATHER_STRONG_WINDS; + PrepareStringBattle(STRINGID_STRONGWINDSDISSIPATED, gActiveBattler); + gBattleCommunication[MSG_DISPLAY] = 1; + } + break; + } case VARIOUS_GET_ROTOTILLER_TARGETS: // Gets the battlers to be affected by rototiller. If there are none, print 'But it failed!' { @@ -10101,7 +10175,7 @@ static void Cmd_weatherdamage(void) && ability != ABILITY_SAND_RUSH && ability != ABILITY_OVERCOAT && !(gStatuses3[gBattlerAttacker] & (STATUS3_UNDERGROUND | STATUS3_UNDERWATER)) - && GetBattlerHoldEffect(gBattlerAttacker, TRUE) != HOLD_EFFECT_SAFETY_GOOGLES) + && GetBattlerHoldEffect(gBattlerAttacker, TRUE) != HOLD_EFFECT_SAFETY_GOGGLES) { gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 16; if (gBattleMoveDamage == 0) @@ -10126,7 +10200,7 @@ static void Cmd_weatherdamage(void) && ability != ABILITY_OVERCOAT && ability != ABILITY_ICE_BODY && !(gStatuses3[gBattlerAttacker] & (STATUS3_UNDERGROUND | STATUS3_UNDERWATER)) - && GetBattlerHoldEffect(gBattlerAttacker, TRUE) != HOLD_EFFECT_SAFETY_GOOGLES) + && GetBattlerHoldEffect(gBattlerAttacker, TRUE) != HOLD_EFFECT_SAFETY_GOGGLES) { gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 16; if (gBattleMoveDamage == 0) @@ -12484,7 +12558,8 @@ static void Cmd_handleballthrow(void) { u32 odds; u8 catchRate; - + + gLastThrownBall = gLastUsedItem; if (gLastUsedItem == ITEM_SAFARI_BALL) catchRate = gBattleStruct->safariCatchFactor * 1275 / 100; else diff --git a/src/battle_util.c b/src/battle_util.c index 40a100796..e3ac305a6 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -756,6 +756,17 @@ void HandleAction_SafariZoneBallThrow(void) gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT; } +void HandleAction_ThrowBall(void) +{ + gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber]; + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + gLastUsedItem = gLastThrownBall; + RemoveBagItem(gLastUsedItem, 1); + gBattlescriptCurrInstr = BattleScript_BallThrow; + gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT; +} + void HandleAction_ThrowPokeblock(void) { gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber]; @@ -2106,7 +2117,8 @@ u8 DoFieldEndTurnEffects(void) case ENDTURN_RAIN: if (gBattleWeather & WEATHER_RAIN_ANY) { - if (!(gBattleWeather & WEATHER_RAIN_PERMANENT)) + if (!(gBattleWeather & WEATHER_RAIN_PERMANENT) + && !(gBattleWeather & WEATHER_RAIN_PRIMAL)) { if (--gWishFutureKnock.weatherDuration == 0) { @@ -2156,7 +2168,9 @@ u8 DoFieldEndTurnEffects(void) case ENDTURN_SUN: if (gBattleWeather & WEATHER_SUN_ANY) { - if (!(gBattleWeather & WEATHER_SUN_PERMANENT) && --gWishFutureKnock.weatherDuration == 0) + if (!(gBattleWeather & WEATHER_SUN_PERMANENT) + && !(gBattleWeather & WEATHER_SUN_PRIMAL) + && --gWishFutureKnock.weatherDuration == 0) { gBattleWeather &= ~WEATHER_SUN_TEMPORARY; gBattlescriptCurrInstr = BattleScript_SunlightFaded; @@ -3383,9 +3397,10 @@ u8 AtkCanceller_UnableToUseMove(void) gBattlerAbility = gBattlerTarget; effect = 1; } - else if (GetBattlerHoldEffect(gBattlerTarget, TRUE) == HOLD_EFFECT_SAFETY_GOOGLES) + else if (GetBattlerHoldEffect(gBattlerTarget, TRUE) == HOLD_EFFECT_SAFETY_GOGGLES) { - RecordItemEffectBattle(gBattlerTarget, HOLD_EFFECT_SAFETY_GOOGLES); + RecordItemEffectBattle(gBattlerTarget, HOLD_EFFECT_SAFETY_GOGGLES); + gLastUsedItem = gBattleMons[gBattlerTarget].item; effect = 1; } @@ -3675,9 +3690,12 @@ u8 TryWeatherFormChange(u8 battler) static const u16 sWeatherFlagsInfo[][3] = { [ENUM_WEATHER_RAIN] = {WEATHER_RAIN_TEMPORARY, WEATHER_RAIN_PERMANENT, HOLD_EFFECT_DAMP_ROCK}, + [ENUM_WEATHER_RAIN_PRIMAL] = {WEATHER_RAIN_PRIMAL, WEATHER_RAIN_PRIMAL, HOLD_EFFECT_DAMP_ROCK}, [ENUM_WEATHER_SUN] = {WEATHER_SUN_TEMPORARY, WEATHER_SUN_PERMANENT, HOLD_EFFECT_HEAT_ROCK}, + [ENUM_WEATHER_SUN_PRIMAL] = {WEATHER_SUN_PRIMAL, WEATHER_SUN_PRIMAL, HOLD_EFFECT_HEAT_ROCK}, [ENUM_WEATHER_SANDSTORM] = {WEATHER_SANDSTORM_TEMPORARY, WEATHER_SANDSTORM_PERMANENT, HOLD_EFFECT_SMOOTH_ROCK}, [ENUM_WEATHER_HAIL] = {WEATHER_HAIL_TEMPORARY, WEATHER_HAIL_PERMANENT, HOLD_EFFECT_ICY_ROCK}, + [ENUM_WEATHER_STRONG_WINDS] = {WEATHER_STRONG_WINDS, WEATHER_STRONG_WINDS, HOLD_EFFECT_NONE}, }; bool32 TryChangeBattleWeather(u8 battler, u32 weatherEnumId, bool32 viaAbility) @@ -3688,6 +3706,13 @@ bool32 TryChangeBattleWeather(u8 battler, u32 weatherEnumId, bool32 viaAbility) gBattleWeather = (sWeatherFlagsInfo[weatherEnumId][0] | sWeatherFlagsInfo[weatherEnumId][1]); return TRUE; } + else if (gBattleWeather & WEATHER_PRIMAL_ANY + && GetBattlerAbility(battler) != ABILITY_DESOLATE_LAND + && GetBattlerAbility(battler) != ABILITY_PRIMORDIAL_SEA + && GetBattlerAbility(battler) != ABILITY_DELTA_STREAM) + { + return FALSE; + } else if (!(gBattleWeather & (sWeatherFlagsInfo[weatherEnumId][0] | sWeatherFlagsInfo[weatherEnumId][1]))) { gBattleWeather = (sWeatherFlagsInfo[weatherEnumId][0]); @@ -4158,6 +4183,12 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move BattleScriptPushCursorAndCallback(BattleScript_DrizzleActivates); effect++; } + else if (WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_PRIMAL_ANY && !gSpecialStatuses[battler].switchInAbilityDone) + { + gSpecialStatuses[battler].switchInAbilityDone = 1; + BattleScriptPushCursorAndCallback(BattleScript_BlockedByPrimalWeatherEnd3); + effect++; + } break; case ABILITY_SAND_STREAM: if (TryChangeBattleWeather(battler, ENUM_WEATHER_SANDSTORM, TRUE)) @@ -4165,6 +4196,12 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move BattleScriptPushCursorAndCallback(BattleScript_SandstreamActivates); effect++; } + else if (WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_PRIMAL_ANY && !gSpecialStatuses[battler].switchInAbilityDone) + { + gSpecialStatuses[battler].switchInAbilityDone = 1; + BattleScriptPushCursorAndCallback(BattleScript_BlockedByPrimalWeatherEnd3); + effect++; + } break; case ABILITY_DROUGHT: if (TryChangeBattleWeather(battler, ENUM_WEATHER_SUN, TRUE)) @@ -4172,6 +4209,12 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move BattleScriptPushCursorAndCallback(BattleScript_DroughtActivates); effect++; } + else if (WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_PRIMAL_ANY && !gSpecialStatuses[battler].switchInAbilityDone) + { + gSpecialStatuses[battler].switchInAbilityDone = 1; + BattleScriptPushCursorAndCallback(BattleScript_BlockedByPrimalWeatherEnd3); + effect++; + } break; case ABILITY_SNOW_WARNING: if (TryChangeBattleWeather(battler, ENUM_WEATHER_HAIL, TRUE)) @@ -4179,6 +4222,12 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move BattleScriptPushCursorAndCallback(BattleScript_SnowWarningActivates); effect++; } + else if (WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_PRIMAL_ANY && !gSpecialStatuses[battler].switchInAbilityDone) + { + gSpecialStatuses[battler].switchInAbilityDone = 1; + BattleScriptPushCursorAndCallback(BattleScript_BlockedByPrimalWeatherEnd3); + effect++; + } break; case ABILITY_ELECTRIC_SURGE: if (TryChangeBattleTerrain(battler, STATUS_FIELD_ELECTRIC_TERRAIN, &gFieldTimers.electricTerrainTimer)) @@ -4268,6 +4317,27 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; + case ABILITY_DESOLATE_LAND: + if (TryChangeBattleWeather(battler, ENUM_WEATHER_SUN_PRIMAL, TRUE)) + { + BattleScriptPushCursorAndCallback(BattleScript_DesolateLandActivates); + effect++; + } + break; + case ABILITY_PRIMORDIAL_SEA: + if (TryChangeBattleWeather(battler, ENUM_WEATHER_RAIN_PRIMAL, TRUE)) + { + BattleScriptPushCursorAndCallback(BattleScript_PrimordialSeaActivates); + effect++; + } + break; + case ABILITY_DELTA_STREAM: + if (TryChangeBattleWeather(battler, ENUM_WEATHER_STRONG_WINDS, TRUE)) + { + BattleScriptPushCursorAndCallback(BattleScript_DeltaStreamActivates); + effect++; + } + break; } break; case ABILITYEFFECT_ENDTURN: // 1 @@ -4458,7 +4528,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move } break; case ABILITYEFFECT_MOVES_BLOCK: // 2 - if ((gLastUsedAbility == ABILITY_SOUNDPROOF && gBattleMoves[move].flags & FLAG_SOUND) + if ((gLastUsedAbility == ABILITY_SOUNDPROOF && gBattleMoves[move].flags & FLAG_SOUND && !(gBattleMoves[move].target & MOVE_TARGET_USER)) || (gLastUsedAbility == ABILITY_BULLETPROOF && gBattleMoves[move].flags & FLAG_BALLISTIC)) { if (gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS) @@ -4824,7 +4894,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move case ABILITY_EFFECT_SPORE: if (!IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_GRASS) && GetBattlerAbility(gBattlerAttacker) != ABILITY_OVERCOAT - && GetBattlerHoldEffect(gBattlerAttacker, TRUE) != HOLD_EFFECT_SAFETY_GOOGLES) + && GetBattlerHoldEffect(gBattlerAttacker, TRUE) != HOLD_EFFECT_SAFETY_GOGGLES) { i = Random() % 3; if (i == 0) @@ -4959,13 +5029,20 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move && !gProtectStructs[gBattlerAttacker].confusionSelfDmg && TARGET_TURN_DAMAGED && !(WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_SANDSTORM_ANY) - && TryChangeBattleWeather(battler, ENUM_WEATHER_SANDSTORM, TRUE)) + && TryChangeBattleWeather(battler, ENUM_WEATHER_SANDSTORM, TRUE) + && !(WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_PRIMAL_ANY)) { gBattleScripting.battler = gActiveBattler = battler; BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_SandSpitActivates; effect++; } + else if (WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_PRIMAL_ANY) + { + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_BlockedByPrimalWeatherRet; + effect++; + } break; case ABILITY_PERISH_BODY: if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) @@ -6810,7 +6887,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) if (TARGET_TURN_DAMAGED && (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)) && IsMoveMakingContact(gCurrentMove, gBattlerAttacker) - && !DoesSubstituteBlockMove(gCurrentMove, gBattlerAttacker, battlerId) + && !DoesSubstituteBlockMove(gBattlerAttacker, battlerId, gCurrentMove) && IsBattlerAlive(gBattlerAttacker) && CanStealItem(gBattlerAttacker, gBattlerTarget, gBattleMons[gBattlerTarget].item) && gBattleMons[gBattlerAttacker].item == ITEM_NONE) @@ -8453,6 +8530,13 @@ static void MulByTypeEffectiveness(u16 *modifier, u16 move, u8 moveType, u8 batt if (gProtectStructs[battlerDef].kingsShielded && gBattleMoves[move].effect != EFFECT_FEINT) mod = UQ_4_12(1.0); + // WEATHER_STRONG_WINDS weakens Super Effective moves against Flying-type Pokémon + if (WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_STRONG_WINDS) + { + if (defType == TYPE_FLYING && mod >= UQ_4_12(2.0)) + mod = UQ_4_12(1.0); + } + MulModifier(modifier, mod); } diff --git a/src/graphics.c b/src/graphics.c index 4c648a479..247231d55 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1312,11 +1312,14 @@ const u32 gUnknown_08D85A1C[] = INCBIN_U32("graphics/battle_frontier/battle_tile #include "data/graphics/intro_scene.h" const u32 gBattleAnimSpriteGfx_FlyingDirt[] = INCBIN_U32("graphics/battle_anims/sprites/flying_dirt.4bpp.lz"); +const u32 gBattleAnimSpritePal_FlyingDirt[] = INCBIN_U32("graphics/battle_anims/sprites/flying_dirt.gbapal.lz"); const u32 gBattleAnimBgTilemap_Sandstorm[] = INCBIN_U32("graphics/battle_anims/backgrounds/sandstorm_brew.bin.lz"); const u32 gBattleAnimBgImage_Sandstorm[] = INCBIN_U32("graphics/battle_anims/backgrounds/sandstorm_brew.4bpp.lz"); -const u32 gBattleAnimSpritePal_FlyingDirt[] = INCBIN_U32("graphics/battle_anims/sprites/flying_dirt.gbapal.lz"); +const u32 gBattleAnimBgTilemap_Windstorm[] = INCBIN_U32("graphics/battle_anims/backgrounds/sandstorm_brew.bin.lz"); +const u32 gBattleAnimBgImage_Windstorm[] = INCBIN_U32("graphics/battle_anims/backgrounds/windstorm_brew.4bpp.lz"); +const u32 gBattleAnimSpritePal_Windstorm[] = INCBIN_U32("graphics/battle_anims/backgrounds/windstorm_brew.gbapal.lz"); const u32 gBattleAnimSpriteGfx_MetalSoundWaves[] = INCBIN_U32("graphics/battle_anims/sprites/metal_sound_waves.4bpp.lz"); const u32 gBattleAnimSpritePal_MetalSoundWaves[] = INCBIN_U32("graphics/battle_anims/sprites/metal_sound_waves.gbapal.lz"); diff --git a/src/item_use.c b/src/item_use.c index d5d52b07a..63854a1ac 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -936,42 +936,46 @@ void ItemUseOutOfBattle_EvolutionStone(u8 taskId) SetUpItemUseCallback(taskId); } -void ItemUseInBattle_PokeBall(u8 taskId) +u32 CanThrowBall(void) { if (IsBattlerAlive(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT)) - && IsBattlerAlive(GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT))) // There are two present pokemon. + && IsBattlerAlive(GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT))) { - static const u8 textCantThrowPokeBall[] = _("Cannot throw a ball!\nThere are two pokemon out there!\p"); - - if (!InBattlePyramid()) - DisplayItemMessage(taskId, 1, textCantThrowPokeBall, CloseItemMessage); - else - DisplayItemMessageInBattlePyramid(taskId, textCantThrowPokeBall, Task_CloseBattlePyramidBagMessage); + return 1; // There are two present pokemon. } - else if (gBattlerInMenuId == GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT) - && IsBattlerAlive(GetBattlerAtPosition(B_POSITION_PLAYER_LEFT))) // Attempting to throw a ball with the second pokemon while both are alive. + else if (IsPlayerPartyAndPokemonStorageFull() == TRUE) { - static const u8 textCantThrowPokeBall[] = _("Cannot throw a ball!\p"); - - if (!InBattlePyramid()) - DisplayItemMessage(taskId, 1, textCantThrowPokeBall, CloseItemMessage); - else - DisplayItemMessageInBattlePyramid(taskId, textCantThrowPokeBall, Task_CloseBattlePyramidBagMessage); + return 2; // No room for mon } - else if (IsPlayerPartyAndPokemonStorageFull() == FALSE) // have room for mon? + + return 0; // usable +} + +static const u8 sText_CantThrowPokeBall_TwoMons[] = _("Cannot throw a ball!\nThere are two pokemon out there!\p"); +void ItemUseInBattle_PokeBall(u8 taskId) +{ + switch (CanThrowBall()) { + case 0: // usable + default: RemoveBagItem(gSpecialVar_ItemId, 1); if (!InBattlePyramid()) Task_FadeAndCloseBagMenu(taskId); else CloseBattlePyramidBag(taskId); - } - else - { + break; + case 1: // There are two present pokemon. + if (!InBattlePyramid()) + DisplayItemMessage(taskId, 1, sText_CantThrowPokeBall_TwoMons, CloseItemMessage); + else + DisplayItemMessageInBattlePyramid(taskId, sText_CantThrowPokeBall_TwoMons, Task_CloseBattlePyramidBagMessage); + break; + case 2: // No room for mon if (!InBattlePyramid()) DisplayItemMessage(taskId, 1, gText_BoxFull, CloseItemMessage); else DisplayItemMessageInBattlePyramid(taskId, gText_BoxFull, Task_CloseBattlePyramidBagMessage); + break; } } diff --git a/src/new_game.c b/src/new_game.c index 2a950efbc..e0453c9ad 100644 --- a/src/new_game.c +++ b/src/new_game.c @@ -45,6 +45,7 @@ #include "berry_powder.h" #include "mevent.h" #include "union_room_chat.h" +#include "constants/items.h" extern const u8 EventScript_ResetAllMapFlags[];