From 898e7543c87394debe31eb0147bfb062aa2f363b Mon Sep 17 00:00:00 2001 From: Frank Date: Tue, 13 Feb 2024 14:24:59 -0500 Subject: [PATCH 01/12] Moved gTypeNames into gTypes --- include/battle_main.h | 2 +- include/data.h | 5 ++ src/battle_controller_player.c | 2 +- src/battle_debug.c | 2 +- src/battle_main.c | 97 +++++++++++++++++++++++++++------- src/battle_message.c | 2 +- src/battle_z_move.c | 2 +- src/data/union_room.h | 36 ++++++------- src/menu_specialized.c | 2 +- src/pokedex.c | 36 ++++++------- src/pokedex_plus_hgss.c | 38 ++++++------- src/union_room.c | 4 +- 12 files changed, 145 insertions(+), 83 deletions(-) diff --git a/include/battle_main.h b/include/battle_main.h index c1394db60c82..fdfbced19004 100644 --- a/include/battle_main.h +++ b/include/battle_main.h @@ -76,7 +76,7 @@ extern struct MultiPartnerMenuPokemon gMultiPartnerParty[MULTI_PARTY_SIZE]; extern const struct SpriteTemplate gUnusedBattleInitSprite; extern const struct OamData gOamData_BattleSpriteOpponentSide; extern const struct OamData gOamData_BattleSpritePlayerSide; -extern const u8 gTypeNames[NUMBER_OF_MON_TYPES][TYPE_NAME_LENGTH + 1]; +extern const struct Type gTypes[NUMBER_OF_MON_TYPES]; extern const u8 gStatusConditionString_PoisonJpn[8]; extern const u8 gStatusConditionString_SleepJpn[8]; diff --git a/include/data.h b/include/data.h index 4727dc605b96..6e8b9f70f48f 100644 --- a/include/data.h +++ b/include/data.h @@ -102,6 +102,11 @@ struct TrainerClass #define TRAINER_ENCOUNTER_MUSIC(trainer)((gTrainers[trainer].encounterMusic_gender & 0x7F)) +struct Type +{ + u8 name[TYPE_NAME_LENGTH + 1]; +}; + extern const u16 gMinigameDigits_Pal[]; extern const u32 gMinigameDigits_Gfx[]; diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index f1bdbdc6683f..1a28d8d2762d 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -1755,7 +1755,7 @@ static void MoveSelectionDisplayMoveType(u32 battler) else type = gMovesInfo[moveInfo->moves[gMoveSelectionCursor[battler]]].type; - StringCopy(txtPtr, gTypeNames[type]); + StringCopy(txtPtr, gTypes[type].name); BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MOVE_TYPE); } diff --git a/src/battle_debug.c b/src/battle_debug.c index cdda88e2365c..6ef533775723 100644 --- a/src/battle_debug.c +++ b/src/battle_debug.c @@ -1480,7 +1480,7 @@ static void PrintSecondaryEntries(struct BattleDebugMenu *data) { u8 *types = &gBattleMons[data->battlerId].type1; - PadString(gTypeNames[types[i]], text); + PadString(gTypes[types[i]].name, text); printer.currentY = printer.y = (i * yMultiplier) + sSecondaryListTemplate.upText_Y; AddTextPrinter(&printer, 0, NULL); } diff --git a/src/battle_main.c b/src/battle_main.c index 4aa7e43a91ae..c039b706668a 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -299,27 +299,84 @@ const struct OamData gOamData_BattleSpritePlayerSide = static const s8 sCenterToCornerVecXs[8] ={-32, -16, -16, -32, -32}; -const u8 gTypeNames[NUMBER_OF_MON_TYPES][TYPE_NAME_LENGTH + 1] = +const struct Type gTypes[NUMBER_OF_MON_TYPES] = { - [TYPE_NORMAL] = _("Normal"), - [TYPE_FIGHTING] = _("Fight"), - [TYPE_FLYING] = _("Flying"), - [TYPE_POISON] = _("Poison"), - [TYPE_GROUND] = _("Ground"), - [TYPE_ROCK] = _("Rock"), - [TYPE_BUG] = _("Bug"), - [TYPE_GHOST] = _("Ghost"), - [TYPE_STEEL] = _("Steel"), - [TYPE_MYSTERY] = _("???"), - [TYPE_FIRE] = _("Fire"), - [TYPE_WATER] = _("Water"), - [TYPE_GRASS] = _("Grass"), - [TYPE_ELECTRIC] = _("Electr"), - [TYPE_PSYCHIC] = _("Psychc"), - [TYPE_ICE] = _("Ice"), - [TYPE_DRAGON] = _("Dragon"), - [TYPE_DARK] = _("Dark"), - [TYPE_FAIRY] = _("Fairy"), + [TYPE_NORMAL] = + { + .name = _("Normal") + }, + [TYPE_FIGHTING] = + { + .name = _("Fight") + }, + [TYPE_FLYING] = + { + .name = _("Flying") + }, + [TYPE_POISON] = + { + .name = _("Poison") + }, + [TYPE_GROUND] = + { + .name = _("Ground") + }, + [TYPE_ROCK] = + { + .name = _("Rock") + }, + [TYPE_BUG] = + { + .name = _("Bug") + }, + [TYPE_GHOST] = + { + .name = _("Ghost") + }, + [TYPE_STEEL] = + { + .name = _("Steel") + }, + [TYPE_MYSTERY] = + { + .name = _("???") + }, + [TYPE_FIRE] = + { + .name = _("Fire") + }, + [TYPE_WATER] = + { + .name = _("Water") + }, + [TYPE_GRASS] = + { + .name = _("Grass") + }, + [TYPE_ELECTRIC] = + { + .name = _("Electr") + }, + [TYPE_PSYCHIC] = + { + .name = _("Psychc") + }, + [TYPE_ICE] = + { + .name = _("Ice") + }, + [TYPE_DRAGON] = + { + .name = _("Dragon") + }, + [TYPE_DARK] = + { + .name = _("Dark") + }, + [TYPE_FAIRY] = + { + .name = _("Fairy") + }, }; // extra args are money and ball diff --git a/src/battle_message.c b/src/battle_message.c index a99f3cde9d72..6a6cecf37860 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -3741,7 +3741,7 @@ void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst) srcID += 3; break; case B_BUFF_TYPE: // type name - StringAppend(dst, gTypeNames[src[srcID + 1]]); + StringAppend(dst, gTypes[src[srcID + 1]].name); srcID += 2; break; case B_BUFF_MON_NICK_WITH_PREFIX: // poke nick with prefix diff --git a/src/battle_z_move.c b/src/battle_z_move.c index b2377bffd457..23d14f3d9dc7 100644 --- a/src/battle_z_move.c +++ b/src/battle_z_move.c @@ -553,7 +553,7 @@ static void ZMoveSelectionDisplayMoveType(u16 zMove, u32 battler) *(txtPtr)++ = EXT_CTRL_CODE_FONT; *(txtPtr)++ = FONT_NORMAL; - StringCopy(txtPtr, gTypeNames[zMoveType]); + StringCopy(txtPtr, gTypes[zMoveType].name); BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MOVE_TYPE); } diff --git a/src/data/union_room.h b/src/data/union_room.h index f32910388b15..cc9dd7fcb50e 100644 --- a/src/data/union_room.h +++ b/src/data/union_room.h @@ -868,24 +868,24 @@ static const struct WindowTemplate sWindowTemplate_TradingBoardRequestType = { }; static const struct ListMenuItem sTradingBoardTypes[NUMBER_OF_MON_TYPES] = { - { gTypeNames[TYPE_NORMAL], TYPE_NORMAL }, - { gTypeNames[TYPE_FIRE], TYPE_FIRE }, - { gTypeNames[TYPE_WATER], TYPE_WATER }, - { gTypeNames[TYPE_ELECTRIC], TYPE_ELECTRIC }, - { gTypeNames[TYPE_GRASS], TYPE_GRASS }, - { gTypeNames[TYPE_ICE], TYPE_ICE }, - { gTypeNames[TYPE_GROUND], TYPE_GROUND }, - { gTypeNames[TYPE_ROCK], TYPE_ROCK }, - { gTypeNames[TYPE_FLYING], TYPE_FLYING }, - { gTypeNames[TYPE_PSYCHIC], TYPE_PSYCHIC }, - { gTypeNames[TYPE_FIGHTING], TYPE_FIGHTING }, - { gTypeNames[TYPE_POISON], TYPE_POISON }, - { gTypeNames[TYPE_BUG], TYPE_BUG }, - { gTypeNames[TYPE_GHOST], TYPE_GHOST }, - { gTypeNames[TYPE_DRAGON], TYPE_DRAGON }, - { gTypeNames[TYPE_STEEL], TYPE_STEEL }, - { gTypeNames[TYPE_DARK], TYPE_DARK }, - { gTypeNames[TYPE_FAIRY], TYPE_FAIRY }, + { gTypes[TYPE_NORMAL].name, TYPE_NORMAL }, + { gTypes[TYPE_FIRE].name, TYPE_FIRE }, + { gTypes[TYPE_WATER].name, TYPE_WATER }, + { gTypes[TYPE_ELECTRIC].name, TYPE_ELECTRIC }, + { gTypes[TYPE_GRASS].name, TYPE_GRASS }, + { gTypes[TYPE_ICE].name, TYPE_ICE }, + { gTypes[TYPE_GROUND].name, TYPE_GROUND }, + { gTypes[TYPE_ROCK].name, TYPE_ROCK }, + { gTypes[TYPE_FLYING].name, TYPE_FLYING }, + { gTypes[TYPE_PSYCHIC].name, TYPE_PSYCHIC }, + { gTypes[TYPE_FIGHTING].name, TYPE_FIGHTING }, + { gTypes[TYPE_POISON].name, TYPE_POISON }, + { gTypes[TYPE_BUG].name, TYPE_BUG }, + { gTypes[TYPE_GHOST].name, TYPE_GHOST }, + { gTypes[TYPE_DRAGON].name, TYPE_DRAGON }, + { gTypes[TYPE_STEEL].name, TYPE_STEEL }, + { gTypes[TYPE_DARK].name, TYPE_DARK }, + { gTypes[TYPE_FAIRY].name, TYPE_FAIRY }, { sText_Exit, NUMBER_OF_MON_TYPES } }; diff --git a/src/menu_specialized.c b/src/menu_specialized.c index 85d78abc1c66..879cbccf62f6 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -777,7 +777,7 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove) return; } move = &gMovesInfo[chosenMove]; - str = gTypeNames[move->type]; + str = gTypes[move->type].name; AddTextPrinterParameterized(RELEARNERWIN_DESC_BATTLE, FONT_NORMAL, str, 4, 25, TEXT_SKIP_DRAW, NULL); x = 4 + GetStringWidth(FONT_NORMAL, gText_MoveRelearnerPP, 0); diff --git a/src/pokedex.c b/src/pokedex.c index a7aa98c42494..619cecb9ac76 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -1379,24 +1379,24 @@ static const struct SearchOptionText sDexSearchColorOptions[] = static const struct SearchOptionText sDexSearchTypeOptions[NUMBER_OF_MON_TYPES + 1] = // + 2 for "None" and terminator, - 1 for Mystery { {gText_DexEmptyString, gText_DexSearchTypeNone}, - {gText_DexEmptyString, gTypeNames[TYPE_NORMAL]}, - {gText_DexEmptyString, gTypeNames[TYPE_FIGHTING]}, - {gText_DexEmptyString, gTypeNames[TYPE_FLYING]}, - {gText_DexEmptyString, gTypeNames[TYPE_POISON]}, - {gText_DexEmptyString, gTypeNames[TYPE_GROUND]}, - {gText_DexEmptyString, gTypeNames[TYPE_ROCK]}, - {gText_DexEmptyString, gTypeNames[TYPE_BUG]}, - {gText_DexEmptyString, gTypeNames[TYPE_GHOST]}, - {gText_DexEmptyString, gTypeNames[TYPE_STEEL]}, - {gText_DexEmptyString, gTypeNames[TYPE_FIRE]}, - {gText_DexEmptyString, gTypeNames[TYPE_WATER]}, - {gText_DexEmptyString, gTypeNames[TYPE_GRASS]}, - {gText_DexEmptyString, gTypeNames[TYPE_ELECTRIC]}, - {gText_DexEmptyString, gTypeNames[TYPE_PSYCHIC]}, - {gText_DexEmptyString, gTypeNames[TYPE_ICE]}, - {gText_DexEmptyString, gTypeNames[TYPE_DRAGON]}, - {gText_DexEmptyString, gTypeNames[TYPE_DARK]}, - {gText_DexEmptyString, gTypeNames[TYPE_FAIRY]}, + {gText_DexEmptyString, gTypes[TYPE_NORMAL].name}, + {gText_DexEmptyString, gTypes[TYPE_FIGHTING].name}, + {gText_DexEmptyString, gTypes[TYPE_FLYING].name}, + {gText_DexEmptyString, gTypes[TYPE_POISON].name}, + {gText_DexEmptyString, gTypes[TYPE_GROUND].name}, + {gText_DexEmptyString, gTypes[TYPE_ROCK].name}, + {gText_DexEmptyString, gTypes[TYPE_BUG].name}, + {gText_DexEmptyString, gTypes[TYPE_GHOST].name}, + {gText_DexEmptyString, gTypes[TYPE_STEEL].name}, + {gText_DexEmptyString, gTypes[TYPE_FIRE].name}, + {gText_DexEmptyString, gTypes[TYPE_WATER].name}, + {gText_DexEmptyString, gTypes[TYPE_GRASS].name}, + {gText_DexEmptyString, gTypes[TYPE_ELECTRIC].name}, + {gText_DexEmptyString, gTypes[TYPE_PSYCHIC].name}, + {gText_DexEmptyString, gTypes[TYPE_ICE].name}, + {gText_DexEmptyString, gTypes[TYPE_DRAGON].name}, + {gText_DexEmptyString, gTypes[TYPE_DARK].name}, + {gText_DexEmptyString, gTypes[TYPE_FAIRY].name}, {}, }; diff --git a/src/pokedex_plus_hgss.c b/src/pokedex_plus_hgss.c index 0e3817d4ac1d..9eed36411fe1 100644 --- a/src/pokedex_plus_hgss.c +++ b/src/pokedex_plus_hgss.c @@ -1955,24 +1955,24 @@ static const struct SearchOptionText sDexSearchColorOptions[] = static const struct SearchOptionText sDexSearchTypeOptions[NUMBER_OF_MON_TYPES + 1] = // + 2 for "None" and terminator, - 1 for Mystery { {gText_DexEmptyString, gText_DexSearchTypeNone}, - {gText_DexEmptyString, gTypeNames[TYPE_NORMAL]}, - {gText_DexEmptyString, gTypeNames[TYPE_FIGHTING]}, - {gText_DexEmptyString, gTypeNames[TYPE_FLYING]}, - {gText_DexEmptyString, gTypeNames[TYPE_POISON]}, - {gText_DexEmptyString, gTypeNames[TYPE_GROUND]}, - {gText_DexEmptyString, gTypeNames[TYPE_ROCK]}, - {gText_DexEmptyString, gTypeNames[TYPE_BUG]}, - {gText_DexEmptyString, gTypeNames[TYPE_GHOST]}, - {gText_DexEmptyString, gTypeNames[TYPE_STEEL]}, - {gText_DexEmptyString, gTypeNames[TYPE_FIRE]}, - {gText_DexEmptyString, gTypeNames[TYPE_WATER]}, - {gText_DexEmptyString, gTypeNames[TYPE_GRASS]}, - {gText_DexEmptyString, gTypeNames[TYPE_ELECTRIC]}, - {gText_DexEmptyString, gTypeNames[TYPE_PSYCHIC]}, - {gText_DexEmptyString, gTypeNames[TYPE_ICE]}, - {gText_DexEmptyString, gTypeNames[TYPE_DRAGON]}, - {gText_DexEmptyString, gTypeNames[TYPE_DARK]}, - {gText_DexEmptyString, gTypeNames[TYPE_FAIRY]}, + {gText_DexEmptyString, gTypes[TYPE_NORMAL].name}, + {gText_DexEmptyString, gTypes[TYPE_FIGHTING].name}, + {gText_DexEmptyString, gTypes[TYPE_FLYING].name}, + {gText_DexEmptyString, gTypes[TYPE_POISON].name}, + {gText_DexEmptyString, gTypes[TYPE_GROUND].name}, + {gText_DexEmptyString, gTypes[TYPE_ROCK].name}, + {gText_DexEmptyString, gTypes[TYPE_BUG].name}, + {gText_DexEmptyString, gTypes[TYPE_GHOST].name}, + {gText_DexEmptyString, gTypes[TYPE_STEEL].name}, + {gText_DexEmptyString, gTypes[TYPE_FIRE].name}, + {gText_DexEmptyString, gTypes[TYPE_WATER].name}, + {gText_DexEmptyString, gTypes[TYPE_GRASS].name}, + {gText_DexEmptyString, gTypes[TYPE_ELECTRIC].name}, + {gText_DexEmptyString, gTypes[TYPE_PSYCHIC].name}, + {gText_DexEmptyString, gTypes[TYPE_ICE].name}, + {gText_DexEmptyString, gTypes[TYPE_DRAGON].name}, + {gText_DexEmptyString, gTypes[TYPE_DARK].name}, + {gText_DexEmptyString, gTypes[TYPE_FAIRY].name}, {}, }; @@ -6687,7 +6687,7 @@ static u8 PrintEvolutionTargetSpeciesAndMethod(u8 taskId, u16 species, u8 depth, StringExpandPlaceholders(gStringVar4, sText_EVO_MOVE ); break; case EVO_FRIENDSHIP_MOVE_TYPE: - StringCopy(gStringVar2, gTypeNames[evolutions[i].param]); + StringCopy(gStringVar2, gTypes[evolutions[i].param].name); StringExpandPlaceholders(gStringVar4, sText_EVO_FRIENDSHIP_MOVE_TYPE ); break; case EVO_MAPSEC: diff --git a/src/union_room.c b/src/union_room.c index d71d3edad10a..529206ff7ca8 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -3184,12 +3184,12 @@ static void Task_RunUnionRoom(u8 taskId) break; case UR_TRADE_NOTYPE: CopyAndTranslatePlayerName(gStringVar1, &uroom->playerList->players[input]); - StringCopy(gStringVar2, gTypeNames[uroom->playerList->players[input].rfu.data.tradeType]); + StringCopy(gStringVar2, gTypes[uroom->playerList->players[input].rfu.data.tradeType].name); ScheduleFieldMessageWithFollowupState(UR_STATE_TRADING_BOARD_LOAD, sText_DontHaveTypeTrainerWants); break; case UR_TRADE_NOEGG: CopyAndTranslatePlayerName(gStringVar1, &uroom->playerList->players[input]); - StringCopy(gStringVar2, gTypeNames[uroom->playerList->players[input].rfu.data.tradeType]); + StringCopy(gStringVar2, gTypes[uroom->playerList->players[input].rfu.data.tradeType].name); ScheduleFieldMessageWithFollowupState(UR_STATE_TRADING_BOARD_LOAD, sText_DontHaveEggTrainerWants); break; } From a7014869ff9ce847b937207ec411cdeee50cd611 Mon Sep 17 00:00:00 2001 From: Frank Date: Tue, 13 Feb 2024 14:33:33 -0500 Subject: [PATCH 02/12] Added invalid move text to struct --- include/data.h | 1 + src/battle_main.c | 58 +++++++++++++++++++++++++++++--------------- src/battle_message.c | 31 +++-------------------- 3 files changed, 43 insertions(+), 47 deletions(-) diff --git a/include/data.h b/include/data.h index 6e8b9f70f48f..2e257d342abf 100644 --- a/include/data.h +++ b/include/data.h @@ -105,6 +105,7 @@ struct TrainerClass struct Type { u8 name[TYPE_NAME_LENGTH + 1]; + u8 invalid[17]; }; extern const u16 gMinigameDigits_Pal[]; diff --git a/src/battle_main.c b/src/battle_main.c index c039b706668a..5899c81880ad 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -299,83 +299,103 @@ const struct OamData gOamData_BattleSpritePlayerSide = static const s8 sCenterToCornerVecXs[8] ={-32, -16, -16, -32, -32}; +// invalid is large enough that the text for TYPE_ELECTRIC will exceed TEXT_BUFF_ARRAY_COUNT. const struct Type gTypes[NUMBER_OF_MON_TYPES] = { [TYPE_NORMAL] = { - .name = _("Normal") + .name = _("Normal"), + .invalid = _("a NORMAL move"), }, [TYPE_FIGHTING] = { - .name = _("Fight") + .name = _("Fight"), + .invalid = _("a FIGHTING move"), }, [TYPE_FLYING] = { - .name = _("Flying") + .name = _("Flying"), + .invalid = _("a FLYING move"), }, [TYPE_POISON] = { - .name = _("Poison") + .name = _("Poison"), + .invalid = _("a POISON move"), }, [TYPE_GROUND] = { - .name = _("Ground") + .name = _("Ground"), + .invalid = _("a GROUND move"), }, [TYPE_ROCK] = { - .name = _("Rock") + .name = _("Rock"), + .invalid = _("a ROCK move"), }, [TYPE_BUG] = { - .name = _("Bug") + .name = _("Bug"), + .invalid = _("a BUG move"), }, [TYPE_GHOST] = { - .name = _("Ghost") + .name = _("Ghost"), + .invalid = _("a GHOST move"), }, [TYPE_STEEL] = { - .name = _("Steel") + .name = _("Steel"), + .invalid = _("a STEEL move"), }, [TYPE_MYSTERY] = { - .name = _("???") + .name = _("???"), + .invalid = _("a ??? move"), }, [TYPE_FIRE] = { - .name = _("Fire") + .name = _("Fire"), + .invalid = _("a FIRE move"), }, [TYPE_WATER] = { - .name = _("Water") + .name = _("Water"), + .invalid = _("a WATER move"), }, [TYPE_GRASS] = { - .name = _("Grass") + .name = _("Grass"), + .invalid = _("a GRASS move"), }, [TYPE_ELECTRIC] = { - .name = _("Electr") + .name = _("Electr"), + .invalid = _("an ELECTRIC move"), }, [TYPE_PSYCHIC] = { - .name = _("Psychc") + .name = _("Psychc"), + .invalid = _("a PSYCHIC move"), }, [TYPE_ICE] = { - .name = _("Ice") + .name = _("Ice"), + .invalid = _("a ICE move"), }, [TYPE_DRAGON] = { - .name = _("Dragon") + .name = _("Dragon"), + .invalid = _("a DRAGON move"), }, [TYPE_DARK] = { - .name = _("Dark") + .name = _("Dark"), + .invalid = _("a DARK move"), }, [TYPE_FAIRY] = { - .name = _("Fairy") + .name = _("Fairy"), + .invalid = _("a FAIRY move"), }, }; diff --git a/src/battle_message.c b/src/battle_message.c index 6a6cecf37860..2b4164202f9a 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -2077,31 +2077,6 @@ const u8 gText_Draw[] = _("{HIGHLIGHT TRANSPARENT}Draw"); static const u8 sText_SpaceIs[] = _(" is"); static const u8 sText_ApostropheS[] = _("'s"); -// For displaying names of invalid moves. -// This is large enough that the text for TYPE_ELECTRIC will exceed TEXT_BUFF_ARRAY_COUNT. -static const u8 sATypeMove_Table[NUMBER_OF_MON_TYPES][17] = -{ - [TYPE_NORMAL] = _("a NORMAL move"), - [TYPE_FIGHTING] = _("a FIGHTING move"), - [TYPE_FLYING] = _("a FLYING move"), - [TYPE_POISON] = _("a POISON move"), - [TYPE_GROUND] = _("a GROUND move"), - [TYPE_ROCK] = _("a ROCK move"), - [TYPE_BUG] = _("a BUG move"), - [TYPE_GHOST] = _("a GHOST move"), - [TYPE_STEEL] = _("a STEEL move"), - [TYPE_MYSTERY] = _("a ??? move"), - [TYPE_FIRE] = _("a FIRE move"), - [TYPE_WATER] = _("a WATER move"), - [TYPE_GRASS] = _("a GRASS move"), - [TYPE_ELECTRIC] = _("an ELECTRIC move"), - [TYPE_PSYCHIC] = _("a PSYCHIC move"), - [TYPE_ICE] = _("an ICE move"), - [TYPE_DRAGON] = _("a DRAGON move"), - [TYPE_DARK] = _("a DARK move"), - [TYPE_FAIRY] = _("a FAIRY move"), -}; - const u8 gText_BattleTourney[] = _("BATTLE TOURNEY"); static const u8 sText_Round1[] = _("Round 1"); static const u8 sText_Round2[] = _("Round 2"); @@ -2919,7 +2894,7 @@ void BufferStringBattle(u16 stringID, u32 battler) if (gBattleMsgDataPtr->currentMove >= MOVES_COUNT && !IsZMove(gBattleMsgDataPtr->currentMove) && !IsMaxMove(gBattleMsgDataPtr->currentMove)) - StringCopy(gBattleTextBuff3, sATypeMove_Table[*(&gBattleStruct->stringMoveType)]); + StringCopy(gBattleTextBuff3, gTypes[*(&gBattleStruct->stringMoveType)].invalid); else StringCopy(gBattleTextBuff3, GetMoveName(gBattleMsgDataPtr->currentMove)); stringPtr = sText_AttackerUsedX; @@ -3349,7 +3324,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst) if (gBattleMsgDataPtr->currentMove >= MOVES_COUNT && !IsZMove(gBattleMsgDataPtr->currentMove) && !IsMaxMove(gBattleMsgDataPtr->currentMove)) - toCpy = sATypeMove_Table[gBattleStruct->stringMoveType]; + toCpy = gTypes[gBattleStruct->stringMoveType].invalid; else toCpy = GetMoveName(gBattleMsgDataPtr->currentMove); break; @@ -3357,7 +3332,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst) if (gBattleMsgDataPtr->originallyUsedMove >= MOVES_COUNT && !IsZMove(gBattleMsgDataPtr->currentMove) && !IsMaxMove(gBattleMsgDataPtr->currentMove)) - toCpy = sATypeMove_Table[gBattleStruct->stringMoveType]; + toCpy = gTypes[gBattleStruct->stringMoveType].invalid; else toCpy = GetMoveName(gBattleMsgDataPtr->originallyUsedMove); break; From 4d9c3819b42fabc2b1e53b4d83d43ef97beccb35 Mon Sep 17 00:00:00 2001 From: Frank Date: Tue, 13 Feb 2024 14:41:24 -0500 Subject: [PATCH 03/12] Added max move to struct --- include/data.h | 1 + src/battle_dynamax.c | 29 +++-------------------------- src/battle_main.c | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+), 26 deletions(-) diff --git a/include/data.h b/include/data.h index 2e257d342abf..8dff49085684 100644 --- a/include/data.h +++ b/include/data.h @@ -106,6 +106,7 @@ struct Type { u8 name[TYPE_NAME_LENGTH + 1]; u8 invalid[17]; + u16 maxMove; }; extern const u16 gMinigameDigits_Pal[]; diff --git a/src/battle_dynamax.c b/src/battle_dynamax.c index b703676b7371..36c4cbf6437b 100644 --- a/src/battle_dynamax.c +++ b/src/battle_dynamax.c @@ -24,29 +24,6 @@ static u8 GetMaxPowerTier(u16 move); -// Constant Data -static const u16 sMaxMoveTable[NUMBER_OF_MON_TYPES] = -{ - [TYPE_NORMAL] = MOVE_MAX_STRIKE, - [TYPE_FIGHTING] = MOVE_MAX_KNUCKLE, - [TYPE_FLYING] = MOVE_MAX_AIRSTREAM, - [TYPE_POISON] = MOVE_MAX_OOZE, - [TYPE_GROUND] = MOVE_MAX_QUAKE, - [TYPE_ROCK] = MOVE_MAX_ROCKFALL, - [TYPE_BUG] = MOVE_MAX_FLUTTERBY, - [TYPE_GHOST] = MOVE_MAX_PHANTASM, - [TYPE_STEEL] = MOVE_MAX_STEELSPIKE, - [TYPE_FIRE] = MOVE_MAX_FLARE, - [TYPE_WATER] = MOVE_MAX_GEYSER, - [TYPE_GRASS] = MOVE_MAX_OVERGROWTH, - [TYPE_ELECTRIC] = MOVE_MAX_LIGHTNING, - [TYPE_PSYCHIC] = MOVE_MAX_MINDSTORM, - [TYPE_ICE] = MOVE_MAX_HAILSTORM, - [TYPE_DRAGON] = MOVE_MAX_WYRMWIND, - [TYPE_DARK] = MOVE_MAX_DARKNESS, - [TYPE_FAIRY] = MOVE_MAX_STARFALL, -}; - struct GMaxMove { u16 species; @@ -305,9 +282,9 @@ static u16 GetTypeBasedMaxMove(u16 battlerId, u16 type) } // Regular Max Move - if (sMaxMoveTable[type] == MOVE_NONE) // failsafe - return sMaxMoveTable[0]; - return sMaxMoveTable[type]; + if (gTypes[type].maxMove == MOVE_NONE) // failsafe + return gTypes[0].maxMove; + return gTypes[type].maxMove; } // Returns the appropriate Max Move or G-Max Move for a battler to use. diff --git a/src/battle_main.c b/src/battle_main.c index 5899c81880ad..bf023849c1ba 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -306,46 +306,55 @@ const struct Type gTypes[NUMBER_OF_MON_TYPES] = { .name = _("Normal"), .invalid = _("a NORMAL move"), + .maxMove = MOVE_MAX_STRIKE, }, [TYPE_FIGHTING] = { .name = _("Fight"), .invalid = _("a FIGHTING move"), + .maxMove = MOVE_MAX_KNUCKLE, }, [TYPE_FLYING] = { .name = _("Flying"), .invalid = _("a FLYING move"), + .maxMove = MOVE_MAX_AIRSTREAM, }, [TYPE_POISON] = { .name = _("Poison"), .invalid = _("a POISON move"), + .maxMove = MOVE_MAX_OOZE, }, [TYPE_GROUND] = { .name = _("Ground"), .invalid = _("a GROUND move"), + .maxMove = MOVE_MAX_QUAKE, }, [TYPE_ROCK] = { .name = _("Rock"), .invalid = _("a ROCK move"), + .maxMove = MOVE_MAX_ROCKFALL, }, [TYPE_BUG] = { .name = _("Bug"), .invalid = _("a BUG move"), + .maxMove = MOVE_MAX_FLUTTERBY, }, [TYPE_GHOST] = { .name = _("Ghost"), .invalid = _("a GHOST move"), + .maxMove = MOVE_MAX_PHANTASM, }, [TYPE_STEEL] = { .name = _("Steel"), .invalid = _("a STEEL move"), + .maxMove = MOVE_MAX_STEELSPIKE, }, [TYPE_MYSTERY] = { @@ -356,46 +365,55 @@ const struct Type gTypes[NUMBER_OF_MON_TYPES] = { .name = _("Fire"), .invalid = _("a FIRE move"), + .maxMove = MOVE_MAX_FLARE, }, [TYPE_WATER] = { .name = _("Water"), .invalid = _("a WATER move"), + .maxMove = MOVE_MAX_GEYSER, }, [TYPE_GRASS] = { .name = _("Grass"), .invalid = _("a GRASS move"), + .maxMove = MOVE_MAX_OVERGROWTH, }, [TYPE_ELECTRIC] = { .name = _("Electr"), .invalid = _("an ELECTRIC move"), + .maxMove = MOVE_MAX_LIGHTNING, }, [TYPE_PSYCHIC] = { .name = _("Psychc"), .invalid = _("a PSYCHIC move"), + .maxMove = MOVE_MAX_MINDSTORM, }, [TYPE_ICE] = { .name = _("Ice"), .invalid = _("a ICE move"), + .maxMove = MOVE_MAX_HAILSTORM, }, [TYPE_DRAGON] = { .name = _("Dragon"), .invalid = _("a DRAGON move"), + .maxMove = MOVE_MAX_WYRMWIND, }, [TYPE_DARK] = { .name = _("Dark"), .invalid = _("a DARK move"), + .maxMove = MOVE_MAX_DARKNESS, }, [TYPE_FAIRY] = { .name = _("Fairy"), .invalid = _("a FAIRY move"), + .maxMove = MOVE_MAX_STARFALL, }, }; From 8d10ac7ded5b263354e48e6e1bf2b5d2db54f065 Mon Sep 17 00:00:00 2001 From: Frank Date: Tue, 13 Feb 2024 15:14:53 -0500 Subject: [PATCH 04/12] Added icon palette to struct --- include/data.h | 1 + src/battle_main.c | 19 ++++++++++++++++++ src/pokedex_plus_hgss.c | 39 +++++++++++------------------------- src/pokemon_summary_screen.c | 39 +++++++++++------------------------- 4 files changed, 44 insertions(+), 54 deletions(-) diff --git a/include/data.h b/include/data.h index 8dff49085684..07d641d7aeca 100644 --- a/include/data.h +++ b/include/data.h @@ -107,6 +107,7 @@ struct Type u8 name[TYPE_NAME_LENGTH + 1]; u8 invalid[17]; u16 maxMove; + u8 palette; }; extern const u16 gMinigameDigits_Pal[]; diff --git a/src/battle_main.c b/src/battle_main.c index bf023849c1ba..565c8a20fb7d 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -307,113 +307,132 @@ const struct Type gTypes[NUMBER_OF_MON_TYPES] = .name = _("Normal"), .invalid = _("a NORMAL move"), .maxMove = MOVE_MAX_STRIKE, + .palette = 13, }, [TYPE_FIGHTING] = { .name = _("Fight"), .invalid = _("a FIGHTING move"), .maxMove = MOVE_MAX_KNUCKLE, + .palette = 13, }, [TYPE_FLYING] = { .name = _("Flying"), .invalid = _("a FLYING move"), .maxMove = MOVE_MAX_AIRSTREAM, + .palette = 14, }, [TYPE_POISON] = { .name = _("Poison"), .invalid = _("a POISON move"), .maxMove = MOVE_MAX_OOZE, + .palette = 14, }, [TYPE_GROUND] = { .name = _("Ground"), .invalid = _("a GROUND move"), .maxMove = MOVE_MAX_QUAKE, + .palette = 13, }, [TYPE_ROCK] = { .name = _("Rock"), .invalid = _("a ROCK move"), .maxMove = MOVE_MAX_ROCKFALL, + .palette = 13, }, [TYPE_BUG] = { .name = _("Bug"), .invalid = _("a BUG move"), .maxMove = MOVE_MAX_FLUTTERBY, + .palette = 15, }, [TYPE_GHOST] = { .name = _("Ghost"), .invalid = _("a GHOST move"), .maxMove = MOVE_MAX_PHANTASM, + .palette = 14, }, [TYPE_STEEL] = { .name = _("Steel"), .invalid = _("a STEEL move"), .maxMove = MOVE_MAX_STEELSPIKE, + .palette = 13, }, [TYPE_MYSTERY] = { .name = _("???"), .invalid = _("a ??? move"), + .palette = 15, }, [TYPE_FIRE] = { .name = _("Fire"), .invalid = _("a FIRE move"), .maxMove = MOVE_MAX_FLARE, + .palette = 13, }, [TYPE_WATER] = { .name = _("Water"), .invalid = _("a WATER move"), .maxMove = MOVE_MAX_GEYSER, + .palette = 14, }, [TYPE_GRASS] = { .name = _("Grass"), .invalid = _("a GRASS move"), .maxMove = MOVE_MAX_OVERGROWTH, + .palette = 15, }, [TYPE_ELECTRIC] = { .name = _("Electr"), .invalid = _("an ELECTRIC move"), .maxMove = MOVE_MAX_LIGHTNING, + .palette = 13, }, [TYPE_PSYCHIC] = { .name = _("Psychc"), .invalid = _("a PSYCHIC move"), .maxMove = MOVE_MAX_MINDSTORM, + .palette = 14, }, [TYPE_ICE] = { .name = _("Ice"), .invalid = _("a ICE move"), .maxMove = MOVE_MAX_HAILSTORM, + .palette = 14, }, [TYPE_DRAGON] = { .name = _("Dragon"), .invalid = _("a DRAGON move"), .maxMove = MOVE_MAX_WYRMWIND, + .palette = 15, }, [TYPE_DARK] = { .name = _("Dark"), .invalid = _("a DARK move"), .maxMove = MOVE_MAX_DARKNESS, + .palette = 13, }, [TYPE_FAIRY] = { .name = _("Fairy"), .invalid = _("a FAIRY move"), .maxMove = MOVE_MAX_STARFALL, + .palette = 14, }, }; diff --git a/src/pokedex_plus_hgss.c b/src/pokedex_plus_hgss.c index 9eed36411fe1..23a46c38f620 100644 --- a/src/pokedex_plus_hgss.c +++ b/src/pokedex_plus_hgss.c @@ -4370,32 +4370,13 @@ static void SetSpriteInvisibility(u8 spriteArrayId, bool8 invisible) #define TYPE_ICON_PAL_NUM_0 13 #define TYPE_ICON_PAL_NUM_1 14 #define TYPE_ICON_PAL_NUM_2 15 -static const u8 sMoveTypeToOamPaletteNum[NUMBER_OF_MON_TYPES + CONTEST_CATEGORIES_COUNT] = -{ - [TYPE_NORMAL] = TYPE_ICON_PAL_NUM_0, - [TYPE_FIGHTING] = TYPE_ICON_PAL_NUM_0, - [TYPE_FLYING] = TYPE_ICON_PAL_NUM_1, - [TYPE_POISON] = TYPE_ICON_PAL_NUM_1, - [TYPE_GROUND] = TYPE_ICON_PAL_NUM_0, - [TYPE_ROCK] = TYPE_ICON_PAL_NUM_0, - [TYPE_BUG] = TYPE_ICON_PAL_NUM_2, - [TYPE_GHOST] = TYPE_ICON_PAL_NUM_1, - [TYPE_STEEL] = TYPE_ICON_PAL_NUM_0, - [TYPE_MYSTERY] = TYPE_ICON_PAL_NUM_2, - [TYPE_FIRE] = TYPE_ICON_PAL_NUM_0, - [TYPE_WATER] = TYPE_ICON_PAL_NUM_1, - [TYPE_GRASS] = TYPE_ICON_PAL_NUM_2, - [TYPE_ELECTRIC] = TYPE_ICON_PAL_NUM_0, - [TYPE_PSYCHIC] = TYPE_ICON_PAL_NUM_1, - [TYPE_ICE] = TYPE_ICON_PAL_NUM_1, - [TYPE_DRAGON] = TYPE_ICON_PAL_NUM_2, - [TYPE_DARK] = TYPE_ICON_PAL_NUM_0, - [TYPE_FAIRY] = TYPE_ICON_PAL_NUM_1, - [NUMBER_OF_MON_TYPES + CONTEST_CATEGORY_COOL] = TYPE_ICON_PAL_NUM_0, - [NUMBER_OF_MON_TYPES + CONTEST_CATEGORY_BEAUTY] = TYPE_ICON_PAL_NUM_1, - [NUMBER_OF_MON_TYPES + CONTEST_CATEGORY_CUTE] = TYPE_ICON_PAL_NUM_1, - [NUMBER_OF_MON_TYPES + CONTEST_CATEGORY_SMART] = TYPE_ICON_PAL_NUM_2, - [NUMBER_OF_MON_TYPES + CONTEST_CATEGORY_TOUGH] = TYPE_ICON_PAL_NUM_0, +static const u8 sMoveTypeToOamPaletteNum[CONTEST_CATEGORIES_COUNT] = +{ + [CONTEST_CATEGORY_COOL] = TYPE_ICON_PAL_NUM_0, + [CONTEST_CATEGORY_BEAUTY] = TYPE_ICON_PAL_NUM_1, + [CONTEST_CATEGORY_CUTE] = TYPE_ICON_PAL_NUM_1, + [CONTEST_CATEGORY_SMART] = TYPE_ICON_PAL_NUM_2, + [CONTEST_CATEGORY_TOUGH] = TYPE_ICON_PAL_NUM_0, }; static void SetTypeIconPosAndPal(u8 typeId, u8 x, u8 y, u8 spriteArrayId) { @@ -4403,7 +4384,11 @@ static void SetTypeIconPosAndPal(u8 typeId, u8 x, u8 y, u8 spriteArrayId) sprite = &gSprites[sPokedexView->typeIconSpriteIds[spriteArrayId]]; StartSpriteAnim(sprite, typeId); - sprite->oam.paletteNum = sMoveTypeToOamPaletteNum[typeId]; + if (typeId < NUMBER_OF_MON_TYPES) { + sprite->oam.paletteNum = gTypes[typeId].palette; + } else { + sprite->oam.paletteNum = sMoveTypeToOamPaletteNum[typeId - NUMBER_OF_MON_TYPES]; + } sprite->x = x + 16; sprite->y = y + 8; SetSpriteInvisibility(spriteArrayId, FALSE); diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index ca84d5b390c7..6758445c5ff2 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -954,32 +954,13 @@ const struct SpriteTemplate gSpriteTemplate_MoveTypes = .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; -static const u8 sMoveTypeToOamPaletteNum[NUMBER_OF_MON_TYPES + CONTEST_CATEGORIES_COUNT] = -{ - [TYPE_NORMAL] = 13, - [TYPE_FIGHTING] = 13, - [TYPE_FLYING] = 14, - [TYPE_POISON] = 14, - [TYPE_GROUND] = 13, - [TYPE_ROCK] = 13, - [TYPE_BUG] = 15, - [TYPE_GHOST] = 14, - [TYPE_STEEL] = 13, - [TYPE_MYSTERY] = 15, - [TYPE_FIRE] = 13, - [TYPE_WATER] = 14, - [TYPE_GRASS] = 15, - [TYPE_ELECTRIC] = 13, - [TYPE_PSYCHIC] = 14, - [TYPE_ICE] = 14, - [TYPE_DRAGON] = 15, - [TYPE_DARK] = 13, - [TYPE_FAIRY] = 14, - [NUMBER_OF_MON_TYPES + CONTEST_CATEGORY_COOL] = 13, - [NUMBER_OF_MON_TYPES + CONTEST_CATEGORY_BEAUTY] = 14, - [NUMBER_OF_MON_TYPES + CONTEST_CATEGORY_CUTE] = 14, - [NUMBER_OF_MON_TYPES + CONTEST_CATEGORY_SMART] = 15, - [NUMBER_OF_MON_TYPES + CONTEST_CATEGORY_TOUGH] = 13, +static const u8 sMoveTypeToOamPaletteNum[CONTEST_CATEGORIES_COUNT] = +{ + [CONTEST_CATEGORY_COOL] = 13, + [CONTEST_CATEGORY_BEAUTY] = 14, + [CONTEST_CATEGORY_CUTE] = 14, + [CONTEST_CATEGORY_SMART] = 15, + [CONTEST_CATEGORY_TOUGH] = 13, }; static const struct OamData sOamData_MoveSelector = { @@ -3919,7 +3900,11 @@ void SetTypeSpritePosAndPal(u8 typeId, u8 x, u8 y, u8 spriteArrayId) { struct Sprite *sprite = &gSprites[sMonSummaryScreen->spriteIds[spriteArrayId]]; StartSpriteAnim(sprite, typeId); - sprite->oam.paletteNum = sMoveTypeToOamPaletteNum[typeId]; + if (typeId < NUMBER_OF_MON_TYPES) { + sprite->oam.paletteNum = gTypes[typeId].palette; + } else { + sprite->oam.paletteNum = sMoveTypeToOamPaletteNum[typeId - NUMBER_OF_MON_TYPES]; + } sprite->x = x + 16; sprite->y = y + 8; SetSpriteInvisibility(spriteArrayId, FALSE); From 545daef44c20093b6fe36300f58472574e554186 Mon Sep 17 00:00:00 2001 From: Frank Date: Tue, 13 Feb 2024 15:35:05 -0500 Subject: [PATCH 05/12] Added macros for invalid and max moves --- src/battle_main.c | 79 ++++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/src/battle_main.c b/src/battle_main.c index 565c8a20fb7d..866f7ac2d730 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -299,139 +299,142 @@ const struct OamData gOamData_BattleSpritePlayerSide = static const s8 sCenterToCornerVecXs[8] ={-32, -16, -16, -32, -32}; -// invalid is large enough that the text for TYPE_ELECTRIC will exceed TEXT_BUFF_ARRAY_COUNT. +#define INVALID(type) .invalid = _(#type" move") +#define MAX_MOVE(move) .maxMove = MOVE_MAX_##move + +// .invalid is large enough that the text for TYPE_ELECTRIC will exceed TEXT_BUFF_ARRAY_COUNT. const struct Type gTypes[NUMBER_OF_MON_TYPES] = { [TYPE_NORMAL] = { .name = _("Normal"), - .invalid = _("a NORMAL move"), - .maxMove = MOVE_MAX_STRIKE, + INVALID(a NORMAL), + MAX_MOVE(STRIKE), .palette = 13, }, [TYPE_FIGHTING] = { .name = _("Fight"), - .invalid = _("a FIGHTING move"), - .maxMove = MOVE_MAX_KNUCKLE, + INVALID(a FIGHTING), + MAX_MOVE(KNUCKLE), .palette = 13, }, [TYPE_FLYING] = { .name = _("Flying"), - .invalid = _("a FLYING move"), - .maxMove = MOVE_MAX_AIRSTREAM, + INVALID(a FLYING), + MAX_MOVE(AIRSTREAM), .palette = 14, }, [TYPE_POISON] = { .name = _("Poison"), - .invalid = _("a POISON move"), - .maxMove = MOVE_MAX_OOZE, + INVALID(a POISON), + MAX_MOVE(OOZE), .palette = 14, }, [TYPE_GROUND] = { .name = _("Ground"), - .invalid = _("a GROUND move"), - .maxMove = MOVE_MAX_QUAKE, + INVALID(a GROUND), + MAX_MOVE(QUAKE), .palette = 13, }, [TYPE_ROCK] = { .name = _("Rock"), - .invalid = _("a ROCK move"), - .maxMove = MOVE_MAX_ROCKFALL, + INVALID(a ROCK), + MAX_MOVE(ROCKFALL), .palette = 13, }, [TYPE_BUG] = { .name = _("Bug"), - .invalid = _("a BUG move"), - .maxMove = MOVE_MAX_FLUTTERBY, + INVALID(a BUG), + MAX_MOVE(FLUTTERBY), .palette = 15, }, [TYPE_GHOST] = { .name = _("Ghost"), - .invalid = _("a GHOST move"), - .maxMove = MOVE_MAX_PHANTASM, + INVALID(a GHOST), + MAX_MOVE(PHANTASM), .palette = 14, }, [TYPE_STEEL] = { .name = _("Steel"), - .invalid = _("a STEEL move"), - .maxMove = MOVE_MAX_STEELSPIKE, + INVALID(a STEEL), + MAX_MOVE(STEELSPIKE), .palette = 13, }, [TYPE_MYSTERY] = { .name = _("???"), - .invalid = _("a ??? move"), + INVALID(a ???), .palette = 15, }, [TYPE_FIRE] = { .name = _("Fire"), - .invalid = _("a FIRE move"), - .maxMove = MOVE_MAX_FLARE, + INVALID(a FIRE), + MAX_MOVE(FLARE), .palette = 13, }, [TYPE_WATER] = { .name = _("Water"), - .invalid = _("a WATER move"), - .maxMove = MOVE_MAX_GEYSER, + INVALID(a WATER), + MAX_MOVE(GEYSER), .palette = 14, }, [TYPE_GRASS] = { .name = _("Grass"), - .invalid = _("a GRASS move"), - .maxMove = MOVE_MAX_OVERGROWTH, + INVALID(a GRASS), + MAX_MOVE(OVERGROWTH), .palette = 15, }, [TYPE_ELECTRIC] = { .name = _("Electr"), - .invalid = _("an ELECTRIC move"), - .maxMove = MOVE_MAX_LIGHTNING, + INVALID(an ELECTRIC), + MAX_MOVE(LIGHTNING), .palette = 13, }, [TYPE_PSYCHIC] = { .name = _("Psychc"), - .invalid = _("a PSYCHIC move"), - .maxMove = MOVE_MAX_MINDSTORM, + INVALID(a PSYCHIC), + MAX_MOVE(MINDSTORM), .palette = 14, }, [TYPE_ICE] = { .name = _("Ice"), - .invalid = _("a ICE move"), - .maxMove = MOVE_MAX_HAILSTORM, + INVALID(a ICE), + MAX_MOVE(HAILSTORM), .palette = 14, }, [TYPE_DRAGON] = { .name = _("Dragon"), - .invalid = _("a DRAGON move"), - .maxMove = MOVE_MAX_WYRMWIND, + INVALID(a DRAGON), + MAX_MOVE(WYRMWIND), .palette = 15, }, [TYPE_DARK] = { .name = _("Dark"), - .invalid = _("a DARK move"), - .maxMove = MOVE_MAX_DARKNESS, + INVALID(a DARK), + MAX_MOVE(DARKNESS), .palette = 13, }, [TYPE_FAIRY] = { .name = _("Fairy"), - .invalid = _("a FAIRY move"), - .maxMove = MOVE_MAX_STARFALL, + INVALID(a FAIRY), + MAX_MOVE(STARFALL), .palette = 14, }, }; From c1c6de3ca120f0bd7fc72217855ffbe7469b54d3 Mon Sep 17 00:00:00 2001 From: Frank Date: Tue, 13 Feb 2024 15:40:32 -0500 Subject: [PATCH 06/12] Swapped palette and max move order --- include/data.h | 2 +- src/battle_main.c | 36 ++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/data.h b/include/data.h index 07d641d7aeca..72b11ba3d403 100644 --- a/include/data.h +++ b/include/data.h @@ -106,8 +106,8 @@ struct Type { u8 name[TYPE_NAME_LENGTH + 1]; u8 invalid[17]; - u16 maxMove; u8 palette; + u16 maxMove; }; extern const u16 gMinigameDigits_Pal[]; diff --git a/src/battle_main.c b/src/battle_main.c index 866f7ac2d730..9e70c12ebb61 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -309,64 +309,64 @@ const struct Type gTypes[NUMBER_OF_MON_TYPES] = { .name = _("Normal"), INVALID(a NORMAL), - MAX_MOVE(STRIKE), .palette = 13, + MAX_MOVE(STRIKE), }, [TYPE_FIGHTING] = { .name = _("Fight"), INVALID(a FIGHTING), - MAX_MOVE(KNUCKLE), .palette = 13, + MAX_MOVE(KNUCKLE), }, [TYPE_FLYING] = { .name = _("Flying"), INVALID(a FLYING), - MAX_MOVE(AIRSTREAM), .palette = 14, + MAX_MOVE(AIRSTREAM), }, [TYPE_POISON] = { .name = _("Poison"), INVALID(a POISON), - MAX_MOVE(OOZE), .palette = 14, + MAX_MOVE(OOZE), }, [TYPE_GROUND] = { .name = _("Ground"), INVALID(a GROUND), - MAX_MOVE(QUAKE), .palette = 13, + MAX_MOVE(QUAKE), }, [TYPE_ROCK] = { .name = _("Rock"), INVALID(a ROCK), - MAX_MOVE(ROCKFALL), .palette = 13, + MAX_MOVE(ROCKFALL), }, [TYPE_BUG] = { .name = _("Bug"), INVALID(a BUG), - MAX_MOVE(FLUTTERBY), .palette = 15, + MAX_MOVE(FLUTTERBY), }, [TYPE_GHOST] = { .name = _("Ghost"), INVALID(a GHOST), - MAX_MOVE(PHANTASM), .palette = 14, + MAX_MOVE(PHANTASM), }, [TYPE_STEEL] = { .name = _("Steel"), INVALID(a STEEL), - MAX_MOVE(STEELSPIKE), .palette = 13, + MAX_MOVE(STEELSPIKE), }, [TYPE_MYSTERY] = { @@ -378,64 +378,64 @@ const struct Type gTypes[NUMBER_OF_MON_TYPES] = { .name = _("Fire"), INVALID(a FIRE), - MAX_MOVE(FLARE), .palette = 13, + MAX_MOVE(FLARE), }, [TYPE_WATER] = { .name = _("Water"), INVALID(a WATER), - MAX_MOVE(GEYSER), .palette = 14, + MAX_MOVE(GEYSER), }, [TYPE_GRASS] = { .name = _("Grass"), INVALID(a GRASS), - MAX_MOVE(OVERGROWTH), .palette = 15, + MAX_MOVE(OVERGROWTH), }, [TYPE_ELECTRIC] = { .name = _("Electr"), INVALID(an ELECTRIC), - MAX_MOVE(LIGHTNING), .palette = 13, + MAX_MOVE(LIGHTNING), }, [TYPE_PSYCHIC] = { .name = _("Psychc"), INVALID(a PSYCHIC), - MAX_MOVE(MINDSTORM), .palette = 14, + MAX_MOVE(MINDSTORM), }, [TYPE_ICE] = { .name = _("Ice"), INVALID(a ICE), - MAX_MOVE(HAILSTORM), .palette = 14, + MAX_MOVE(HAILSTORM), }, [TYPE_DRAGON] = { .name = _("Dragon"), INVALID(a DRAGON), - MAX_MOVE(WYRMWIND), .palette = 15, + MAX_MOVE(WYRMWIND), }, [TYPE_DARK] = { .name = _("Dark"), INVALID(a DARK), - MAX_MOVE(DARKNESS), .palette = 13, + MAX_MOVE(DARKNESS), }, [TYPE_FAIRY] = { .name = _("Fairy"), INVALID(a FAIRY), - MAX_MOVE(STARFALL), .palette = 14, + MAX_MOVE(STARFALL), }, }; From b9db91afd5808ed404bef9c06da4d325851bf87c Mon Sep 17 00:00:00 2001 From: Frank Date: Tue, 13 Feb 2024 15:43:00 -0500 Subject: [PATCH 07/12] Renamed invalid to generic --- src/battle_main.c | 42 +++++++++++++++++++++--------------------- src/battle_message.c | 6 +++--- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/battle_main.c b/src/battle_main.c index 9e70c12ebb61..e532db8209cf 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -299,141 +299,141 @@ const struct OamData gOamData_BattleSpritePlayerSide = static const s8 sCenterToCornerVecXs[8] ={-32, -16, -16, -32, -32}; -#define INVALID(type) .invalid = _(#type" move") +#define GENERIC(type) .generic = _(#type" move") #define MAX_MOVE(move) .maxMove = MOVE_MAX_##move -// .invalid is large enough that the text for TYPE_ELECTRIC will exceed TEXT_BUFF_ARRAY_COUNT. +// .generic is large enough that the text for TYPE_ELECTRIC will exceed TEXT_BUFF_ARRAY_COUNT. const struct Type gTypes[NUMBER_OF_MON_TYPES] = { [TYPE_NORMAL] = { .name = _("Normal"), - INVALID(a NORMAL), + GENERIC(a NORMAL), .palette = 13, MAX_MOVE(STRIKE), }, [TYPE_FIGHTING] = { .name = _("Fight"), - INVALID(a FIGHTING), + GENERIC(a FIGHTING), .palette = 13, MAX_MOVE(KNUCKLE), }, [TYPE_FLYING] = { .name = _("Flying"), - INVALID(a FLYING), + GENERIC(a FLYING), .palette = 14, MAX_MOVE(AIRSTREAM), }, [TYPE_POISON] = { .name = _("Poison"), - INVALID(a POISON), + GENERIC(a POISON), .palette = 14, MAX_MOVE(OOZE), }, [TYPE_GROUND] = { .name = _("Ground"), - INVALID(a GROUND), + GENERIC(a GROUND), .palette = 13, MAX_MOVE(QUAKE), }, [TYPE_ROCK] = { .name = _("Rock"), - INVALID(a ROCK), + GENERIC(a ROCK), .palette = 13, MAX_MOVE(ROCKFALL), }, [TYPE_BUG] = { .name = _("Bug"), - INVALID(a BUG), + GENERIC(a BUG), .palette = 15, MAX_MOVE(FLUTTERBY), }, [TYPE_GHOST] = { .name = _("Ghost"), - INVALID(a GHOST), + GENERIC(a GHOST), .palette = 14, MAX_MOVE(PHANTASM), }, [TYPE_STEEL] = { .name = _("Steel"), - INVALID(a STEEL), + GENERIC(a STEEL), .palette = 13, MAX_MOVE(STEELSPIKE), }, [TYPE_MYSTERY] = { .name = _("???"), - INVALID(a ???), + GENERIC(a ???), .palette = 15, }, [TYPE_FIRE] = { .name = _("Fire"), - INVALID(a FIRE), + GENERIC(a FIRE), .palette = 13, MAX_MOVE(FLARE), }, [TYPE_WATER] = { .name = _("Water"), - INVALID(a WATER), + GENERIC(a WATER), .palette = 14, MAX_MOVE(GEYSER), }, [TYPE_GRASS] = { .name = _("Grass"), - INVALID(a GRASS), + GENERIC(a GRASS), .palette = 15, MAX_MOVE(OVERGROWTH), }, [TYPE_ELECTRIC] = { .name = _("Electr"), - INVALID(an ELECTRIC), + GENERIC(an ELECTRIC), .palette = 13, MAX_MOVE(LIGHTNING), }, [TYPE_PSYCHIC] = { .name = _("Psychc"), - INVALID(a PSYCHIC), + GENERIC(a PSYCHIC), .palette = 14, MAX_MOVE(MINDSTORM), }, [TYPE_ICE] = { .name = _("Ice"), - INVALID(a ICE), + GENERIC(a ICE), .palette = 14, MAX_MOVE(HAILSTORM), }, [TYPE_DRAGON] = { .name = _("Dragon"), - INVALID(a DRAGON), + GENERIC(a DRAGON), .palette = 15, MAX_MOVE(WYRMWIND), }, [TYPE_DARK] = { .name = _("Dark"), - INVALID(a DARK), + GENERIC(a DARK), .palette = 13, MAX_MOVE(DARKNESS), }, [TYPE_FAIRY] = { .name = _("Fairy"), - INVALID(a FAIRY), + GENERIC(a FAIRY), .palette = 14, MAX_MOVE(STARFALL), }, diff --git a/src/battle_message.c b/src/battle_message.c index 2b4164202f9a..ccbd9b5be8d3 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -2894,7 +2894,7 @@ void BufferStringBattle(u16 stringID, u32 battler) if (gBattleMsgDataPtr->currentMove >= MOVES_COUNT && !IsZMove(gBattleMsgDataPtr->currentMove) && !IsMaxMove(gBattleMsgDataPtr->currentMove)) - StringCopy(gBattleTextBuff3, gTypes[*(&gBattleStruct->stringMoveType)].invalid); + StringCopy(gBattleTextBuff3, gTypes[*(&gBattleStruct->stringMoveType)].generic); else StringCopy(gBattleTextBuff3, GetMoveName(gBattleMsgDataPtr->currentMove)); stringPtr = sText_AttackerUsedX; @@ -3324,7 +3324,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst) if (gBattleMsgDataPtr->currentMove >= MOVES_COUNT && !IsZMove(gBattleMsgDataPtr->currentMove) && !IsMaxMove(gBattleMsgDataPtr->currentMove)) - toCpy = gTypes[gBattleStruct->stringMoveType].invalid; + toCpy = gTypes[gBattleStruct->stringMoveType].generic; else toCpy = GetMoveName(gBattleMsgDataPtr->currentMove); break; @@ -3332,7 +3332,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst) if (gBattleMsgDataPtr->originallyUsedMove >= MOVES_COUNT && !IsZMove(gBattleMsgDataPtr->currentMove) && !IsMaxMove(gBattleMsgDataPtr->currentMove)) - toCpy = gTypes[gBattleStruct->stringMoveType].invalid; + toCpy = gTypes[gBattleStruct->stringMoveType].generic; else toCpy = GetMoveName(gBattleMsgDataPtr->originallyUsedMove); break; From 13c0896a189486121a6a7b32817a1e7b58931a57 Mon Sep 17 00:00:00 2001 From: Frank Date: Tue, 13 Feb 2024 16:04:06 -0500 Subject: [PATCH 08/12] Renamed invalid to generic in struct definition --- include/data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/data.h b/include/data.h index 72b11ba3d403..37aab807364b 100644 --- a/include/data.h +++ b/include/data.h @@ -105,7 +105,7 @@ struct TrainerClass struct Type { u8 name[TYPE_NAME_LENGTH + 1]; - u8 invalid[17]; + u8 generic[17]; u8 palette; u16 maxMove; }; From ac2b0d45ab34436c0ce25f337ca3eb124ac96a56 Mon Sep 17 00:00:00 2001 From: Frank Date: Wed, 14 Feb 2024 17:31:11 -0500 Subject: [PATCH 09/12] Added zMoves and items to type struct --- include/data.h | 8 ++++ src/battle_main.c | 114 ++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 103 insertions(+), 19 deletions(-) diff --git a/include/data.h b/include/data.h index 37aab807364b..03a7ff44eb2d 100644 --- a/include/data.h +++ b/include/data.h @@ -107,7 +107,15 @@ struct Type u8 name[TYPE_NAME_LENGTH + 1]; u8 generic[17]; u8 palette; + u16 zMove; u16 maxMove; + u16 enhanceItem; + u16 berry; + u16 gem; + u16 plate; + u16 memory; + u16 zCrystal; + u16 teraShard; }; extern const u16 gMinigameDigits_Pal[]; diff --git a/src/battle_main.c b/src/battle_main.c index e532db8209cf..92cef7f47e0e 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -300,7 +300,23 @@ const struct OamData gOamData_BattleSpritePlayerSide = static const s8 sCenterToCornerVecXs[8] ={-32, -16, -16, -32, -32}; #define GENERIC(type) .generic = _(#type" move") -#define MAX_MOVE(move) .maxMove = MOVE_MAX_##move +#define MOVES(z, max) \ + .zMove = MOVE_##z, \ + .maxMove = MOVE_MAX_##max, + +#define ITEMS(type, item, berryName, crystal) \ + .enhanceItem = ITEM_##item, \ + .berry = ITEM_##berryName##_BERRY, \ + .gem = ITEM_##type##_GEM, \ + .zCrystal = ITEM_##crystal##IUM_Z, + +//Not in ITEMS since Normal doesn't have these two items (Blank Plate is not yet implemented) +#define LEGENDARY_ITEMS(plateName, type) \ + .plate = ITEM_##plateName##_PLATE, \ + .memory = ITEM_##type##_MEMORY, \ + +//Not in ITEMS since Stellar has Tera Shards but no other item +#define TERA_SHARD(type) .teraShard = ITEM_##type##_TERA_SHARD, // .generic is large enough that the text for TYPE_ELECTRIC will exceed TEXT_BUFF_ARRAY_COUNT. const struct Type gTypes[NUMBER_OF_MON_TYPES] = @@ -310,63 +326,89 @@ const struct Type gTypes[NUMBER_OF_MON_TYPES] = .name = _("Normal"), GENERIC(a NORMAL), .palette = 13, - MAX_MOVE(STRIKE), + MOVES(BREAKNECK_BLITZ, STRIKE) + ITEMS(NORMAL, SILK_SCARF, CHILAN, NORMAL) + TERA_SHARD(NORMAL) }, [TYPE_FIGHTING] = { .name = _("Fight"), GENERIC(a FIGHTING), .palette = 13, - MAX_MOVE(KNUCKLE), + MOVES(ALL_OUT_PUMMELING, KNUCKLE) + ITEMS(FIGHTING, BLACK_BELT, CHOPLE, FIGHTIN) + LEGENDARY_ITEMS(FIST, FIGHTING) + TERA_SHARD(FIGHTING) }, [TYPE_FLYING] = { .name = _("Flying"), GENERIC(a FLYING), .palette = 14, - MAX_MOVE(AIRSTREAM), + MOVES(SUPERSONIC_SKYSTRIKE, AIRSTREAM) + ITEMS(FLYING, SHARP_BEAK, COBA, FLYIN) + LEGENDARY_ITEMS(SKY, FLYING) + TERA_SHARD(FLYING) }, [TYPE_POISON] = { .name = _("Poison"), GENERIC(a POISON), .palette = 14, - MAX_MOVE(OOZE), + MOVES(ACID_DOWNPOUR, OOZE) + ITEMS(POISON, POISON_BARB, KEBIA, POISON) + LEGENDARY_ITEMS(TOXIC, POISON) + TERA_SHARD(POISON) }, [TYPE_GROUND] = { .name = _("Ground"), GENERIC(a GROUND), .palette = 13, - MAX_MOVE(QUAKE), + MOVES(TECTONIC_RAGE, QUAKE) + ITEMS(GROUND, SOFT_SAND, SHUCA, GROUND) + LEGENDARY_ITEMS(EARTH, GROUND) + TERA_SHARD(GROUND) }, [TYPE_ROCK] = { .name = _("Rock"), GENERIC(a ROCK), .palette = 13, - MAX_MOVE(ROCKFALL), + MOVES(CONTINENTAL_CRUSH, ROCKFALL) + ITEMS(ROCK, HARD_STONE, CHARTI, ROCK) + LEGENDARY_ITEMS(STONE, ROCK) + TERA_SHARD(ROCK) }, [TYPE_BUG] = { .name = _("Bug"), GENERIC(a BUG), .palette = 15, - MAX_MOVE(FLUTTERBY), + MOVES(SAVAGE_SPIN_OUT, FLUTTERBY) + ITEMS(BUG, SILVER_POWDER, TANGA, BUGIN) + LEGENDARY_ITEMS(INSECT, BUG) + TERA_SHARD(BUG) }, [TYPE_GHOST] = { .name = _("Ghost"), GENERIC(a GHOST), .palette = 14, - MAX_MOVE(PHANTASM), + MOVES(NEVER_ENDING_NIGHTMARE, PHANTASM) + ITEMS(GHOST, SPELL_TAG, KASIB, GHOST) + LEGENDARY_ITEMS(SPOOKY, GHOST) + TERA_SHARD(GHOST) }, [TYPE_STEEL] = { .name = _("Steel"), GENERIC(a STEEL), .palette = 13, - MAX_MOVE(STEELSPIKE), + MOVES(CORKSCREW_CRASH, STEELSPIKE) + ITEMS(STEEL, METAL_COAT, BABIRI, STEEL) + LEGENDARY_ITEMS(IRON, STEEL) + TERA_SHARD(STEEL) }, [TYPE_MYSTERY] = { @@ -379,64 +421,98 @@ const struct Type gTypes[NUMBER_OF_MON_TYPES] = .name = _("Fire"), GENERIC(a FIRE), .palette = 13, - MAX_MOVE(FLARE), + MOVES(INFERNO_OVERDRIVE, FLARE) + ITEMS(FIRE, CHARCOAL, OCCA, FIR) + LEGENDARY_ITEMS(FLAME, FIRE) + TERA_SHARD(FIRE) }, [TYPE_WATER] = { .name = _("Water"), GENERIC(a WATER), .palette = 14, - MAX_MOVE(GEYSER), + MOVES(HYDRO_VORTEX, GEYSER) + ITEMS(WATER, MYSTIC_WATER, PASSHO, WATER) + LEGENDARY_ITEMS(SPLASH, WATER) + TERA_SHARD(WATER) }, [TYPE_GRASS] = { .name = _("Grass"), GENERIC(a GRASS), .palette = 15, - MAX_MOVE(OVERGROWTH), + MOVES(BLOOM_DOOM, OVERGROWTH) + ITEMS(GRASS, MIRACLE_SEED, RINDO, GRASS) + LEGENDARY_ITEMS(MEADOW, GRASS) + TERA_SHARD(GRASS) }, [TYPE_ELECTRIC] = { .name = _("Electr"), GENERIC(an ELECTRIC), .palette = 13, - MAX_MOVE(LIGHTNING), + MOVES(GIGAVOLT_HAVOC, LIGHTNING) + ITEMS(ELECTRIC, MAGNET, WACAN, ELECTR) + LEGENDARY_ITEMS(ZAP, ELECTRIC) + TERA_SHARD(ELECTRIC) }, [TYPE_PSYCHIC] = { .name = _("Psychc"), GENERIC(a PSYCHIC), .palette = 14, - MAX_MOVE(MINDSTORM), + MOVES(SHATTERED_PSYCHE, MINDSTORM) + ITEMS(PSYCHIC, TWISTED_SPOON, PAYAPA, PSYCH) + LEGENDARY_ITEMS(MIND, PSYCHIC) + TERA_SHARD(PSYCHIC) }, [TYPE_ICE] = { .name = _("Ice"), GENERIC(a ICE), .palette = 14, - MAX_MOVE(HAILSTORM), + MOVES(SUBZERO_SLAMMER, HAILSTORM) + ITEMS(ICE, NEVER_MELT_ICE, YACHE, IC) + LEGENDARY_ITEMS(ICICLE, ICE) + TERA_SHARD(ICE) }, [TYPE_DRAGON] = { .name = _("Dragon"), GENERIC(a DRAGON), .palette = 15, - MAX_MOVE(WYRMWIND), + MOVES(DEVASTATING_DRAKE, WYRMWIND) + ITEMS(DRAGON, DRAGON_FANG, HABAN, DRAGON) + LEGENDARY_ITEMS(DRACO, DRAGON) + TERA_SHARD(DRAGON) }, [TYPE_DARK] = { .name = _("Dark"), GENERIC(a DARK), .palette = 13, - MAX_MOVE(DARKNESS), + MOVES(BLACK_HOLE_ECLIPSE, DARKNESS) + ITEMS(DARK, BLACK_GLASSES, COLBUR, DARKIN) + LEGENDARY_ITEMS(DREAD, DARK) + TERA_SHARD(DARK) }, [TYPE_FAIRY] = { .name = _("Fairy"), GENERIC(a FAIRY), .palette = 14, - MAX_MOVE(STARFALL), + MOVES(TWINKLE_TACKLE, STARFALL) + ITEMS(FAIRY, FAIRY_FEATHER, ROSELI, FAIR) + LEGENDARY_ITEMS(PIXIE, FAIRY) + TERA_SHARD(FAIRY) + }, + /* + [TYPE_STELLAR] = + { + .name = _("Stellar"), + TERA_SHARD(STELLAR), }, + */ }; // extra args are money and ball From 259d2f752711566c7db10706a55fec4815b29693 Mon Sep 17 00:00:00 2001 From: Frank Date: Mon, 19 Feb 2024 07:39:55 -0500 Subject: [PATCH 10/12] Addressed comments --- src/battle_main.c | 290 ++++++++++++++++++++++------------- src/pokedex_plus_hgss.c | 19 +-- src/pokemon_summary_screen.c | 5 +- 3 files changed, 189 insertions(+), 125 deletions(-) diff --git a/src/battle_main.c b/src/battle_main.c index 92cef7f47e0e..68bebfc15e95 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -299,218 +299,288 @@ const struct OamData gOamData_BattleSpritePlayerSide = static const s8 sCenterToCornerVecXs[8] ={-32, -16, -16, -32, -32}; -#define GENERIC(type) .generic = _(#type" move") -#define MOVES(z, max) \ - .zMove = MOVE_##z, \ - .maxMove = MOVE_MAX_##max, - -#define ITEMS(type, item, berryName, crystal) \ - .enhanceItem = ITEM_##item, \ - .berry = ITEM_##berryName##_BERRY, \ - .gem = ITEM_##type##_GEM, \ - .zCrystal = ITEM_##crystal##IUM_Z, - -//Not in ITEMS since Normal doesn't have these two items (Blank Plate is not yet implemented) -#define LEGENDARY_ITEMS(plateName, type) \ - .plate = ITEM_##plateName##_PLATE, \ - .memory = ITEM_##type##_MEMORY, \ - -//Not in ITEMS since Stellar has Tera Shards but no other item -#define TERA_SHARD(type) .teraShard = ITEM_##type##_TERA_SHARD, - // .generic is large enough that the text for TYPE_ELECTRIC will exceed TEXT_BUFF_ARRAY_COUNT. const struct Type gTypes[NUMBER_OF_MON_TYPES] = { [TYPE_NORMAL] = { .name = _("Normal"), - GENERIC(a NORMAL), + .generic = _("a NORMAL move"), .palette = 13, - MOVES(BREAKNECK_BLITZ, STRIKE) - ITEMS(NORMAL, SILK_SCARF, CHILAN, NORMAL) - TERA_SHARD(NORMAL) + .zMove = MOVE_BREAKNECK_BLITZ, + .maxMove = MOVE_MAX_STRIKE, + .enhanceItem = ITEM_SILK_SCARF, + .berry = ITEM_CHILAN_BERRY, + .gem = ITEM_NORMAL_GEM, + .zCrystal = ITEM_NORMALIUM_Z, + .teraShard = ITEM_NORMAL_TERA_SHARD, }, [TYPE_FIGHTING] = { .name = _("Fight"), - GENERIC(a FIGHTING), + .generic = _("a FIGHTING move"), .palette = 13, - MOVES(ALL_OUT_PUMMELING, KNUCKLE) - ITEMS(FIGHTING, BLACK_BELT, CHOPLE, FIGHTIN) - LEGENDARY_ITEMS(FIST, FIGHTING) - TERA_SHARD(FIGHTING) + .zMove = MOVE_ALL_OUT_PUMMELING, + .maxMove = MOVE_MAX_KNUCKLE, + .enhanceItem = ITEM_BLACK_BELT, + .berry = ITEM_CHOPLE_BERRY, + .gem = ITEM_FIGHTING_GEM, + .zCrystal = ITEM_FIGHTINIUM_Z, + .plate= ITEM_FIST_PLATE, + .memory = ITEM_FIGHTING_MEMORY, + .teraShard = ITEM_FIGHTING_TERA_SHARD, }, [TYPE_FLYING] = { .name = _("Flying"), - GENERIC(a FLYING), + .generic = _("a FLYING move"), .palette = 14, - MOVES(SUPERSONIC_SKYSTRIKE, AIRSTREAM) - ITEMS(FLYING, SHARP_BEAK, COBA, FLYIN) - LEGENDARY_ITEMS(SKY, FLYING) - TERA_SHARD(FLYING) + .zMove = MOVE_SUPERSONIC_SKYSTRIKE, + .maxMove = MOVE_MAX_AIRSTREAM, + .enhanceItem = ITEM_SHARP_BEAK, + .berry = ITEM_COBA_BERRY, + .gem = ITEM_FLYING_GEM, + .zCrystal = ITEM_FLYINIUM_Z, + .plate= ITEM_SKY_PLATE, + .memory = ITEM_FLYING_MEMORY, + .teraShard = ITEM_FLYING_TERA_SHARD, }, [TYPE_POISON] = { .name = _("Poison"), - GENERIC(a POISON), + .generic = _("a POISON move"), .palette = 14, - MOVES(ACID_DOWNPOUR, OOZE) - ITEMS(POISON, POISON_BARB, KEBIA, POISON) - LEGENDARY_ITEMS(TOXIC, POISON) - TERA_SHARD(POISON) + .zMove = MOVE_ACID_DOWNPOUR, + .maxMove = MOVE_MAX_OOZE, + .enhanceItem = ITEM_POISON_BARB, + .berry = ITEM_KEBIA_BERRY, + .gem = ITEM_POISON_GEM, + .zCrystal = ITEM_POISONIUM_Z, + .plate= ITEM_TOXIC_PLATE, + .memory = ITEM_POISON_MEMORY, + .teraShard = ITEM_POISON_TERA_SHARD, }, [TYPE_GROUND] = { .name = _("Ground"), - GENERIC(a GROUND), + .generic = _("a GROUND move"), .palette = 13, - MOVES(TECTONIC_RAGE, QUAKE) - ITEMS(GROUND, SOFT_SAND, SHUCA, GROUND) - LEGENDARY_ITEMS(EARTH, GROUND) - TERA_SHARD(GROUND) + .zMove = MOVE_TECTONIC_RAGE, + .maxMove = MOVE_MAX_QUAKE, + .enhanceItem = ITEM_SOFT_SAND, + .berry = ITEM_SHUCA_BERRY, + .gem = ITEM_GROUND_GEM, + .zCrystal = ITEM_GROUNDIUM_Z, + .plate= ITEM_EARTH_PLATE, + .memory = ITEM_GROUND_MEMORY, + .teraShard = ITEM_GROUND_TERA_SHARD, }, [TYPE_ROCK] = { .name = _("Rock"), - GENERIC(a ROCK), + .generic = _("a ROCK move"), .palette = 13, - MOVES(CONTINENTAL_CRUSH, ROCKFALL) - ITEMS(ROCK, HARD_STONE, CHARTI, ROCK) - LEGENDARY_ITEMS(STONE, ROCK) - TERA_SHARD(ROCK) + .zMove = MOVE_CONTINENTAL_CRUSH, + .maxMove = MOVE_MAX_ROCKFALL, + .enhanceItem = ITEM_HARD_STONE, + .berry = ITEM_CHARTI_BERRY, + .gem = ITEM_ROCK_GEM, + .zCrystal = ITEM_ROCKIUM_Z, + .plate= ITEM_STONE_PLATE, + .memory = ITEM_ROCK_MEMORY, + .teraShard = ITEM_ROCK_TERA_SHARD, }, [TYPE_BUG] = { .name = _("Bug"), - GENERIC(a BUG), + .generic = _("a BUG move"), .palette = 15, - MOVES(SAVAGE_SPIN_OUT, FLUTTERBY) - ITEMS(BUG, SILVER_POWDER, TANGA, BUGIN) - LEGENDARY_ITEMS(INSECT, BUG) - TERA_SHARD(BUG) + .zMove = MOVE_SAVAGE_SPIN_OUT, + .maxMove = MOVE_MAX_FLUTTERBY, + .enhanceItem = ITEM_SILVER_POWDER, + .berry = ITEM_TANGA_BERRY, + .gem = ITEM_BUG_GEM, + .zCrystal = ITEM_BUGINIUM_Z, + .plate= ITEM_INSECT_PLATE, + .memory = ITEM_BUG_MEMORY, + .teraShard = ITEM_BUG_TERA_SHARD, }, [TYPE_GHOST] = { .name = _("Ghost"), - GENERIC(a GHOST), + .generic = _("a GHOST move"), .palette = 14, - MOVES(NEVER_ENDING_NIGHTMARE, PHANTASM) - ITEMS(GHOST, SPELL_TAG, KASIB, GHOST) - LEGENDARY_ITEMS(SPOOKY, GHOST) - TERA_SHARD(GHOST) + .zMove = MOVE_NEVER_ENDING_NIGHTMARE, + .maxMove = MOVE_MAX_PHANTASM, + .enhanceItem = ITEM_SPELL_TAG, + .berry = ITEM_KASIB_BERRY, + .gem = ITEM_GHOST_GEM, + .zCrystal = ITEM_GHOSTIUM_Z, + .plate= ITEM_SPOOKY_PLATE, + .memory = ITEM_GHOST_MEMORY, + .teraShard = ITEM_GHOST_TERA_SHARD, }, [TYPE_STEEL] = { .name = _("Steel"), - GENERIC(a STEEL), + .generic = _("a STEEL move"), .palette = 13, - MOVES(CORKSCREW_CRASH, STEELSPIKE) - ITEMS(STEEL, METAL_COAT, BABIRI, STEEL) - LEGENDARY_ITEMS(IRON, STEEL) - TERA_SHARD(STEEL) + .zMove = MOVE_CORKSCREW_CRASH, + .maxMove = MOVE_MAX_STEELSPIKE, + .enhanceItem = ITEM_METAL_COAT, + .berry = ITEM_BABIRI_BERRY, + .gem = ITEM_STEEL_GEM, + .zCrystal = ITEM_STEELIUM_Z, + .plate= ITEM_IRON_PLATE, + .memory = ITEM_STEEL_MEMORY, + .teraShard = ITEM_STEEL_TERA_SHARD, }, [TYPE_MYSTERY] = { .name = _("???"), - GENERIC(a ???), + .generic = _("a ??? move"), .palette = 15, }, [TYPE_FIRE] = { .name = _("Fire"), - GENERIC(a FIRE), + .generic = _("a FIRE move"), .palette = 13, - MOVES(INFERNO_OVERDRIVE, FLARE) - ITEMS(FIRE, CHARCOAL, OCCA, FIR) - LEGENDARY_ITEMS(FLAME, FIRE) - TERA_SHARD(FIRE) + .zMove = MOVE_INFERNO_OVERDRIVE, + .maxMove = MOVE_MAX_FLARE, + .enhanceItem = ITEM_CHARCOAL, + .berry = ITEM_OCCA_BERRY, + .gem = ITEM_FIRE_GEM, + .zCrystal = ITEM_FIRIUM_Z, + .plate= ITEM_FLAME_PLATE, + .memory = ITEM_FIRE_MEMORY, + .teraShard = ITEM_FIRE_TERA_SHARD, }, [TYPE_WATER] = { .name = _("Water"), - GENERIC(a WATER), + .generic = _("a WATER move"), .palette = 14, - MOVES(HYDRO_VORTEX, GEYSER) - ITEMS(WATER, MYSTIC_WATER, PASSHO, WATER) - LEGENDARY_ITEMS(SPLASH, WATER) - TERA_SHARD(WATER) + .zMove = MOVE_HYDRO_VORTEX, + .maxMove = MOVE_MAX_GEYSER, + .enhanceItem = ITEM_MYSTIC_WATER, + .berry = ITEM_PASSHO_BERRY, + .gem = ITEM_WATER_GEM, + .zCrystal = ITEM_WATERIUM_Z, + .plate= ITEM_SPLASH_PLATE, + .memory = ITEM_WATER_MEMORY, + .teraShard = ITEM_WATER_TERA_SHARD, }, [TYPE_GRASS] = { .name = _("Grass"), - GENERIC(a GRASS), + .generic = _("a GRASS move"), .palette = 15, - MOVES(BLOOM_DOOM, OVERGROWTH) - ITEMS(GRASS, MIRACLE_SEED, RINDO, GRASS) - LEGENDARY_ITEMS(MEADOW, GRASS) - TERA_SHARD(GRASS) + .zMove = MOVE_BLOOM_DOOM, + .maxMove = MOVE_MAX_OVERGROWTH, + .enhanceItem = ITEM_MIRACLE_SEED, + .berry = ITEM_RINDO_BERRY, + .gem = ITEM_GRASS_GEM, + .zCrystal = ITEM_GRASSIUM_Z, + .plate= ITEM_MEADOW_PLATE, + .memory = ITEM_GRASS_MEMORY, + .teraShard = ITEM_GRASS_TERA_SHARD, }, [TYPE_ELECTRIC] = { .name = _("Electr"), - GENERIC(an ELECTRIC), + .generic = _("an ELECTRIC move"), .palette = 13, - MOVES(GIGAVOLT_HAVOC, LIGHTNING) - ITEMS(ELECTRIC, MAGNET, WACAN, ELECTR) - LEGENDARY_ITEMS(ZAP, ELECTRIC) - TERA_SHARD(ELECTRIC) + .zMove = MOVE_GIGAVOLT_HAVOC, + .maxMove = MOVE_MAX_LIGHTNING, + .enhanceItem = ITEM_MAGNET, + .berry = ITEM_WACAN_BERRY, + .gem = ITEM_ELECTRIC_GEM, + .zCrystal = ITEM_ELECTRIUM_Z, + .plate= ITEM_ZAP_PLATE, + .memory = ITEM_ELECTRIC_MEMORY, + .teraShard = ITEM_ELECTRIC_TERA_SHARD, }, [TYPE_PSYCHIC] = { .name = _("Psychc"), - GENERIC(a PSYCHIC), + .generic = _("a PSYCHIC move"), .palette = 14, - MOVES(SHATTERED_PSYCHE, MINDSTORM) - ITEMS(PSYCHIC, TWISTED_SPOON, PAYAPA, PSYCH) - LEGENDARY_ITEMS(MIND, PSYCHIC) - TERA_SHARD(PSYCHIC) + .zMove = MOVE_SHATTERED_PSYCHE, + .maxMove = MOVE_MAX_MINDSTORM, + .enhanceItem = ITEM_TWISTED_SPOON, + .berry = ITEM_PAYAPA_BERRY, + .gem = ITEM_PSYCHIC_GEM, + .zCrystal = ITEM_PSYCHIUM_Z, + .plate= ITEM_MIND_PLATE, + .memory = ITEM_PSYCHIC_MEMORY, + .teraShard = ITEM_PSYCHIC_TERA_SHARD, }, [TYPE_ICE] = { .name = _("Ice"), - GENERIC(a ICE), + .generic = _("an ICE move"), .palette = 14, - MOVES(SUBZERO_SLAMMER, HAILSTORM) - ITEMS(ICE, NEVER_MELT_ICE, YACHE, IC) - LEGENDARY_ITEMS(ICICLE, ICE) - TERA_SHARD(ICE) + .zMove = MOVE_SUBZERO_SLAMMER, + .maxMove = MOVE_MAX_HAILSTORM, + .enhanceItem = ITEM_NEVER_MELT_ICE, + .berry = ITEM_YACHE_BERRY, + .gem = ITEM_ICE_GEM, + .zCrystal = ITEM_ICIUM_Z, + .plate= ITEM_ICICLE_PLATE, + .memory = ITEM_ICE_MEMORY, + .teraShard = ITEM_ICE_TERA_SHARD, }, [TYPE_DRAGON] = { .name = _("Dragon"), - GENERIC(a DRAGON), + .generic = _("a DRAGON move"), .palette = 15, - MOVES(DEVASTATING_DRAKE, WYRMWIND) - ITEMS(DRAGON, DRAGON_FANG, HABAN, DRAGON) - LEGENDARY_ITEMS(DRACO, DRAGON) - TERA_SHARD(DRAGON) + .zMove = MOVE_DEVASTATING_DRAKE, + .maxMove = MOVE_MAX_WYRMWIND, + .enhanceItem = ITEM_DRAGON_FANG, + .berry = ITEM_HABAN_BERRY, + .gem = ITEM_DRAGON_GEM, + .zCrystal = ITEM_DRAGONIUM_Z, + .plate= ITEM_DRACO_PLATE, + .memory = ITEM_DRAGON_MEMORY, + .teraShard = ITEM_DRAGON_TERA_SHARD, }, [TYPE_DARK] = { .name = _("Dark"), - GENERIC(a DARK), + .generic = _("a DARK move"), .palette = 13, - MOVES(BLACK_HOLE_ECLIPSE, DARKNESS) - ITEMS(DARK, BLACK_GLASSES, COLBUR, DARKIN) - LEGENDARY_ITEMS(DREAD, DARK) - TERA_SHARD(DARK) + .zMove = MOVE_BLACK_HOLE_ECLIPSE, + .maxMove = MOVE_MAX_DARKNESS, + .enhanceItem = ITEM_BLACK_GLASSES, + .berry = ITEM_COLBUR_BERRY, + .gem = ITEM_DARK_GEM, + .zCrystal = ITEM_DARKINIUM_Z, + .plate= ITEM_DREAD_PLATE, + .memory = ITEM_DARK_MEMORY, + .teraShard = ITEM_DARK_TERA_SHARD, }, [TYPE_FAIRY] = { .name = _("Fairy"), - GENERIC(a FAIRY), + .generic = _("a FAIRY move"), .palette = 14, - MOVES(TWINKLE_TACKLE, STARFALL) - ITEMS(FAIRY, FAIRY_FEATHER, ROSELI, FAIR) - LEGENDARY_ITEMS(PIXIE, FAIRY) - TERA_SHARD(FAIRY) + .zMove = MOVE_TWINKLE_TACKLE, + .maxMove = MOVE_MAX_STARFALL, + .enhanceItem = ITEM_FAIRY_FEATHER, + .berry = ITEM_ROSELI_BERRY, + .gem = ITEM_FAIRY_GEM, + .zCrystal = ITEM_FAIRIUM_Z, + .plate= ITEM_PIXIE_PLATE, + .memory = ITEM_FAIRY_MEMORY, + .teraShard = ITEM_FAIRY_TERA_SHARD, }, /* [TYPE_STELLAR] = { .name = _("Stellar"), - TERA_SHARD(STELLAR), + .teraShard = ITEM_STELLAR_TERA_SHARD,, }, */ }; diff --git a/src/pokedex_plus_hgss.c b/src/pokedex_plus_hgss.c index 23a46c38f620..5762a071bd03 100644 --- a/src/pokedex_plus_hgss.c +++ b/src/pokedex_plus_hgss.c @@ -4366,17 +4366,13 @@ static void SetSpriteInvisibility(u8 spriteArrayId, bool8 invisible) { gSprites[sPokedexView->typeIconSpriteIds[spriteArrayId]].invisible = invisible; } -// different from pokemon_summary_screen -#define TYPE_ICON_PAL_NUM_0 13 -#define TYPE_ICON_PAL_NUM_1 14 -#define TYPE_ICON_PAL_NUM_2 15 static const u8 sMoveTypeToOamPaletteNum[CONTEST_CATEGORIES_COUNT] = { - [CONTEST_CATEGORY_COOL] = TYPE_ICON_PAL_NUM_0, - [CONTEST_CATEGORY_BEAUTY] = TYPE_ICON_PAL_NUM_1, - [CONTEST_CATEGORY_CUTE] = TYPE_ICON_PAL_NUM_1, - [CONTEST_CATEGORY_SMART] = TYPE_ICON_PAL_NUM_2, - [CONTEST_CATEGORY_TOUGH] = TYPE_ICON_PAL_NUM_0, + [CONTEST_CATEGORY_COOL] = 13, + [CONTEST_CATEGORY_BEAUTY] = 14, + [CONTEST_CATEGORY_CUTE] = 14, + [CONTEST_CATEGORY_SMART] = 15, + [CONTEST_CATEGORY_TOUGH] = 13, }; static void SetTypeIconPosAndPal(u8 typeId, u8 x, u8 y, u8 spriteArrayId) { @@ -4384,11 +4380,10 @@ static void SetTypeIconPosAndPal(u8 typeId, u8 x, u8 y, u8 spriteArrayId) sprite = &gSprites[sPokedexView->typeIconSpriteIds[spriteArrayId]]; StartSpriteAnim(sprite, typeId); - if (typeId < NUMBER_OF_MON_TYPES) { + if (typeId < NUMBER_OF_MON_TYPES) sprite->oam.paletteNum = gTypes[typeId].palette; - } else { + else sprite->oam.paletteNum = sMoveTypeToOamPaletteNum[typeId - NUMBER_OF_MON_TYPES]; - } sprite->x = x + 16; sprite->y = y + 8; SetSpriteInvisibility(spriteArrayId, FALSE); diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 6758445c5ff2..aeb5689875a6 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -3900,11 +3900,10 @@ void SetTypeSpritePosAndPal(u8 typeId, u8 x, u8 y, u8 spriteArrayId) { struct Sprite *sprite = &gSprites[sMonSummaryScreen->spriteIds[spriteArrayId]]; StartSpriteAnim(sprite, typeId); - if (typeId < NUMBER_OF_MON_TYPES) { + if (typeId < NUMBER_OF_MON_TYPES) sprite->oam.paletteNum = gTypes[typeId].palette; - } else { + else sprite->oam.paletteNum = sMoveTypeToOamPaletteNum[typeId - NUMBER_OF_MON_TYPES]; - } sprite->x = x + 16; sprite->y = y + 8; SetSpriteInvisibility(spriteArrayId, FALSE); From 920887fa1a330715750c24230ae8ad7cd9561e6f Mon Sep 17 00:00:00 2001 From: Frank Date: Mon, 19 Feb 2024 17:07:25 -0500 Subject: [PATCH 11/12] Incorporated newer comments --- include/battle_main.h | 2 +- include/data.h | 8 +-- src/battle_controller_player.c | 2 +- src/battle_debug.c | 2 +- src/battle_dynamax.c | 6 +- src/battle_main.c | 112 ++++++++++++++++----------------- src/battle_message.c | 8 +-- src/battle_z_move.c | 2 +- src/data/union_room.h | 36 +++++------ src/menu_specialized.c | 2 +- src/pokedex.c | 36 +++++------ src/pokedex_plus_hgss.c | 44 ++++++------- src/pokemon_summary_screen.c | 6 +- src/union_room.c | 4 +- 14 files changed, 135 insertions(+), 135 deletions(-) diff --git a/include/battle_main.h b/include/battle_main.h index fdfbced19004..9469e63efe6d 100644 --- a/include/battle_main.h +++ b/include/battle_main.h @@ -76,7 +76,7 @@ extern struct MultiPartnerMenuPokemon gMultiPartnerParty[MULTI_PARTY_SIZE]; extern const struct SpriteTemplate gUnusedBattleInitSprite; extern const struct OamData gOamData_BattleSpriteOpponentSide; extern const struct OamData gOamData_BattleSpritePlayerSide; -extern const struct Type gTypes[NUMBER_OF_MON_TYPES]; +extern const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES]; extern const u8 gStatusConditionString_PoisonJpn[8]; extern const u8 gStatusConditionString_SleepJpn[8]; diff --git a/include/data.h b/include/data.h index 03a7ff44eb2d..0e267ed4927d 100644 --- a/include/data.h +++ b/include/data.h @@ -102,20 +102,20 @@ struct TrainerClass #define TRAINER_ENCOUNTER_MUSIC(trainer)((gTrainers[trainer].encounterMusic_gender & 0x7F)) -struct Type +struct TypeInfo { u8 name[TYPE_NAME_LENGTH + 1]; u8 generic[17]; u8 palette; - u16 zMove; + //u16 zMove; u16 maxMove; - u16 enhanceItem; + /*u16 enhanceItem; u16 berry; u16 gem; u16 plate; u16 memory; u16 zCrystal; - u16 teraShard; + u16 teraShard;*/ }; extern const u16 gMinigameDigits_Pal[]; diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 1a28d8d2762d..c9778f898e46 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -1755,7 +1755,7 @@ static void MoveSelectionDisplayMoveType(u32 battler) else type = gMovesInfo[moveInfo->moves[gMoveSelectionCursor[battler]]].type; - StringCopy(txtPtr, gTypes[type].name); + StringCopy(txtPtr, gTypesInfo[type].name); BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MOVE_TYPE); } diff --git a/src/battle_debug.c b/src/battle_debug.c index 6ef533775723..4e9d5ecf297a 100644 --- a/src/battle_debug.c +++ b/src/battle_debug.c @@ -1480,7 +1480,7 @@ static void PrintSecondaryEntries(struct BattleDebugMenu *data) { u8 *types = &gBattleMons[data->battlerId].type1; - PadString(gTypes[types[i]].name, text); + PadString(gTypesInfo[types[i]].name, text); printer.currentY = printer.y = (i * yMultiplier) + sSecondaryListTemplate.upText_Y; AddTextPrinter(&printer, 0, NULL); } diff --git a/src/battle_dynamax.c b/src/battle_dynamax.c index 36c4cbf6437b..12bcfcb5f7cd 100644 --- a/src/battle_dynamax.c +++ b/src/battle_dynamax.c @@ -282,9 +282,9 @@ static u16 GetTypeBasedMaxMove(u16 battlerId, u16 type) } // Regular Max Move - if (gTypes[type].maxMove == MOVE_NONE) // failsafe - return gTypes[0].maxMove; - return gTypes[type].maxMove; + if (gTypesInfo[type].maxMove == MOVE_NONE) // failsafe + return gTypesInfo[0].maxMove; + return gTypesInfo[type].maxMove; } // Returns the appropriate Max Move or G-Max Move for a battler to use. diff --git a/src/battle_main.c b/src/battle_main.c index 68bebfc15e95..c4a7360c9d67 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -300,140 +300,140 @@ const struct OamData gOamData_BattleSpritePlayerSide = static const s8 sCenterToCornerVecXs[8] ={-32, -16, -16, -32, -32}; // .generic is large enough that the text for TYPE_ELECTRIC will exceed TEXT_BUFF_ARRAY_COUNT. -const struct Type gTypes[NUMBER_OF_MON_TYPES] = +const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] = { [TYPE_NORMAL] = { .name = _("Normal"), .generic = _("a NORMAL move"), .palette = 13, - .zMove = MOVE_BREAKNECK_BLITZ, + //.zMove = MOVE_BREAKNECK_BLITZ, .maxMove = MOVE_MAX_STRIKE, - .enhanceItem = ITEM_SILK_SCARF, + /*.enhanceItem = ITEM_SILK_SCARF, .berry = ITEM_CHILAN_BERRY, .gem = ITEM_NORMAL_GEM, .zCrystal = ITEM_NORMALIUM_Z, - .teraShard = ITEM_NORMAL_TERA_SHARD, + .teraShard = ITEM_NORMAL_TERA_SHARD,*/ }, [TYPE_FIGHTING] = { .name = _("Fight"), .generic = _("a FIGHTING move"), .palette = 13, - .zMove = MOVE_ALL_OUT_PUMMELING, + //.zMove = MOVE_ALL_OUT_PUMMELING, .maxMove = MOVE_MAX_KNUCKLE, - .enhanceItem = ITEM_BLACK_BELT, + /*.enhanceItem = ITEM_BLACK_BELT, .berry = ITEM_CHOPLE_BERRY, .gem = ITEM_FIGHTING_GEM, .zCrystal = ITEM_FIGHTINIUM_Z, .plate= ITEM_FIST_PLATE, .memory = ITEM_FIGHTING_MEMORY, - .teraShard = ITEM_FIGHTING_TERA_SHARD, + .teraShard = ITEM_FIGHTING_TERA_SHARD,*/ }, [TYPE_FLYING] = { .name = _("Flying"), .generic = _("a FLYING move"), .palette = 14, - .zMove = MOVE_SUPERSONIC_SKYSTRIKE, + //.zMove = MOVE_SUPERSONIC_SKYSTRIKE, .maxMove = MOVE_MAX_AIRSTREAM, - .enhanceItem = ITEM_SHARP_BEAK, + /*.enhanceItem = ITEM_SHARP_BEAK, .berry = ITEM_COBA_BERRY, .gem = ITEM_FLYING_GEM, .zCrystal = ITEM_FLYINIUM_Z, .plate= ITEM_SKY_PLATE, .memory = ITEM_FLYING_MEMORY, - .teraShard = ITEM_FLYING_TERA_SHARD, + .teraShard = ITEM_FLYING_TERA_SHARD,*/ }, [TYPE_POISON] = { .name = _("Poison"), .generic = _("a POISON move"), .palette = 14, - .zMove = MOVE_ACID_DOWNPOUR, + //.zMove = MOVE_ACID_DOWNPOUR, .maxMove = MOVE_MAX_OOZE, - .enhanceItem = ITEM_POISON_BARB, + /*.enhanceItem = ITEM_POISON_BARB, .berry = ITEM_KEBIA_BERRY, .gem = ITEM_POISON_GEM, .zCrystal = ITEM_POISONIUM_Z, .plate= ITEM_TOXIC_PLATE, .memory = ITEM_POISON_MEMORY, - .teraShard = ITEM_POISON_TERA_SHARD, + .teraShard = ITEM_POISON_TERA_SHARD,*/ }, [TYPE_GROUND] = { .name = _("Ground"), .generic = _("a GROUND move"), .palette = 13, - .zMove = MOVE_TECTONIC_RAGE, + //.zMove = MOVE_TECTONIC_RAGE, .maxMove = MOVE_MAX_QUAKE, - .enhanceItem = ITEM_SOFT_SAND, + /*.enhanceItem = ITEM_SOFT_SAND, .berry = ITEM_SHUCA_BERRY, .gem = ITEM_GROUND_GEM, .zCrystal = ITEM_GROUNDIUM_Z, .plate= ITEM_EARTH_PLATE, .memory = ITEM_GROUND_MEMORY, - .teraShard = ITEM_GROUND_TERA_SHARD, + .teraShard = ITEM_GROUND_TERA_SHARD,*/ }, [TYPE_ROCK] = { .name = _("Rock"), .generic = _("a ROCK move"), .palette = 13, - .zMove = MOVE_CONTINENTAL_CRUSH, + //.zMove = MOVE_CONTINENTAL_CRUSH, .maxMove = MOVE_MAX_ROCKFALL, - .enhanceItem = ITEM_HARD_STONE, + /*.enhanceItem = ITEM_HARD_STONE, .berry = ITEM_CHARTI_BERRY, .gem = ITEM_ROCK_GEM, .zCrystal = ITEM_ROCKIUM_Z, .plate= ITEM_STONE_PLATE, .memory = ITEM_ROCK_MEMORY, - .teraShard = ITEM_ROCK_TERA_SHARD, + .teraShard = ITEM_ROCK_TERA_SHARD,*/ }, [TYPE_BUG] = { .name = _("Bug"), .generic = _("a BUG move"), .palette = 15, - .zMove = MOVE_SAVAGE_SPIN_OUT, + //.zMove = MOVE_SAVAGE_SPIN_OUT, .maxMove = MOVE_MAX_FLUTTERBY, - .enhanceItem = ITEM_SILVER_POWDER, + /*.enhanceItem = ITEM_SILVER_POWDER, .berry = ITEM_TANGA_BERRY, .gem = ITEM_BUG_GEM, .zCrystal = ITEM_BUGINIUM_Z, .plate= ITEM_INSECT_PLATE, .memory = ITEM_BUG_MEMORY, - .teraShard = ITEM_BUG_TERA_SHARD, + .teraShard = ITEM_BUG_TERA_SHARD,*/ }, [TYPE_GHOST] = { .name = _("Ghost"), .generic = _("a GHOST move"), .palette = 14, - .zMove = MOVE_NEVER_ENDING_NIGHTMARE, + //.zMove = MOVE_NEVER_ENDING_NIGHTMARE, .maxMove = MOVE_MAX_PHANTASM, - .enhanceItem = ITEM_SPELL_TAG, + /*.enhanceItem = ITEM_SPELL_TAG, .berry = ITEM_KASIB_BERRY, .gem = ITEM_GHOST_GEM, .zCrystal = ITEM_GHOSTIUM_Z, .plate= ITEM_SPOOKY_PLATE, .memory = ITEM_GHOST_MEMORY, - .teraShard = ITEM_GHOST_TERA_SHARD, + .teraShard = ITEM_GHOST_TERA_SHARD,*/ }, [TYPE_STEEL] = { .name = _("Steel"), .generic = _("a STEEL move"), .palette = 13, - .zMove = MOVE_CORKSCREW_CRASH, + //.zMove = MOVE_CORKSCREW_CRASH, .maxMove = MOVE_MAX_STEELSPIKE, - .enhanceItem = ITEM_METAL_COAT, + /*.enhanceItem = ITEM_METAL_COAT, .berry = ITEM_BABIRI_BERRY, .gem = ITEM_STEEL_GEM, .zCrystal = ITEM_STEELIUM_Z, .plate= ITEM_IRON_PLATE, .memory = ITEM_STEEL_MEMORY, - .teraShard = ITEM_STEEL_TERA_SHARD, + .teraShard = ITEM_STEEL_TERA_SHARD,*/ }, [TYPE_MYSTERY] = { @@ -446,141 +446,141 @@ const struct Type gTypes[NUMBER_OF_MON_TYPES] = .name = _("Fire"), .generic = _("a FIRE move"), .palette = 13, - .zMove = MOVE_INFERNO_OVERDRIVE, + //.zMove = MOVE_INFERNO_OVERDRIVE, .maxMove = MOVE_MAX_FLARE, - .enhanceItem = ITEM_CHARCOAL, + /*.enhanceItem = ITEM_CHARCOAL, .berry = ITEM_OCCA_BERRY, .gem = ITEM_FIRE_GEM, .zCrystal = ITEM_FIRIUM_Z, .plate= ITEM_FLAME_PLATE, .memory = ITEM_FIRE_MEMORY, - .teraShard = ITEM_FIRE_TERA_SHARD, + .teraShard = ITEM_FIRE_TERA_SHARD,*/ }, [TYPE_WATER] = { .name = _("Water"), .generic = _("a WATER move"), .palette = 14, - .zMove = MOVE_HYDRO_VORTEX, + //.zMove = MOVE_HYDRO_VORTEX, .maxMove = MOVE_MAX_GEYSER, - .enhanceItem = ITEM_MYSTIC_WATER, + /*.enhanceItem = ITEM_MYSTIC_WATER, .berry = ITEM_PASSHO_BERRY, .gem = ITEM_WATER_GEM, .zCrystal = ITEM_WATERIUM_Z, .plate= ITEM_SPLASH_PLATE, .memory = ITEM_WATER_MEMORY, - .teraShard = ITEM_WATER_TERA_SHARD, + .teraShard = ITEM_WATER_TERA_SHARD,*/ }, [TYPE_GRASS] = { .name = _("Grass"), .generic = _("a GRASS move"), .palette = 15, - .zMove = MOVE_BLOOM_DOOM, + //.zMove = MOVE_BLOOM_DOOM, .maxMove = MOVE_MAX_OVERGROWTH, - .enhanceItem = ITEM_MIRACLE_SEED, + /*.enhanceItem = ITEM_MIRACLE_SEED, .berry = ITEM_RINDO_BERRY, .gem = ITEM_GRASS_GEM, .zCrystal = ITEM_GRASSIUM_Z, .plate= ITEM_MEADOW_PLATE, .memory = ITEM_GRASS_MEMORY, - .teraShard = ITEM_GRASS_TERA_SHARD, + .teraShard = ITEM_GRASS_TERA_SHARD,*/ }, [TYPE_ELECTRIC] = { .name = _("Electr"), .generic = _("an ELECTRIC move"), .palette = 13, - .zMove = MOVE_GIGAVOLT_HAVOC, + //.zMove = MOVE_GIGAVOLT_HAVOC, .maxMove = MOVE_MAX_LIGHTNING, - .enhanceItem = ITEM_MAGNET, + /*.enhanceItem = ITEM_MAGNET, .berry = ITEM_WACAN_BERRY, .gem = ITEM_ELECTRIC_GEM, .zCrystal = ITEM_ELECTRIUM_Z, .plate= ITEM_ZAP_PLATE, .memory = ITEM_ELECTRIC_MEMORY, - .teraShard = ITEM_ELECTRIC_TERA_SHARD, + .teraShard = ITEM_ELECTRIC_TERA_SHARD,*/ }, [TYPE_PSYCHIC] = { .name = _("Psychc"), .generic = _("a PSYCHIC move"), .palette = 14, - .zMove = MOVE_SHATTERED_PSYCHE, + //.zMove = MOVE_SHATTERED_PSYCHE, .maxMove = MOVE_MAX_MINDSTORM, - .enhanceItem = ITEM_TWISTED_SPOON, + /*.enhanceItem = ITEM_TWISTED_SPOON, .berry = ITEM_PAYAPA_BERRY, .gem = ITEM_PSYCHIC_GEM, .zCrystal = ITEM_PSYCHIUM_Z, .plate= ITEM_MIND_PLATE, .memory = ITEM_PSYCHIC_MEMORY, - .teraShard = ITEM_PSYCHIC_TERA_SHARD, + .teraShard = ITEM_PSYCHIC_TERA_SHARD,*/ }, [TYPE_ICE] = { .name = _("Ice"), .generic = _("an ICE move"), .palette = 14, - .zMove = MOVE_SUBZERO_SLAMMER, + //.zMove = MOVE_SUBZERO_SLAMMER, .maxMove = MOVE_MAX_HAILSTORM, - .enhanceItem = ITEM_NEVER_MELT_ICE, + /*.enhanceItem = ITEM_NEVER_MELT_ICE, .berry = ITEM_YACHE_BERRY, .gem = ITEM_ICE_GEM, .zCrystal = ITEM_ICIUM_Z, .plate= ITEM_ICICLE_PLATE, .memory = ITEM_ICE_MEMORY, - .teraShard = ITEM_ICE_TERA_SHARD, + .teraShard = ITEM_ICE_TERA_SHARD,*/ }, [TYPE_DRAGON] = { .name = _("Dragon"), .generic = _("a DRAGON move"), .palette = 15, - .zMove = MOVE_DEVASTATING_DRAKE, + //.zMove = MOVE_DEVASTATING_DRAKE, .maxMove = MOVE_MAX_WYRMWIND, - .enhanceItem = ITEM_DRAGON_FANG, + /*.enhanceItem = ITEM_DRAGON_FANG, .berry = ITEM_HABAN_BERRY, .gem = ITEM_DRAGON_GEM, .zCrystal = ITEM_DRAGONIUM_Z, .plate= ITEM_DRACO_PLATE, .memory = ITEM_DRAGON_MEMORY, - .teraShard = ITEM_DRAGON_TERA_SHARD, + .teraShard = ITEM_DRAGON_TERA_SHARD,*/ }, [TYPE_DARK] = { .name = _("Dark"), .generic = _("a DARK move"), .palette = 13, - .zMove = MOVE_BLACK_HOLE_ECLIPSE, + //.zMove = MOVE_BLACK_HOLE_ECLIPSE, .maxMove = MOVE_MAX_DARKNESS, - .enhanceItem = ITEM_BLACK_GLASSES, + /*.enhanceItem = ITEM_BLACK_GLASSES, .berry = ITEM_COLBUR_BERRY, .gem = ITEM_DARK_GEM, .zCrystal = ITEM_DARKINIUM_Z, .plate= ITEM_DREAD_PLATE, .memory = ITEM_DARK_MEMORY, - .teraShard = ITEM_DARK_TERA_SHARD, + .teraShard = ITEM_DARK_TERA_SHARD,*/ }, [TYPE_FAIRY] = { .name = _("Fairy"), .generic = _("a FAIRY move"), .palette = 14, - .zMove = MOVE_TWINKLE_TACKLE, + //.zMove = MOVE_TWINKLE_TACKLE, .maxMove = MOVE_MAX_STARFALL, - .enhanceItem = ITEM_FAIRY_FEATHER, + /*.enhanceItem = ITEM_FAIRY_FEATHER, .berry = ITEM_ROSELI_BERRY, .gem = ITEM_FAIRY_GEM, .zCrystal = ITEM_FAIRIUM_Z, .plate= ITEM_PIXIE_PLATE, .memory = ITEM_FAIRY_MEMORY, - .teraShard = ITEM_FAIRY_TERA_SHARD, + .teraShard = ITEM_FAIRY_TERA_SHARD,*/ }, /* [TYPE_STELLAR] = { .name = _("Stellar"), - .teraShard = ITEM_STELLAR_TERA_SHARD,, + .teraShard = ITEM_STELLAR_TERA_SHARD, }, */ }; diff --git a/src/battle_message.c b/src/battle_message.c index ccbd9b5be8d3..d86bfb31a27e 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -2894,7 +2894,7 @@ void BufferStringBattle(u16 stringID, u32 battler) if (gBattleMsgDataPtr->currentMove >= MOVES_COUNT && !IsZMove(gBattleMsgDataPtr->currentMove) && !IsMaxMove(gBattleMsgDataPtr->currentMove)) - StringCopy(gBattleTextBuff3, gTypes[*(&gBattleStruct->stringMoveType)].generic); + StringCopy(gBattleTextBuff3, gTypesInfo[*(&gBattleStruct->stringMoveType)].generic); else StringCopy(gBattleTextBuff3, GetMoveName(gBattleMsgDataPtr->currentMove)); stringPtr = sText_AttackerUsedX; @@ -3324,7 +3324,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst) if (gBattleMsgDataPtr->currentMove >= MOVES_COUNT && !IsZMove(gBattleMsgDataPtr->currentMove) && !IsMaxMove(gBattleMsgDataPtr->currentMove)) - toCpy = gTypes[gBattleStruct->stringMoveType].generic; + toCpy = gTypesInfo[gBattleStruct->stringMoveType].generic; else toCpy = GetMoveName(gBattleMsgDataPtr->currentMove); break; @@ -3332,7 +3332,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst) if (gBattleMsgDataPtr->originallyUsedMove >= MOVES_COUNT && !IsZMove(gBattleMsgDataPtr->currentMove) && !IsMaxMove(gBattleMsgDataPtr->currentMove)) - toCpy = gTypes[gBattleStruct->stringMoveType].generic; + toCpy = gTypesInfo[gBattleStruct->stringMoveType].generic; else toCpy = GetMoveName(gBattleMsgDataPtr->originallyUsedMove); break; @@ -3716,7 +3716,7 @@ void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst) srcID += 3; break; case B_BUFF_TYPE: // type name - StringAppend(dst, gTypes[src[srcID + 1]].name); + StringAppend(dst, gTypesInfo[src[srcID + 1]].name); srcID += 2; break; case B_BUFF_MON_NICK_WITH_PREFIX: // poke nick with prefix diff --git a/src/battle_z_move.c b/src/battle_z_move.c index 23d14f3d9dc7..f0d2938b8e4b 100644 --- a/src/battle_z_move.c +++ b/src/battle_z_move.c @@ -553,7 +553,7 @@ static void ZMoveSelectionDisplayMoveType(u16 zMove, u32 battler) *(txtPtr)++ = EXT_CTRL_CODE_FONT; *(txtPtr)++ = FONT_NORMAL; - StringCopy(txtPtr, gTypes[zMoveType].name); + StringCopy(txtPtr, gTypesInfo[zMoveType].name); BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MOVE_TYPE); } diff --git a/src/data/union_room.h b/src/data/union_room.h index cc9dd7fcb50e..89b57c3d39f1 100644 --- a/src/data/union_room.h +++ b/src/data/union_room.h @@ -868,24 +868,24 @@ static const struct WindowTemplate sWindowTemplate_TradingBoardRequestType = { }; static const struct ListMenuItem sTradingBoardTypes[NUMBER_OF_MON_TYPES] = { - { gTypes[TYPE_NORMAL].name, TYPE_NORMAL }, - { gTypes[TYPE_FIRE].name, TYPE_FIRE }, - { gTypes[TYPE_WATER].name, TYPE_WATER }, - { gTypes[TYPE_ELECTRIC].name, TYPE_ELECTRIC }, - { gTypes[TYPE_GRASS].name, TYPE_GRASS }, - { gTypes[TYPE_ICE].name, TYPE_ICE }, - { gTypes[TYPE_GROUND].name, TYPE_GROUND }, - { gTypes[TYPE_ROCK].name, TYPE_ROCK }, - { gTypes[TYPE_FLYING].name, TYPE_FLYING }, - { gTypes[TYPE_PSYCHIC].name, TYPE_PSYCHIC }, - { gTypes[TYPE_FIGHTING].name, TYPE_FIGHTING }, - { gTypes[TYPE_POISON].name, TYPE_POISON }, - { gTypes[TYPE_BUG].name, TYPE_BUG }, - { gTypes[TYPE_GHOST].name, TYPE_GHOST }, - { gTypes[TYPE_DRAGON].name, TYPE_DRAGON }, - { gTypes[TYPE_STEEL].name, TYPE_STEEL }, - { gTypes[TYPE_DARK].name, TYPE_DARK }, - { gTypes[TYPE_FAIRY].name, TYPE_FAIRY }, + { gTypesInfo[TYPE_NORMAL].name, TYPE_NORMAL }, + { gTypesInfo[TYPE_FIRE].name, TYPE_FIRE }, + { gTypesInfo[TYPE_WATER].name, TYPE_WATER }, + { gTypesInfo[TYPE_ELECTRIC].name, TYPE_ELECTRIC }, + { gTypesInfo[TYPE_GRASS].name, TYPE_GRASS }, + { gTypesInfo[TYPE_ICE].name, TYPE_ICE }, + { gTypesInfo[TYPE_GROUND].name, TYPE_GROUND }, + { gTypesInfo[TYPE_ROCK].name, TYPE_ROCK }, + { gTypesInfo[TYPE_FLYING].name, TYPE_FLYING }, + { gTypesInfo[TYPE_PSYCHIC].name, TYPE_PSYCHIC }, + { gTypesInfo[TYPE_FIGHTING].name, TYPE_FIGHTING }, + { gTypesInfo[TYPE_POISON].name, TYPE_POISON }, + { gTypesInfo[TYPE_BUG].name, TYPE_BUG }, + { gTypesInfo[TYPE_GHOST].name, TYPE_GHOST }, + { gTypesInfo[TYPE_DRAGON].name, TYPE_DRAGON }, + { gTypesInfo[TYPE_STEEL].name, TYPE_STEEL }, + { gTypesInfo[TYPE_DARK].name, TYPE_DARK }, + { gTypesInfo[TYPE_FAIRY].name, TYPE_FAIRY }, { sText_Exit, NUMBER_OF_MON_TYPES } }; diff --git a/src/menu_specialized.c b/src/menu_specialized.c index 879cbccf62f6..fcb65d9ae73a 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -777,7 +777,7 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove) return; } move = &gMovesInfo[chosenMove]; - str = gTypes[move->type].name; + str = gTypesInfo[move->type].name; AddTextPrinterParameterized(RELEARNERWIN_DESC_BATTLE, FONT_NORMAL, str, 4, 25, TEXT_SKIP_DRAW, NULL); x = 4 + GetStringWidth(FONT_NORMAL, gText_MoveRelearnerPP, 0); diff --git a/src/pokedex.c b/src/pokedex.c index 619cecb9ac76..d6a453e6ed7a 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -1379,24 +1379,24 @@ static const struct SearchOptionText sDexSearchColorOptions[] = static const struct SearchOptionText sDexSearchTypeOptions[NUMBER_OF_MON_TYPES + 1] = // + 2 for "None" and terminator, - 1 for Mystery { {gText_DexEmptyString, gText_DexSearchTypeNone}, - {gText_DexEmptyString, gTypes[TYPE_NORMAL].name}, - {gText_DexEmptyString, gTypes[TYPE_FIGHTING].name}, - {gText_DexEmptyString, gTypes[TYPE_FLYING].name}, - {gText_DexEmptyString, gTypes[TYPE_POISON].name}, - {gText_DexEmptyString, gTypes[TYPE_GROUND].name}, - {gText_DexEmptyString, gTypes[TYPE_ROCK].name}, - {gText_DexEmptyString, gTypes[TYPE_BUG].name}, - {gText_DexEmptyString, gTypes[TYPE_GHOST].name}, - {gText_DexEmptyString, gTypes[TYPE_STEEL].name}, - {gText_DexEmptyString, gTypes[TYPE_FIRE].name}, - {gText_DexEmptyString, gTypes[TYPE_WATER].name}, - {gText_DexEmptyString, gTypes[TYPE_GRASS].name}, - {gText_DexEmptyString, gTypes[TYPE_ELECTRIC].name}, - {gText_DexEmptyString, gTypes[TYPE_PSYCHIC].name}, - {gText_DexEmptyString, gTypes[TYPE_ICE].name}, - {gText_DexEmptyString, gTypes[TYPE_DRAGON].name}, - {gText_DexEmptyString, gTypes[TYPE_DARK].name}, - {gText_DexEmptyString, gTypes[TYPE_FAIRY].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_NORMAL].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_FIGHTING].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_FLYING].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_POISON].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_GROUND].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_ROCK].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_BUG].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_GHOST].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_STEEL].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_FIRE].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_WATER].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_GRASS].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_ELECTRIC].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_PSYCHIC].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_ICE].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_DRAGON].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_DARK].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_FAIRY].name}, {}, }; diff --git a/src/pokedex_plus_hgss.c b/src/pokedex_plus_hgss.c index 5762a071bd03..60c97981f09e 100644 --- a/src/pokedex_plus_hgss.c +++ b/src/pokedex_plus_hgss.c @@ -1955,24 +1955,24 @@ static const struct SearchOptionText sDexSearchColorOptions[] = static const struct SearchOptionText sDexSearchTypeOptions[NUMBER_OF_MON_TYPES + 1] = // + 2 for "None" and terminator, - 1 for Mystery { {gText_DexEmptyString, gText_DexSearchTypeNone}, - {gText_DexEmptyString, gTypes[TYPE_NORMAL].name}, - {gText_DexEmptyString, gTypes[TYPE_FIGHTING].name}, - {gText_DexEmptyString, gTypes[TYPE_FLYING].name}, - {gText_DexEmptyString, gTypes[TYPE_POISON].name}, - {gText_DexEmptyString, gTypes[TYPE_GROUND].name}, - {gText_DexEmptyString, gTypes[TYPE_ROCK].name}, - {gText_DexEmptyString, gTypes[TYPE_BUG].name}, - {gText_DexEmptyString, gTypes[TYPE_GHOST].name}, - {gText_DexEmptyString, gTypes[TYPE_STEEL].name}, - {gText_DexEmptyString, gTypes[TYPE_FIRE].name}, - {gText_DexEmptyString, gTypes[TYPE_WATER].name}, - {gText_DexEmptyString, gTypes[TYPE_GRASS].name}, - {gText_DexEmptyString, gTypes[TYPE_ELECTRIC].name}, - {gText_DexEmptyString, gTypes[TYPE_PSYCHIC].name}, - {gText_DexEmptyString, gTypes[TYPE_ICE].name}, - {gText_DexEmptyString, gTypes[TYPE_DRAGON].name}, - {gText_DexEmptyString, gTypes[TYPE_DARK].name}, - {gText_DexEmptyString, gTypes[TYPE_FAIRY].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_NORMAL].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_FIGHTING].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_FLYING].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_POISON].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_GROUND].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_ROCK].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_BUG].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_GHOST].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_STEEL].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_FIRE].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_WATER].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_GRASS].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_ELECTRIC].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_PSYCHIC].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_ICE].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_DRAGON].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_DARK].name}, + {gText_DexEmptyString, gTypesInfo[TYPE_FAIRY].name}, {}, }; @@ -4366,7 +4366,7 @@ static void SetSpriteInvisibility(u8 spriteArrayId, bool8 invisible) { gSprites[sPokedexView->typeIconSpriteIds[spriteArrayId]].invisible = invisible; } -static const u8 sMoveTypeToOamPaletteNum[CONTEST_CATEGORIES_COUNT] = +static const u8 sContestCategoryToOamPaletteNum[CONTEST_CATEGORIES_COUNT] = { [CONTEST_CATEGORY_COOL] = 13, [CONTEST_CATEGORY_BEAUTY] = 14, @@ -4381,9 +4381,9 @@ static void SetTypeIconPosAndPal(u8 typeId, u8 x, u8 y, u8 spriteArrayId) sprite = &gSprites[sPokedexView->typeIconSpriteIds[spriteArrayId]]; StartSpriteAnim(sprite, typeId); if (typeId < NUMBER_OF_MON_TYPES) - sprite->oam.paletteNum = gTypes[typeId].palette; + sprite->oam.paletteNum = gTypesInfo[typeId].palette; else - sprite->oam.paletteNum = sMoveTypeToOamPaletteNum[typeId - NUMBER_OF_MON_TYPES]; + sprite->oam.paletteNum = sContestCategoryToOamPaletteNum[typeId - NUMBER_OF_MON_TYPES]; sprite->x = x + 16; sprite->y = y + 8; SetSpriteInvisibility(spriteArrayId, FALSE); @@ -6667,7 +6667,7 @@ static u8 PrintEvolutionTargetSpeciesAndMethod(u8 taskId, u16 species, u8 depth, StringExpandPlaceholders(gStringVar4, sText_EVO_MOVE ); break; case EVO_FRIENDSHIP_MOVE_TYPE: - StringCopy(gStringVar2, gTypes[evolutions[i].param].name); + StringCopy(gStringVar2, gTypesInfo[evolutions[i].param].name); StringExpandPlaceholders(gStringVar4, sText_EVO_FRIENDSHIP_MOVE_TYPE ); break; case EVO_MAPSEC: diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index aeb5689875a6..14e3237fb0be 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -954,7 +954,7 @@ const struct SpriteTemplate gSpriteTemplate_MoveTypes = .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; -static const u8 sMoveTypeToOamPaletteNum[CONTEST_CATEGORIES_COUNT] = +static const u8 sContestCategoryToOamPaletteNum[CONTEST_CATEGORIES_COUNT] = { [CONTEST_CATEGORY_COOL] = 13, [CONTEST_CATEGORY_BEAUTY] = 14, @@ -3901,9 +3901,9 @@ void SetTypeSpritePosAndPal(u8 typeId, u8 x, u8 y, u8 spriteArrayId) struct Sprite *sprite = &gSprites[sMonSummaryScreen->spriteIds[spriteArrayId]]; StartSpriteAnim(sprite, typeId); if (typeId < NUMBER_OF_MON_TYPES) - sprite->oam.paletteNum = gTypes[typeId].palette; + sprite->oam.paletteNum = gTypesInfo[typeId].palette; else - sprite->oam.paletteNum = sMoveTypeToOamPaletteNum[typeId - NUMBER_OF_MON_TYPES]; + sprite->oam.paletteNum = sContestCategoryToOamPaletteNum[typeId - NUMBER_OF_MON_TYPES]; sprite->x = x + 16; sprite->y = y + 8; SetSpriteInvisibility(spriteArrayId, FALSE); diff --git a/src/union_room.c b/src/union_room.c index 529206ff7ca8..f4ee01d1b404 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -3184,12 +3184,12 @@ static void Task_RunUnionRoom(u8 taskId) break; case UR_TRADE_NOTYPE: CopyAndTranslatePlayerName(gStringVar1, &uroom->playerList->players[input]); - StringCopy(gStringVar2, gTypes[uroom->playerList->players[input].rfu.data.tradeType].name); + StringCopy(gStringVar2, gTypesInfo[uroom->playerList->players[input].rfu.data.tradeType].name); ScheduleFieldMessageWithFollowupState(UR_STATE_TRADING_BOARD_LOAD, sText_DontHaveTypeTrainerWants); break; case UR_TRADE_NOEGG: CopyAndTranslatePlayerName(gStringVar1, &uroom->playerList->players[input]); - StringCopy(gStringVar2, gTypes[uroom->playerList->players[input].rfu.data.tradeType].name); + StringCopy(gStringVar2, gTypesInfo[uroom->playerList->players[input].rfu.data.tradeType].name); ScheduleFieldMessageWithFollowupState(UR_STATE_TRADING_BOARD_LOAD, sText_DontHaveEggTrainerWants); break; } From d8e01a1f4d6443759555a15e23dbff400080e81d Mon Sep 17 00:00:00 2001 From: Frank Date: Wed, 28 Feb 2024 14:05:48 -0500 Subject: [PATCH 12/12] Updated comment format --- include/data.h | 14 +-- src/battle_main.c | 248 +++++++++++++++++++++++----------------------- 2 files changed, 131 insertions(+), 131 deletions(-) diff --git a/include/data.h b/include/data.h index 1ea6b719884f..df11e48a1099 100644 --- a/include/data.h +++ b/include/data.h @@ -106,13 +106,13 @@ struct TypeInfo u8 palette; //u16 zMove; u16 maxMove; - /*u16 enhanceItem; - u16 berry; - u16 gem; - u16 plate; - u16 memory; - u16 zCrystal; - u16 teraShard;*/ + //u16 enhanceItem; + //u16 berry; + //u16 gem; + //u16 plate; + //u16 memory; + //u16 zCrystal; + //u16 teraShard; }; extern const u16 gMinigameDigits_Pal[]; diff --git a/src/battle_main.c b/src/battle_main.c index 0f6dc3ce19b4..8a61887bde0d 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -309,11 +309,11 @@ const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] = .palette = 13, //.zMove = MOVE_BREAKNECK_BLITZ, .maxMove = MOVE_MAX_STRIKE, - /*.enhanceItem = ITEM_SILK_SCARF, - .berry = ITEM_CHILAN_BERRY, - .gem = ITEM_NORMAL_GEM, - .zCrystal = ITEM_NORMALIUM_Z, - .teraShard = ITEM_NORMAL_TERA_SHARD,*/ + //.enhanceItem = ITEM_SILK_SCARF, + //.berry = ITEM_CHILAN_BERRY, + //.gem = ITEM_NORMAL_GEM, + //.zCrystal = ITEM_NORMALIUM_Z, + //.teraShard = ITEM_NORMAL_TERA_SHARD, }, [TYPE_FIGHTING] = { @@ -322,13 +322,13 @@ const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] = .palette = 13, //.zMove = MOVE_ALL_OUT_PUMMELING, .maxMove = MOVE_MAX_KNUCKLE, - /*.enhanceItem = ITEM_BLACK_BELT, - .berry = ITEM_CHOPLE_BERRY, - .gem = ITEM_FIGHTING_GEM, - .zCrystal = ITEM_FIGHTINIUM_Z, - .plate= ITEM_FIST_PLATE, - .memory = ITEM_FIGHTING_MEMORY, - .teraShard = ITEM_FIGHTING_TERA_SHARD,*/ + //.enhanceItem = ITEM_BLACK_BELT, + //.berry = ITEM_CHOPLE_BERRY, + //.gem = ITEM_FIGHTING_GEM, + //.zCrystal = ITEM_FIGHTINIUM_Z, + //.plate= ITEM_FIST_PLATE, + //.memory = ITEM_FIGHTING_MEMORY, + //.teraShard = ITEM_FIGHTING_TERA_SHARD, }, [TYPE_FLYING] = { @@ -337,13 +337,13 @@ const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] = .palette = 14, //.zMove = MOVE_SUPERSONIC_SKYSTRIKE, .maxMove = MOVE_MAX_AIRSTREAM, - /*.enhanceItem = ITEM_SHARP_BEAK, - .berry = ITEM_COBA_BERRY, - .gem = ITEM_FLYING_GEM, - .zCrystal = ITEM_FLYINIUM_Z, - .plate= ITEM_SKY_PLATE, - .memory = ITEM_FLYING_MEMORY, - .teraShard = ITEM_FLYING_TERA_SHARD,*/ + //.enhanceItem = ITEM_SHARP_BEAK, + //.berry = ITEM_COBA_BERRY, + //.gem = ITEM_FLYING_GEM, + //.zCrystal = ITEM_FLYINIUM_Z, + //.plate= ITEM_SKY_PLATE, + //.memory = ITEM_FLYING_MEMORY, + //.teraShard = ITEM_FLYING_TERA_SHARD, }, [TYPE_POISON] = { @@ -352,13 +352,13 @@ const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] = .palette = 14, //.zMove = MOVE_ACID_DOWNPOUR, .maxMove = MOVE_MAX_OOZE, - /*.enhanceItem = ITEM_POISON_BARB, - .berry = ITEM_KEBIA_BERRY, - .gem = ITEM_POISON_GEM, - .zCrystal = ITEM_POISONIUM_Z, - .plate= ITEM_TOXIC_PLATE, - .memory = ITEM_POISON_MEMORY, - .teraShard = ITEM_POISON_TERA_SHARD,*/ + //.enhanceItem = ITEM_POISON_BARB, + //.berry = ITEM_KEBIA_BERRY, + //.gem = ITEM_POISON_GEM, + //.zCrystal = ITEM_POISONIUM_Z, + //.plate= ITEM_TOXIC_PLATE, + //.memory = ITEM_POISON_MEMORY, + //.teraShard = ITEM_POISON_TERA_SHARD, }, [TYPE_GROUND] = { @@ -367,13 +367,13 @@ const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] = .palette = 13, //.zMove = MOVE_TECTONIC_RAGE, .maxMove = MOVE_MAX_QUAKE, - /*.enhanceItem = ITEM_SOFT_SAND, - .berry = ITEM_SHUCA_BERRY, - .gem = ITEM_GROUND_GEM, - .zCrystal = ITEM_GROUNDIUM_Z, - .plate= ITEM_EARTH_PLATE, - .memory = ITEM_GROUND_MEMORY, - .teraShard = ITEM_GROUND_TERA_SHARD,*/ + //.enhanceItem = ITEM_SOFT_SAND, + //.berry = ITEM_SHUCA_BERRY, + //.gem = ITEM_GROUND_GEM, + //.zCrystal = ITEM_GROUNDIUM_Z, + //.plate= ITEM_EARTH_PLATE, + //.memory = ITEM_GROUND_MEMORY, + //.teraShard = ITEM_GROUND_TERA_SHARD, }, [TYPE_ROCK] = { @@ -382,13 +382,13 @@ const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] = .palette = 13, //.zMove = MOVE_CONTINENTAL_CRUSH, .maxMove = MOVE_MAX_ROCKFALL, - /*.enhanceItem = ITEM_HARD_STONE, - .berry = ITEM_CHARTI_BERRY, - .gem = ITEM_ROCK_GEM, - .zCrystal = ITEM_ROCKIUM_Z, - .plate= ITEM_STONE_PLATE, - .memory = ITEM_ROCK_MEMORY, - .teraShard = ITEM_ROCK_TERA_SHARD,*/ + //.enhanceItem = ITEM_HARD_STONE, + //.berry = ITEM_CHARTI_BERRY, + //.gem = ITEM_ROCK_GEM, + //.zCrystal = ITEM_ROCKIUM_Z, + //.plate= ITEM_STONE_PLATE, + //.memory = ITEM_ROCK_MEMORY, + //.teraShard = ITEM_ROCK_TERA_SHARD, }, [TYPE_BUG] = { @@ -397,13 +397,13 @@ const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] = .palette = 15, //.zMove = MOVE_SAVAGE_SPIN_OUT, .maxMove = MOVE_MAX_FLUTTERBY, - /*.enhanceItem = ITEM_SILVER_POWDER, - .berry = ITEM_TANGA_BERRY, - .gem = ITEM_BUG_GEM, - .zCrystal = ITEM_BUGINIUM_Z, - .plate= ITEM_INSECT_PLATE, - .memory = ITEM_BUG_MEMORY, - .teraShard = ITEM_BUG_TERA_SHARD,*/ + //.enhanceItem = ITEM_SILVER_POWDER, + //.berry = ITEM_TANGA_BERRY, + //.gem = ITEM_BUG_GEM, + //.zCrystal = ITEM_BUGINIUM_Z, + //.plate= ITEM_INSECT_PLATE, + //.memory = ITEM_BUG_MEMORY, + //.teraShard = ITEM_BUG_TERA_SHARD, }, [TYPE_GHOST] = { @@ -412,13 +412,13 @@ const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] = .palette = 14, //.zMove = MOVE_NEVER_ENDING_NIGHTMARE, .maxMove = MOVE_MAX_PHANTASM, - /*.enhanceItem = ITEM_SPELL_TAG, - .berry = ITEM_KASIB_BERRY, - .gem = ITEM_GHOST_GEM, - .zCrystal = ITEM_GHOSTIUM_Z, - .plate= ITEM_SPOOKY_PLATE, - .memory = ITEM_GHOST_MEMORY, - .teraShard = ITEM_GHOST_TERA_SHARD,*/ + //.enhanceItem = ITEM_SPELL_TAG, + //.berry = ITEM_KASIB_BERRY, + //.gem = ITEM_GHOST_GEM, + //.zCrystal = ITEM_GHOSTIUM_Z, + //.plate= ITEM_SPOOKY_PLATE, + //.memory = ITEM_GHOST_MEMORY, + //.teraShard = ITEM_GHOST_TERA_SHARD, }, [TYPE_STEEL] = { @@ -427,13 +427,13 @@ const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] = .palette = 13, //.zMove = MOVE_CORKSCREW_CRASH, .maxMove = MOVE_MAX_STEELSPIKE, - /*.enhanceItem = ITEM_METAL_COAT, - .berry = ITEM_BABIRI_BERRY, - .gem = ITEM_STEEL_GEM, - .zCrystal = ITEM_STEELIUM_Z, - .plate= ITEM_IRON_PLATE, - .memory = ITEM_STEEL_MEMORY, - .teraShard = ITEM_STEEL_TERA_SHARD,*/ + //.enhanceItem = ITEM_METAL_COAT, + //.berry = ITEM_BABIRI_BERRY, + //.gem = ITEM_STEEL_GEM, + //.zCrystal = ITEM_STEELIUM_Z, + //.plate= ITEM_IRON_PLATE, + //.memory = ITEM_STEEL_MEMORY, + //.teraShard = ITEM_STEEL_TERA_SHARD, }, [TYPE_MYSTERY] = { @@ -448,13 +448,13 @@ const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] = .palette = 13, //.zMove = MOVE_INFERNO_OVERDRIVE, .maxMove = MOVE_MAX_FLARE, - /*.enhanceItem = ITEM_CHARCOAL, - .berry = ITEM_OCCA_BERRY, - .gem = ITEM_FIRE_GEM, - .zCrystal = ITEM_FIRIUM_Z, - .plate= ITEM_FLAME_PLATE, - .memory = ITEM_FIRE_MEMORY, - .teraShard = ITEM_FIRE_TERA_SHARD,*/ + //.enhanceItem = ITEM_CHARCOAL, + //.berry = ITEM_OCCA_BERRY, + //.gem = ITEM_FIRE_GEM, + //.zCrystal = ITEM_FIRIUM_Z, + //.plate= ITEM_FLAME_PLATE, + //.memory = ITEM_FIRE_MEMORY, + //.teraShard = ITEM_FIRE_TERA_SHARD, }, [TYPE_WATER] = { @@ -463,13 +463,13 @@ const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] = .palette = 14, //.zMove = MOVE_HYDRO_VORTEX, .maxMove = MOVE_MAX_GEYSER, - /*.enhanceItem = ITEM_MYSTIC_WATER, - .berry = ITEM_PASSHO_BERRY, - .gem = ITEM_WATER_GEM, - .zCrystal = ITEM_WATERIUM_Z, - .plate= ITEM_SPLASH_PLATE, - .memory = ITEM_WATER_MEMORY, - .teraShard = ITEM_WATER_TERA_SHARD,*/ + //.enhanceItem = ITEM_MYSTIC_WATER, + //.berry = ITEM_PASSHO_BERRY, + //.gem = ITEM_WATER_GEM, + //.zCrystal = ITEM_WATERIUM_Z, + //.plate= ITEM_SPLASH_PLATE, + //.memory = ITEM_WATER_MEMORY, + //.teraShard = ITEM_WATER_TERA_SHARD, }, [TYPE_GRASS] = { @@ -478,13 +478,13 @@ const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] = .palette = 15, //.zMove = MOVE_BLOOM_DOOM, .maxMove = MOVE_MAX_OVERGROWTH, - /*.enhanceItem = ITEM_MIRACLE_SEED, - .berry = ITEM_RINDO_BERRY, - .gem = ITEM_GRASS_GEM, - .zCrystal = ITEM_GRASSIUM_Z, - .plate= ITEM_MEADOW_PLATE, - .memory = ITEM_GRASS_MEMORY, - .teraShard = ITEM_GRASS_TERA_SHARD,*/ + //.enhanceItem = ITEM_MIRACLE_SEED, + //.berry = ITEM_RINDO_BERRY, + //.gem = ITEM_GRASS_GEM, + //.zCrystal = ITEM_GRASSIUM_Z, + //.plate= ITEM_MEADOW_PLATE, + //.memory = ITEM_GRASS_MEMORY, + //.teraShard = ITEM_GRASS_TERA_SHARD, }, [TYPE_ELECTRIC] = { @@ -493,13 +493,13 @@ const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] = .palette = 13, //.zMove = MOVE_GIGAVOLT_HAVOC, .maxMove = MOVE_MAX_LIGHTNING, - /*.enhanceItem = ITEM_MAGNET, - .berry = ITEM_WACAN_BERRY, - .gem = ITEM_ELECTRIC_GEM, - .zCrystal = ITEM_ELECTRIUM_Z, - .plate= ITEM_ZAP_PLATE, - .memory = ITEM_ELECTRIC_MEMORY, - .teraShard = ITEM_ELECTRIC_TERA_SHARD,*/ + //.enhanceItem = ITEM_MAGNET, + //.berry = ITEM_WACAN_BERRY, + //.gem = ITEM_ELECTRIC_GEM, + //.zCrystal = ITEM_ELECTRIUM_Z, + //.plate= ITEM_ZAP_PLATE, + //.memory = ITEM_ELECTRIC_MEMORY, + //.teraShard = ITEM_ELECTRIC_TERA_SHARD, }, [TYPE_PSYCHIC] = { @@ -508,13 +508,13 @@ const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] = .palette = 14, //.zMove = MOVE_SHATTERED_PSYCHE, .maxMove = MOVE_MAX_MINDSTORM, - /*.enhanceItem = ITEM_TWISTED_SPOON, - .berry = ITEM_PAYAPA_BERRY, - .gem = ITEM_PSYCHIC_GEM, - .zCrystal = ITEM_PSYCHIUM_Z, - .plate= ITEM_MIND_PLATE, - .memory = ITEM_PSYCHIC_MEMORY, - .teraShard = ITEM_PSYCHIC_TERA_SHARD,*/ + //.enhanceItem = ITEM_TWISTED_SPOON, + //.berry = ITEM_PAYAPA_BERRY, + //.gem = ITEM_PSYCHIC_GEM, + //.zCrystal = ITEM_PSYCHIUM_Z, + //.plate= ITEM_MIND_PLATE, + //.memory = ITEM_PSYCHIC_MEMORY, + //.teraShard = ITEM_PSYCHIC_TERA_SHARD, }, [TYPE_ICE] = { @@ -523,13 +523,13 @@ const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] = .palette = 14, //.zMove = MOVE_SUBZERO_SLAMMER, .maxMove = MOVE_MAX_HAILSTORM, - /*.enhanceItem = ITEM_NEVER_MELT_ICE, - .berry = ITEM_YACHE_BERRY, - .gem = ITEM_ICE_GEM, - .zCrystal = ITEM_ICIUM_Z, - .plate= ITEM_ICICLE_PLATE, - .memory = ITEM_ICE_MEMORY, - .teraShard = ITEM_ICE_TERA_SHARD,*/ + //.enhanceItem = ITEM_NEVER_MELT_ICE, + //.berry = ITEM_YACHE_BERRY, + //.gem = ITEM_ICE_GEM, + //.zCrystal = ITEM_ICIUM_Z, + //.plate= ITEM_ICICLE_PLATE, + //.memory = ITEM_ICE_MEMORY, + //.teraShard = ITEM_ICE_TERA_SHARD, }, [TYPE_DRAGON] = { @@ -538,13 +538,13 @@ const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] = .palette = 15, //.zMove = MOVE_DEVASTATING_DRAKE, .maxMove = MOVE_MAX_WYRMWIND, - /*.enhanceItem = ITEM_DRAGON_FANG, - .berry = ITEM_HABAN_BERRY, - .gem = ITEM_DRAGON_GEM, - .zCrystal = ITEM_DRAGONIUM_Z, - .plate= ITEM_DRACO_PLATE, - .memory = ITEM_DRAGON_MEMORY, - .teraShard = ITEM_DRAGON_TERA_SHARD,*/ + //.enhanceItem = ITEM_DRAGON_FANG, + //.berry = ITEM_HABAN_BERRY, + //.gem = ITEM_DRAGON_GEM, + //.zCrystal = ITEM_DRAGONIUM_Z, + //.plate= ITEM_DRACO_PLATE, + //.memory = ITEM_DRAGON_MEMORY, + //.teraShard = ITEM_DRAGON_TERA_SHARD, }, [TYPE_DARK] = { @@ -553,13 +553,13 @@ const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] = .palette = 13, //.zMove = MOVE_BLACK_HOLE_ECLIPSE, .maxMove = MOVE_MAX_DARKNESS, - /*.enhanceItem = ITEM_BLACK_GLASSES, - .berry = ITEM_COLBUR_BERRY, - .gem = ITEM_DARK_GEM, - .zCrystal = ITEM_DARKINIUM_Z, - .plate= ITEM_DREAD_PLATE, - .memory = ITEM_DARK_MEMORY, - .teraShard = ITEM_DARK_TERA_SHARD,*/ + //.enhanceItem = ITEM_BLACK_GLASSES, + //.berry = ITEM_COLBUR_BERRY, + //.gem = ITEM_DARK_GEM, + //.zCrystal = ITEM_DARKINIUM_Z, + //.plate= ITEM_DREAD_PLATE, + //.memory = ITEM_DARK_MEMORY, + //.teraShard = ITEM_DARK_TERA_SHARD, }, [TYPE_FAIRY] = { @@ -568,13 +568,13 @@ const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] = .palette = 14, //.zMove = MOVE_TWINKLE_TACKLE, .maxMove = MOVE_MAX_STARFALL, - /*.enhanceItem = ITEM_FAIRY_FEATHER, - .berry = ITEM_ROSELI_BERRY, - .gem = ITEM_FAIRY_GEM, - .zCrystal = ITEM_FAIRIUM_Z, - .plate= ITEM_PIXIE_PLATE, - .memory = ITEM_FAIRY_MEMORY, - .teraShard = ITEM_FAIRY_TERA_SHARD,*/ + //.enhanceItem = ITEM_FAIRY_FEATHER, + //.berry = ITEM_ROSELI_BERRY, + //.gem = ITEM_FAIRY_GEM, + //.zCrystal = ITEM_FAIRIUM_Z, + //.plate= ITEM_PIXIE_PLATE, + //.memory = ITEM_FAIRY_MEMORY, + //.teraShard = ITEM_FAIRY_TERA_SHARD, }, /* [TYPE_STELLAR] =