diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index a79fae484d..3943be6278 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -16929,6 +16929,29 @@ ChillyReceptionSnowballs: delay 3 return +Move_BURNING_BULWARK:: + goto Move_PROTECT + +Move_ALLURING_VOICE:: + loadspritegfx ANIM_TAG_THIN_RING + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x8, 0x6e7d + waitforvisualfinish + createvisualtask SoundTask_PlayCryWithEcho, 5, FALSE + createsprite gHyperVoiceRingSpriteTemplate, ANIM_ATTACKER, 0, 45, 0, 0, 0, 0, 0, 1 + createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 1, 0, 6, 1 + createvisualtask AnimTask_ShakeMon2, 2, ANIM_DEF_PARTNER, 1, 0, 6, 1 + createvisualtask AnimTask_ShakeBattleTerrain, 2, 1, 0, 6, 1 + createvisualtask SoundTask_WaitForCry, 5 + delay 0xA + createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 1, 0, 26, 1 + createvisualtask AnimTask_ShakeMon2, 2, ANIM_DEF_PARTNER, 1, 0, 26, 1 + waitforvisualfinish + createvisualtask SoundTask_WaitForCry, 0x5 + waitforvisualfinish + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x8, 0x0, 0x6e7d + waitforvisualfinish + end + Move_TERA_BLAST:: Move_AXE_KICK:: Move_LAST_RESPECTS:: @@ -16980,13 +17003,11 @@ Move_IVY_CUDGEL:: Move_ELECTRO_SHOT:: Move_TERA_STARSTORM:: Move_FICKLE_BEAM:: -Move_BURNING_BULWARK:: Move_THUNDERCLAP:: Move_MIGHTY_CLEAVE:: Move_TACHYON_CUTTER:: Move_HARD_PRESS:: Move_DRAGON_CHEER:: -Move_ALLURING_VOICE:: Move_TEMPER_FLARE:: Move_SUPERCELL_SLAM:: Move_PSYCHIC_NOISE:: @@ -19353,7 +19374,7 @@ Move_TELEPORT: call UnsetPsychicBg waitforvisualfinish end - + DoubleTeamAnimRet: setalpha 12, 8 monbg ANIM_ATK_PARTNER diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 1fa863dbba..3d111da6d2 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -368,6 +368,7 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectDoodle @ EFFECT_DOODLE .4byte BattleScript_EffectFilletAway @ EFFECT_FILLET_AWAY .4byte BattleScript_EffectHit @ EFFECT_IVY_CUDGEL + .4byte BattleScript_EffectHit @ EFFECT_FICKLE_BEAM BattleScript_EffectFilletAway: attackcanceler @@ -907,12 +908,25 @@ BattleScript_EffectMeteorBeam:: @ DecideTurn jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn - setbyte sTWOTURN_STRINGID, B_MSG_TURN1_METEOR_BEAM + jumpifmove MOVE_METEOR_BEAM, BattleScript_SetStringMeteorBeam + jumpifmove MOVE_ELECTRO_SHOT, BattleScript_SetStringElectroShock +BattleScript_TryCharging: call BattleScript_FirstChargingTurnMeteorBeam + jumpifmove MOVE_METEOR_BEAM, BattleScript_TryMeteorBeam + jumpifweatheraffected BS_ATTACKER, B_WEATHER_RAIN, BattleScript_TwoTurnMovesSecondTurn @ Check for move Electro Shot +BattleScript_TryMeteorBeam: jumpifnoholdeffect BS_ATTACKER, HOLD_EFFECT_POWER_HERB, BattleScript_MoveEnd call BattleScript_PowerHerbActivation goto BattleScript_TwoTurnMovesSecondTurn +BattleScript_SetStringMeteorBeam: + setbyte sTWOTURN_STRINGID, B_MSG_TURN1_METEOR_BEAM + goto BattleScript_TryCharging + +BattleScript_SetStringElectroShock: + setbyte sTWOTURN_STRINGID, B_MSG_TURN1_ELECTRO_SHOCK + goto BattleScript_TryCharging + BattleScript_FirstChargingTurnMeteorBeam:: attackcanceler flushtextbox diff --git a/include/battle.h b/include/battle.h index d166f49c97..4a3070e010 100644 --- a/include/battle.h +++ b/include/battle.h @@ -162,6 +162,7 @@ struct ProtectStruct u16 shellTrap:1; u16 maxGuarded:1; u16 silkTrapped:1; + u16 burningBulwarked:1; u16 eatMirrorHerb:1; u16 activateOpportunist:2; // 2 - to copy stats. 1 - stats copied (do not repeat). 0 - no stats to copy u16 usedAllySwitch:1; @@ -681,7 +682,7 @@ struct BattleStruct u16 arenaStartHp[2]; u8 arenaLostPlayerMons; // Bits for party member, lost as in referee's decision, not by fainting. u8 arenaLostOpponentMons; - u8 alreadyStatusedMoveAttempt; // As bits for battlers; For example when using Thunder Wave on an already paralyzed pokemon. + u8 alreadyStatusedMoveAttempt; // As bits for battlers; For example when using Thunder Wave on an already paralyzed Pokémon. u8 debugBattler; u8 magnitudeBasePower; u8 presentBasePower; @@ -812,6 +813,7 @@ STATIC_ASSERT(sizeof(((struct BattleStruct *)0)->palaceFlags) * 8 >= MAX_BATTLER || gProtectStructs[battlerId].spikyShielded \ || gProtectStructs[battlerId].kingsShielded \ || gProtectStructs[battlerId].banefulBunkered \ + || gProtectStructs[battlerId].burningBulwarked \ || gProtectStructs[battlerId].obstructed \ || gProtectStructs[battlerId].silkTrapped) @@ -952,7 +954,7 @@ struct BattleSpriteData struct MonSpritesGfx { - void *firstDecompressed; // ptr to the decompressed sprite of the first pokemon + void *firstDecompressed; // ptr to the decompressed sprite of the first Pokémon union { void *ptr[MAX_BATTLERS_COUNT]; u8 *byte[MAX_BATTLERS_COUNT]; diff --git a/include/battle_ai_util.h b/include/battle_ai_util.h index 516627f75e..c9b6f7f691 100644 --- a/include/battle_ai_util.h +++ b/include/battle_ai_util.h @@ -59,7 +59,6 @@ bool32 ShouldRestoreHpBerry(u32 battlerAtk, u32 item); bool32 IsStatBoostingBerry(u32 item); bool32 CanKnockOffItem(u32 battler, u32 item); bool32 IsAbilityOfRating(u32 ability, s8 rating); -s8 GetAbilityRating(u32 ability); bool32 AI_IsAbilityOnSide(u32 battlerId, u32 ability); bool32 AI_MoveMakesContact(u32 ability, u32 holdEffect, u32 move); u32 AI_GetBattlerMoveTargetType(u32 battlerId, u32 move); diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index c603ee197b..2641e02e4f 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -347,7 +347,8 @@ #define EFFECT_DOODLE 343 #define EFFECT_FILLET_AWAY 344 #define EFFECT_IVY_CUDGEL 345 +#define EFFECT_FICKLE_BEAM 346 -#define NUM_BATTLE_MOVE_EFFECTS 346 +#define NUM_BATTLE_MOVE_EFFECTS 347 #endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H diff --git a/include/constants/battle_palace.h b/include/constants/battle_palace.h index 8516550892..1d8c2f2dda 100644 --- a/include/constants/battle_palace.h +++ b/include/constants/battle_palace.h @@ -16,12 +16,12 @@ #define PALACE_DATA_WIN_STREAK 1 #define PALACE_DATA_WIN_STREAK_ACTIVE 2 -// Pokemon in Battle Palace have a move "group" type preference depending on nature +// Pokémon in Battle Palace have a move "group" type preference depending on nature #define PALACE_MOVE_GROUP_ATTACK 0 #define PALACE_MOVE_GROUP_DEFENSE 1 #define PALACE_MOVE_GROUP_SUPPORT 2 -// In palace doubles battles pokemon have a target preference depending on nature +// In palace doubles battles Pokémon have a target preference depending on nature #define PALACE_TARGET_STRONGER 0 #define PALACE_TARGET_WEAKER 1 #define PALACE_TARGET_RANDOM 2 diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index 5b571c9fb2..c4ca5dee43 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -697,8 +697,9 @@ #define STRINGID_THESWAMPDISAPPEARED 695 #define STRINGID_PKMNTELLCHILLINGRECEPTIONJOKE 696 #define STRINGID_HOSPITALITYRESTORATION 697 +#define STRINGID_ELECTROSHOCKCHARGING 698 -#define BATTLESTRINGS_COUNT 698 +#define BATTLESTRINGS_COUNT 699 // This is the string id that gBattleStringsTable starts with. // String ids before this (e.g. STRINGID_INTROMSG) are not in the table, @@ -756,6 +757,7 @@ #define B_MSG_TURN1_FREEZE_SHOCK 10 #define B_MSG_TURN1_SKY_DROP 11 #define B_MSG_TURN1_METEOR_BEAM 12 +#define B_MSG_TURN1_ELECTRO_SHOCK 13 // gMoveWeatherChangeStringIds #define B_MSG_STARTED_RAIN 0 diff --git a/include/constants/field_specials.h b/include/constants/field_specials.h index 6659403313..1e08a47f95 100644 --- a/include/constants/field_specials.h +++ b/include/constants/field_specials.h @@ -62,7 +62,7 @@ #define DEPT_STORE_FLOORNUM_11F 14 #define DEPT_STORE_FLOORNUM_ROOFTOP 15 -// Lilycove Pokemon Trainer Fan Club +// Lilycove Pokémon Trainer Fan Club #define NUM_TRAINER_FAN_CLUB_MEMBERS 8 #define FANCLUB_GOT_FIRST_FANS 7 diff --git a/include/constants/global.h b/include/constants/global.h index f9b7241ef6..cb023efab3 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -9,9 +9,9 @@ // Invalid Versions show as "----------" in Gen 4 and Gen 5's summary screen. // In Gens 6 and 7, invalid versions instead show "a distant land" in the summary screen. -// In Gen 4 only, migrated Pokemon with Diamond, Pearl, or Platinum's ID show as "----------". +// In Gen 4 only, migrated Pokémon with Diamond, Pearl, or Platinum's ID show as "----------". // Gen 5 and up read Diamond, Pearl, or Platinum's ID as "Sinnoh". -// In Gen 4 and up, migrated Pokemon with HeartGold or SoulSilver's ID show the otherwise unused "Johto" string. +// In Gen 4 and up, migrated Pokémon with HeartGold or SoulSilver's ID show the otherwise unused "Johto" string. #define VERSION_SAPPHIRE 1 #define VERSION_RUBY 2 #define VERSION_EMERALD 3 diff --git a/include/constants/pokedex.h b/include/constants/pokedex.h index ffbbb2eb18..07e8c02fe2 100644 --- a/include/constants/pokedex.h +++ b/include/constants/pokedex.h @@ -1,7 +1,7 @@ #ifndef GUARD_CONSTANTS_POKEDEX_H #define GUARD_CONSTANTS_POKEDEX_H -// National Pokedex order. +// National Pokédex order // These constants are NOT disabled by P_GEN_X_POKEMON to keep pokedex_orders.h clean. enum { NATIONAL_DEX_NONE, @@ -1062,7 +1062,7 @@ enum { #define POKEMON_SLOTS_NUMBER (NATIONAL_DEX_COUNT + 1) -// Hoenn Pokedex order +// Hoenn Pokédex order enum { HOENN_DEX_NONE, HOENN_DEX_TREECKO, diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 06da4a179e..4c98258ada 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -1,7 +1,7 @@ #ifndef GUARD_CONSTANTS_POKEMON_H #define GUARD_CONSTANTS_POKEMON_H -// Pokemon types +// Pokémon types #define TYPE_NONE 255 #define TYPE_NORMAL 0 #define TYPE_FIGHTING 1 @@ -24,7 +24,7 @@ #define TYPE_FAIRY 18 #define NUMBER_OF_MON_TYPES 19 -// Pokemon egg groups +// Pokémon egg groups #define EGG_GROUP_NONE 0 #define EGG_GROUP_MONSTER 1 #define EGG_GROUP_WATER_1 2 @@ -44,7 +44,7 @@ #define EGG_GROUPS_PER_MON 2 -// Pokemon natures +// Pokémon natures #define NATURE_HARDY 0 #define NATURE_LONELY 1 #define NATURE_BRAVE 2 @@ -72,7 +72,7 @@ #define NATURE_QUIRKY 24 #define NUM_NATURES 25 -// Pokemon Stats +// Pokémon Stats #define STAT_HP 0 #define STAT_ATK 1 #define STAT_DEF 2 @@ -240,7 +240,7 @@ #define GROWTH_FAST 4 #define GROWTH_SLOW 5 -// Body colors for pokedex search +// Body colors for Pokédex search #define BODY_COLOR_RED 0 #define BODY_COLOR_BLUE 1 #define BODY_COLOR_YELLOW 2 @@ -316,7 +316,7 @@ #define MON_PIC_HEIGHT 64 #define MON_PIC_SIZE (MON_PIC_WIDTH * MON_PIC_HEIGHT / 2) -// Most pokemon have 2 frames (a default and an alternate for their animation). +// Most Pokémon have 2 frames (a default and an alternate for their animation). // There are 4 exceptions: // - Deoxys has 2 frames, 1 for each form // - Spinda has 1 frame, presumably to avoid the work of animating its spots diff --git a/include/constants/tv.h b/include/constants/tv.h index 13ec88ecdc..1b629fb039 100644 --- a/include/constants/tv.h +++ b/include/constants/tv.h @@ -170,7 +170,7 @@ #define NUM_SECRET_BASE_FLAGS 32 // by definition, bitfield of 2 u16s -// TV Show states for Pokemon Contest Live Updates +// TV Show states for Pokémon Contest Live Updates #define CONTESTLIVE_STATE_INTRO 0 #define CONTESTLIVE_STATE_WON_BOTH_ROUNDS 1 #define CONTESTLIVE_STATE_BETTER_ROUND2 2 diff --git a/include/contest.h b/include/contest.h index 9f2fafaf25..8a3b6a3c65 100644 --- a/include/contest.h +++ b/include/contest.h @@ -214,7 +214,7 @@ struct ContestantStatus u8 comboAppealBonus; u8 repeatJam; u8 nextTurnOrder; // turn position - u8 attentionLevel; // How much the Pokemon "stood out" + u8 attentionLevel; // How much the Pokémon "stood out" u8 contestantAnimTarget; }; diff --git a/include/global.h b/include/global.h index 84d5cafa7c..4ec9407912 100644 --- a/include/global.h +++ b/include/global.h @@ -509,7 +509,7 @@ struct SaveBlock2 /*0x90*/ u8 filler_90[0x8]; /*0x98*/ struct Time localTimeOffset; /*0xA0*/ struct Time lastBerryTreeUpdate; - /*0xA8*/ u32 gcnLinkFlags; // Read by Pokemon Colosseum/XD + /*0xA8*/ u32 gcnLinkFlags; // Read by Pokémon Colosseum/XD /*0xAC*/ u32 encryptionKey; /*0xB0*/ struct PlayersApprentice playerApprentice; /*0xDC*/ struct Apprentice apprentices[APPRENTICE_COUNT]; diff --git a/include/graphics.h b/include/graphics.h index d8248575f8..1c1ae1e523 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -62,7 +62,7 @@ extern const u32 gBallGfx_Cherish[]; extern const u32 gBallPal_Cherish[]; extern const u32 gOpenPokeballGfx[]; -// pokemon gfx +// Pokémon gfx extern const u16 gMonIconPalettes[][16]; // pokeblock @@ -278,7 +278,7 @@ extern const u32 gBattleTerrainPalette_StadiumGlacia[]; extern const u32 gBattleTerrainPalette_StadiumDrake[]; extern const u32 gBattleTerrainPalette_StadiumWallace[]; -// pokedex +// Pokédex extern const u32 gPokedexInterface_Gfx[]; extern const u16 gPokedexBgHoenn_Pal[]; extern const u32 gPokedexMenu_Gfx[]; @@ -1911,7 +1911,7 @@ extern const u32 gBerryPalette_Rowap[]; extern const u32 gBerryPalette_Kee[]; extern const u32 gBerryPalette_Maranga[]; -//pokenav +//PokéNav extern const u16 gPokenavCondition_Pal[]; extern const u32 gPokenavCondition_Gfx[]; extern const u32 gPokenavCondition_Tilemap[]; @@ -3133,11 +3133,11 @@ extern const u32 gBattleAnimBgImage_Rainbow[]; extern const u32 gBattleAnimBGPalette_Rainbow[]; extern const u32 gBattleAnimBgTilemap_Rainbow[]; -// Pokedex Area Screen +// Pokédex Area Screen extern const u32 gPokedexAreaScreenAreaUnknown_Gfx[]; extern const u16 gPokedexAreaScreenAreaUnknown_Pal[]; -// Pokemon Storage System +// Pokémon Storage System extern const u32 gStorageSystemMenu_Gfx[]; extern const u16 gStorageSystemPartyMenu_Pal[]; extern const u32 gStorageSystemPartyMenu_Tilemap[]; @@ -3265,7 +3265,7 @@ extern const u32 gBerryCrush_Crusher_Gfx[]; extern const u16 gBerryCrush_Crusher_Pal[]; extern const u32 gBerryCrush_TextWindows_Tilemap[]; -// Pokenav +// PokéNav extern const u32 gPokenavMessageBox_Gfx[]; extern const u32 gPokenavMessageBox_Tilemap[]; extern const u16 gPokenavMessageBox_Pal[]; diff --git a/include/pokemon.h b/include/pokemon.h index 709b867de0..aa94d2df62 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -533,6 +533,7 @@ struct Ability { u8 name[ABILITY_NAME_LENGTH + 1]; const u8 *description; + s8 aiRating; }; #define SPINDA_SPOT_WIDTH 16 diff --git a/include/pokemon_summary_screen.h b/include/pokemon_summary_screen.h index b313b59d9b..f56c3aca64 100755 --- a/include/pokemon_summary_screen.h +++ b/include/pokemon_summary_screen.h @@ -17,7 +17,7 @@ void ShowPokemonSummaryScreenHandleDeoxys(u8 mode, struct BoxPokemon *mons, u8 m u8 GetMoveSlotToReplace(void); void SummaryScreen_SetAnimDelayTaskId(u8 taskId); -// The Pokemon Summary Screen can operate in different modes. Certain features, +// The Pokémon Summary Screen can operate in different modes. Certain features, // such as move re-ordering, are available in the different modes. enum PokemonSummaryScreenMode { diff --git a/include/pokenav.h b/include/pokenav.h index c6a8bb253e..174c338e27 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -65,8 +65,8 @@ struct PokenavMonList enum { POKENAV_MODE_NORMAL, // Chosen from Start menu. - POKENAV_MODE_FORCE_CALL_READY, // Pokenav tutorial before calling Mr. Stone - POKENAV_MODE_FORCE_CALL_EXIT, // Pokenav tutorial after calling Mr. Stone + POKENAV_MODE_FORCE_CALL_READY, // PokéNav tutorial before calling Mr. Stone + POKENAV_MODE_FORCE_CALL_EXIT, // PokéNav tutorial after calling Mr. Stone }; enum @@ -232,8 +232,8 @@ enum [CHECK_PAGE_INTRO_2] = gText_MatchCall##name##_Intro2} -// Pokenav Function IDs -// Indices into the LoopedTask tables for each of the main Pokenav features +// PokéNav Function IDs +// Indices into the LoopedTask tables for each of the main PokéNav features enum RegionMapFuncIds { diff --git a/include/random.h b/include/random.h index 6e2615ee9e..a4f6a88e25 100644 --- a/include/random.h +++ b/include/random.h @@ -177,6 +177,7 @@ enum RandomTag RNG_QUICK_DRAW, RNG_QUICK_CLAW, RNG_TRACE, + RNG_FICKLE_BEAM, }; #define RandomWeighted(tag, ...) \ diff --git a/include/strings.h b/include/strings.h index 9184b4663a..589c2b4646 100644 --- a/include/strings.h +++ b/include/strings.h @@ -524,7 +524,7 @@ extern const u8 gText_Speed[]; extern const u8 gText_Dash[]; extern const u8 gText_Plus[]; -//pokedex text +//Pokédex text extern const u8 gText_CryOf[]; extern const u8 gText_SizeComparedTo[]; extern const u8 gText_PokedexRegistration[]; @@ -1130,7 +1130,7 @@ extern const u8 gTrickHouse_Mechadoll_Six2[]; extern const u8 gTrickHouse_Mechadoll_Seven2[]; extern const u8 gTrickHouse_Mechadoll_Eight2[]; -// Pokedex strings +// Pokédex strings extern const u8 gText_SearchForPkmnBasedOnParameters[]; extern const u8 gText_SwitchPokedexListings[]; extern const u8 gText_ReturnToPokedex[]; @@ -2897,7 +2897,7 @@ extern const u8 gText_WantToPlayAgain[]; extern const u8 gText_CommunicationStandby3[]; extern const u8 gText_SomeoneDroppedOut[]; -// Pokemon jump +// Pokémon jump extern const u8 gText_WantToPlayAgain2[]; extern const u8 gText_SomeoneDroppedOut2[]; extern const u8 gText_CommunicationStandby4[]; @@ -2972,7 +2972,7 @@ extern const u8 gText_CutenessContest[]; extern const u8 gText_SmartnessContest[]; extern const u8 gText_ToughnessContest[]; -// Pokenav Match Call +// PokéNav Match Call extern const u8 gText_CallCantBeMadeHere[]; extern const u8 gText_NumberRegistered[]; extern const u8 gText_NumberOfBattles[]; @@ -2982,7 +2982,7 @@ extern const u8 gText_Call[]; extern const u8 gText_Check[]; extern const u8 gText_Cancel6[]; -// Pokenav Menu Handler +// PokéNav Menu Handler extern const u8 gText_CheckMapOfHoenn[]; extern const u8 gText_CheckPokemonInDetail[]; extern const u8 gText_CallRegisteredTrainer[]; @@ -2999,7 +2999,7 @@ extern const u8 gText_FindToughPokemon[]; extern const u8 gText_ReturnToConditionMenu[]; extern const u8 gText_NoRibbonWinners[]; -// Pokenav +// PokéNav extern const u8 gText_NumberIndex[]; extern const u8 gText_RibbonsF700[]; diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 12dac510d3..6b7412f1ea 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -2759,8 +2759,8 @@ static s32 AI_DoubleBattle(u32 battlerAtk, u32 battlerDef, u32 move, s32 score) u32 atkPartnerAbility = aiData->abilities[BATTLE_PARTNER(battlerAtk)]; u32 atkPartnerHoldEffect = aiData->holdEffects[BATTLE_PARTNER(battlerAtk)]; bool32 partnerProtecting = (gBattleMoves[aiData->partnerMove].effect == EFFECT_PROTECT); - bool32 attackerHasBadAbility = (GetAbilityRating(aiData->abilities[battlerAtk]) < 0); - bool32 partnerHasBadAbility = (GetAbilityRating(atkPartnerAbility) < 0); + bool32 attackerHasBadAbility = (gAbilities[aiData->abilities[battlerAtk]].aiRating < 0); + bool32 partnerHasBadAbility = (gAbilities[atkPartnerAbility].aiRating < 0); u32 predictedMove = aiData->predictedMoves[battlerDef]; SetTypeBeforeUsingMove(move, battlerAtk); @@ -4314,7 +4314,7 @@ static s32 AI_CheckViability(u32 battlerAtk, u32 battlerDef, u32 move, s32 score ADJUST_SCORE(1); break; case EFFECT_SKILL_SWAP: - if (GetAbilityRating(aiData->abilities[battlerDef]) > GetAbilityRating(aiData->abilities[battlerAtk])) + if (gAbilities[aiData->abilities[battlerDef]].aiRating > gAbilities[aiData->abilities[battlerAtk]].aiRating) ADJUST_SCORE(1); break; case EFFECT_WORRY_SEED: @@ -4324,7 +4324,7 @@ static s32 AI_CheckViability(u32 battlerAtk, u32 battlerDef, u32 move, s32 score ADJUST_SCORE(2); break; case EFFECT_ENTRAINMENT: - if (IsAbilityOfRating(aiData->abilities[battlerDef], 5) || GetAbilityRating(aiData->abilities[battlerAtk]) <= 0) + if (IsAbilityOfRating(aiData->abilities[battlerDef], 5) || gAbilities[aiData->abilities[battlerAtk]].aiRating <= 0) { if (aiData->abilities[battlerDef] != aiData->abilities[battlerAtk] && !(gStatuses3[battlerDef] & STATUS3_GASTRO_ACID)) ADJUST_SCORE(2); diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index 5f96ef1e34..43450089c4 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -249,7 +249,7 @@ static bool32 ShouldSwitchIfWonderGuard(u32 battler, bool32 emitResult) if (GetBattlerAbility(GetBattlerAtPosition(opposingPosition)) != ABILITY_WONDER_GUARD) return FALSE; - // Check if Pokemon has a super effective move. + // Check if Pokémon has a super effective move. for (opposingBattler = GetBattlerAtPosition(opposingPosition), i = 0; i < MAX_MON_MOVES; i++) { move = gBattleMons[battler].moves[i]; @@ -268,7 +268,7 @@ static bool32 ShouldSwitchIfWonderGuard(u32 battler, bool32 emitResult) else party = gEnemyParty; - // Find a Pokemon in the party that has a super effective move. + // Find a Pokémon in the party that has a super effective move. for (i = firstId; i < lastId; i++) { if (!IsValidForBattle(&party[i])) @@ -295,7 +295,7 @@ static bool32 ShouldSwitchIfWonderGuard(u32 battler, bool32 emitResult) } } - return FALSE; // There is not a single Pokemon in the party that has a super effective move against a mon with Wonder Guard. + return FALSE; // There is not a single Pokémon in the party that has a super effective move against a mon with Wonder Guard. } static bool32 FindMonThatAbsorbsOpponentsMove(u32 battler, bool32 emitResult) diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index f62feafb22..06f24b0e6e 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -35,267 +35,6 @@ static u32 AI_GetEffectiveness(uq4_12_t multiplier); // Const Data -static const s8 sAiAbilityRatings[ABILITIES_COUNT] = -{ - [ABILITY_ADAPTABILITY] = 8, - [ABILITY_AFTERMATH] = 5, - [ABILITY_AERILATE] = 8, - [ABILITY_AIR_LOCK] = 5, - [ABILITY_ANALYTIC] = 5, - [ABILITY_ANGER_POINT] = 4, - [ABILITY_ANTICIPATION] = 2, - [ABILITY_ARENA_TRAP] = 9, - [ABILITY_AROMA_VEIL] = 3, - [ABILITY_AURA_BREAK] = 3, - [ABILITY_BAD_DREAMS] = 4, - [ABILITY_BATTERY] = 0, - [ABILITY_BATTLE_ARMOR] = 2, - [ABILITY_BATTLE_BOND] = 6, - [ABILITY_BEAST_BOOST] = 7, - [ABILITY_BERSERK] = 5, - [ABILITY_BIG_PECKS] = 1, - [ABILITY_BLAZE] = 5, - [ABILITY_BULLETPROOF] = 7, - [ABILITY_CHEEK_POUCH] = 4, - [ABILITY_CHLOROPHYLL] = 6, - [ABILITY_CLEAR_BODY] = 4, - [ABILITY_CLOUD_NINE] = 5, - [ABILITY_COLOR_CHANGE] = 2, - [ABILITY_COMATOSE] = 6, - [ABILITY_COMPETITIVE] = 5, - [ABILITY_COMPOUND_EYES] = 7, - [ABILITY_CONTRARY] = 8, - [ABILITY_CORROSION] = 5, - [ABILITY_CURSED_BODY] = 4, - [ABILITY_CUTE_CHARM] = 2, - [ABILITY_DAMP] = 2, - [ABILITY_DANCER] = 5, - [ABILITY_DARK_AURA] = 6, - [ABILITY_DAZZLING] = 5, - [ABILITY_DEFEATIST] = -1, - [ABILITY_DEFIANT] = 5, - [ABILITY_DELTA_STREAM] = 10, - [ABILITY_DESOLATE_LAND] = 10, - [ABILITY_DISGUISE] = 8, - [ABILITY_DOWNLOAD] = 7, - [ABILITY_DRIZZLE] = 9, - [ABILITY_DROUGHT] = 9, - [ABILITY_DRY_SKIN] = 6, - [ABILITY_EARLY_BIRD] = 4, - [ABILITY_EFFECT_SPORE] = 4, - [ABILITY_ELECTRIC_SURGE] = 8, - [ABILITY_EMERGENCY_EXIT] = 3, - [ABILITY_FAIRY_AURA] = 6, - [ABILITY_FILTER] = 6, - [ABILITY_FLAME_BODY] = 4, - [ABILITY_FLARE_BOOST] = 5, - [ABILITY_FLASH_FIRE] = 6, - [ABILITY_FLOWER_GIFT] = 4, - [ABILITY_FLOWER_VEIL] = 0, - [ABILITY_FLUFFY] = 5, - [ABILITY_FORECAST] = 6, - [ABILITY_FOREWARN] = 2, - [ABILITY_FRIEND_GUARD] = 0, - [ABILITY_FRISK] = 3, - [ABILITY_FULL_METAL_BODY] = 4, - [ABILITY_FUR_COAT] = 7, - [ABILITY_GALE_WINGS] = 6, - [ABILITY_GALVANIZE] = 8, - [ABILITY_GLUTTONY] = 3, - [ABILITY_GOOEY] = 5, - [ABILITY_GRASS_PELT] = 2, - [ABILITY_GRASSY_SURGE] = 8, - [ABILITY_GUTS] = 6, - [ABILITY_HARVEST] = 5, - [ABILITY_HEALER] = 0, - [ABILITY_HEATPROOF] = 5, - [ABILITY_HEAVY_METAL] = -1, - [ABILITY_HONEY_GATHER] = 0, - [ABILITY_HUGE_POWER] = 10, - [ABILITY_HUSTLE] = 7, - [ABILITY_HYDRATION] = 4, - [ABILITY_HYPER_CUTTER] = 3, - [ABILITY_ICE_BODY] = 3, - [ABILITY_ILLUMINATE] = 0, - [ABILITY_ILLUSION] = 8, - [ABILITY_IMMUNITY] = 4, - [ABILITY_IMPOSTER] = 9, - [ABILITY_INFILTRATOR] = 6, - [ABILITY_INNARDS_OUT] = 5, - [ABILITY_INNER_FOCUS] = 2, - [ABILITY_INSOMNIA] = 4, - [ABILITY_INTIMIDATE] = 7, - [ABILITY_IRON_BARBS] = 6, - [ABILITY_IRON_FIST] = 6, - [ABILITY_JUSTIFIED] = 4, - [ABILITY_KEEN_EYE] = 1, - [ABILITY_KLUTZ] = -1, - [ABILITY_LEAF_GUARD] = 2, - [ABILITY_LEVITATE] = 7, - [ABILITY_LIGHT_METAL] = 2, - [ABILITY_LIGHTNING_ROD] = 7, - [ABILITY_LIMBER] = 3, - [ABILITY_LIQUID_OOZE] = 3, - [ABILITY_LIQUID_VOICE] = 5, - [ABILITY_LONG_REACH] = 3, - [ABILITY_MAGIC_BOUNCE] = 9, - [ABILITY_MAGIC_GUARD] = 9, - [ABILITY_MAGICIAN] = 3, - [ABILITY_MAGMA_ARMOR] = 1, - [ABILITY_MAGNET_PULL] = 9, - [ABILITY_MARVEL_SCALE] = 5, - [ABILITY_MEGA_LAUNCHER] = 7, - [ABILITY_MERCILESS] = 4, - [ABILITY_MINUS] = 0, - [ABILITY_MISTY_SURGE] = 8, - [ABILITY_MOLD_BREAKER] = 7, - [ABILITY_MOODY] = 10, - [ABILITY_MOTOR_DRIVE] = 6, - [ABILITY_MOXIE] = 7, - [ABILITY_MULTISCALE] = 8, - [ABILITY_MULTITYPE] = 8, - [ABILITY_MUMMY] = 5, - [ABILITY_NATURAL_CURE] = 7, - [ABILITY_NEUROFORCE] = 6, - [ABILITY_NO_GUARD] = 8, - [ABILITY_NORMALIZE] = -1, - [ABILITY_OBLIVIOUS] = 2, - [ABILITY_OVERCOAT] = 5, - [ABILITY_OVERGROW] = 5, - [ABILITY_OWN_TEMPO] = 3, - [ABILITY_PARENTAL_BOND] = 10, - [ABILITY_PICKUP] = 1, - [ABILITY_PICKPOCKET] = 3, - [ABILITY_PIXILATE] = 8, - [ABILITY_PLUS] = 0, - [ABILITY_POISON_HEAL] = 8, - [ABILITY_POISON_POINT] = 4, - [ABILITY_POISON_TOUCH] = 4, - [ABILITY_POWER_CONSTRUCT] = 10, - [ABILITY_POWER_OF_ALCHEMY] = 0, - [ABILITY_PRANKSTER] = 8, - [ABILITY_PRESSURE] = 5, - [ABILITY_PRIMORDIAL_SEA] = 10, - [ABILITY_PRISM_ARMOR] = 6, - [ABILITY_PROTEAN] = 8, - [ABILITY_PSYCHIC_SURGE] = 8, - [ABILITY_PURE_POWER] = 10, - [ABILITY_QUEENLY_MAJESTY] = 6, - [ABILITY_QUICK_FEET] = 5, - [ABILITY_RAIN_DISH] = 3, - [ABILITY_RATTLED] = 3, - [ABILITY_RECEIVER] = 0, - [ABILITY_RECKLESS] = 6, - [ABILITY_REFRIGERATE] = 8, - [ABILITY_REGENERATOR] = 8, - [ABILITY_RIVALRY] = 1, - [ABILITY_RKS_SYSTEM] = 8, - [ABILITY_ROCK_HEAD] = 5, - [ABILITY_ROUGH_SKIN] = 6, - [ABILITY_RUN_AWAY] = 0, - [ABILITY_SAND_FORCE] = 4, - [ABILITY_SAND_RUSH] = 6, - [ABILITY_SAND_STREAM] = 9, - [ABILITY_SAND_VEIL] = 3, - [ABILITY_SAP_SIPPER] = 7, - [ABILITY_SCHOOLING] = 6, - [ABILITY_SCRAPPY] = 6, - [ABILITY_SERENE_GRACE] = 8, - [ABILITY_SHADOW_SHIELD] = 8, - [ABILITY_SHADOW_TAG] = 10, - [ABILITY_SHED_SKIN] = 7, - [ABILITY_SHEER_FORCE] = 8, - [ABILITY_SHELL_ARMOR] = 2, - [ABILITY_SHIELD_DUST] = 5, - [ABILITY_SHIELDS_DOWN] = 6, - [ABILITY_SIMPLE] = 8, - [ABILITY_SKILL_LINK] = 7, - [ABILITY_SLOW_START] = -2, - [ABILITY_SLUSH_RUSH] = 5, - [ABILITY_SNIPER] = 3, - [ABILITY_SNOW_CLOAK] = 3, - [ABILITY_SNOW_WARNING] = 8, - [ABILITY_SOLAR_POWER] = 3, - [ABILITY_SOLID_ROCK] = 6, - [ABILITY_SOUL_HEART] = 7, - [ABILITY_SOUNDPROOF] = 4, - [ABILITY_SPEED_BOOST] = 9, - [ABILITY_STAKEOUT] = 6, - [ABILITY_STALL] = -1, - [ABILITY_STAMINA] = 6, - [ABILITY_STANCE_CHANGE] = 10, - [ABILITY_STATIC] = 4, - [ABILITY_STEADFAST] = 2, - [ABILITY_STEELWORKER] = 6, - [ABILITY_STENCH] = 1, - [ABILITY_STICKY_HOLD] = 3, - [ABILITY_STORM_DRAIN] = 7, - [ABILITY_STRONG_JAW] = 6, - [ABILITY_STURDY] = 6, - [ABILITY_SUCTION_CUPS] = 2, - [ABILITY_SUPER_LUCK] = 3, - [ABILITY_SURGE_SURFER] = 4, - [ABILITY_SWARM] = 5, - [ABILITY_SWEET_VEIL] = 4, - [ABILITY_SWIFT_SWIM] = 6, - [ABILITY_SYMBIOSIS] = 0, - [ABILITY_SYNCHRONIZE] = 4, - [ABILITY_TANGLED_FEET] = 2, - [ABILITY_TANGLING_HAIR] = 5, - [ABILITY_TECHNICIAN] = 8, - [ABILITY_TELEPATHY] = 0, - [ABILITY_TERAVOLT] = 7, - [ABILITY_THICK_FAT] = 7, - [ABILITY_TINTED_LENS] = 7, - [ABILITY_TORRENT] = 5, - [ABILITY_TOXIC_BOOST] = 6, - [ABILITY_TOUGH_CLAWS] = 7, - [ABILITY_TRACE] = 6, - [ABILITY_TRIAGE] = 7, - [ABILITY_TRUANT] = -2, - [ABILITY_TURBOBLAZE] = 7, - [ABILITY_UNAWARE] = 6, - [ABILITY_UNBURDEN] = 7, - [ABILITY_UNNERVE] = 3, - [ABILITY_VICTORY_STAR] = 6, - [ABILITY_VITAL_SPIRIT] = 4, - [ABILITY_VOLT_ABSORB] = 7, - [ABILITY_WATER_ABSORB] = 7, - [ABILITY_WATER_BUBBLE] = 8, - [ABILITY_WATER_COMPACTION] = 4, - [ABILITY_WATER_VEIL] = 4, - [ABILITY_WEAK_ARMOR] = 2, - [ABILITY_WHITE_SMOKE] = 4, - [ABILITY_WIMP_OUT] = 3, - [ABILITY_WONDER_GUARD] = 10, - [ABILITY_WONDER_SKIN] = 4, - [ABILITY_ZEN_MODE] = -1, - [ABILITY_INTREPID_SWORD] = 3, - [ABILITY_DAUNTLESS_SHIELD] = 3, - [ABILITY_BALL_FETCH] = 0, - [ABILITY_COTTON_DOWN] = 3, - [ABILITY_MIRROR_ARMOR] = 6, - [ABILITY_GULP_MISSILE] = 3, - [ABILITY_STALWART] = 2, - [ABILITY_PROPELLER_TAIL] = 2, - [ABILITY_STEAM_ENGINE] = 3, - [ABILITY_PUNK_ROCK] = 2, - [ABILITY_SAND_SPIT] = 5, - [ABILITY_ICE_SCALES] = 7, - [ABILITY_RIPEN] = 4, - [ABILITY_ICE_FACE] = 4, - [ABILITY_POWER_SPOT] = 2, - [ABILITY_MIMICRY] = 2, - [ABILITY_SCREEN_CLEANER] = 3, - [ABILITY_NEUTRALIZING_GAS] = 5, - [ABILITY_HUNGER_SWITCH] = 2, - [ABILITY_PASTEL_VEIL] = 4, - [ABILITY_STEELY_SPIRIT] = 2, - [ABILITY_PERISH_BODY] = -1, - [ABILITY_WANDERING_SPIRIT] = 2, - [ABILITY_GORILLA_TACTICS] = 4, -}; - static const u16 sEncouragedEncoreEffects[] = { EFFECT_DREAM_EATER, @@ -3526,16 +3265,11 @@ bool32 SideHasMoveCategory(u32 battlerId, u32 category) bool32 IsAbilityOfRating(u32 ability, s8 rating) { - if (sAiAbilityRatings[ability] >= rating) + if (gAbilities[ability].aiRating >= rating) return TRUE; return FALSE; } -s8 GetAbilityRating(u32 ability) -{ - return sAiAbilityRatings[ability]; -} - static const u16 sRecycleEncouragedItems[] = { ITEM_CHESTO_BERRY, diff --git a/src/battle_anim_mon_movement.c b/src/battle_anim_mon_movement.c index 5f52d6cd67..7caac0a869 100644 --- a/src/battle_anim_mon_movement.c +++ b/src/battle_anim_mon_movement.c @@ -543,7 +543,7 @@ static void SlideMonToOriginalPos_Step(struct Sprite *sprite) } // Linearly translates a mon to a target offset. The horizontal offset -// is mirrored for the opponent's pokemon, and the vertical offset +// is mirrored for the opponent's Pokémon, and the vertical offset // is only mirrored if arg 3 is set to 1. // arg 0: 0 = attacker, 1 = target // arg 1: target x pixel offset diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index 891fa402f5..b01f59a260 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -52,7 +52,7 @@ const struct UCoords8 sBattlerCoords[][MAX_BATTLERS_COUNT] = }, }; -// Placeholders for pokemon sprites to be created for a move animation effect (e.g. Role Play / Snatch) +// Placeholders for Pokémon sprites to be created for a move animation effect (e.g. Role Play / Snatch) #define TAG_MOVE_EFFECT_MON_1 55125 #define TAG_MOVE_EFFECT_MON_2 55126 @@ -2052,7 +2052,7 @@ u8 GetBattlerSpriteBGPriorityRank(u8 battlerId) return 1; } -// Create pokemon sprite to be used for a move animation effect (e.g. Role Play / Snatch) +// Create Pokémon sprite to be used for a move animation effect (e.g. Role Play / Snatch) u8 CreateAdditionalMonSpriteForMoveAnim(u16 species, bool8 isBackpic, u8 id, s16 x, s16 y, u8 subpriority, u32 personality, bool8 isShiny, u32 battlerId) { u8 spriteId; diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index c039b7c454..ec5945d633 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -1279,12 +1279,12 @@ static void Intro_TryShinyAnimShowHealthbox(u32 battler) bool32 bgmRestored = FALSE; bool32 battlerAnimsDone = FALSE; - // Start shiny animation if applicable for 1st pokemon + // Start shiny animation if applicable for 1st Pokémon if (!gBattleSpritesDataPtr->healthBoxesData[battler].triedShinyMonAnim && !gBattleSpritesDataPtr->healthBoxesData[battler].ballAnimActive) TryShinyAnimation(battler, &gPlayerParty[gBattlerPartyIndexes[battler]]); - // Start shiny animation if applicable for 2nd pokemon + // Start shiny animation if applicable for 2nd Pokémon if (!gBattleSpritesDataPtr->healthBoxesData[BATTLE_PARTNER(battler)].triedShinyMonAnim && !gBattleSpritesDataPtr->healthBoxesData[BATTLE_PARTNER(battler)].ballAnimActive) TryShinyAnimation(BATTLE_PARTNER(battler), &gPlayerParty[gBattlerPartyIndexes[BATTLE_PARTNER(battler)]]); diff --git a/src/battle_dome.c b/src/battle_dome.c index 0835c5809a..1997fd3e3a 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -2224,7 +2224,7 @@ static void CreateDomeOpponentMon(u8 monPartyId, u16 tournamentTrainerId, u8 tou #ifdef BUGFIX u8 fixedIv = GetDomeTrainerMonIvs(DOME_TRAINERS[tournamentTrainerId].trainerId); #else - u8 fixedIv = GetDomeTrainerMonIvs(tournamentTrainerId); // BUG: Using the wrong ID. As a result, all Pokemon have ivs of 3. + u8 fixedIv = GetDomeTrainerMonIvs(tournamentTrainerId); // BUG: Using the wrong ID. As a result, all Pokémon have ivs of 3. #endif u8 level = SetFacilityPtrsGetLevel(); CreateMonWithEVSpreadNatureOTID(&gEnemyParty[monPartyId], @@ -2286,13 +2286,13 @@ static void CreateDomeOpponentMons(u16 tournamentTrainerId) } } -// Returns a bitmask representing which 2 of the trainer's 3 pokemon to select. +// Returns a bitmask representing which 2 of the trainer's 3 Pokémon to select. // The choice is calculated solely depending on the type effectiveness of their -// movesets against the player's pokemon. +// movesets against the player's Pokémon. // There is a 50% chance of either a "good" or "bad" selection mode being used. // In the good mode movesets are preferred which are more effective against the -// player, and in the bad mode the opposite is true. If all 3 pokemon tie, the -// other mode will be tried. If they tie again, the pokemon selection is random. +// player, and in the bad mode the opposite is true. If all 3 Pokémon tie, the +// other mode will be tried. If they tie again, the Pokémon selection is random. int GetDomeTrainerSelectedMons(u16 tournamentTrainerId) { int selectedMonBits; @@ -4746,7 +4746,7 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo) if (lost[1]) gSprites[sInfoCard->spriteIds[1 + arrId]].oam.paletteNum = 3; - // Draw left trainer's pokemon icons. + // Draw left trainer's Pokémon icons. for (i = 0; i < FRONTIER_PARTY_SIZE; i++) { if (trainerIds[0] == TRAINER_PLAYER) @@ -4786,7 +4786,7 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo) } } - // Draw right trainer's pokemon icons. + // Draw right trainer's Pokémon icons. for (i = 0; i < FRONTIER_PARTY_SIZE; i++) { if (trainerIds[1] == TRAINER_PLAYER) @@ -5137,7 +5137,7 @@ static u16 GetWinningMove(int winnerTournamentId, int loserTournamentId, u8 roun int movePower = 0; SetFacilityPtrsGetLevel(); - // Calc move points of all 4 moves for all 3 pokemon hitting all 3 target mons. + // Calc move points of all 4 moves for all 3 Pokémon hitting all 3 target mons. for (i = 0; i < FRONTIER_PARTY_SIZE; i++) { for (j = 0; j < MAX_MON_MOVES; j++) diff --git a/src/battle_factory.c b/src/battle_factory.c index 4543bfbad4..8e3f84b359 100644 --- a/src/battle_factory.c +++ b/src/battle_factory.c @@ -337,7 +337,7 @@ static void GenerateOpponentMons(void) if (gFacilityTrainerMons[monId].species == SPECIES_UNOWN) continue; - // Ensure none of the opponent's pokemon are the same as the potential rental pokemon for the player + // Ensure none of the opponent's Pokémon are the same as the potential rental Pokémon for the player for (j = 0; j < (int)ARRAY_COUNT(gSaveBlock2Ptr->frontier.rentalMons); j++) { if (gFacilityTrainerMons[monId].species == gFacilityTrainerMons[gSaveBlock2Ptr->frontier.rentalMons[j].monId].species) @@ -346,7 +346,7 @@ static void GenerateOpponentMons(void) if (j != (int)ARRAY_COUNT(gSaveBlock2Ptr->frontier.rentalMons)) continue; - // "High tier" pokemon are only allowed on open level mode + // "High tier" Pokémon are only allowed on open level mode if (lvlMode == FRONTIER_LVL_50 && monId > FRONTIER_MONS_HIGH_TIER) continue; @@ -554,7 +554,7 @@ static void GenerateInitialRentalMons(void) i = 0; while (i != PARTY_SIZE) { - if (i < rentalRank) // The more times the player has rented, the more initial rentals are generated from a better set of pokemon + if (i < rentalRank) // The more times the player has rented, the more initial rentals are generated from a better set of Pokémon monId = GetFactoryMonId(factoryLvlMode, challengeNum, TRUE); else monId = GetFactoryMonId(factoryLvlMode, challengeNum, FALSE); @@ -562,7 +562,7 @@ static void GenerateInitialRentalMons(void) if (gFacilityTrainerMons[monId].species == SPECIES_UNOWN) continue; - // Cannot have two pokemon of the same species. + // Cannot have two Pokémon of the same species. for (j = firstMonId; j < firstMonId + i; j++) { u16 existingMonId = monIds[j]; diff --git a/src/battle_factory_screen.c b/src/battle_factory_screen.c index d010ec53c8..e945361f33 100644 --- a/src/battle_factory_screen.c +++ b/src/battle_factory_screen.c @@ -32,15 +32,15 @@ #include "constants/songs.h" #include "constants/rgb.h" -// Select_ refers to the first Pokemon selection screen where you choose your initial 3 rental Pokemon. -// Swap_ refers to the subsequent selection screens where you can swap a Pokemon with one from the beaten trainer +// Select_ refers to the first Pokémon selection screen where you choose your initial 3 rental Pokémon. +// Swap_ refers to the subsequent selection screens where you can swap a Pokémon with one from the beaten trainer // Note that, generally, "Action" will refer to the immediate actions that can be taken on each screen, -// i.e. selecting a pokemon or selecting the Cancel button +// i.e. selecting a Pokémon or selecting the Cancel button // The "Options menu" will refer to the popup menu that shows when some actions have been selected -#define SWAP_PLAYER_SCREEN 0 // The screen where the player selects which of their pokemon to swap away -#define SWAP_ENEMY_SCREEN 1 // The screen where the player selects which new pokemon from the defeated party to swap for +#define SWAP_PLAYER_SCREEN 0 // The screen where the player selects which of their Pokémon to swap away +#define SWAP_ENEMY_SCREEN 1 // The screen where the player selects which new Pokémon from the defeated party to swap for #define SELECTABLE_MONS_COUNT 6 @@ -89,7 +89,7 @@ struct FactorySelectableMon { u16 monId; u16 ballSpriteId; - u8 selectedId; // 0 - not selected, 1 - first pokemon, 2 - second pokemon, 3 - third pokemon + u8 selectedId; // 0 - not selected, 1 - first Pokémon, 2 - second Pokémon, 3 - third Pokémon struct Pokemon monData; }; @@ -1060,7 +1060,7 @@ static void SpriteCB_Pokeball(struct Sprite *sprite) { if (sprite->oam.paletteNum == IndexOfSpritePaletteTag(PALTAG_BALL_SELECTED)) { - // Pokeball selected, do rocking animation + // Poké Ball selected, do rocking animation if (sprite->animEnded) { if (sprite->data[0] != 0) @@ -1084,7 +1084,7 @@ static void SpriteCB_Pokeball(struct Sprite *sprite) } else { - // Pokeball not selected, remain still + // Poké Ball not selected, remain still StartSpriteAnimIfDifferent(sprite, 0); } } @@ -1521,7 +1521,7 @@ static void Select_Task_Exit(u8 taskId) } } -// Handles the Yes/No prompt when confirming the 3 selected rental pokemon +// Handles the Yes/No prompt when confirming the 3 selected rental Pokémon static void Select_Task_HandleYesNo(u8 taskId) { if (sFactorySelectScreen->monPicAnimating == TRUE) @@ -1543,14 +1543,14 @@ static void Select_Task_HandleYesNo(u8 taskId) PlaySE(SE_SELECT); if (sFactorySelectScreen->yesNoCursorPos == 0) { - // Selected Yes, confirmed selected pokemon + // Selected Yes, confirmed selected Pokémon Select_HideChosenMons(); gTasks[taskId].tState = 0; gTasks[taskId].func = Select_Task_Exit; } else { - // Selected No, continue choosing pokemon + // Selected No, continue choosing Pokémon Select_ErasePopupMenu(SELECT_WIN_YES_NO); Select_DeclineChosenMons(); sFactorySelectScreen->fadeSpeciesNameActive = TRUE; @@ -1560,7 +1560,7 @@ static void Select_Task_HandleYesNo(u8 taskId) } else if (JOY_NEW(B_BUTTON)) { - // Pressed B, Continue choosing pokemon + // Pressed B, Continue choosing Pokémon PlaySE(SE_SELECT); Select_ErasePopupMenu(SELECT_WIN_YES_NO); Select_DeclineChosenMons(); @@ -1582,7 +1582,7 @@ static void Select_Task_HandleYesNo(u8 taskId) } } -// Handles the popup menu that shows when a pokemon is selected +// Handles the popup menu that shows when a Pokémon is selected static void Select_Task_HandleMenu(u8 taskId) { switch (gTasks[taskId].tState) @@ -2416,7 +2416,7 @@ static void Swap_Task_Exit(u8 taskId) { case 0: // Set return value for script - // TRUE if player kept their current pokemon + // TRUE if player kept their current Pokémon if (sFactorySwapScreen->monSwapped == TRUE) { gTasks[taskId].tState++; @@ -2631,7 +2631,7 @@ static void Swap_Task_HandleMenu(u8 taskId) } } -// Handles input on the two main swap screens (choosing a current pokeon to get rid of, and choosing a new pokemon to receive) +// Handles input on the two main swap screens (choosing a current pokeon to get rid of, and choosing a new Pokémon to receive) static void Swap_Task_HandleChooseMons(u8 taskId) { switch (gTasks[taskId].tState) @@ -2646,7 +2646,7 @@ static void Swap_Task_HandleChooseMons(u8 taskId) case STATE_CHOOSE_MONS_HANDLE_INPUT: if (JOY_NEW(A_BUTTON)) { - // Run whatever action is currently selected (a pokeball, the Cancel button, etc.) + // Run whatever action is currently selected (a Poké Ball, the Cancel button, etc.) PlaySE(SE_SELECT); sFactorySwapScreen->fadeSpeciesNameActive = FALSE; Swap_PrintMonSpeciesAtFade(); @@ -3554,7 +3554,7 @@ static void Swap_HandleActionCursorChange(u8 cursorId) { if (cursorId < FRONTIER_PARTY_SIZE) { - // Cursor is on one of the pokemon + // Cursor is on one of the Pokémon gSprites[sFactorySwapScreen->cursorSpriteId].invisible = FALSE; Swap_HideActionButtonHighlights(); gSprites[sFactorySwapScreen->cursorSpriteId].x = gSprites[sFactorySwapScreen->ballSpriteIds[cursorId]].x; diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 06deedaaa5..2f72197bf9 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -103,7 +103,7 @@ void FreeBattleSpritesData(void) FREE_AND_SET_NULL(gBattleSpritesDataPtr); } -// Pokemon chooses move to use in Battle Palace rather than player +// Pokémon chooses move to use in Battle Palace rather than player u16 ChooseMoveAndTargetInBattlePalace(u32 battler) { s32 i, var1, var2; @@ -163,7 +163,7 @@ u16 ChooseMoveAndTargetInBattlePalace(u32 battler) chosenMoveId = BattleAI_ChooseMoveOrAction(); } - // If no moves matched the selected group, pick a new move from groups the pokemon has + // If no moves matched the selected group, pick a new move from groups the Pokémon has // In this case the AI is not checked again, so the choice may be worse // If a move is chosen this way, there's a 50% chance that it will be unable to use it anyway if (chosenMoveId == -1 || chosenMoveId >= MAX_MON_MOVES) @@ -356,7 +356,7 @@ static u16 GetBattlePalaceTarget(u32 battler) return BATTLE_OPPOSITE(battler) << 8; } -// Wait for the pokemon to finish appearing out from the pokeball on send out +// Wait for the Pokémon to finish appearing out from the Poké Ball on send out void SpriteCB_WaitForBattlerBallReleaseAnim(struct Sprite *sprite) { u8 spriteId = sprite->data[1]; diff --git a/src/battle_main.c b/src/battle_main.c index 9930fa56fe..951766adcd 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -3263,6 +3263,7 @@ const u8* FaintClearSetData(u32 battler) gProtectStructs[battler].quash = FALSE; gProtectStructs[battler].obstructed = FALSE; gProtectStructs[battler].silkTrapped = FALSE; + gProtectStructs[battler].burningBulwarked = FALSE; gProtectStructs[battler].endured = FALSE; gProtectStructs[battler].noValidMoves = FALSE; gProtectStructs[battler].helpingHand = FALSE; diff --git a/src/battle_message.c b/src/battle_message.c index c0462846d3..b421836f4a 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -834,9 +834,11 @@ static const u8 sText_TheSeaOfFireDisappeared[] = _("The sea of fire around {B_A static const u8 sText_SwampEnvelopedSide[] = _("A swamp enveloped\n{B_DEF_TEAM2} team!"); static const u8 sText_TheSwampDisappeared[] = _("The swamp around {B_ATK_TEAM2}\nteam disappeared!"); static const u8 sText_HospitalityRestoration[] = _("The {B_ATK_PARTNER_NAME} drank down all\nthe matcha that Sinistcha made!"); +static const u8 sText_ElectroShockCharging[] = _("{B_ATK_NAME_WITH_PREFIX} absorbed\nelectricity!"); const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { + [STRINGID_ELECTROSHOCKCHARGING - BATTLESTRINGS_TABLE_START] = sText_ElectroShockCharging, [STRINGID_HOSPITALITYRESTORATION - BATTLESTRINGS_TABLE_START] = sText_HospitalityRestoration, [STRINGID_THESWAMPDISAPPEARED - BATTLESTRINGS_TABLE_START] = sText_TheSwampDisappeared, [STRINGID_SWAMPENVELOPEDSIDE - BATTLESTRINGS_TABLE_START] = sText_SwampEnvelopedSide, @@ -1764,6 +1766,7 @@ const u16 gFirstTurnOfTwoStringIds[] = [B_MSG_TURN1_FREEZE_SHOCK] = STRINGID_CLOAKEDINAFREEZINGLIGHT, [B_MSG_TURN1_SKY_DROP] = STRINGID_PKMNTOOKTARGETHIGH, [B_MSG_TURN1_METEOR_BEAM] = STRINGID_METEORBEAMCHARGING, + [B_MSG_TURN1_ELECTRO_SHOCK] = STRINGID_ELECTROSHOCKCHARGING, }; // Index copied from move's index in sTrappingMoves @@ -2921,7 +2924,7 @@ void BufferStringBattle(u16 stringID, u32 battler) } } break; - case STRINGID_USEDMOVE: // pokemon used a move msg + case STRINGID_USEDMOVE: // Pokémon used a move msg if (gBattleStruct->zmove.active && gBattleStruct->zmove.activeCategory != BATTLE_CATEGORY_STATUS) StringCopy(gBattleTextBuff3, GetZMoveName(gBattleMsgDataPtr->currentMove)); else if (IsMaxMove(gBattleMsgDataPtr->currentMove)) @@ -3236,7 +3239,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst) { u32 dstID = 0; // if they used dstID, why not use srcID as well? const u8 *toCpy = NULL; - // This buffer may hold either the name of a trainer, pokemon, or item. + // This buffer may hold either the name of a trainer, Pokémon, or item. u8 text[max(max(max(32, TRAINER_NAME_LENGTH + 1), POKEMON_NAME_LENGTH + 1), ITEM_NAME_LENGTH)]; u8 multiplayerId; diff --git a/src/battle_pike.c b/src/battle_pike.c index 4a2065be44..3869531d20 100644 --- a/src/battle_pike.c +++ b/src/battle_pike.c @@ -1268,7 +1268,7 @@ static void TryHealMons(u8 healCount) for (i = 0; i < FRONTIER_PARTY_SIZE; i++) indices[i] = i; - // Only 'healCount' number of pokemon will be healed. + // Only 'healCount' number of Pokémon will be healed. // The order in which they're (attempted to be) healed is random, Shuffle(indices, FRONTIER_PARTY_SIZE, sizeof(indices[0])); diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 4a2f95215d..d2a0a931b8 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -3127,6 +3127,9 @@ void SetMoveEffect(bool32 primary, bool32 certain) switch (gBattleScripting.moveEffect) { case MOVE_EFFECT_CONFUSION: + if (gCurrentMove == MOVE_ALLURING_VOICE && !gProtectStructs[gEffectBattler].statRaised) + break; + if (!CanBeConfused(gEffectBattler)) { gBattlescriptCurrInstr++; @@ -3528,6 +3531,7 @@ void SetMoveEffect(bool32 primary, bool32 certain) gProtectStructs[gBattlerTarget].banefulBunkered = FALSE; gProtectStructs[gBattlerTarget].obstructed = FALSE; gProtectStructs[gBattlerTarget].silkTrapped = FALSE; + gProtectStructs[gBattlerAttacker].burningBulwarked = FALSE; BattleScriptPush(gBattlescriptCurrInstr + 1); if (gCurrentMove == MOVE_HYPERSPACE_FURY) gBattlescriptCurrInstr = BattleScript_HyperspaceFuryRemoveProtect; @@ -4341,7 +4345,7 @@ static void Cmd_getexp(void) if (IsTradedMon(&gPlayerParty[*expMonId])) { - // check if the pokemon doesn't belong to the player + // check if the Pokémon doesn't belong to the player if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && *expMonId >= 3) i = STRINGID_EMPTYSTRING4; else @@ -5422,6 +5426,15 @@ static void Cmd_moveend(void) gBattlescriptCurrInstr = BattleScript_KingsShieldEffect; effect = 1; } + else if (gProtectStructs[gBattlerTarget].burningBulwarked) + { + gProtectStructs[gBattlerAttacker].touchedProtectLike = FALSE; + gBattleScripting.moveEffect = MOVE_EFFECT_BURN | MOVE_EFFECT_AFFECTS_USER; + PREPARE_MOVE_BUFFER(gBattleTextBuff1, MOVE_BURNING_BULWARK); + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_BanefulBunkerEffect; + effect = 1; + } // Not strictly a protect effect, but works the same way else if (gProtectStructs[gBattlerTarget].beakBlastCharge && CanBeBurned(gBattlerAttacker) @@ -5840,7 +5853,7 @@ static void Cmd_moveend(void) } gBattleScripting.moveendState++; break; - case MOVEEND_NEXT_TARGET: // For moves hitting two opposing Pokemon. + case MOVEEND_NEXT_TARGET: // For moves hitting two opposing Pokémon. { u16 moveTarget = GetBattlerMoveTargetType(gBattlerAttacker, gCurrentMove); // Set a flag if move hits either target (for throat spray that can't check damage) @@ -10777,6 +10790,11 @@ static void Cmd_setprotectlike(void) gProtectStructs[gBattlerAttacker].silkTrapped = TRUE; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_PROTECTED_ITSELF; } + else if (gCurrentMove == MOVE_BURNING_BULWARK) + { + gProtectStructs[gBattlerAttacker].burningBulwarked = TRUE; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_PROTECTED_ITSELF; + } gDisableStructs[gBattlerAttacker].protectUses++; fail = FALSE; @@ -11853,7 +11871,7 @@ static void Cmd_forcerandomswitch(void) { firstMonId = 0; lastMonId = PARTY_SIZE; - battler2PartyId = gBattlerPartyIndexes[gBattlerTarget]; // there is only one pokemon out in single battles + battler2PartyId = gBattlerPartyIndexes[gBattlerTarget]; // there is only one Pokémon out in single battles battler1PartyId = gBattlerPartyIndexes[gBattlerTarget]; } @@ -12403,7 +12421,7 @@ static void Cmd_setsubstitute(void) } else { - gBattleMoveDamage = GetNonDynamaxMaxHP(gBattlerAttacker) / 4; // one bit value will only work for pokemon which max hp can go to 1020(which is more than possible in games) + gBattleMoveDamage = GetNonDynamaxMaxHP(gBattlerAttacker) / 4; // one bit value will only work for Pokémon which max hp can go to 1020(which is more than possible in games) if (gBattleMoveDamage == 0) gBattleMoveDamage = 1; @@ -13899,7 +13917,7 @@ static void Cmd_tryswapitems(void) { gBattlescriptCurrInstr = cmd->failInstr; } - // can't swap if two pokemon don't have an item + // can't swap if two Pokémon don't have an item // or if either of them is an enigma berry or a mail else if ((gBattleMons[gBattlerAttacker].item == ITEM_NONE && gBattleMons[gBattlerTarget].item == ITEM_NONE) || !CanBattlerGetOrLoseItem(gBattlerAttacker, gBattleMons[gBattlerAttacker].item) diff --git a/src/battle_setup.c b/src/battle_setup.c index 750191d74f..15a91112b9 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -111,7 +111,7 @@ EWRAM_DATA static u8 *sTrainerBBattleScriptRetAddr = NULL; EWRAM_DATA static bool8 sShouldCheckTrainerBScript = FALSE; EWRAM_DATA static u8 sNoOfPossibleTrainerRetScripts = 0; -// The first transition is used if the enemy pokemon are lower level than our pokemon. +// The first transition is used if the enemy Pokémon are lower level than our Pokémon. // Otherwise, the second transition is used. static const u8 sBattleTransitionTable_Wild[][2] = { @@ -908,7 +908,7 @@ u8 GetTrainerBattleTransition(void) return B_TRANSITION_AQUA; if (gTrainers[gTrainerBattleOpponent_A].doubleBattle == TRUE) - minPartyCount = 2; // double battles always at least have 2 pokemon. + minPartyCount = 2; // double battles always at least have 2 Pokémon. else minPartyCount = 1; diff --git a/src/battle_tent.c b/src/battle_tent.c index b7a9daecba..c003affebe 100644 --- a/src/battle_tent.c +++ b/src/battle_tent.c @@ -309,7 +309,7 @@ static void GenerateInitialRentalMons(void) i = 0; while (i != PARTY_SIZE) { - // Cannot have two pokemon of the same species. + // Cannot have two Pokémon of the same species. monSetId = Random() % NUM_SLATEPORT_TENT_MONS; for (j = firstMonId; j < firstMonId + i; j++) { @@ -390,7 +390,7 @@ static void GenerateOpponentMons(void) { sRandMonId = monSet[Random() % numMons]; - // Ensure none of the opponent's pokemon are the same as the potential rental pokemon for the player + // Ensure none of the opponent's Pokémon are the same as the potential rental Pokémon for the player for (j = 0; j < (int)ARRAY_COUNT(gSaveBlock2Ptr->frontier.rentalMons); j++) { if (gFacilityTrainerMons[sRandMonId].species == gFacilityTrainerMons[gSaveBlock2Ptr->frontier.rentalMons[j].monId].species) diff --git a/src/battle_tower.c b/src/battle_tower.c index 53ed39f236..bc0970e7b0 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -1646,8 +1646,8 @@ static void FillTrainerParty(u16 trainerId, u8 firstMonId, u8 monCount) } // Regular battle frontier trainer. - // Attempt to fill the trainer's party with random Pokemon until 3 have been - // successfully chosen. The trainer's party may not have duplicate pokemon species + // Attempt to fill the trainer's party with random Pokémon until 3 have been + // successfully chosen. The trainer's party may not have duplicate Pokémon species // or duplicate held items. for (bfMonCount = 0; monSet[bfMonCount] != 0xFFFF; bfMonCount++) ; @@ -1657,12 +1657,12 @@ static void FillTrainerParty(u16 trainerId, u8 firstMonId, u8 monCount) { u16 monId = monSet[Random() % bfMonCount]; - // "High tier" pokemon are only allowed on open level mode + // "High tier" Pokémon are only allowed on open level mode // 20 is not a possible value for level here if ((level == FRONTIER_MAX_LEVEL_50 || level == 20) && monId > FRONTIER_MONS_HIGH_TIER) continue; - // Ensure this pokemon species isn't a duplicate. + // Ensure this Pokémon species isn't a duplicate. for (j = 0; j < i + firstMonId; j++) { if (GetMonData(&gEnemyParty[j], MON_DATA_SPECIES, NULL) == gFacilityTrainerMons[monId].species) @@ -1681,7 +1681,7 @@ static void FillTrainerParty(u16 trainerId, u8 firstMonId, u8 monCount) if (j != i + firstMonId) continue; - // Ensure this exact pokemon index isn't a duplicate. This check doesn't seem necessary + // Ensure this exact Pokémon index isn't a duplicate. This check doesn't seem necessary // because the species and held items were already checked directly above. for (j = 0; j < i; j++) { @@ -1693,7 +1693,7 @@ static void FillTrainerParty(u16 trainerId, u8 firstMonId, u8 monCount) chosenMonIndices[i] = monId; - // Place the chosen pokemon into the trainer's party. + // Place the chosen Pokémon into the trainer's party. CreateMonWithEVSpreadNatureOTID(&gEnemyParty[i + firstMonId], gFacilityTrainerMons[monId].species, level, @@ -1703,7 +1703,7 @@ static void FillTrainerParty(u16 trainerId, u8 firstMonId, u8 monCount) otID); friendship = MAX_FRIENDSHIP; - // Give the chosen pokemon its specified moves. + // Give the chosen Pokémon its specified moves. for (j = 0; j < MAX_MON_MOVES; j++) { SetMonMoveSlot(&gEnemyParty[i + firstMonId], gFacilityTrainerMons[monId].moves[j], j); @@ -1714,7 +1714,7 @@ static void FillTrainerParty(u16 trainerId, u8 firstMonId, u8 monCount) SetMonData(&gEnemyParty[i + firstMonId], MON_DATA_FRIENDSHIP, &friendship); SetMonData(&gEnemyParty[i + firstMonId], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[monId].itemTableId]); - // The pokemon was successfully added to the trainer's party, so it's safe to move on to + // The Pokémon was successfully added to the trainer's party, so it's safe to move on to // the next party slot. i++; } @@ -1770,7 +1770,7 @@ u16 GetRandomFrontierMonFromSet(u16 trainerId) do { - // "High tier" pokemon are only allowed on open level mode + // "High tier" Pokémon are only allowed on open level mode // 20 is not a possible value for level here monId = monSet[Random() % numMons]; } while((level == FRONTIER_MAX_LEVEL_50 || level == 20) && monId > FRONTIER_MONS_HIGH_TIER); @@ -2443,8 +2443,8 @@ static void GetPotentialPartnerMoveAndSpecies(u16 trainerId, u16 monId) // These partners can be an NPC or a former/record-mixed Apprentice // When talked to, their response consists of: // PARTNER_MSGID_INTRO - A greeting -// PARTNER_MSGID_MON1 - Naming one pokemon on their team, and a move it has -// PARTNER_MSGID_MON2_ASK - Naming a second pokemon on their team, a move it has, and asking if they'd like to be their partner +// PARTNER_MSGID_MON1 - Naming one Pokémon on their team, and a move it has +// PARTNER_MSGID_MON2_ASK - Naming a second Pokémon on their team, a move it has, and asking if they'd like to be their partner // PARTNER_MSGID_ACCEPT - If the player agrees to be their partner // PARTNER_MSGID_REJECT - If the player declines to be their partner static void ShowPartnerCandidateMessage(void) @@ -2762,7 +2762,7 @@ static void AwardBattleTowerRibbons(void) #ifdef BUGFIX struct RibbonCounter ribbons[MAX_FRONTIER_PARTY_SIZE]; #else - struct RibbonCounter ribbons[3]; // BUG: 4 Pokemon can receive ribbons in a double battle mode. + struct RibbonCounter ribbons[3]; // BUG: 4 Pokémon can receive ribbons in a double battle mode. #endif u8 ribbonType = 0; u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; @@ -3458,7 +3458,7 @@ static void FillTentTrainerParty_(u16 trainerId, u8 firstMonId, u8 monCount) { u16 monId = monSet[Random() % bfMonCount]; - // Ensure this pokemon species isn't a duplicate. + // Ensure this Pokémon species isn't a duplicate. for (j = 0; j < i + firstMonId; j++) { if (GetMonData(&gEnemyParty[j], MON_DATA_SPECIES, NULL) == gFacilityTrainerMons[monId].species) @@ -3477,7 +3477,7 @@ static void FillTentTrainerParty_(u16 trainerId, u8 firstMonId, u8 monCount) if (j != i + firstMonId) continue; - // Ensure this exact pokemon index isn't a duplicate. This check doesn't seem necessary + // Ensure this exact Pokémon index isn't a duplicate. This check doesn't seem necessary // because the species and held items were already checked directly above. for (j = 0; j < i; j++) { @@ -3489,7 +3489,7 @@ static void FillTentTrainerParty_(u16 trainerId, u8 firstMonId, u8 monCount) chosenMonIndices[i] = monId; - // Place the chosen pokemon into the trainer's party. + // Place the chosen Pokémon into the trainer's party. CreateMonWithEVSpreadNatureOTID(&gEnemyParty[i + firstMonId], gFacilityTrainerMons[monId].species, level, @@ -3499,7 +3499,7 @@ static void FillTentTrainerParty_(u16 trainerId, u8 firstMonId, u8 monCount) otID); friendship = MAX_FRIENDSHIP; - // Give the chosen pokemon its specified moves. + // Give the chosen Pokémon its specified moves. for (j = 0; j < MAX_MON_MOVES; j++) { SetMonMoveSlot(&gEnemyParty[i + firstMonId], gFacilityTrainerMons[monId].moves[j], j); @@ -3510,7 +3510,7 @@ static void FillTentTrainerParty_(u16 trainerId, u8 firstMonId, u8 monCount) SetMonData(&gEnemyParty[i + firstMonId], MON_DATA_FRIENDSHIP, &friendship); SetMonData(&gEnemyParty[i + firstMonId], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[monId].itemTableId]); - // The pokemon was successfully added to the trainer's party, so it's safe to move on to + // The Pokémon was successfully added to the trainer's party, so it's safe to move on to // the next party slot. i++; } diff --git a/src/battle_tv.c b/src/battle_tv.c index 310a154153..beb480905a 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -639,7 +639,7 @@ static const u16 *const sPointsArray[] = }; // Points will always be calculated for these messages -// even if current pokemon does not have corresponding move +// even if current Pokémon does not have corresponding move static const u16 sSpecialBattleStrings[] = { STRINGID_PKMNPERISHCOUNTFELL, STRINGID_PKMNWISHCAMETRUE, STRINGID_PKMNLOSTPPGRUDGE, diff --git a/src/battle_util.c b/src/battle_util.c index c9d20c75fb..ba417982c1 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2870,7 +2870,7 @@ u8 DoBattlerEndTurnEffects(void) { MAGIC_GUARD_CHECK; // R/S does not perform this sleep check, which causes the nightmare effect to - // persist even after the affected Pokemon has been awakened by Shed Skin. + // persist even after the affected Pokémon has been awakened by Shed Skin. if (gBattleMons[battler].status1 & STATUS1_SLEEP) { gBattleMoveDamage = GetNonDynamaxMaxHP(battler) / 4; @@ -2959,7 +2959,7 @@ u8 DoBattlerEndTurnEffects(void) } if (gBattlerAttacker != gBattlersCount) { - effect = 2; // a pokemon was awaken + effect = 2; // a Pokémon was awaken break; } else @@ -3023,7 +3023,7 @@ u8 DoBattlerEndTurnEffects(void) if (gDisableStructs[battler].disabledMove == gBattleMons[battler].moves[i]) break; } - if (i == MAX_MON_MOVES) // pokemon does not have the disabled move anymore + if (i == MAX_MON_MOVES) // Pokémon does not have the disabled move anymore { gDisableStructs[battler].disabledMove = 0; gDisableStructs[battler].disableTimer = 0; @@ -3040,7 +3040,7 @@ u8 DoBattlerEndTurnEffects(void) case ENDTURN_ENCORE: // encore if (gDisableStructs[battler].encoreTimer != 0) { - if (gBattleMons[battler].moves[gDisableStructs[battler].encoredMovePos] != gDisableStructs[battler].encoredMove) // pokemon does not have the encored move anymore + if (gBattleMons[battler].moves[gDisableStructs[battler].encoredMovePos] != gDisableStructs[battler].encoredMove) // Pokémon does not have the encored move anymore { gDisableStructs[battler].encoredMove = 0; gDisableStructs[battler].encoreTimer = 0; @@ -6144,7 +6144,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32 if (gBattleMons[i].ability == ABILITY_TRACE && (gBattleResources->flags->flags[i] & RESOURCE_FLAG_TRACED)) { u32 chosenTarget; - u32 side = (BATTLE_OPPOSITE(GetBattlerPosition(i))) & BIT_SIDE; // side of the opposing pokemon + u32 side = (BATTLE_OPPOSITE(GetBattlerPosition(i))) & BIT_SIDE; // side of the opposing Pokémon u32 target1 = GetBattlerAtPosition(side); u32 target2 = GetBattlerAtPosition(side + BIT_FLANK); @@ -8494,6 +8494,8 @@ bool32 IsBattlerProtected(u32 battler, u32 move) return TRUE; else if (gProtectStructs[battler].banefulBunkered) return TRUE; + else if (gProtectStructs[battler].burningBulwarked) + return TRUE; else if ((gProtectStructs[battler].obstructed || gProtectStructs[battler].silkTrapped) && !IS_MOVE_STATUS(move)) return TRUE; else if (gProtectStructs[battler].spikyShielded) @@ -8992,6 +8994,10 @@ static inline u32 CalcMoveBasePower(u32 move, u32 battlerAtk, u32 battlerDef, u3 basePower += 50 * gBattleStruct->timesGotHit[GetBattlerSide(battlerAtk)][gBattlerPartyIndexes[battlerAtk]]; basePower = (basePower > 350) ? 350 : basePower; break; + case EFFECT_FICKLE_BEAM: + if (RandomPercentage(RNG_FICKLE_BEAM, 30)) + basePower *= 2; + break; } // Move-specific base power changes diff --git a/src/birch_pc.c b/src/birch_pc.c index 1f0ab23498..8256a1378b 100644 --- a/src/birch_pc.c +++ b/src/birch_pc.c @@ -20,7 +20,7 @@ bool16 ScriptGetPokedexInfo(void) return IsNationalPokedexEnabled(); } -// This shows your Hoenn Pokedex rating and not your National Dex. +// This shows your Hoenn Pokédex rating and not your National Dex. const u8 *GetPokedexRatingText(u16 count) { if (count < 10) diff --git a/src/contest.c b/src/contest.c index 6b7322335c..e0c5969a06 100644 --- a/src/contest.c +++ b/src/contest.c @@ -194,7 +194,7 @@ static void SwapMoveDescAndContestTilemaps(void); #define CONTESTANT_TEXT_COLOR_START 10 enum { -// The "{Pokemon Name} / {Trainer Name}" windows. +// The "{Pokémon Name} / {Trainer Name}" windows. WIN_CONTESTANT0_NAME, WIN_CONTESTANT1_NAME, WIN_CONTESTANT2_NAME, @@ -3429,11 +3429,11 @@ static void RankContestants(void) // For each contestant, find the best rank with their point total. // Normally, each point total is different, and this will output the - // rankings as expected. However, if two pokemon are tied, then they + // rankings as expected. However, if two Pokémon are tied, then they // both get the best rank for that point total. // // For example if the point totals are [100, 80, 80, 50], the ranks will - // be [1, 2, 2, 4]. The pokemon with a point total of 80 stop looking + // be [1, 2, 2, 4]. The Pokémon with a point total of 80 stop looking // when they see the first 80 in the array, so they both share the '2' // rank. for (i = 0; i < CONTESTANT_COUNT; i++) @@ -4585,10 +4585,10 @@ void MakeContestantNervous(u8 p) // ContestantStatus::nextTurnOrder field of each contestant. The remaining // turns are assigned such that the turn order will reverse. // -// For example, if no pokemon have a defined nextTurnOrder, then the 4th +// For example, if no Pokémon have a defined nextTurnOrder, then the 4th // will become 1st, the 3rd will become 2nd, etc. // -// Note: This function assumes that multiple pokemon cannot have the same +// Note: This function assumes that multiple Pokémon cannot have the same // nextTurnOrder value. static void ApplyNextTurnOrder(void) { diff --git a/src/credits.c b/src/credits.c index 2b4d919bdc..5d5a80cf78 100644 --- a/src/credits.c +++ b/src/credits.c @@ -64,12 +64,12 @@ enum { struct CreditsData { - u16 monToShow[NUM_MON_SLIDES]; // List of Pokemon species ids that will show during the credits + u16 monToShow[NUM_MON_SLIDES]; // List of Pokémon species ids that will show during the credits u16 imgCounter; //how many mon images have been shown u16 nextImgPos; //if the next image spawns left/center/right u16 currShownMon; //index into monToShow - u16 numMonToShow; //number of pokemon to show, always NUM_MON_SLIDES after determine function - u16 caughtMonIds[NATIONAL_DEX_COUNT]; //temporary location to hold a condensed array of all caught pokemon + u16 numMonToShow; //number of Pokémon to show, always NUM_MON_SLIDES after determine function + u16 caughtMonIds[NATIONAL_DEX_COUNT]; //temporary location to hold a condensed array of all caught Pokémon u16 numCaughtMon; //count of filled spaces in caughtMonIds u16 unused[7]; }; @@ -1556,8 +1556,8 @@ static void DeterminePokemonToShow(void) u16 dexNum; u16 j; - // Go through the Pokedex, and anything that has gotten caught we put into our massive array. - // This basically packs all of the caught pokemon into the front of the array + // Go through the Pokédex, and anything that has gotten caught we put into our massive array. + // This basically packs all of the caught Pokémon into the front of the array for (dexNum = 1, j = 0; dexNum < NATIONAL_DEX_COUNT; dexNum++) { if (GetSetPokedexFlag(dexNum, FLAG_GET_CAUGHT)) @@ -1571,14 +1571,14 @@ static void DeterminePokemonToShow(void) for (dexNum = j; dexNum < NATIONAL_DEX_COUNT; dexNum++) sCreditsData->caughtMonIds[dexNum] = NATIONAL_DEX_NONE; - // Cap the number of pokemon we care about to NUM_MON_SLIDES, the max we show in the credits scene (-1 for the starter) + // Cap the number of Pokémon we care about to NUM_MON_SLIDES, the max we show in the credits scene (-1 for the starter) sCreditsData->numCaughtMon = j; if (sCreditsData->numCaughtMon < NUM_MON_SLIDES) sCreditsData->numMonToShow = j; else sCreditsData->numMonToShow = NUM_MON_SLIDES; - // Loop through our list of caught pokemon and select randomly from it to fill the images to show + // Loop through our list of caught Pokémon and select randomly from it to fill the images to show j = 0; do { @@ -1599,7 +1599,7 @@ static void DeterminePokemonToShow(void) } while (sCreditsData->numCaughtMon != 0 && j < NUM_MON_SLIDES); - // If we don't have enough pokemon in the dex to fill everything, copy the selected mon into the end of the array, so it loops + // If we don't have enough Pokémon in the dex to fill everything, copy the selected mon into the end of the array, so it loops if (sCreditsData->numMonToShow < NUM_MON_SLIDES) { for (j = sCreditsData->numMonToShow, page = 0; j < NUM_MON_SLIDES; j++) @@ -1610,7 +1610,7 @@ static void DeterminePokemonToShow(void) if (page == sCreditsData->numMonToShow) page = 0; } - // Ensure the last pokemon is our starter + // Ensure the last Pokémon is our starter sCreditsData->monToShow[NUM_MON_SLIDES - 1] = starter; } else @@ -1618,7 +1618,7 @@ static void DeterminePokemonToShow(void) // Check to see if our starter has already appeared in this list, break if it has for (dexNum = 0; sCreditsData->monToShow[dexNum] != starter && dexNum < NUM_MON_SLIDES; dexNum++); - // If it has, swap it with the last pokemon, to ensure our starter is the last image + // If it has, swap it with the last Pokémon, to ensure our starter is the last image if (dexNum < sCreditsData->numMonToShow - 1) { sCreditsData->monToShow[dexNum] = sCreditsData->monToShow[NUM_MON_SLIDES-1]; @@ -1626,7 +1626,7 @@ static void DeterminePokemonToShow(void) } else { - // Ensure the last pokemon is our starter + // Ensure the last Pokémon is our starter sCreditsData->monToShow[NUM_MON_SLIDES - 1] = starter; } } diff --git a/src/data/abilities.h b/src/data/abilities.h index 2ff80f3ab3..56f7547b23 100644 --- a/src/data/abilities.h +++ b/src/data/abilities.h @@ -4,84 +4,98 @@ const struct Ability gAbilities[ABILITIES_COUNT] = { .name = _("-------"), .description = COMPOUND_STRING("No special ability."), + .aiRating = 0, }, [ABILITY_STENCH] = { .name = _("Stench"), .description = COMPOUND_STRING("May cause a foe to flinch."), + .aiRating = 1, }, [ABILITY_DRIZZLE] = { .name = _("Drizzle"), .description = COMPOUND_STRING("Summons rain in battle."), + .aiRating = 9, }, [ABILITY_SPEED_BOOST] = { .name = _("Speed Boost"), .description = COMPOUND_STRING("Gradually boosts Speed."), + .aiRating = 9, }, [ABILITY_BATTLE_ARMOR] = { .name = _("Battle Armor"), .description = COMPOUND_STRING("Blocks critical hits."), + .aiRating = 2, }, [ABILITY_STURDY] = { .name = _("Sturdy"), .description = COMPOUND_STRING("Negates 1-hit KO attacks."), + .aiRating = 6, }, [ABILITY_DAMP] = { .name = _("Damp"), .description = COMPOUND_STRING("Prevents self-destruction."), + .aiRating = 2, }, [ABILITY_LIMBER] = { .name = _("Limber"), .description = COMPOUND_STRING("Prevents paralysis."), + .aiRating = 3, }, [ABILITY_SAND_VEIL] = { .name = _("Sand Veil"), .description = COMPOUND_STRING("Ups evasion in a sandstorm."), + .aiRating = 3, }, [ABILITY_STATIC] = { .name = _("Static"), .description = COMPOUND_STRING("Paralyzes on contact."), + .aiRating = 4, }, [ABILITY_VOLT_ABSORB] = { .name = _("Volt Absorb"), .description = COMPOUND_STRING("Turns electricity into HP."), + .aiRating = 7, }, [ABILITY_WATER_ABSORB] = { .name = _("Water Absorb"), .description = COMPOUND_STRING("Changes water into HP."), + .aiRating = 7, }, [ABILITY_OBLIVIOUS] = { .name = _("Oblivious"), .description = COMPOUND_STRING("Prevents attraction."), + .aiRating = 2, }, [ABILITY_CLOUD_NINE] = { .name = _("Cloud Nine"), .description = COMPOUND_STRING("Negates weather effects."), + .aiRating = 5, }, [ABILITY_COMPOUND_EYES] = @@ -92,102 +106,119 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("CompoundEyes"), #endif .description = COMPOUND_STRING("Raises accuracy."), + .aiRating = 7, }, [ABILITY_INSOMNIA] = { .name = _("Insomnia"), .description = COMPOUND_STRING("Prevents sleep."), + .aiRating = 4, }, [ABILITY_COLOR_CHANGE] = { .name = _("Color Change"), .description = COMPOUND_STRING("Changes type to foe's move."), + .aiRating = 2, }, [ABILITY_IMMUNITY] = { .name = _("Immunity"), .description = COMPOUND_STRING("Prevents poisoning."), + .aiRating = 4, }, [ABILITY_FLASH_FIRE] = { .name = _("Flash Fire"), .description = COMPOUND_STRING("Powers up if hit by fire."), + .aiRating = 6, }, [ABILITY_SHIELD_DUST] = { .name = _("Shield Dust"), .description = COMPOUND_STRING("Prevents added effects."), + .aiRating = 5, }, [ABILITY_OWN_TEMPO] = { .name = _("Own Tempo"), .description = COMPOUND_STRING("Prevents confusion."), + .aiRating = 3, }, [ABILITY_SUCTION_CUPS] = { .name = _("Suction Cups"), .description = COMPOUND_STRING("Firmly anchors the body."), + .aiRating = 2, }, [ABILITY_INTIMIDATE] = { .name = _("Intimidate"), .description = COMPOUND_STRING("Lowers the foe's Attack."), + .aiRating = 7, }, [ABILITY_SHADOW_TAG] = { .name = _("Shadow Tag"), .description = COMPOUND_STRING("Prevents the foe's escape."), + .aiRating = 10, }, [ABILITY_ROUGH_SKIN] = { .name = _("Rough Skin"), .description = COMPOUND_STRING("Hurts to touch."), + .aiRating = 6, }, [ABILITY_WONDER_GUARD] = { .name = _("Wonder Guard"), .description = COMPOUND_STRING("“Supereffective” hits."), + .aiRating = 10, }, [ABILITY_LEVITATE] = { .name = _("Levitate"), .description = COMPOUND_STRING("Not hit by Ground attacks."), + .aiRating = 7, }, [ABILITY_EFFECT_SPORE] = { .name = _("Effect Spore"), .description = COMPOUND_STRING("Leaves spores on contact."), + .aiRating = 4, }, [ABILITY_SYNCHRONIZE] = { .name = _("Synchronize"), .description = COMPOUND_STRING("Passes on status problems."), + .aiRating = 4, }, [ABILITY_CLEAR_BODY] = { .name = _("Clear Body"), .description = COMPOUND_STRING("Prevents ability reduction."), + .aiRating = 4, }, [ABILITY_NATURAL_CURE] = { .name = _("Natural Cure"), .description = COMPOUND_STRING("Heals upon switching out."), + .aiRating = 7, }, [ABILITY_LIGHTNING_ROD] = @@ -198,870 +229,1015 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("LightningRod"), #endif .description = COMPOUND_STRING("Draws electrical moves."), + .aiRating = 7, }, [ABILITY_SERENE_GRACE] = { .name = _("Serene Grace"), .description = COMPOUND_STRING("Promotes added effects."), + .aiRating = 8, }, [ABILITY_SWIFT_SWIM] = { .name = _("Swift Swim"), .description = COMPOUND_STRING("Raises Speed in rain."), + .aiRating = 6, }, [ABILITY_CHLOROPHYLL] = { .name = _("Chlorophyll"), .description = COMPOUND_STRING("Raises Speed in sunshine."), + .aiRating = 6, }, [ABILITY_ILLUMINATE] = { .name = _("Illuminate"), .description = COMPOUND_STRING("Encounter rate increases."), + .aiRating = 0, }, [ABILITY_TRACE] = { .name = _("Trace"), .description = COMPOUND_STRING("Copies special ability."), + .aiRating = 6, }, [ABILITY_HUGE_POWER] = { .name = _("Huge Power"), .description = COMPOUND_STRING("Raises Attack."), + .aiRating = 10, }, [ABILITY_POISON_POINT] = { .name = _("Poison Point"), .description = COMPOUND_STRING("Poisons foe on contact."), + .aiRating = 4, }, [ABILITY_INNER_FOCUS] = { .name = _("Inner Focus"), .description = COMPOUND_STRING("Prevents flinching."), + .aiRating = 2, }, [ABILITY_MAGMA_ARMOR] = { .name = _("Magma Armor"), .description = COMPOUND_STRING("Prevents freezing."), + .aiRating = 1, }, [ABILITY_WATER_VEIL] = { .name = _("Water Veil"), .description = COMPOUND_STRING("Prevents burns."), + .aiRating = 4, }, [ABILITY_MAGNET_PULL] = { .name = _("Magnet Pull"), .description = COMPOUND_STRING("Traps Steel-type Pokémon."), + .aiRating = 9, }, [ABILITY_SOUNDPROOF] = { .name = _("Soundproof"), .description = COMPOUND_STRING("Avoids sound-based moves."), + .aiRating = 4, }, [ABILITY_RAIN_DISH] = { .name = _("Rain Dish"), .description = COMPOUND_STRING("Slight HP recovery in rain."), + .aiRating = 3, }, [ABILITY_SAND_STREAM] = { .name = _("Sand Stream"), .description = COMPOUND_STRING("Summons a sandstorm."), + .aiRating = 9, }, [ABILITY_PRESSURE] = { .name = _("Pressure"), .description = COMPOUND_STRING("Raises foe's PP usage."), + .aiRating = 5, }, [ABILITY_THICK_FAT] = { .name = _("Thick Fat"), .description = COMPOUND_STRING("Heat-and-cold protection."), + .aiRating = 7, }, [ABILITY_EARLY_BIRD] = { .name = _("Early Bird"), .description = COMPOUND_STRING("Awakens quickly from sleep."), + .aiRating = 4, }, [ABILITY_FLAME_BODY] = { .name = _("Flame Body"), .description = COMPOUND_STRING("Burns the foe on contact."), + .aiRating = 4, }, [ABILITY_RUN_AWAY] = { .name = _("Run Away"), .description = COMPOUND_STRING("Makes escaping easier."), + .aiRating = 0, }, [ABILITY_KEEN_EYE] = { .name = _("Keen Eye"), .description = COMPOUND_STRING("Prevents loss of accuracy."), + .aiRating = 1, }, [ABILITY_HYPER_CUTTER] = { .name = _("Hyper Cutter"), .description = COMPOUND_STRING("Prevents Attack reduction."), + .aiRating = 3, }, [ABILITY_PICKUP] = { .name = _("Pickup"), .description = COMPOUND_STRING("May pick up items."), + .aiRating = 1, }, [ABILITY_TRUANT] = { .name = _("Truant"), .description = COMPOUND_STRING("Moves only every two turns."), + .aiRating = -2, }, [ABILITY_HUSTLE] = { .name = _("Hustle"), .description = COMPOUND_STRING("Trades accuracy for power."), + .aiRating = 7, }, [ABILITY_CUTE_CHARM] = { .name = _("Cute Charm"), .description = COMPOUND_STRING("Infatuates on contact."), + .aiRating = 2, }, [ABILITY_PLUS] = { .name = _("Plus"), .description = COMPOUND_STRING("Powers up with Minus."), + .aiRating = 0, }, [ABILITY_MINUS] = { .name = _("Minus"), .description = COMPOUND_STRING("Powers up with Plus."), + .aiRating = 0, }, [ABILITY_FORECAST] = { .name = _("Forecast"), .description = COMPOUND_STRING("Changes with the weather."), + .aiRating = 6, }, [ABILITY_STICKY_HOLD] = { .name = _("Sticky Hold"), .description = COMPOUND_STRING("Prevents item theft."), + .aiRating = 3, }, [ABILITY_SHED_SKIN] = { .name = _("Shed Skin"), .description = COMPOUND_STRING("Heals the body by shedding."), + .aiRating = 7, }, [ABILITY_GUTS] = { .name = _("Guts"), .description = COMPOUND_STRING("Ups Attack if suffering."), + .aiRating = 6, }, [ABILITY_MARVEL_SCALE] = { .name = _("Marvel Scale"), .description = COMPOUND_STRING("Ups Defense if suffering."), + .aiRating = 5, }, [ABILITY_LIQUID_OOZE] = { .name = _("Liquid Ooze"), .description = COMPOUND_STRING("Draining causes injury."), + .aiRating = 3, }, [ABILITY_OVERGROW] = { .name = _("Overgrow"), .description = COMPOUND_STRING("Ups Grass moves in a pinch."), + .aiRating = 5, }, [ABILITY_BLAZE] = { .name = _("Blaze"), .description = COMPOUND_STRING("Ups Fire moves in a pinch."), + .aiRating = 5, }, [ABILITY_TORRENT] = { .name = _("Torrent"), .description = COMPOUND_STRING("Ups Water moves in a pinch."), + .aiRating = 5, }, [ABILITY_SWARM] = { .name = _("Swarm"), .description = COMPOUND_STRING("Ups Bug moves in a pinch."), + .aiRating = 5, }, [ABILITY_ROCK_HEAD] = { .name = _("Rock Head"), .description = COMPOUND_STRING("Prevents recoil damage."), + .aiRating = 5, }, [ABILITY_DROUGHT] = { .name = _("Drought"), .description = COMPOUND_STRING("Summons sunlight in battle."), + .aiRating = 9, }, [ABILITY_ARENA_TRAP] = { .name = _("Arena Trap"), .description = COMPOUND_STRING("Prevents fleeing."), + .aiRating = 9, }, [ABILITY_VITAL_SPIRIT] = { .name = _("Vital Spirit"), .description = COMPOUND_STRING("Prevents sleep."), + .aiRating = 4, }, [ABILITY_WHITE_SMOKE] = { .name = _("White Smoke"), .description = COMPOUND_STRING("Prevents ability reduction."), + .aiRating = 4, }, [ABILITY_PURE_POWER] = { .name = _("Pure Power"), .description = COMPOUND_STRING("Raises Attack."), + .aiRating = 10, }, [ABILITY_SHELL_ARMOR] = { .name = _("Shell Armor"), .description = COMPOUND_STRING("Blocks critical hits."), + .aiRating = 2, }, [ABILITY_AIR_LOCK] = { .name = _("Air Lock"), .description = COMPOUND_STRING("Negates weather effects."), + .aiRating = 5, }, [ABILITY_TANGLED_FEET] = { .name = _("Tangled Feet"), .description = COMPOUND_STRING("Ups evasion if confused."), + .aiRating = 2, }, [ABILITY_MOTOR_DRIVE] = { .name = _("Motor Drive"), .description = COMPOUND_STRING("Electricity raises Speed."), + .aiRating = 6, }, [ABILITY_RIVALRY] = { .name = _("Rivalry"), .description = COMPOUND_STRING("Powers up against rivals."), + .aiRating = 1, }, [ABILITY_STEADFAST] = { .name = _("Steadfast"), .description = COMPOUND_STRING("Flinching raises Speed."), + .aiRating = 2, }, [ABILITY_SNOW_CLOAK] = { .name = _("Snow Cloak"), .description = COMPOUND_STRING("Ups evasion in Hail or Snow."), + .aiRating = 3, }, [ABILITY_GLUTTONY] = { .name = _("Gluttony"), .description = COMPOUND_STRING("Eats Berries early."), + .aiRating = 3, }, [ABILITY_ANGER_POINT] = { .name = _("Anger Point"), .description = COMPOUND_STRING("Critical hits raise Attack."), + .aiRating = 4, }, [ABILITY_UNBURDEN] = { .name = _("Unburden"), .description = COMPOUND_STRING("Using a hold item ups Speed."), + .aiRating = 7, }, [ABILITY_HEATPROOF] = { .name = _("Heatproof"), .description = COMPOUND_STRING("Heat and burn protection."), + .aiRating = 5, }, [ABILITY_SIMPLE] = { .name = _("Simple"), .description = COMPOUND_STRING("Prone to wild stat changes."), + .aiRating = 8, }, [ABILITY_DRY_SKIN] = { .name = _("Dry Skin"), .description = COMPOUND_STRING("Prefers moisture to heat."), + .aiRating = 6, }, [ABILITY_DOWNLOAD] = { .name = _("Download"), .description = COMPOUND_STRING("Adjusts power favorably."), + .aiRating = 7, }, [ABILITY_IRON_FIST] = { .name = _("Iron Fist"), .description = COMPOUND_STRING("Boosts punching moves."), + .aiRating = 6, }, [ABILITY_POISON_HEAL] = { .name = _("Poison Heal"), .description = COMPOUND_STRING("Restores HP if poisoned."), + .aiRating = 8, }, [ABILITY_ADAPTABILITY] = { .name = _("Adaptability"), .description = COMPOUND_STRING("Boosts same type attacks."), + .aiRating = 8, }, [ABILITY_SKILL_LINK] = { .name = _("Skill Link"), .description = COMPOUND_STRING("Multi-hit moves hit 5 times."), + .aiRating = 7, }, [ABILITY_HYDRATION] = { .name = _("Hydration"), .description = COMPOUND_STRING("Cures status in rain."), + .aiRating = 4, }, [ABILITY_SOLAR_POWER] = { .name = _("Solar Power"), .description = COMPOUND_STRING("Powers up in sunshine."), + .aiRating = 3, }, [ABILITY_QUICK_FEET] = { .name = _("Quick Feet"), .description = COMPOUND_STRING("Ups Speed if suffering."), + .aiRating = 5, }, [ABILITY_NORMALIZE] = { .name = _("Normalize"), .description = COMPOUND_STRING("Moves become Normal-type."), + .aiRating = -1, }, [ABILITY_SNIPER] = { .name = _("Sniper"), .description = COMPOUND_STRING("Boosts critical hits."), + .aiRating = 3, }, [ABILITY_MAGIC_GUARD] = { .name = _("Magic Guard"), .description = COMPOUND_STRING("Only damaged by attacks."), + .aiRating = 9, }, [ABILITY_NO_GUARD] = { .name = _("No Guard"), .description = COMPOUND_STRING("Ensures that all moves hit."), + .aiRating = 8, }, [ABILITY_STALL] = { .name = _("Stall"), .description = COMPOUND_STRING("Always moves last."), + .aiRating = -1, }, [ABILITY_TECHNICIAN] = { .name = _("Technician"), .description = COMPOUND_STRING("Boosts weaker moves."), + .aiRating = 8, }, [ABILITY_LEAF_GUARD] = { .name = _("Leaf Guard"), .description = COMPOUND_STRING("Blocks status in sunshine."), + .aiRating = 2, }, [ABILITY_KLUTZ] = { .name = _("Klutz"), .description = COMPOUND_STRING("Can't use hold items."), + .aiRating = -1, }, [ABILITY_MOLD_BREAKER] = { .name = _("Mold Breaker"), .description = COMPOUND_STRING("Moves hit through abilities."), + .aiRating = 7, }, [ABILITY_SUPER_LUCK] = { .name = _("Super Luck"), .description = COMPOUND_STRING("Critical hits land often."), + .aiRating = 3, }, [ABILITY_AFTERMATH] = { .name = _("Aftermath"), .description = COMPOUND_STRING("Fainting damages the foe."), + .aiRating = 5, }, [ABILITY_ANTICIPATION] = { .name = _("Anticipation"), .description = COMPOUND_STRING("Senses dangerous moves."), + .aiRating = 2, }, [ABILITY_FOREWARN] = { .name = _("Forewarn"), .description = COMPOUND_STRING("Determines a foe's move."), + .aiRating = 2, }, [ABILITY_UNAWARE] = { .name = _("Unaware"), .description = COMPOUND_STRING("Ignores stat changes."), + .aiRating = 6, }, [ABILITY_TINTED_LENS] = { .name = _("Tinted Lens"), .description = COMPOUND_STRING("Ups “not very effective”."), + .aiRating = 7, }, [ABILITY_FILTER] = { .name = _("Filter"), .description = COMPOUND_STRING("Weakens “supereffective”."), + .aiRating = 6, }, [ABILITY_SLOW_START] = { .name = _("Slow Start"), .description = COMPOUND_STRING("Takes a while to get going."), + .aiRating = -2, }, [ABILITY_SCRAPPY] = { .name = _("Scrappy"), .description = COMPOUND_STRING("Hits Ghost-type Pokémon."), + .aiRating = 6, }, [ABILITY_STORM_DRAIN] = { .name = _("Storm Drain"), .description = COMPOUND_STRING("Draws in Water moves."), + .aiRating = 7, }, [ABILITY_ICE_BODY] = { .name = _("Ice Body"), .description = COMPOUND_STRING("HP recovery in Hail or Snow."), + .aiRating = 3, }, [ABILITY_SOLID_ROCK] = { .name = _("Solid Rock"), .description = COMPOUND_STRING("Weakens “supereffective”."), + .aiRating = 6, }, [ABILITY_SNOW_WARNING] = { .name = _("Snow Warning"), .description = COMPOUND_STRING("Summons a Hailstorm."), + .aiRating = 8, }, [ABILITY_HONEY_GATHER] = { .name = _("Honey Gather"), .description = COMPOUND_STRING("May gather Honey."), + .aiRating = 0, }, [ABILITY_FRISK] = { .name = _("Frisk"), .description = COMPOUND_STRING("Checks a foe's item."), + .aiRating = 3, }, [ABILITY_RECKLESS] = { .name = _("Reckless"), .description = COMPOUND_STRING("Boosts moves with recoil."), + .aiRating = 6, }, [ABILITY_MULTITYPE] = { .name = _("Multitype"), .description = COMPOUND_STRING("Changes type to its Plate."), + .aiRating = 8, }, [ABILITY_FLOWER_GIFT] = { .name = _("Flower Gift"), .description = COMPOUND_STRING("Allies power up in sunshine."), + .aiRating = 4, }, [ABILITY_BAD_DREAMS] = { .name = _("Bad Dreams"), .description = COMPOUND_STRING("Damages sleeping Pokémon."), + .aiRating = 4, }, [ABILITY_PICKPOCKET] = { .name = _("Pickpocket"), .description = COMPOUND_STRING("Steals the foe's held item."), + .aiRating = 3, }, [ABILITY_SHEER_FORCE] = { .name = _("Sheer Force"), .description = COMPOUND_STRING("Trades effects for power."), + .aiRating = 8, }, [ABILITY_CONTRARY] = { .name = _("Contrary"), .description = COMPOUND_STRING("Inverts stat changes."), + .aiRating = 8, }, [ABILITY_UNNERVE] = { .name = _("Unnerve"), .description = COMPOUND_STRING("Foes can't eat Berries."), + .aiRating = 3, }, [ABILITY_DEFIANT] = { .name = _("Defiant"), .description = COMPOUND_STRING("Lowered stats up Attack."), + .aiRating = 5, }, [ABILITY_DEFEATIST] = { .name = _("Defeatist"), .description = COMPOUND_STRING("Gives up at half HP."), + .aiRating = -1, }, [ABILITY_CURSED_BODY] = { .name = _("Cursed Body"), .description = COMPOUND_STRING("Disables moves on contact."), + .aiRating = 4, }, [ABILITY_HEALER] = { .name = _("Healer"), .description = COMPOUND_STRING("Heals partner Pokémon."), + .aiRating = 0, }, [ABILITY_FRIEND_GUARD] = { .name = _("Friend Guard"), .description = COMPOUND_STRING("Lowers damage to partner."), + .aiRating = 0, }, [ABILITY_WEAK_ARMOR] = { .name = _("Weak Armor"), .description = COMPOUND_STRING("Its stats change when hit."), + .aiRating = 2, }, [ABILITY_HEAVY_METAL] = { .name = _("Heavy Metal"), .description = COMPOUND_STRING("Doubles weight."), + .aiRating = -1, }, [ABILITY_LIGHT_METAL] = { .name = _("Light Metal"), .description = COMPOUND_STRING("Halves weight."), + .aiRating = 2, }, [ABILITY_MULTISCALE] = { .name = _("Multiscale"), .description = COMPOUND_STRING("Halves damage at full HP."), + .aiRating = 8, }, [ABILITY_TOXIC_BOOST] = { .name = _("Toxic Boost"), .description = COMPOUND_STRING("Ups Attack if poisoned."), + .aiRating = 6, }, [ABILITY_FLARE_BOOST] = { .name = _("Flare Boost"), .description = COMPOUND_STRING("Ups Sp. Atk if burned."), + .aiRating = 5, }, [ABILITY_HARVEST] = { .name = _("Harvest"), .description = COMPOUND_STRING("May recycle a used Berry."), + .aiRating = 5, }, [ABILITY_TELEPATHY] = { .name = _("Telepathy"), .description = COMPOUND_STRING("Can't be damaged by an ally."), + .aiRating = 0, }, [ABILITY_MOODY] = { .name = _("Moody"), .description = COMPOUND_STRING("Stats change gradually."), + .aiRating = 10, }, [ABILITY_OVERCOAT] = { .name = _("Overcoat"), .description = COMPOUND_STRING("Blocks weather and powder."), + .aiRating = 5, }, [ABILITY_POISON_TOUCH] = { .name = _("Poison Touch"), .description = COMPOUND_STRING("Poisons foe on contact."), + .aiRating = 4, }, [ABILITY_REGENERATOR] = { .name = _("Regenerator"), .description = COMPOUND_STRING("Heals upon switching out."), + .aiRating = 8, }, [ABILITY_BIG_PECKS] = { .name = _("Big Pecks"), .description = COMPOUND_STRING("Prevents Defense loss."), + .aiRating = 1, }, [ABILITY_SAND_RUSH] = { .name = _("Sand Rush"), .description = COMPOUND_STRING("Ups Speed in a sandstorm."), + .aiRating = 6, }, [ABILITY_WONDER_SKIN] = { .name = _("Wonder Skin"), .description = COMPOUND_STRING("May avoid status problems."), + .aiRating = 4, }, [ABILITY_ANALYTIC] = { .name = _("Analytic"), .description = COMPOUND_STRING("Moving last boosts power."), + .aiRating = 5, }, [ABILITY_ILLUSION] = { .name = _("Illusion"), .description = COMPOUND_STRING("Appears as a partner."), + .aiRating = 8, }, [ABILITY_IMPOSTER] = { .name = _("Imposter"), .description = COMPOUND_STRING("Transforms into the foe."), + .aiRating = 9, }, [ABILITY_INFILTRATOR] = { .name = _("Infiltrator"), .description = COMPOUND_STRING("Passes through barriers."), + .aiRating = 6, }, [ABILITY_MUMMY] = { .name = _("Mummy"), .description = COMPOUND_STRING("Spreads with contact."), + .aiRating = 5, }, [ABILITY_MOXIE] = { .name = _("Moxie"), .description = COMPOUND_STRING("KOs raise Attack."), + .aiRating = 7, }, [ABILITY_JUSTIFIED] = { .name = _("Justified"), .description = COMPOUND_STRING("Dark hits raise Attack."), + .aiRating = 4, }, [ABILITY_RATTLED] = { .name = _("Rattled"), .description = COMPOUND_STRING("Raises Speed when scared."), + .aiRating = 3, }, [ABILITY_MAGIC_BOUNCE] = { .name = _("Magic Bounce"), .description = COMPOUND_STRING("Reflects status moves."), + .aiRating = 9, }, [ABILITY_SAP_SIPPER] = { .name = _("Sap Sipper"), .description = COMPOUND_STRING("Grass increases Attack."), + .aiRating = 7, }, [ABILITY_PRANKSTER] = { .name = _("Prankster"), .description = COMPOUND_STRING("Status moves go first."), + .aiRating = 8, }, [ABILITY_SAND_FORCE] = { .name = _("Sand Force"), .description = COMPOUND_STRING("Powers up in a sandstorm."), + .aiRating = 4, }, [ABILITY_IRON_BARBS] = { .name = _("Iron Barbs"), .description = COMPOUND_STRING("Hurts to touch."), + .aiRating = 6, }, [ABILITY_ZEN_MODE] = { .name = _("Zen Mode"), .description = COMPOUND_STRING("Transforms at half HP."), + .aiRating = -1, }, [ABILITY_VICTORY_STAR] = { .name = _("Victory Star"), .description = COMPOUND_STRING("Raises party accuracy."), + .aiRating = 6, }, [ABILITY_TURBOBLAZE] = { .name = _("Turboblaze"), .description = COMPOUND_STRING("Moves hit through abilities."), + .aiRating = 7, }, [ABILITY_TERAVOLT] = { .name = _("Teravolt"), .description = COMPOUND_STRING("Moves hit through abilities."), + .aiRating = 7, }, [ABILITY_AROMA_VEIL] = { .name = _("Aroma Veil"), .description = COMPOUND_STRING("Prevents limiting of moves."), + .aiRating = 3, }, [ABILITY_FLOWER_VEIL] = { .name = _("Flower Veil"), .description = COMPOUND_STRING("Protects Grass-types."), + .aiRating = 0, }, [ABILITY_CHEEK_POUCH] = { .name = _("Cheek Pouch"), .description = COMPOUND_STRING("Eating Berries restores HP."), + .aiRating = 4, }, [ABILITY_PROTEAN] = { .name = _("Protean"), .description = COMPOUND_STRING("Changes type to used move."), + .aiRating = 8, }, [ABILITY_FUR_COAT] = { .name = _("Fur Coat"), .description = COMPOUND_STRING("Raises Defense."), + .aiRating = 7, }, [ABILITY_MAGICIAN] = { .name = _("Magician"), .description = COMPOUND_STRING("Steals the foe's held item."), + .aiRating = 3, }, [ABILITY_BULLETPROOF] = { .name = _("Bulletproof"), .description = COMPOUND_STRING("Avoids some projectiles."), + .aiRating = 7, }, [ABILITY_COMPETITIVE] = { .name = _("Competitive"), .description = COMPOUND_STRING("Lowered stats up Sp. Atk."), + .aiRating = 5, }, [ABILITY_STRONG_JAW] = { .name = _("Strong Jaw"), .description = COMPOUND_STRING("Boosts biting moves."), + .aiRating = 6, }, [ABILITY_REFRIGERATE] = { .name = _("Refrigerate"), .description = COMPOUND_STRING("Normal moves become Ice."), + .aiRating = 8, }, [ABILITY_SWEET_VEIL] = { .name = _("Sweet Veil"), .description = COMPOUND_STRING("Prevents party from sleep."), + .aiRating = 4, }, [ABILITY_STANCE_CHANGE] = @@ -1072,12 +1248,14 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("StanceChange"), #endif .description = COMPOUND_STRING("Transforms as it battles."), + .aiRating = 10, }, [ABILITY_GALE_WINGS] = { .name = _("Gale Wings"), .description = COMPOUND_STRING("Flying moves go first."), + .aiRating = 6, }, [ABILITY_MEGA_LAUNCHER] = @@ -1088,42 +1266,49 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("MegaLauncher"), #endif .description = COMPOUND_STRING("Boosts pulse moves."), + .aiRating = 7, }, [ABILITY_GRASS_PELT] = { .name = _("Grass Pelt"), .description = COMPOUND_STRING("Ups Defense in grass."), + .aiRating = 2, }, [ABILITY_SYMBIOSIS] = { .name = _("Symbiosis"), .description = COMPOUND_STRING("Passes its item to an ally."), + .aiRating = 0, }, [ABILITY_TOUGH_CLAWS] = { .name = _("Tough Claws"), .description = COMPOUND_STRING("Boosts contact moves."), + .aiRating = 7, }, [ABILITY_PIXILATE] = { .name = _("Pixilate"), .description = COMPOUND_STRING("Normal moves become Fairy."), + .aiRating = 8, }, [ABILITY_GOOEY] = { .name = _("Gooey"), .description = COMPOUND_STRING("Lowers Speed on contact."), + .aiRating = 5, }, [ABILITY_AERILATE] = { .name = _("Aerilate"), .description = COMPOUND_STRING("Normal moves become Flying."), + .aiRating = 8, }, [ABILITY_PARENTAL_BOND] = @@ -1134,24 +1319,28 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("ParentalBond"), #endif .description = COMPOUND_STRING("Moves hit twice."), + .aiRating = 10, }, [ABILITY_DARK_AURA] = { .name = _("Dark Aura"), .description = COMPOUND_STRING("Boosts Dark moves."), + .aiRating = 6, }, [ABILITY_FAIRY_AURA] = { .name = _("Fairy Aura"), .description = COMPOUND_STRING("Boosts Fairy moves."), + .aiRating = 6, }, [ABILITY_AURA_BREAK] = { .name = _("Aura Break"), .description = COMPOUND_STRING("Reverse aura abilities."), + .aiRating = 3, }, [ABILITY_PRIMORDIAL_SEA] = @@ -1162,6 +1351,7 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("PrimrdialSea"), #endif .description = COMPOUND_STRING("Summons heavy rain."), + .aiRating = 10, }, [ABILITY_DESOLATE_LAND] = @@ -1172,24 +1362,28 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("DesolateLand"), #endif .description = COMPOUND_STRING("Summons intense sunlight."), + .aiRating = 10, }, [ABILITY_DELTA_STREAM] = { .name = _("Delta Stream"), .description = COMPOUND_STRING("Summons strong winds."), + .aiRating = 10, }, [ABILITY_STAMINA] = { .name = _("Stamina"), .description = COMPOUND_STRING("Boosts Defense when hit."), + .aiRating = 6, }, [ABILITY_WIMP_OUT] = { .name = _("Wimp Out"), .description = COMPOUND_STRING("Flees at half HP."), + .aiRating = 3, }, [ABILITY_EMERGENCY_EXIT] = @@ -1200,6 +1394,7 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("EmergncyExit"), #endif .description = COMPOUND_STRING("Flees at half HP."), + .aiRating = 3, }, [ABILITY_WATER_COMPACTION] = @@ -1210,96 +1405,112 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("WtrCmpaction"), #endif .description = COMPOUND_STRING("Water boosts Defense."), + .aiRating = 4, }, [ABILITY_MERCILESS] = { .name = _("Merciless"), .description = COMPOUND_STRING("Criticals poisoned foes."), + .aiRating = 4, }, [ABILITY_SHIELDS_DOWN] = { .name = _("Shields Down"), .description = COMPOUND_STRING("Shell breaks at half HP."), + .aiRating = 6, }, [ABILITY_STAKEOUT] = { .name = _("Stakeout"), .description = COMPOUND_STRING("Stronger as foes switch in."), + .aiRating = 6, }, [ABILITY_WATER_BUBBLE] = { .name = _("Water Bubble"), .description = COMPOUND_STRING("Guards from fire and burns."), + .aiRating = 8, }, [ABILITY_STEELWORKER] = { .name = _("Steelworker"), .description = COMPOUND_STRING("Powers up Steel moves."), + .aiRating = 6, }, [ABILITY_BERSERK] = { .name = _("Berserk"), .description = COMPOUND_STRING("Boosts Sp. Atk at low HP."), + .aiRating = 5, }, [ABILITY_SLUSH_RUSH] = { .name = _("Slush Rush"), .description = COMPOUND_STRING("Raises Speed in Hail or Snow."), + .aiRating = 5, }, [ABILITY_LONG_REACH] = { .name = _("Long Reach"), .description = COMPOUND_STRING("Never makes contact."), + .aiRating = 3, }, [ABILITY_LIQUID_VOICE] = { .name = _("Liquid Voice"), .description = COMPOUND_STRING("Makes sound moves Water."), + .aiRating = 5, }, [ABILITY_TRIAGE] = { .name = _("Triage"), .description = COMPOUND_STRING("Healing moves go first."), + .aiRating = 7, }, [ABILITY_GALVANIZE] = { .name = _("Galvanize"), .description = COMPOUND_STRING("Normal moves turn Electric."), + .aiRating = 8, }, [ABILITY_SURGE_SURFER] = { .name = _("Surge Surfer"), .description = COMPOUND_STRING("Faster on electricity."), + .aiRating = 4, }, [ABILITY_SCHOOLING] = { .name = _("Schooling"), .description = COMPOUND_STRING("Forms a school when strong."), + .aiRating = 6, }, [ABILITY_DISGUISE] = { .name = _("Disguise"), .description = COMPOUND_STRING("Decoy protects it once."), + .aiRating = 8, }, [ABILITY_BATTLE_BOND] = { .name = _("Battle Bond"), .description = COMPOUND_STRING("Changes form after a KO."), + .aiRating = 6, }, [ABILITY_POWER_CONSTRUCT] = @@ -1310,18 +1521,21 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("PwrConstruct"), #endif .description = COMPOUND_STRING("Cells aid it when weakened."), + .aiRating = 10, }, [ABILITY_CORROSION] = { .name = _("Corrosion"), .description = COMPOUND_STRING("Poisons any type."), + .aiRating = 5, }, [ABILITY_COMATOSE] = { .name = _("Comatose"), .description = COMPOUND_STRING("Always drowsing."), + .aiRating = 6, }, [ABILITY_QUEENLY_MAJESTY] = @@ -1332,42 +1546,49 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("QueenlyMjsty"), #endif .description = COMPOUND_STRING("Protects from priority."), + .aiRating = 6, }, [ABILITY_INNARDS_OUT] = { .name = _("Innards Out"), .description = COMPOUND_STRING("Hurts foe when defeated."), + .aiRating = 5, }, [ABILITY_DANCER] = { .name = _("Dancer"), .description = COMPOUND_STRING("Dances along with others."), + .aiRating = 5, }, [ABILITY_BATTERY] = { .name = _("Battery"), .description = COMPOUND_STRING("Boosts ally's Sp. Atk."), + .aiRating = 0, }, [ABILITY_FLUFFY] = { .name = _("Fluffy"), .description = COMPOUND_STRING("Tougher but flammable."), + .aiRating = 5, }, [ABILITY_DAZZLING] = { .name = _("Dazzling"), .description = COMPOUND_STRING("Protects from priority."), + .aiRating = 5, }, [ABILITY_SOUL_HEART] = { .name = _("Soul-Heart"), .description = COMPOUND_STRING("KOs raise Sp. Atk."), + .aiRating = 7, }, [ABILITY_TANGLING_HAIR] = @@ -1378,12 +1599,14 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("TanglingHair"), #endif .description = COMPOUND_STRING("Lowers Speed on contact."), + .aiRating = 5, }, [ABILITY_RECEIVER] = { .name = _("Receiver"), .description = COMPOUND_STRING("Copies ally's ability."), + .aiRating = 0, }, [ABILITY_POWER_OF_ALCHEMY] = @@ -1394,18 +1617,21 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("PwrOfAlchemy"), #endif .description = COMPOUND_STRING("Copies ally's ability."), + .aiRating = 0, }, [ABILITY_BEAST_BOOST] = { .name = _("Beast Boost"), .description = COMPOUND_STRING("KOs boost best stat."), + .aiRating = 7, }, [ABILITY_RKS_SYSTEM] = { .name = _("RKS System"), .description = COMPOUND_STRING("Memories change its type."), + .aiRating = 8, }, [ABILITY_ELECTRIC_SURGE] = @@ -1416,6 +1642,7 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("ElectrcSurge"), #endif .description = COMPOUND_STRING("Field becomes Electric."), + .aiRating = 8, }, [ABILITY_PSYCHIC_SURGE] = @@ -1426,18 +1653,21 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("PsychicSurge"), #endif .description = COMPOUND_STRING("Field becomes weird."), + .aiRating = 8, }, [ABILITY_MISTY_SURGE] = { .name = _("Misty Surge"), .description = COMPOUND_STRING("Field becomes misty."), + .aiRating = 8, }, [ABILITY_GRASSY_SURGE] = { .name = _("Grassy Surge"), .description = COMPOUND_STRING("Field becomes grassy."), + .aiRating = 8, }, [ABILITY_FULL_METAL_BODY] = @@ -1448,6 +1678,7 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("FullMetalBdy"), #endif .description = COMPOUND_STRING("Prevents stat reduction."), + .aiRating = 4, }, [ABILITY_SHADOW_SHIELD] = @@ -1458,18 +1689,21 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("ShadowShield"), #endif .description = COMPOUND_STRING("Halves damage at full HP."), + .aiRating = 8, }, [ABILITY_PRISM_ARMOR] = { .name = _("Prism Armor"), .description = COMPOUND_STRING("Weakens “supereffective”."), + .aiRating = 6, }, [ABILITY_NEUROFORCE] = { .name = _("Neuroforce"), .description = COMPOUND_STRING("Ups “supereffective”."), + .aiRating = 6, }, [ABILITY_INTREPID_SWORD] = @@ -1480,6 +1714,7 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("IntrepidSwrd"), #endif .description = COMPOUND_STRING("Ups Attack on entry."), + .aiRating = 3, }, [ABILITY_DAUNTLESS_SHIELD] = @@ -1490,6 +1725,7 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("DauntlssShld"), #endif .description = COMPOUND_STRING("Ups Defense on entry."), + .aiRating = 3, }, [ABILITY_LIBERO] = @@ -1502,12 +1738,14 @@ const struct Ability gAbilities[ABILITIES_COUNT] = { .name = _("Ball Fetch"), .description = COMPOUND_STRING("Fetches failed Poké Ball."), + .aiRating = 0, }, [ABILITY_COTTON_DOWN] = { .name = _("Cotton Down"), .description = COMPOUND_STRING("Lower Speed of all when hit."), + .aiRating = 3, }, [ABILITY_PROPELLER_TAIL] = @@ -1518,72 +1756,84 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("PropellrTail"), #endif .description = COMPOUND_STRING("Ignores foe's redirection."), + .aiRating = 2, }, [ABILITY_MIRROR_ARMOR] = { .name = _("Mirror Armor"), .description = COMPOUND_STRING("Reflect stat decreases."), + .aiRating = 6, }, [ABILITY_GULP_MISSILE] = { .name = _("Gulp Missile"), .description = COMPOUND_STRING("If hit, spits prey from sea."), + .aiRating = 3, }, [ABILITY_STALWART] = { .name = _("Stalwart"), .description = COMPOUND_STRING("Ignores foe's redirection."), + .aiRating = 2, }, [ABILITY_STEAM_ENGINE] = { .name = _("Steam Engine"), .description = COMPOUND_STRING("Fire or Water hits up Speed."), + .aiRating = 3, }, [ABILITY_PUNK_ROCK] = { .name = _("Punk Rock"), .description = COMPOUND_STRING("Ups and resists sound."), + .aiRating = 2, }, [ABILITY_SAND_SPIT] = { .name = _("Sand Spit"), .description = COMPOUND_STRING("Creates a sandstorm if hit."), + .aiRating = 5, }, [ABILITY_ICE_SCALES] = { .name = _("Ice Scales"), .description = COMPOUND_STRING("Halves special damage."), + .aiRating = 7, }, [ABILITY_RIPEN] = { .name = _("Ripen"), .description = COMPOUND_STRING("Doubles effect of Berries."), + .aiRating = 4, }, [ABILITY_ICE_FACE] = { .name = _("Ice Face"), .description = COMPOUND_STRING("Hail or Snow renew free hit."), + .aiRating = 4, }, [ABILITY_POWER_SPOT] = { .name = _("Power Spot"), .description = COMPOUND_STRING("Powers up ally moves."), + .aiRating = 2, }, [ABILITY_MIMICRY] = { .name = _("Mimicry"), .description = COMPOUND_STRING("Changes type on terrain."), + .aiRating = 2, }, [ABILITY_SCREEN_CLEANER] = @@ -1594,6 +1844,7 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("ScreenCleanr"), #endif .description = COMPOUND_STRING("Removes walls of light."), + .aiRating = 3, }, [ABILITY_STEELY_SPIRIT] = @@ -1604,12 +1855,14 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("SteelySpirit"), #endif .description = COMPOUND_STRING("Boosts ally's Steel moves."), + .aiRating = 2, }, [ABILITY_PERISH_BODY] = { .name = _("Perish Body"), .description = COMPOUND_STRING("Foe faints in 3 turns if hit."), + .aiRating = -1, }, [ABILITY_WANDERING_SPIRIT] = @@ -1620,6 +1873,7 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("WandrngSprit"), #endif .description = COMPOUND_STRING("Trade abilities on contact."), + .aiRating = 2, }, [ABILITY_GORILLA_TACTICS] = @@ -1630,6 +1884,7 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("GorillaTacti"), #endif .description = COMPOUND_STRING("Ups Attack and locks move."), + .aiRating = 4, }, [ABILITY_NEUTRALIZING_GAS] = @@ -1640,12 +1895,14 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("NeutrlzngGas"), #endif .description = COMPOUND_STRING("All Abilities are nullified."), + .aiRating = 5, }, [ABILITY_PASTEL_VEIL] = { .name = _("Pastel Veil"), .description = COMPOUND_STRING("Protects team from poison."), + .aiRating = 4, }, [ABILITY_HUNGER_SWITCH] = @@ -1656,18 +1913,21 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("HungerSwitch"), #endif .description = COMPOUND_STRING("Changes form each turn."), + .aiRating = 2, }, [ABILITY_QUICK_DRAW] = { .name = _("Quick Draw"), .description = COMPOUND_STRING("Moves first occasionally."), + .aiRating = 4, }, [ABILITY_UNSEEN_FIST] = { .name = _("Unseen Fist"), .description = COMPOUND_STRING("Contact evades protection."), + .aiRating = 6, }, [ABILITY_CURIOUS_MEDICINE] = @@ -1678,18 +1938,21 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("CuriusMedicn"), #endif .description = COMPOUND_STRING("Remove ally's stat changes."), + .aiRating = 3, }, [ABILITY_TRANSISTOR] = { .name = _("Transistor"), .description = COMPOUND_STRING("Ups Electric-type moves."), + .aiRating = 6, }, [ABILITY_DRAGONS_MAW] = { .name = _("Dragon's Maw"), .description = COMPOUND_STRING("Ups Dragon-type moves."), + .aiRating = 6, }, [ABILITY_CHILLING_NEIGH] = @@ -1700,24 +1963,28 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("ChillngNeigh"), #endif .description = COMPOUND_STRING("KOs boost Attack stat."), + .aiRating = 7, }, [ABILITY_GRIM_NEIGH] = { .name = _("Grim Neigh"), .description = COMPOUND_STRING("KOs boost Sp. Atk stat."), + .aiRating = 7, }, [ABILITY_AS_ONE_ICE_RIDER] = { .name = _("As One"), .description = COMPOUND_STRING("Unnerve and Chilling Neigh."), + .aiRating = 10, }, [ABILITY_AS_ONE_SHADOW_RIDER] = { .name = _("As One"), .description = COMPOUND_STRING("Unnerve and Grim Neigh."), + .aiRating = 10, }, [ABILITY_LINGERING_AROMA] = @@ -1728,12 +1995,14 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("LngerngAroma"), #endif .description = COMPOUND_STRING("Spreads with contact."), + .aiRating = 5, }, [ABILITY_SEED_SOWER] = { .name = _("Seed Sower"), .description = COMPOUND_STRING("Affects terrain when hit."), + .aiRating = 5, }, [ABILITY_THERMAL_EXCHANGE] = @@ -1744,12 +2013,14 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("ThrmlExchnge"), #endif .description = COMPOUND_STRING("Fire hits up Attack."), + .aiRating = 4, }, [ABILITY_ANGER_SHELL] = { .name = _("Anger Shell"), .description = COMPOUND_STRING("Gets angry at half HP."), + .aiRating = 3, }, [ABILITY_PURIFYING_SALT] = @@ -1760,6 +2031,7 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("PurfyingSalt"), #endif .description = COMPOUND_STRING("Protected by pure salts."), + .aiRating = 6, }, [ABILITY_WELL_BAKED_BODY] = @@ -1770,18 +2042,21 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("WellBakedBdy"), #endif .description = COMPOUND_STRING("Strengthened by Fire."), + .aiRating = 5, }, [ABILITY_WIND_RIDER] = { .name = _("Wind Rider"), .description = COMPOUND_STRING("Ups Attack if hit by wind."), + .aiRating = 4, }, [ABILITY_GUARD_DOG] = { .name = _("Guard Dog"), .description = COMPOUND_STRING("Cannot be intimidated."), + .aiRating = 5, }, [ABILITY_ROCKY_PAYLOAD] = @@ -1792,24 +2067,28 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("RockyPayload"), #endif .description = COMPOUND_STRING("Powers up Rock moves."), + .aiRating = 6, }, [ABILITY_WIND_POWER] = { .name = _("Wind Power"), .description = COMPOUND_STRING("Gets charged by wind."), + .aiRating = 4, }, [ABILITY_ZERO_TO_HERO] = { .name = _("Zero to Hero"), .description = COMPOUND_STRING("Changes form on switch out."), + .aiRating = 10, }, [ABILITY_COMMANDER] = { .name = _("Commander"), .description = COMPOUND_STRING("Commands from Dondozo."), + .aiRating = 10, }, [ABILITY_ELECTROMORPHOSIS] = @@ -1819,7 +2098,8 @@ const struct Ability gAbilities[ABILITIES_COUNT] = #else .name = _("Elecmrphosis"), #endif - .description = COMPOUND_STRING("Gets Charged on contact."), + .description = COMPOUND_STRING("Gets Charged when hit."), + .aiRating = 5, }, [ABILITY_PROTOSYNTHESIS] = @@ -1830,18 +2110,21 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("Protosnthsis"), #endif .description = COMPOUND_STRING("Sun boosts best stat."), + .aiRating = 7, }, [ABILITY_QUARK_DRIVE] = { .name = _("Quark Drive"), .description = COMPOUND_STRING("Elec. field ups best stat."), + .aiRating = 7, }, [ABILITY_GOOD_AS_GOLD] = { .name = _("Good as Gold"), .description = COMPOUND_STRING("Avoids status problems."), + .aiRating = 8, }, [ABILITY_VESSEL_OF_RUIN] = @@ -1852,6 +2135,7 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("VesselOfRuin"), #endif .description = COMPOUND_STRING("Lowers foes' sp. damage."), + .aiRating = 5, }, [ABILITY_SWORD_OF_RUIN] = @@ -1861,7 +2145,8 @@ const struct Ability gAbilities[ABILITIES_COUNT] = #else .name = _("SwordOfRuin"), #endif - .description = COMPOUND_STRING("Lowers foes' defense."), + .description = COMPOUND_STRING("Lowers foes' Defense."), + .aiRating = 5, }, [ABILITY_TABLETS_OF_RUIN] = @@ -1872,6 +2157,7 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("TabltsOfRuin"), #endif .description = COMPOUND_STRING("Lowers foes' damage."), + .aiRating = 5, }, [ABILITY_BEADS_OF_RUIN] = @@ -1881,7 +2167,8 @@ const struct Ability gAbilities[ABILITIES_COUNT] = #else .name = _("BeadsOfRuin"), #endif - .description = COMPOUND_STRING("Lowers foes' sp. defense."), + .description = COMPOUND_STRING("Lowers foes' Sp. Defense."), + .aiRating = 5, }, [ABILITY_ORICHALCUM_PULSE] = @@ -1892,6 +2179,7 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("OrchlcumPlse"), #endif .description = COMPOUND_STRING("Summons sunlight in battle."), + .aiRating = 8, }, [ABILITY_HADRON_ENGINE] = @@ -1902,24 +2190,28 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("HadronEngine"), #endif .description = COMPOUND_STRING("Field becomes Electric."), + .aiRating = 8, }, [ABILITY_OPPORTUNIST] = { .name = _("Opportunist"), .description = COMPOUND_STRING("Copies foe's stat change."), + .aiRating = 5, }, [ABILITY_CUD_CHEW] = { .name = _("Cud Chew"), .description = COMPOUND_STRING("Eats a used berry again."), + .aiRating = 4, }, [ABILITY_SHARPNESS] = { .name = _("Sharpness"), .description = COMPOUND_STRING("Strengthens slicing moves."), + .aiRating = 7, }, [ABILITY_SUPREME_OVERLORD] = @@ -1930,30 +2222,35 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("SuprmeOvrlrd"), #endif .description = COMPOUND_STRING("Inherits fallen's strength."), + .aiRating = 6, }, [ABILITY_COSTAR] = { .name = _("Costar"), .description = COMPOUND_STRING("Copies ally's stat changes."), + .aiRating = 5, }, [ABILITY_TOXIC_DEBRIS] = { .name = _("Toxic Debris"), .description = COMPOUND_STRING("Throws poison spikes if hit."), + .aiRating = 4, }, [ABILITY_ARMOR_TAIL] = { .name = _("Armor Tail"), .description = COMPOUND_STRING("Protects from priority."), + .aiRating = 5, }, [ABILITY_EARTH_EATER] = { .name = _("Earth Eater"), .description = COMPOUND_STRING("Eats ground to heal HP."), + .aiRating = 7, }, [ABILITY_MYCELIUM_MIGHT] = @@ -1964,18 +2261,21 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("MceliumMight"), #endif .description = COMPOUND_STRING("Status moves never fail."), + .aiRating = 2, }, [ABILITY_HOSPITALITY] = { .name = _("Hospitality"), .description = COMPOUND_STRING("Restores ally's HP."), + .aiRating = 5, }, [ABILITY_MINDS_EYE] = { .name = _("Mind's Eye"), .description = COMPOUND_STRING("Keen Eye and Scrappy."), + .aiRating = 8, }, [ABILITY_EMBODY_ASPECT_TEAL] = @@ -1986,6 +2286,7 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("EmbodyAspect"), #endif .description = COMPOUND_STRING("Raises Speed."), + .aiRating = 6, }, [ABILITY_EMBODY_ASPECT_HEARTHFLAME] = @@ -1996,6 +2297,7 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("EmbodyAspect"), #endif .description = COMPOUND_STRING("Raises Attack."), + .aiRating = 6, }, [ABILITY_EMBODY_ASPECT_WELLSPRING] = @@ -2006,6 +2308,7 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("EmbodyAspect"), #endif .description = COMPOUND_STRING("Raises Sp. Def."), + .aiRating = 6, }, [ABILITY_EMBODY_ASPECT_CORNERSTONE] = @@ -2016,12 +2319,14 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("EmbodyAspect"), #endif .description = COMPOUND_STRING("Raises Defense."), + .aiRating = 6, }, [ABILITY_TOXIC_CHAIN] = { .name = _("Toxic Chain"), .description = COMPOUND_STRING("Moves can poison."), + .aiRating = 8, }, [ABILITY_SUPERSWEET_SYRUP] = @@ -2032,18 +2337,21 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("SuprswtSyrup"), #endif .description = COMPOUND_STRING("Lowers the foe's Speed."), + .aiRating = 5, }, [ABILITY_TERA_SHIFT] = { .name = _("Tera Shift"), .description = COMPOUND_STRING("Terasteralizes upon entry."), + .aiRating = 10, }, [ABILITY_TERA_SHELL] = { .name = _("Tera Shell"), .description = COMPOUND_STRING("Resistant to types at full HP."), + .aiRating = 10, }, [ABILITY_TERAFORM_ZERO] = @@ -2054,6 +2362,7 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("TeraformZero"), #endif .description = COMPOUND_STRING("Removes weather and terrain."), + .aiRating = 10, }, [ABILITY_POISON_PUPPETEER] = @@ -2064,5 +2373,6 @@ const struct Ability gAbilities[ABILITIES_COUNT] = .name = _("PoisnPuppter"), #endif .description = COMPOUND_STRING("Confuses poisoned foes."), + .aiRating = 8, }, }; diff --git a/src/data/battle_frontier/battle_frontier_trainer_mons.h b/src/data/battle_frontier/battle_frontier_trainer_mons.h index 625a602658..f0a203d56d 100644 --- a/src/data/battle_frontier/battle_frontier_trainer_mons.h +++ b/src/data/battle_frontier/battle_frontier_trainer_mons.h @@ -4172,7 +4172,7 @@ FRONTIER_MON_##lastmon##_10,\ -1 -// The strong Psychic M/F trainers all use the below pokemon +// The strong Psychic M/F trainers all use the below Pokémon // Additionally they use 1 of 3 legendary trios, and Latios or Latias depending on gender #define FRONTIER_MONS_PSYCHIC_2(lati, legend1, legend2, legend3) \ FRONTIER_MON_WOBBUFFET_1, \ diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index c88f726c21..287f7a5cad 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -13721,7 +13721,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] = [MOVE_ELECTRO_SHOT] = { - .effect = EFFECT_PLACEHOLDER, //EFFECT_ELECTRO_SHOT + .effect = EFFECT_METEOR_BEAM, .power = 130, .type = TYPE_ELECTRIC, .accuracy = 100, @@ -13750,7 +13750,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] = [MOVE_FICKLE_BEAM] = { - .effect = EFFECT_PLACEHOLDER, //EFFECT_FICKLE_BEAM + .effect = EFFECT_FICKLE_BEAM, .power = 80, .type = TYPE_DRAGON, .accuracy = 100, @@ -13762,7 +13762,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] = [MOVE_BURNING_BULWARK] = { - .effect = EFFECT_PROTECT, // NEEDS ACTUAL PROTECT SIDE EFFECT + .effect = EFFECT_PROTECT, .power = 0, .type = TYPE_FIRE, .accuracy = 0, @@ -13851,7 +13851,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] = [MOVE_ALLURING_VOICE] = { - .effect = EFFECT_PLACEHOLDER, //EFFECT_ALLURING_VOICE + .effect = EFFECT_HIT, .power = 80, .type = TYPE_FAIRY, .accuracy = 100, @@ -13860,7 +13860,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] = .priority = 0, .category = BATTLE_CATEGORY_SPECIAL, .soundMove = TRUE, + .sheerForceBoost = TRUE, .ignoresSubstitute = TRUE, + .additionalEffects = ADDITIONAL_EFFECTS( + SECONDARY_EFFECT(MOVE_EFFECT_CONFUSION, 100) + ), }, [MOVE_TEMPER_FLARE] = diff --git a/src/data/party_menu.h b/src/data/party_menu.h index 168520a48c..a053754f46 100644 --- a/src/data/party_menu.h +++ b/src/data/party_menu.h @@ -64,7 +64,7 @@ static const struct PartyMenuBoxInfoRects sPartyBoxInfoRects[] = // Each layout array has an array for each of the 6 party slots // The array for each slot has the sprite coords of its various sprites in the following order -// Pokemon icon (x, y), held item (x, y), status condition (x, y), menu pokeball (x, y) +// Pokémon icon (x, y), held item (x, y), status condition (x, y), menu Poké Ball (x, y) static const u8 sPartyMenuSpriteCoords[PARTY_LAYOUT_COUNT][PARTY_SIZE][4 * 2] = { [PARTY_LAYOUT_SINGLE] = @@ -953,7 +953,7 @@ static const struct CompressedSpritePalette sSpritePalette_MenuPokeball = gPartyMenuPokeball_Pal, TAG_POKEBALL }; -// Used for the pokeball sprite on each party slot / Cancel button +// Used for the Poké Ball sprite on each party slot / Cancel button static const struct SpriteTemplate sSpriteTemplate_MenuPokeball = { .tileTag = TAG_POKEBALL, diff --git a/src/data/pokemon/experience_tables.h b/src/data/pokemon/experience_tables.h index 15bcadeb29..8f50e10918 100644 --- a/src/data/pokemon/experience_tables.h +++ b/src/data/pokemon/experience_tables.h @@ -1,5 +1,5 @@ -#define SQUARE(n)(n * n) -#define CUBE(n)(n * n * n) +#define SQUARE(n)((n) * (n)) +#define CUBE(n)((n) * (n) * (n)) #define EXP_SLOW(n)((5 * CUBE(n)) / 4) // (5 * (n)^3) / 4 #define EXP_FAST(n)((4 * CUBE(n)) / 5) // (4 * (n)^3) / 5 diff --git a/src/data/text/nature_names.h b/src/data/text/nature_names.h deleted file mode 100644 index 5cf2d8024c..0000000000 --- a/src/data/text/nature_names.h +++ /dev/null @@ -1,54 +0,0 @@ -static const u8 sHardyNatureName[] = _("Hardy"); -static const u8 sLonelyNatureName[] = _("Lonely"); -static const u8 sBraveNatureName[] = _("Brave"); -static const u8 sAdamantNatureName[] = _("Adamant"); -static const u8 sNaughtyNatureName[] = _("Naughty"); -static const u8 sBoldNatureName[] = _("Bold"); -static const u8 sDocileNatureName[] = _("Docile"); -static const u8 sRelaxedNatureName[] = _("Relaxed"); -static const u8 sImpishNatureName[] = _("Impish"); -static const u8 sLaxNatureName[] = _("Lax"); -static const u8 sTimidNatureName[] = _("Timid"); -static const u8 sHastyNatureName[] = _("Hasty"); -static const u8 sSeriousNatureName[] = _("Serious"); -static const u8 sJollyNatureName[] = _("Jolly"); -static const u8 sNaiveNatureName[] = _("Naive"); -static const u8 sModestNatureName[] = _("Modest"); -static const u8 sMildNatureName[] = _("Mild"); -static const u8 sQuietNatureName[] = _("Quiet"); -static const u8 sBashfulNatureName[] = _("Bashful"); -static const u8 sRashNatureName[] = _("Rash"); -static const u8 sCalmNatureName[] = _("Calm"); -static const u8 sGentleNatureName[] = _("Gentle"); -static const u8 sSassyNatureName[] = _("Sassy"); -static const u8 sCarefulNatureName[] = _("Careful"); -static const u8 sQuirkyNatureName[] = _("Quirky"); - -const u8 *const gNatureNamePointers[NUM_NATURES] = -{ - [NATURE_HARDY] = sHardyNatureName, - [NATURE_LONELY] = sLonelyNatureName, - [NATURE_BRAVE] = sBraveNatureName, - [NATURE_ADAMANT] = sAdamantNatureName, - [NATURE_NAUGHTY] = sNaughtyNatureName, - [NATURE_BOLD] = sBoldNatureName, - [NATURE_DOCILE] = sDocileNatureName, - [NATURE_RELAXED] = sRelaxedNatureName, - [NATURE_IMPISH] = sImpishNatureName, - [NATURE_LAX] = sLaxNatureName, - [NATURE_TIMID] = sTimidNatureName, - [NATURE_HASTY] = sHastyNatureName, - [NATURE_SERIOUS] = sSeriousNatureName, - [NATURE_JOLLY] = sJollyNatureName, - [NATURE_NAIVE] = sNaiveNatureName, - [NATURE_MODEST] = sModestNatureName, - [NATURE_MILD] = sMildNatureName, - [NATURE_QUIET] = sQuietNatureName, - [NATURE_BASHFUL] = sBashfulNatureName, - [NATURE_RASH] = sRashNatureName, - [NATURE_CALM] = sCalmNatureName, - [NATURE_GENTLE] = sGentleNatureName, - [NATURE_SASSY] = sSassyNatureName, - [NATURE_CAREFUL] = sCarefulNatureName, - [NATURE_QUIRKY] = sQuirkyNatureName, -}; diff --git a/src/daycare.c b/src/daycare.c index 31d2abe62e..e8426b4c00 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -250,10 +250,10 @@ void StoreSelectedPokemonInDaycare(void) StorePokemonInEmptyDaycareSlot(&gPlayerParty[monId], &gSaveBlock1Ptr->daycare); } -// Shifts the second daycare pokemon slot into the first slot. +// Shifts the second daycare Pokémon slot into the first slot. static void ShiftDaycareSlots(struct DayCare *daycare) { - // This condition is only satisfied when the player takes out the first pokemon from the daycare. + // This condition is only satisfied when the player takes out the first Pokémon from the daycare. if (GetBoxMonData(&daycare->mons[1].mon, MON_DATA_SPECIES) != SPECIES_NONE && GetBoxMonData(&daycare->mons[0].mon, MON_DATA_SPECIES) == SPECIES_NONE) { @@ -738,7 +738,7 @@ static void InheritAbility(struct Pokemon *egg, struct BoxPokemon *father, struc } } -// Counts the number of egg moves a pokemon learns and stores the moves in +// Counts the number of egg moves a Pokémon learns and stores the moves in // the given array. static u8 GetEggMoves(struct Pokemon *pokemon, u16 *eggMoves) { diff --git a/src/field_effect.c b/src/field_effect.c index 294d13b01c..8309e10b8e 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -259,7 +259,7 @@ static const u32 sHofMonitorBig_Gfx[] = INCBIN_U32("graphics/field_effects/pics/ static const u8 sHofMonitorSmall_Gfx[] = INCBIN_U8("graphics/field_effects/pics/hof_monitor_small.4bpp"); static const u16 sHofMonitor_Pal[16] = INCBIN_U16("graphics/field_effects/palettes/hof_monitor.gbapal"); -// Graphics for the lights streaking past your Pokemon when it uses a field move. +// Graphics for the lights streaking past your Pokémon when it uses a field move. static const u32 sFieldMoveStreaksOutdoors_Gfx[] = INCBIN_U32("graphics/field_effects/pics/field_move_streaks.4bpp"); static const u16 sFieldMoveStreaksOutdoors_Pal[16] = INCBIN_U16("graphics/field_effects/pics/field_move_streaks.gbapal"); static const u16 sFieldMoveStreaksOutdoors_Tilemap[320] = INCBIN_U16("graphics/field_effects/pics/field_move_streaks.bin"); diff --git a/src/field_message_box.c b/src/field_message_box.c index 55124e7dfc..b797e1d353 100755 --- a/src/field_message_box.c +++ b/src/field_message_box.c @@ -84,7 +84,7 @@ bool8 ShowPokenavFieldMessage(const u8 *str) StringExpandPlaceholders(gStringVar4, str); CreateTask(Task_HidePokenavMessageWhenDone, 0); StartMatchCallFromScript(str); - sFieldMessageBoxMode = 2; + sFieldMessageBoxMode = FIELD_MESSAGE_BOX_NORMAL; return TRUE; } diff --git a/src/fldeff_misc.c b/src/fldeff_misc.c index c01e88b512..513cd13e76 100644 --- a/src/fldeff_misc.c +++ b/src/fldeff_misc.c @@ -308,7 +308,7 @@ static const struct SpriteTemplate sSpriteTemplate_RecordMixLights = .callback = SpriteCallbackDummy, }; -// For accessing pokemon storage PC or the Hall of Fame PC +// For accessing Pokémon storage PC or the Hall of Fame PC void ComputerScreenOpenEffect(u16 increment, u16 unused, u8 priority) { CreateComputerScreenEffectTask(Task_ComputerScreenOpenEffect, increment, unused, priority); diff --git a/src/frontier_util.c b/src/frontier_util.c index 15f5385e83..0317f6e15d 100644 --- a/src/frontier_util.c +++ b/src/frontier_util.c @@ -326,7 +326,7 @@ static const struct FrontierBrainMon sFrontierBrainsMons[][2][FRONTIER_PARTY_SIZ }, [FRONTIER_FACILITY_FACTORY] = { - // Because Factory's pokemon are random, this facility's Brain also uses random pokemon. + // Because Factory's Pokémon are random, this facility's Brain also uses random Pokémon. // What is interesting, this team is actually the one Steven uses in the multi tag battle alongside the player. { { @@ -1947,7 +1947,7 @@ static void AppendIfValid(u16 species, u16 heldItem, u16 hp, u8 lvlMode, u8 monL // gSpecialVar_Result is the level mode before and after calls to this function // gSpecialVar_0x8004 is used to store the return value instead (TRUE if there are insufficient eligible mons) -// The names of ineligible pokemon that have been caught are also buffered to print +// The names of ineligible Pokémon that have been caught are also buffered to print static void CheckPartyIneligibility(void) { u16 speciesArray[PARTY_SIZE]; diff --git a/src/graphics.c b/src/graphics.c index 9ec11a5b8d..c00bb2c767 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -689,7 +689,7 @@ const u8 gHealthboxElementsGfxTable[] = INCBIN_U8("graphics/battle_interface/hpb "graphics/battle_interface/misc_frameend.4bpp", "graphics/battle_interface/ball_display.4bpp", "graphics/battle_interface/ball_caught_indicator.4bpp", - "graphics/battle_interface/status2.4bpp", // these three duplicate sets of graphics are for the opponent/partner pokemon + "graphics/battle_interface/status2.4bpp", // these three duplicate sets of graphics are for the opponent/partner Pokémon "graphics/battle_interface/status3.4bpp", "graphics/battle_interface/status4.4bpp", "graphics/battle_interface/healthbox_doubles_frameend.4bpp", @@ -1279,7 +1279,7 @@ const u32 gDomeTourneyLineUp_Tilemap[] = INCBIN_U32("graphics/battle_frontier/to const u32 gDomeTourneyInfoCard_Gfx[] = INCBIN_U32("graphics/battle_frontier/tourney_info_card.4bpp.lz"); const u32 gDomeTourneyInfoCard_Tilemap[] = INCBIN_U32("graphics/battle_frontier/tourney_info_card_tilemap.bin.lz"); const u32 gDomeTourneyInfoCardBg_Tilemap[] = INCBIN_U32("graphics/battle_frontier/tourney_info_card_bg.bin.lz"); -const u32 gDomeTourneyTreeButtons_Gfx[] = INCBIN_U32("graphics/battle_frontier/tourney_buttons.4bpp.lz"); // exit/cancel and pokeball buttons +const u32 gDomeTourneyTreeButtons_Gfx[] = INCBIN_U32("graphics/battle_frontier/tourney_buttons.4bpp.lz"); // exit/cancel and Poké Ball buttons const u32 gDomeTourneyTree_Pal[] = INCBIN_U32("graphics/battle_frontier/tourney_tree.gbapal.lz"); const u32 gDomeTourneyTreeButtons_Pal[] = INCBIN_U32("graphics/battle_frontier/tourney_buttons.gbapal.lz"); const u32 gDomeTourneyMatchCardBg_Pal[] = INCBIN_U32("graphics/battle_frontier/tourney_match_card_bg.gbapal.lz"); @@ -1731,7 +1731,7 @@ const u16 gFrontierPassMapCursor_Pal[] = INCBIN_U16("graphics/frontier_pass/map_ const u16 gFrontierPassMedalsSilver_Pal[] = INCBIN_U16("graphics/frontier_pass/silver.gbapal"); const u16 gFrontierPassMedalsGold_Pal[] = INCBIN_U16("graphics/frontier_pass/gold.gbapal"); -// Pokedex +// Pokédex const u16 gPokedexBgHoenn_Pal[] = INCBIN_U16("graphics/pokedex/bg_hoenn.gbapal"); const u16 gPokedexCaughtScreen_Pal[] = INCBIN_U16("graphics/pokedex/caught_screen.gbapal"); const u16 gPokedexSearchResults_Pal[] = INCBIN_U16("graphics/pokedex/search_results_bg.gbapal"); @@ -1785,7 +1785,7 @@ const u16 gContestResultsTitle_Smart_Tilemap[] = INCBIN_U16("graphics/contest/r const u16 gContestResultsTitle_Tough_Tilemap[] = INCBIN_U16("graphics/contest/results_screen/title_tough.bin"); const u16 gContestResultsTitle_Tilemap[] = INCBIN_U16("graphics/contest/results_screen/title.bin"); -// pokenav +// PokéNav const u16 gPokenavCondition_Pal[] = INCBIN_U16("graphics/pokenav/condition/graph.gbapal"); const u32 gPokenavCondition_Gfx[] = INCBIN_U32("graphics/pokenav/condition/graph.4bpp.lz"); @@ -1886,7 +1886,7 @@ const u32 gKantoTrainerCardFront_Tilemap[] = INCBIN_U32("graphics/trainer_card/f const u32 gKantoTrainerCardBack_Tilemap[] = INCBIN_U32("graphics/trainer_card/frlg/back.bin.lz"); const u32 gKantoTrainerCardFrontLink_Tilemap[] = INCBIN_U32("graphics/trainer_card/frlg/front_link.bin.lz"); -// pokemon storage system +// Pokémon storage system const u32 gStorageSystemMenu_Gfx[] = INCBIN_U32("graphics/pokemon_storage/menu.4bpp.lz"); const u16 gStorageSystemPartyMenu_Pal[] = INCBIN_U16("graphics/pokemon_storage/party_menu.gbapal"); diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index cdb1edb461..f7a5d2c378 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -625,7 +625,7 @@ static void Task_Hof_TryDisplayAnotherMon(u8 taskId) else { sHofFadePalettes |= (0x10000 << gSprites[gTasks[taskId].tMonSpriteId(currPokeID)].oam.paletteNum); - if (gTasks[taskId].tDisplayedMonId < PARTY_SIZE - 1 && currMon[1].species != SPECIES_NONE) // there is another pokemon to display + if (gTasks[taskId].tDisplayedMonId < PARTY_SIZE - 1 && currMon[1].species != SPECIES_NONE) // there is another Pokémon to display { gTasks[taskId].tDisplayedMonId++; BeginNormalPaletteFade(sHofFadePalettes, 0, 12, 12, RGB(16, 29, 24)); diff --git a/src/lottery_corner.c b/src/lottery_corner.c index d06934ca51..4e58c22858 100644 --- a/src/lottery_corner.c +++ b/src/lottery_corner.c @@ -73,7 +73,7 @@ void PickLotteryCornerTicket(void) } } } - else // pokemon are always arranged from populated spots first to unpopulated, so the moment a NONE species is found, that's the end of the list. + else // Pokémon are always arranged from populated spots first to unpopulated, so the moment a NONE species is found, that's the end of the list. break; } diff --git a/src/move_relearner.c b/src/move_relearner.c index af4593e533..975663e4d3 100644 --- a/src/move_relearner.c +++ b/src/move_relearner.c @@ -369,7 +369,7 @@ static void VBlankCB_MoveRelearner(void) TransferPlttBuffer(); } -// Script arguments: The pokemon to teach is in VAR_0x8004 +// Script arguments: The Pokémon to teach is in VAR_0x8004 void TeachMoveRelearnerMove(void) { LockPlayerFieldControls(); diff --git a/src/overworld.c b/src/overworld.c index 238e21d8d5..e18ae583c4 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -1327,7 +1327,7 @@ void UpdateAmbientCry(s16 *state, u16 *delayCounter) } } // Ambient cries after the first one take between 1200-2399 frames (~20-40 seconds) - // If the player has a pokemon with the ability Swarm in their party, the time is halved to 600-1199 frames (~10-20 seconds) + // If the player has a Pokémon with the ability Swarm in their party, the time is halved to 600-1199 frames (~10-20 seconds) *delayCounter = ((Random() % 1200) + 1200) / divBy; *state = AMB_CRY_WAIT; break; @@ -1339,7 +1339,7 @@ void UpdateAmbientCry(s16 *state, u16 *delayCounter) } break; case AMB_CRY_IDLE: - // No land/water pokemon on this map + // No land/water Pokémon on this map break; } } @@ -1350,7 +1350,7 @@ static void ChooseAmbientCrySpecies(void) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE130)) && !IsMirageIslandPresent()) { - // Only play water pokemon cries on this route + // Only play water Pokémon cries on this route // when Mirage Island is not present sIsAmbientCryWaterMon = TRUE; sAmbientCrySpecies = GetLocalWaterMon(); diff --git a/src/party_menu.c b/src/party_menu.c index e5d59e26a8..6223e046b0 100644 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -180,7 +180,7 @@ enum { }; enum { - // Window ids 0-5 are implicitly assigned to each party pokemon in InitPartyMenuBoxes + // Window ids 0-5 are implicitly assigned to each party Pokémon in InitPartyMenuBoxes WIN_MSG = PARTY_SIZE, }; @@ -7108,7 +7108,7 @@ static bool8 TrySwitchInPokemon(void) u8 newSlot; u8 i; - // In a multi battle, slots 1, 4, and 5 are the partner's pokemon + // In a multi battle, slots 1, 4, and 5 are the partner's Pokémon if (IsMultiBattle() == TRUE && (slot == 1 || slot == 4 || slot == 5)) { StringCopy(gStringVar1, GetTrainerPartnerName()); diff --git a/src/pokeball.c b/src/pokeball.c index 0ed34b48ad..89568215e9 100644 --- a/src/pokeball.c +++ b/src/pokeball.c @@ -1204,10 +1204,10 @@ static u8 LaunchBallFadeMonTaskForPokeball(bool8 unFadeLater, u8 spritePalNum, u return LaunchBallFadeMonTask(unFadeLater, spritePalNum, selectedPalettes, BALL_POKE); } -// Sprite data for the pokemon +// Sprite data for the Pokémon #define sSpecies data[7] -// Sprite data for the pokeball +// Sprite data for the Poké Ball #define sMonSpriteId data[0] #define sDelay data[1] #define sMonPalNum data[2] @@ -1217,7 +1217,7 @@ static u8 LaunchBallFadeMonTaskForPokeball(bool8 unFadeLater, u8 spritePalNum, u #define sFinalMonY data[6] #define sTrigIdx data[7] -// Pokeball in Birch intro, and when receiving via trade +// Poké Ball in Birch intro, and when receiving via trade void CreatePokeballSpriteToReleaseMon(u8 monSpriteId, u8 monPalNum, u8 x, u8 y, u8 oamPriority, u8 subpriority, u8 delay, u32 fadePalettes, u16 species) { u8 spriteId; diff --git a/src/pokedex.c b/src/pokedex.c index ee3656da68..a0f53d97c0 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -1765,7 +1765,7 @@ static void Task_HandlePokedexStartMenuInput(u8 taskId) CreateMonSpritesAtPos(sPokedexView->selectedPokemon, 0xE); gMain.newKeys |= START_BUTTON; //Exit menu break; - case 3: //CLOSE POKEDEX + case 3: //CLOSE POKéDEX BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); gTasks[taskId].func = Task_ClosePokedex; PlaySE(SE_PC_OFF); @@ -1965,12 +1965,12 @@ static void Task_HandleSearchResultsStartMenuInput(u8 taskId) CreateMonSpritesAtPos(sPokedexView->selectedPokemon, 0xE); gMain.newKeys |= START_BUTTON; break; - case 3: //BACK TO POKEDEX + case 3: //BACK TO POKéDEX BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); gTasks[taskId].func = Task_ReturnToPokedexFromSearchResults; PlaySE(SE_TRUCK_DOOR); break; - case 4: //CLOSE POKEDEX + case 4: //CLOSE POKéDEX BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); gTasks[taskId].func = Task_ClosePokedexFromSearchResultsStartMenu; PlaySE(SE_PC_OFF); @@ -2056,7 +2056,7 @@ static void Task_ClosePokedexFromSearchResultsStartMenu(u8 taskId) #undef tLoadScreenTaskId -// For loading main pokedex page or pokedex search results +// For loading main pokedex page or Pokédex search results static bool8 LoadPokedexListPage(u8 page) { switch (gMain.state) diff --git a/src/pokemon.c b/src/pokemon.c index a2e357f134..96811a92dd 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -362,6 +362,35 @@ const struct SpindaSpot gSpindaSpotGraphics[] = #include "data/pokemon/item_effects.h" +const u8 *const gNatureNamePointers[NUM_NATURES] = +{ + [NATURE_HARDY] = COMPOUND_STRING("Hardy"), + [NATURE_LONELY] = COMPOUND_STRING("Lonely"), + [NATURE_BRAVE] = COMPOUND_STRING("Brave"), + [NATURE_ADAMANT] = COMPOUND_STRING("Adamant"), + [NATURE_NAUGHTY] = COMPOUND_STRING("Naughty"), + [NATURE_BOLD] = COMPOUND_STRING("Bold"), + [NATURE_DOCILE] = COMPOUND_STRING("Docile"), + [NATURE_RELAXED] = COMPOUND_STRING("Relaxed"), + [NATURE_IMPISH] = COMPOUND_STRING("Impish"), + [NATURE_LAX] = COMPOUND_STRING("Lax"), + [NATURE_TIMID] = COMPOUND_STRING("Timid"), + [NATURE_HASTY] = COMPOUND_STRING("Hasty"), + [NATURE_SERIOUS] = COMPOUND_STRING("Serious"), + [NATURE_JOLLY] = COMPOUND_STRING("Jolly"), + [NATURE_NAIVE] = COMPOUND_STRING("Naive"), + [NATURE_MODEST] = COMPOUND_STRING("Modest"), + [NATURE_MILD] = COMPOUND_STRING("Mild"), + [NATURE_QUIET] = COMPOUND_STRING("Quiet"), + [NATURE_BASHFUL] = COMPOUND_STRING("Bashful"), + [NATURE_RASH] = COMPOUND_STRING("Rash"), + [NATURE_CALM] = COMPOUND_STRING("Calm"), + [NATURE_GENTLE] = COMPOUND_STRING("Gentle"), + [NATURE_SASSY] = COMPOUND_STRING("Sassy"), + [NATURE_CAREFUL] = COMPOUND_STRING("Careful"), + [NATURE_QUIRKY] = COMPOUND_STRING("Quirky"), +}; + const s8 gNatureStatTable[NUM_NATURES][NUM_NATURE_STATS] = { // Attack Defense Speed Sp.Atk Sp. Def [NATURE_HARDY] = { 0, 0, 0, 0, 0 }, diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 95a8387066..645ba149e6 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -201,7 +201,7 @@ enum { CURSOR_AREA_IN_BOX, CURSOR_AREA_IN_PARTY, CURSOR_AREA_BOX_TITLE, - CURSOR_AREA_BUTTONS, // Party Pokemon and Close Box + CURSOR_AREA_BUTTONS, // Party Pokémon and Close Box }; #define CURSOR_AREA_IN_HAND CURSOR_AREA_BOX_TITLE // Alt name for cursor area used by Move Items diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 56e1ea51e9..b6a64c0211 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -91,13 +91,13 @@ enum { #define PSS_LABEL_WINDOW_PORTRAIT_SPECIES 19 // The lower name #define PSS_LABEL_WINDOW_END 20 -// Dynamic fields for the Pokemon Info page +// Dynamic fields for the Pokémon Info page #define PSS_DATA_WINDOW_INFO_ORIGINAL_TRAINER 0 #define PSS_DATA_WINDOW_INFO_ID 1 #define PSS_DATA_WINDOW_INFO_ABILITY 2 #define PSS_DATA_WINDOW_INFO_MEMO 3 -// Dynamic fields for the Pokemon Skills page +// Dynamic fields for the Pokémon Skills page #define PSS_DATA_WINDOW_SKILLS_HELD_ITEM 0 #define PSS_DATA_WINDOW_SKILLS_RIBBON_COUNT 1 #define PSS_DATA_WINDOW_SKILLS_STATS_LEFT 2 // HP, Attack, Defense @@ -180,7 +180,7 @@ static EWRAM_DATA struct PokemonSummaryScreenData u8 currPageIndex; u8 minPageIndex; u8 maxPageIndex; - bool8 lockMonFlag; // This is used to prevent the player from changing pokemon in the move deleter select, etc, but it is not needed because the input is handled differently there + bool8 lockMonFlag; // This is used to prevent the player from changing Pokémon in the move deleter select, etc, but it is not needed because the input is handled differently there u16 newMove; u8 firstMoveIndex; u8 secondMoveIndex; @@ -190,7 +190,7 @@ static EWRAM_DATA struct PokemonSummaryScreenData u8 windowIds[8]; u8 spriteIds[SPRITE_ARR_ID_COUNT]; bool8 handleDeoxys; - s16 switchCounter; // Used for various switch statement cases that decompress/load graphics or pokemon data + s16 switchCounter; // Used for various switch statement cases that decompress/load graphics or Pokémon data u8 unk_filler4[6]; u8 categoryIconSpriteId; } *sMonSummaryScreen = NULL; @@ -322,7 +322,6 @@ static void SummaryScreen_DestroyAnimDelayTask(void); // const rom data #include "data/text/move_descriptions.h" -#include "data/text/nature_names.h" static const struct BgTemplate sBgTemplates[] = { @@ -2795,7 +2794,7 @@ static void DrawContestMoveHearts(u16 move) } } -static void LimitEggSummaryPageDisplay(void) // If the pokemon is an egg, limit the number of pages displayed to 1 +static void LimitEggSummaryPageDisplay(void) // If the Pokémon is an egg, limit the number of pages displayed to 1 { if (sMonSummaryScreen->summary.isEgg) ChangeBgX(3, 0x10000, BG_COORD_SET); @@ -4122,7 +4121,7 @@ static bool32 UNUSED IsMonAnimationFinished(void) return TRUE; } -static void StopPokemonAnimations(void) // A subtle effect, this function stops pokemon animations when leaving the PSS +static void StopPokemonAnimations(void) // A subtle effect, this function stops Pokémon animations when leaving the PSS { u16 i; u16 paletteIndex; diff --git a/src/pokenav_menu_handler.c b/src/pokenav_menu_handler.c index b81b4c892f..d67f61c1ea 100644 --- a/src/pokenav_menu_handler.c +++ b/src/pokenav_menu_handler.c @@ -257,7 +257,7 @@ static u32 HandleMainMenuInput(struct Pokenav_Menu *menu) return POKENAV_MENU_FUNC_NONE; } -// Force the player to select Match Call during the call Mr. Stone pokenav tutorial +// Force the player to select Match Call during the call Mr. Stone PokéNav tutorial static u32 HandleMainMenuInputTutorial(struct Pokenav_Menu *menu) { if (UpdateMenuCursorPos(menu)) @@ -287,7 +287,7 @@ static u32 HandleMainMenuInputTutorial(struct Pokenav_Menu *menu) return POKENAV_MENU_FUNC_NONE; } -// After calling Mr. Stone during the pokenav tutorial, force player to exit or use Match Call again +// After calling Mr. Stone during the PokéNav tutorial, force player to exit or use Match Call again static u32 HandleMainMenuInputEndTutorial(struct Pokenav_Menu *menu) { if (UpdateMenuCursorPos(menu)) diff --git a/src/rom_header_gf.c b/src/rom_header_gf.c index 022eb95017..4ded1a7ff3 100644 --- a/src/rom_header_gf.c +++ b/src/rom_header_gf.c @@ -8,7 +8,7 @@ // The purpose of this struct is for outside applications to be // able to access parts of the ROM or its save file, like a public API. -// In vanilla, it was used by Colosseum and XD to access pokemon graphics. +// In vanilla, it was used by Colosseum and XD to access Pokémon graphics. // // If this struct is rearranged in any way, it defeats the purpose of // having it at all. Applications like PKHex or streaming HUDs may find diff --git a/src/roulette.c b/src/roulette.c index 44dac2db6c..ec4c8cfcfe 100644 --- a/src/roulette.c +++ b/src/roulette.c @@ -990,8 +990,8 @@ static const struct RouletteFlashSettings sFlashData_Colors[NUM_ROULETTE_SLOTS + }, }; -// Data to flash any pokemon icon (F_FLASH_ICON) on the roulette wheel. One entry for each color row -// Each poke icon flashes with the tint of the row color it belongs to, so the pokemon itself is irrelevant +// Data to flash any Pokémon icon (F_FLASH_ICON) on the roulette wheel. One entry for each color row +// Each poke icon flashes with the tint of the row color it belongs to, so the Pokémon itself is irrelevant static const struct RouletteFlashSettings sFlashData_PokeIcons[NUM_BOARD_COLORS] = { [GET_ROW_IDX(ROW_ORANGE)] = { @@ -2702,7 +2702,7 @@ static const struct SpriteTemplate sSpriteTemplates_GridIcons[NUM_BOARD_POKES] = } }; -// Wheel icons are listed clockwise starting from 1 oclock on the roulette wheel (with pokeball upside right) +// Wheel icons are listed clockwise starting from 1 oclock on the roulette wheel (with Poké Ball upside right) // They go Wynaut -> Azurill -> Skitty -> Makuhita, and Orange -> Green -> Purple static const struct SpriteTemplate sSpriteTemplates_WheelIcons[NUM_ROULETTE_SLOTS] = { @@ -4481,7 +4481,7 @@ static void SetBallStuck(struct Sprite *sprite) // The below slot ids are relative to the slot the ball got stuck on if ((sRoulette->useTaillow + 1) & sRoulette->partySpeciesFlags) { - // If the player has the corresponding pokemon in their party (HAS_SHROOMISH or HAS_TAILLOW), + // If the player has the corresponding Pokémon in their party (HAS_SHROOMISH or HAS_TAILLOW), // there's a 75% chance that the ball will be moved to a spot they bet on // assuming it was one of the slots identified as a candidate if (betSlotId && (rand % 256) < 192) diff --git a/src/save_location.c b/src/save_location.c index 74d2f2c44d..3384200598 100644 --- a/src/save_location.c +++ b/src/save_location.c @@ -119,9 +119,9 @@ void TrySetMapSaveWarpStatus(void) TrySetUnknownWarpStatus(); } -// In FRLG, only bits 0, 4, and 5 are set when the pokedex is received. +// In FRLG, only bits 0, 4, and 5 are set when the Pokédex is received. // Bits 1, 2, 3, and 15 are instead set by SetPostgameFlags. -// These flags are read by Pokemon Colosseum/XD for linking. XD Additionally requires FLAG_SYS_GAME_CLEAR +// These flags are read by Pokémon Colosseum/XD for linking. XD Additionally requires FLAG_SYS_GAME_CLEAR void SetUnlockedPokedexFlags(void) { gSaveBlock2Ptr->gcnLinkFlags |= (1 << 15); diff --git a/src/script_pokemon_util.c b/src/script_pokemon_util.c index 04448b6f6c..2f3c29f2a7 100644 --- a/src/script_pokemon_util.c +++ b/src/script_pokemon_util.c @@ -256,7 +256,7 @@ void ReducePlayerPartyToSelectedMons(void) CpuFill32(0, party, sizeof party); - // copy the selected pokemon according to the order. + // copy the selected Pokémon according to the order. for (i = 0; i < MAX_FRONTIER_PARTY_SIZE; i++) if (gSelectedOrderFromParty[i]) // as long as the order keeps going (did the player select 1 mon? 2? 3?), do not stop party[i] = gPlayerParty[gSelectedOrderFromParty[i] - 1]; // index is 0 based, not literal diff --git a/src/start_menu.c b/src/start_menu.c index 9ef6adaf05..0525ccf70d 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -716,7 +716,7 @@ static bool8 StartMenuPokeNavCallback(void) PlayRainStoppingSoundEffect(); RemoveExtraStartMenuWindows(); CleanupOverworldWindowsAndTilemaps(); - SetMainCallback2(CB2_InitPokeNav); // Display PokeNav + SetMainCallback2(CB2_InitPokeNav); // Display PokéNav return TRUE; } @@ -1421,7 +1421,7 @@ static void ShowSaveInfoWindow(void) if (FlagGet(FLAG_SYS_POKEDEX_GET) == TRUE) { - // Print pokedex count + // Print Pokédex count yOffset += 16; AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingPokedex, 0, yOffset, TEXT_SKIP_DRAW, NULL); BufferSaveMenuText(SAVE_MENU_CAUGHT, gStringVar4, color); diff --git a/src/starter_choose.c b/src/starter_choose.c index f1821fe04d..01b6600053 100644 --- a/src/starter_choose.c +++ b/src/starter_choose.c @@ -26,7 +26,7 @@ #define STARTER_MON_COUNT 3 -// Position of the sprite of the selected starter Pokemon +// Position of the sprite of the selected starter Pokémon #define STARTER_PKMN_POS_X (DISPLAY_WIDTH / 2) #define STARTER_PKMN_POS_Y 64 @@ -446,7 +446,7 @@ void CB2_ChooseStarter(void) spriteId = CreateSprite(&sSpriteTemplate_Hand, 120, 56, 2); gSprites[spriteId].data[0] = taskId; - // Create three Pokeball sprites + // Create three Poké Ball sprites spriteId = CreateSprite(&sSpriteTemplate_Pokeball, sPokeballCoords[0][0], sPokeballCoords[0][1], 2); gSprites[spriteId].sTaskId = taskId; gSprites[spriteId].sBallId = 0; @@ -495,7 +495,7 @@ static void Task_HandleStarterChooseInput(u8 taskId) spriteId = CreateSprite(&sSpriteTemplate_StarterCircle, sPokeballCoords[selection][0], sPokeballCoords[selection][1], 1); gTasks[taskId].tCircleSpriteId = spriteId; - // Create Pokemon sprite + // Create Pokémon sprite spriteId = CreatePokemonFrontSprite(GetStarterPokemon(gTasks[taskId].tStarterSelection), sPokeballCoords[selection][0], sPokeballCoords[selection][1]); gSprites[spriteId].affineAnims = &sAffineAnims_StarterPokemon; gSprites[spriteId].callback = SpriteCB_StarterPokemon; @@ -637,7 +637,7 @@ static u8 CreatePokemonFrontSprite(u16 species, u8 x, u8 y) static void SpriteCB_SelectionHand(struct Sprite *sprite) { - // Float up and down above selected pokeball + // Float up and down above selected Poké Ball sprite->x = sCursorCoords[gTasks[sprite->data[0]].tStarterSelection][0]; sprite->y = sCursorCoords[gTasks[sprite->data[0]].tStarterSelection][1]; sprite->y2 = Sin(sprite->data[1], 8); @@ -646,7 +646,7 @@ static void SpriteCB_SelectionHand(struct Sprite *sprite) static void SpriteCB_Pokeball(struct Sprite *sprite) { - // Animate pokeball if currently selected + // Animate Poké Ball if currently selected if (gTasks[sprite->sTaskId].tStarterSelection == sprite->sBallId) StartSpriteAnimIfDifferent(sprite, 1); else diff --git a/src/title_screen.c b/src/title_screen.c index 12015b8bd8..1d605d1fc0 100644 --- a/src/title_screen.c +++ b/src/title_screen.c @@ -680,7 +680,7 @@ static void MainCB2(void) UpdatePaletteFade(); } -// Shine the Pokemon logo two more times, and fade in the version banner +// Shine the Pokémon logo two more times, and fade in the version banner static void Task_TitleScreenPhase1(u8 taskId) { // Skip to next phase when A, B, Start, or Select is pressed @@ -728,7 +728,7 @@ static void Task_TitleScreenPhase1(u8 taskId) #undef sParentTaskId #undef sAlphaBlendIdx -// Create "Press Start" and copyright banners, and slide Pokemon logo up +// Create "Press Start" and copyright banners, and slide Pokémon logo up static void Task_TitleScreenPhase2(u8 taskId) { u32 yPos; @@ -767,7 +767,7 @@ static void Task_TitleScreenPhase2(u8 taskId) if (!(gTasks[taskId].tCounter & 1) && gTasks[taskId].tBg2Y != 0) gTasks[taskId].tBg2Y++; - // Slide Pokemon logo up + // Slide Pokémon logo up yPos = gTasks[taskId].tBg2Y * 256; SetGpuReg(REG_OFFSET_BG2Y_L, yPos); SetGpuReg(REG_OFFSET_BG2Y_H, yPos / 0x10000); diff --git a/src/trade.c b/src/trade.c index 0d7765857f..080bd74f66 100644 --- a/src/trade.c +++ b/src/trade.c @@ -168,7 +168,7 @@ static EWRAM_DATA u8 *sMenuTextTileBuffer = NULL; // Bytes 0-2 are used for the player's name text // Bytes 3-5 are used for the partner's name text // Bytes 6-7 are used for the Cancel text -// Bytes 8-13 are used for the Choose a Pokemon text +// Bytes 8-13 are used for the Choose a Pokémon text // See the corresponding GFXTAGs in src/data/trade.h static EWRAM_DATA u8 *sMenuTextTileBuffers[NUM_MENU_TEXT_SPRITES] = {NULL}; @@ -1006,25 +1006,25 @@ static void SetActiveMenuOptions(void) { if (i < sTradeMenu->partyCounts[TRADE_PLAYER]) { - // Present player pokemon + // Present player Pokémon gSprites[sTradeMenu->partySpriteIds[TRADE_PLAYER][i]].invisible = FALSE; sTradeMenu->optionsActive[i] = TRUE; } else { - // Absent player pokemon + // Absent player Pokémon sTradeMenu->optionsActive[i] = FALSE; } if (i < sTradeMenu->partyCounts[TRADE_PARTNER]) { - // Present partner pokemon + // Present partner Pokémon gSprites[sTradeMenu->partySpriteIds[TRADE_PARTNER][i]].invisible = FALSE; sTradeMenu->optionsActive[i + PARTY_SIZE] = TRUE; } else { - // Absent partner pokemon + // Absent partner Pokémon sTradeMenu->optionsActive[i + PARTY_SIZE] = FALSE; } } @@ -1281,7 +1281,7 @@ static void Leader_HandleCommunication(void) if (sTradeMenu->playerSelectStatus == STATUS_READY && sTradeMenu->partnerSelectStatus == STATUS_READY) { - // Both players have selected a pokemon to trade + // Both players have selected a Pokémon to trade sTradeMenu->callbackId = CB_SET_SELECTED_MONS; sTradeMenu->linkData[0] = LINKCMD_SET_MONS_TO_TRADE; sTradeMenu->linkData[1] = sTradeMenu->cursorPosition; @@ -1291,7 +1291,7 @@ static void Leader_HandleCommunication(void) else if (sTradeMenu->playerSelectStatus == STATUS_READY && sTradeMenu->partnerSelectStatus == STATUS_CANCEL) { - // The player has selected a pokemon to trade, + // The player has selected a Pokémon to trade, // but the partner has selected Cancel PrintTradeMessage(MSG_CANCELED); sTradeMenu->linkData[0] = LINKCMD_PARTNER_CANCEL_TRADE; @@ -1304,7 +1304,7 @@ static void Leader_HandleCommunication(void) else if (sTradeMenu->playerSelectStatus == STATUS_CANCEL && sTradeMenu->partnerSelectStatus == STATUS_READY) { - // The partner has selected a pokemon to trade, + // The partner has selected a Pokémon to trade, // but the player has selected cancel PrintTradeMessage(MSG_FRIEND_WANTS_TO_TRADE); sTradeMenu->linkData[0] = LINKCMD_PLAYER_CANCEL_TRADE; @@ -1461,7 +1461,7 @@ static void CB_ProcessMenuInput(void) if (sTradeMenu->cursorPosition < PARTY_SIZE) { - // Selected pokemon in player's party + // Selected Pokémon in player's party DrawTextBorderOuter(1, 1, 14); FillWindowPixelBuffer(1, PIXEL_FILL(1)); PrintMenuTable(1, ARRAY_COUNT(sSelectTradeMonActions), sSelectTradeMonActions); @@ -1472,7 +1472,7 @@ static void CB_ProcessMenuInput(void) } else if (sTradeMenu->cursorPosition < PARTY_SIZE * 2) { - // Selected pokemon in partner's party + // Selected Pokémon in partner's party BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); sTradeMenu->callbackId = CB_SHOW_MON_SUMMARY; } @@ -1848,7 +1848,7 @@ static void SetSelectedMon(u8 cursorPosition) if (sTradeMenu->drawSelectedMonState[whichParty] == 0) { // Start the animation to display just the selected - // pokemon in the middle of the screen + // Pokémon in the middle of the screen sTradeMenu->drawSelectedMonState[whichParty] = 1; sTradeMenu->selectedMonIdx[whichParty] = cursorPosition; } @@ -1882,10 +1882,10 @@ static void DrawSelectedMonScreen(u8 whichParty) for (i = 0; i < PARTY_SIZE; i++) ClearWindowTilemap(i + (whichParty * PARTY_SIZE + 2)); - // Re-display the selected pokemon + // Re-display the selected Pokémon gSprites[sTradeMenu->partySpriteIds[selectedMonParty][partyIdx]].invisible = FALSE; - // Move the selected pokemon to the center + // Move the selected Pokémon to the center gSprites[sTradeMenu->partySpriteIds[selectedMonParty][partyIdx]].data[0] = 20; gSprites[sTradeMenu->partySpriteIds[selectedMonParty][partyIdx]].data[2] = (sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE][0] + sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE + 1][0]) / 2 * 8 + 14; @@ -3088,13 +3088,13 @@ static void TradeMons(u8 playerPartyIdx, u8 partnerPartyIdx) struct Pokemon *partnerMon = &gEnemyParty[partnerPartyIdx]; u16 partnerMail = GetMonData(partnerMon, MON_DATA_MAIL); - // The mail attached to the sent Pokemon no longer exists in your file. + // The mail attached to the sent Pokémon no longer exists in your file. if (playerMail != MAIL_NONE) ClearMail(&gSaveBlock1Ptr->mail[playerMail]); SWAP(*playerMon, *partnerMon, sTradeAnim->tempMon); - // By default, a Pokemon received from a trade will have 70 Friendship. + // By default, a Pokémon received from a trade will have 70 Friendship. // Eggs use Friendship to track egg cycles, so don't set this on Eggs. friendship = 70; if (!GetMonData(playerMon, MON_DATA_IS_EGG)) diff --git a/src/trainer_pokemon_sprites.c b/src/trainer_pokemon_sprites.c index 0d1954ab71..cfa013620a 100644 --- a/src/trainer_pokemon_sprites.c +++ b/src/trainer_pokemon_sprites.c @@ -11,7 +11,7 @@ #define PICS_COUNT 8 -// Needs to be large enough to store either a decompressed pokemon pic or trainer pic +// Needs to be large enough to store either a decompressed Pokémon pic or trainer pic #define PIC_SPRITE_SIZE max(MON_PIC_SIZE, TRAINER_PIC_SIZE) #define MAX_PIC_FRAMES max(MAX_MON_PIC_FRAMES, MAX_TRAINER_PIC_FRAMES) diff --git a/src/tv.c b/src/tv.c index 0211ef71e2..e89f6a9145 100644 --- a/src/tv.c +++ b/src/tv.c @@ -6206,7 +6206,7 @@ static void DoTVShowSpotTheCuties(void) TVShowConvertInternationalString(gStringVar1, show->cuties.playerName, show->cuties.language); TVShowConvertInternationalString(gStringVar2, show->cuties.nickname, show->cuties.pokemonNameLanguage); - // Comments following the intro depend on how many ribbons the pokemon has + // Comments following the intro depend on how many ribbons the Pokémon has if (show->cuties.nRibbons < 10) sTVShowState = SPOTCUTIES_STATE_RIBBONS_LOW; else if (show->cuties.nRibbons < 20) diff --git a/src/use_pokeblock.c b/src/use_pokeblock.c index 2aefdedf38..c9d5c56e5c 100644 --- a/src/use_pokeblock.c +++ b/src/use_pokeblock.c @@ -73,10 +73,10 @@ struct UsePokeblockSession u8 natureText[34]; }; -// This struct is identical to PokenavMonListItem, the struct used for managing lists of pokemon in the pokenav +// This struct is identical to PokenavMonListItem, the struct used for managing lists of Pokémon in the PokéNav // Given that this screen is essentially duplicated in the poknav, this struct was probably the same one with // a more general name/purpose -// TODO: Once the pokenav conditions screens are documented, resolve the above +// TODO: Once the PokéNav conditions screens are documented, resolve the above struct UsePokeblockMenuPokemon { u8 boxId; // Because this screen is never used for the PC this is always set to TOTAL_BOXES_COUNT to refer to party @@ -1259,7 +1259,7 @@ static void LoadAndCreateSelectionIcons(void) LoadSpriteSheets(spriteSheets); LoadSpritePalettes(spritePals); - // Fill pokeball selection icons up to number in party + // Fill Poké Ball selection icons up to number in party for (i = 0; i < sMenu->info.numSelections - 1; i++) { spriteId = CreateSprite(&spriteTemplate, 226, (i * 20) + 8, 0); @@ -1489,7 +1489,7 @@ static bool8 LoadNewSelection_CancelToMon(void) case 2: if (!ConditionMenu_UpdateMonEnter(&sMenu->graph, &sMenu->curMonXOffset)) { - // Load the new adjacent pokemon (not the one being shown) + // Load the new adjacent Pokémon (not the one being shown) LoadMonInfo(sMenu->toLoadSelection, sMenu->toLoadId); sMenu->info.helperState++; } @@ -1552,7 +1552,7 @@ static bool8 LoadNewSelection_MonToMon(void) case 2: if (!ConditionMenu_UpdateMonEnter(&sMenu->graph, &sMenu->curMonXOffset)) { - // Load the new adjacent pokemon (not the one being shown) + // Load the new adjacent Pokémon (not the one being shown) LoadMonInfo(sMenu->toLoadSelection, sMenu->toLoadId); sMenu->info.helperState++; } @@ -1593,8 +1593,8 @@ static void SpriteCB_SelectionIconCancel(struct Sprite *sprite) sprite->oam.paletteNum = IndexOfSpritePaletteTag(TAG_CONDITION_CANCEL); } -// Calculate the max id for sparkles/stars that appear around the pokemon on the condition screen -// All pokemon start with 1 sparkle (added by CreateConditionSparkleSprites), so the number here +1 +// Calculate the max id for sparkles/stars that appear around the Pokémon on the condition screen +// All Pokémon start with 1 sparkle (added by CreateConditionSparkleSprites), so the number here +1 // is the total number of sparkles that appear static void CalculateNumAdditionalSparkles(u8 monIndex) { diff --git a/src/wild_encounter.c b/src/wild_encounter.c index f4412c479a..474c5ef560 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -403,7 +403,7 @@ u8 PickWildMonNature(void) } } } - // check synchronize for a pokemon with the same ability + // check synchronize for a Pokémon with the same ability if (OW_SYNCHRONIZE_NATURE < GEN_9 && !GetMonData(&gPlayerParty[0], MON_DATA_SANITY_IS_EGG) && GetMonAbility(&gPlayerParty[0]) == ABILITY_SYNCHRONIZE @@ -902,16 +902,16 @@ u16 GetLocalWildMon(bool8 *isWaterMon) // Neither if (landMonsInfo == NULL && waterMonsInfo == NULL) return SPECIES_NONE; - // Land Pokemon + // Land Pokémon else if (landMonsInfo != NULL && waterMonsInfo == NULL) return landMonsInfo->wildPokemon[ChooseWildMonIndex_Land()].species; - // Water Pokemon + // Water Pokémon else if (landMonsInfo == NULL && waterMonsInfo != NULL) { *isWaterMon = TRUE; return waterMonsInfo->wildPokemon[ChooseWildMonIndex_WaterRock()].species; } - // Either land or water Pokemon + // Either land or water Pokémon if ((Random() % 100) < 80) { return landMonsInfo->wildPokemon[ChooseWildMonIndex_Land()].species; diff --git a/test/battle/move_effect/confusion_hit.c b/test/battle/move_effect/confusion_hit.c new file mode 100644 index 0000000000..45077f42d0 --- /dev/null +++ b/test/battle/move_effect/confusion_hit.c @@ -0,0 +1,50 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("Alluring Voice confuses the target if the target raised a stat this turn") +{ + u16 move; + + PARAMETRIZE { move = MOVE_CELEBRATE; } + PARAMETRIZE { move = MOVE_SWORDS_DANCE; } + + GIVEN { + ASSUME(gBattleMoves[MOVE_ALLURING_VOICE].effect == EFFECT_CONFUSE_HIT); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, move); MOVE(player, MOVE_ALLURING_VOICE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, move, opponent); + ANIMATION(ANIM_TYPE_MOVE, MOVE_ALLURING_VOICE, player); + HP_BAR(opponent); + if (move == MOVE_SWORDS_DANCE) { + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_CONFUSION, opponent); + MESSAGE("Foe Wobbuffet became confused!"); + } else { + NONE_OF { + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_CONFUSION, opponent); + MESSAGE("Foe Wobbuffet became confused!"); + } + } + } +} + +SINGLE_BATTLE_TEST("Alluring Voice confuse effect is removed if it is Sheer Force boosted") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_ALLURING_VOICE].effect == EFFECT_CONFUSE_HIT); + PLAYER(SPECIES_NIDOKING) { Ability(ABILITY_SHEER_FORCE); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_SWORDS_DANCE); MOVE(player, MOVE_ALLURING_VOICE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_SWORDS_DANCE, opponent); + ANIMATION(ANIM_TYPE_MOVE, MOVE_ALLURING_VOICE, player); + HP_BAR(opponent); + NONE_OF { + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_CONFUSION, opponent); + MESSAGE("Foe Wobbuffet became confused!"); + } + } +} diff --git a/test/battle/move_effect/fickle_beam.c b/test/battle/move_effect/fickle_beam.c new file mode 100644 index 0000000000..2732b641a6 --- /dev/null +++ b/test/battle/move_effect/fickle_beam.c @@ -0,0 +1,30 @@ +#include "global.h" +#include "test/battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_FICKLE_BEAM].effect == EFFECT_FICKLE_BEAM); +} + +SINGLE_BATTLE_TEST("Fickle Beam deals double damage 30% of the time") +{ + s16 damage[2]; + + PASSES_RANDOMLY(30, 100, RNG_FICKLE_BEAM); + GIVEN { + ASSUME(gBattleMoves[MOVE_POWER_GEM].power == 80); + ASSUME(gBattleMoves[MOVE_FICKLE_BEAM].power == 80); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_POWER_GEM); } + TURN { MOVE(player, MOVE_FICKLE_BEAM); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_POWER_GEM, player); + HP_BAR(opponent, captureDamage: &damage[0]); + ANIMATION(ANIM_TYPE_MOVE, MOVE_FICKLE_BEAM, player); + HP_BAR(opponent, captureDamage: &damage[1]); + } THEN { + EXPECT_MUL_EQ(damage[0], Q_4_12(2.0), damage[1]); + } +} diff --git a/test/battle/move_effect/meteor_beam.c b/test/battle/move_effect/meteor_beam.c new file mode 100644 index 0000000000..600de153d4 --- /dev/null +++ b/test/battle/move_effect/meteor_beam.c @@ -0,0 +1,61 @@ +#include "global.h" +#include "test/battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_ELECTRO_SHOT].effect == EFFECT_METEOR_BEAM); +} + +SINGLE_BATTLE_TEST("Electro Shot needs a charging Turn") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_ELECTRO_SHOT); } + TURN { SKIP_TURN(player); } + } SCENE { + // Charging turn + ANIMATION(ANIM_TYPE_MOVE, MOVE_ELECTRO_SHOT, player); + MESSAGE("Wobbuffet absorbed electricity!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Wobbuffet's Sp. Atk rose!"); + // Attack turn + MESSAGE("Wobbuffet used Electro Shot!"); + } +} + +SINGLE_BATTLE_TEST("Electro Shot doesn't need to charge when it's raining") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_RAIN_DANCE); MOVE(player, MOVE_ELECTRO_SHOT); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_RAIN_DANCE, opponent); + ANIMATION(ANIM_TYPE_MOVE, MOVE_ELECTRO_SHOT, player); + MESSAGE("Wobbuffet absorbed electricity!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Wobbuffet's Sp. Atk rose!"); + MESSAGE("Wobbuffet used Electro Shot!"); + } +} + +SINGLE_BATTLE_TEST("Electro Shot doesn't need to charge with Power Herb") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_POWER_HERB); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_ELECTRO_SHOT); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_ELECTRO_SHOT, player); + MESSAGE("Wobbuffet absorbed electricity!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Wobbuffet's Sp. Atk rose!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Wobbuffet became fully charged due to its Power Herb!"); + MESSAGE("Wobbuffet used Electro Shot!"); + } +} diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index 2c8de594a1..17b4c34276 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -12,6 +12,7 @@ ASSUMPTIONS ASSUME(gBattleMoves[MOVE_QUICK_GUARD].effect == EFFECT_PROTECT); ASSUME(gBattleMoves[MOVE_CRAFTY_SHIELD].effect == EFFECT_PROTECT); ASSUME(gBattleMoves[MOVE_BANEFUL_BUNKER].effect == EFFECT_PROTECT); + ASSUME(gBattleMoves[MOVE_BURNING_BULWARK].effect == EFFECT_PROTECT); ASSUME(gBattleMoves[MOVE_TACKLE].category == BATTLE_CATEGORY_PHYSICAL); ASSUME(gBattleMoves[MOVE_TACKLE].makesContact); ASSUME(gBattleMoves[MOVE_LEER].category == BATTLE_CATEGORY_STATUS); @@ -19,7 +20,7 @@ ASSUMPTIONS ASSUME(!(gBattleMoves[MOVE_WATER_GUN].makesContact)); } -SINGLE_BATTLE_TEST("Protect, Detect, Spiky Shield and Baneful Bunker protect from all moves") +SINGLE_BATTLE_TEST("Protect, Detect, Spiky Shield, Baneful Bunker and Burning Bulwark protect from all moves") { u32 j; static const u16 protectMoves[] = { @@ -27,6 +28,7 @@ SINGLE_BATTLE_TEST("Protect, Detect, Spiky Shield and Baneful Bunker protect fro MOVE_DETECT, MOVE_SPIKY_SHIELD, MOVE_BANEFUL_BUNKER, + MOVE_BURNING_BULWARK, }; u16 protectMove = MOVE_NONE; u16 usedMove = MOVE_NONE; @@ -188,6 +190,38 @@ SINGLE_BATTLE_TEST("Baneful Bunker poisons pokemon for moves making contact") } } +SINGLE_BATTLE_TEST("Burning Bulwark burns pokemon for moves making contact") +{ + u16 usedMove = MOVE_NONE; + + PARAMETRIZE {usedMove = MOVE_TACKLE; } + PARAMETRIZE {usedMove = MOVE_LEER; } + PARAMETRIZE {usedMove = MOVE_WATER_GUN; } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_BURNING_BULWARK); MOVE(player, usedMove); } + TURN {} + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_BURNING_BULWARK, opponent); + MESSAGE("Foe Wobbuffet protected itself!"); + NOT ANIMATION(ANIM_TYPE_MOVE, usedMove, player); + MESSAGE("Foe Wobbuffet protected itself!"); + if (usedMove == MOVE_TACKLE) { + NOT HP_BAR(opponent); + STATUS_ICON(player, STATUS1_BURN); + } else { + NONE_OF { + HP_BAR(opponent); + STATUS_ICON(player, STATUS1_BURN); + } + } + } +} + SINGLE_BATTLE_TEST("Recoil damage is not applied if target was protected") { u32 j, k;