diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 08474a1e8..d3ff57492 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -9200,6 +9200,7 @@ BattleScript_ItemHealHP_Ret:: BattleScript_SelectingNotAllowedMoveChoiceItem:: printselectionstring STRINGID_ITEMALLOWSONLYYMOVE endselectionscript + BattleScript_SelectingNotAllowedMoveChoiceItemInPalace:: printstring STRINGID_ITEMALLOWSONLYYMOVE goto BattleScript_SelectingUnusableMoveInPalace @@ -9207,6 +9208,7 @@ BattleScript_SelectingNotAllowedMoveChoiceItemInPalace:: BattleScript_SelectingNotAllowedMoveGorillaTactics:: printselectionstring STRINGID_ABILITYALLOWSONLYMOVE endselectionscript + BattleScript_SelectingNotAllowedMoveGorillaTacticsInPalace:: printstring STRINGID_ABILITYALLOWSONLYMOVE goto BattleScript_SelectingUnusableMoveInPalace @@ -9214,10 +9216,19 @@ BattleScript_SelectingNotAllowedMoveGorillaTacticsInPalace:: BattleScript_SelectingNotAllowedMoveAssaultVest:: printselectionstring STRINGID_ASSAULTVESTDOESNTALLOW endselectionscript + BattleScript_SelectingNotAllowedMoveAssaultVestInPalace:: printstring STRINGID_ASSAULTVESTDOESNTALLOW goto BattleScript_SelectingUnusableMoveInPalace +BattleScript_SelectingNotAllowedPlaceholder:: + printselectionstring STRINGID_NOTDONEYET + endselectionscript + +BattleScript_SelectingNotAllowedPlaceholderInPalace:: + printstring STRINGID_NOTDONEYET + goto BattleScript_SelectingUnusableMoveInPalace + BattleScript_HangedOnMsg:: playanimation BS_TARGET, B_ANIM_HANGED_ON printstring STRINGID_PKMNHUNGONWITHX diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 77d889cc3..19380932d 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -277,6 +277,8 @@ extern const u8 BattleScript_HarvestActivates[]; extern const u8 BattleScript_ImposterActivates[]; extern const u8 BattleScript_SelectingNotAllowedMoveAssaultVest[]; extern const u8 BattleScript_SelectingNotAllowedMoveAssaultVestInPalace[]; +extern const u8 BattleScript_SelectingNotAllowedPlaceholder[]; +extern const u8 BattleScript_SelectingNotAllowedPlaceholderInPalace[]; extern const u8 BattleScript_SelectingNotAllowedMoveGravity[]; extern const u8 BattleScript_MoveUsedGravityPrevents[]; extern const u8 BattleScript_SelectingNotAllowedMoveGravityInPalace[]; diff --git a/include/battle_util.h b/include/battle_util.h index 0219a0e6a..d26aa2477 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -15,6 +15,8 @@ #define MOVE_LIMITATION_BELCH (1 << 11) #define MOVE_LIMITATION_THROAT_CHOP (1 << 12) #define MOVE_LIMITATION_STUFF_CHEEKS (1 << 13) + +#define MOVE_LIMITATION_PLACEHOLDER (1 << 15) #define MOVE_LIMITATIONS_ALL 0xFFFF #define ABILITYEFFECT_ON_SWITCHIN 0 diff --git a/include/pokemon_summary_screen.h b/include/pokemon_summary_screen.h index 3996c8e15..4e9e62284 100755 --- a/include/pokemon_summary_screen.h +++ b/include/pokemon_summary_screen.h @@ -6,6 +6,7 @@ extern u8 gLastViewedMonIndex; extern const u8 *const gMoveDescriptionPointers[]; +extern const u8 gNotDoneYetDescription[]; extern const u8 *const gNatureNamePointers[]; void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void)); diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 0d029e397..c253d37fb 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -2512,6 +2512,8 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (gBattleMons[battlerAtk].hp <= gBattleMons[battlerAtk].maxHP / 3) score -= 10; break;*/ + case EFFECT_PLACEHOLDER: + return 0; // cannot even select } // move effect checks if (score < 0) diff --git a/src/battle_util.c b/src/battle_util.c index 22c319a46..6f3c16514 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -1930,6 +1930,20 @@ u8 TrySetCantSelectMoveBattleScript(void) } } + if (gBattleMoves[move].effect == EFFECT_PLACEHOLDER) + { + if (gBattleTypeFlags & BATTLE_TYPE_PALACE) + { + gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedPlaceholderInPalace; + gProtectStructs[gActiveBattler].palaceUnableToUseMove = TRUE; + } + else + { + gSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedPlaceholder; + limitations++; + } + } + return limitations; } @@ -1949,6 +1963,9 @@ u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u16 check) // No PP else if (check & MOVE_LIMITATION_PP && gBattleMons[battlerId].pp[i] == 0) unusableMoves |= gBitTable[i]; + // Placeholder + else if (check & MOVE_LIMITATION_PLACEHOLDER && gBattleMoves[gBattleMons[battlerId].moves[i]].effect == EFFECT_PLACEHOLDER) + unusableMoves |= gBitTable[i]; // Disable else if (check & MOVE_LIMITATION_DISABLED && gBattleMons[battlerId].moves[i] == gDisableStructs[battlerId].disabledMove) unusableMoves |= gBitTable[i]; diff --git a/src/data/text/move_descriptions.h b/src/data/text/move_descriptions.h index 5f6bcfb0e..7d890b1d3 100644 --- a/src/data/text/move_descriptions.h +++ b/src/data/text/move_descriptions.h @@ -2978,8 +2978,9 @@ static const u8 sEerieSpellDescription[] = _( "Attacks with psychic power.\n" "Foe's last move has 3 PP cut."); -static const u8 sNotDoneYetDescription[] = _( - "Not done yet."); +const u8 gNotDoneYetDescription[] = _( + "This move can't be used. Its\n" + "effect is in development."); // MOVE_NONE is ignored in this table. Make sure to always subtract 1 before getting the right pointer. const u8 *const gMoveDescriptionPointers[MOVES_COUNT - 1] = diff --git a/src/menu_specialized.c b/src/menu_specialized.c index 42c80b5ee..0893fd314 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -24,6 +24,7 @@ #include "trig.h" #include "window.h" #include "constants/songs.h" +#include "constants/battle_move_effects.h" #include "gba/io_reg.h" extern const struct CompressedSpriteSheet gMonFrontPicTable[]; @@ -807,7 +808,11 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove) } AddTextPrinterParameterized(0, FONT_NORMAL, str, 0x6A, 0x29, TEXT_SKIP_DRAW, NULL); - str = gMoveDescriptionPointers[chosenMove - 1]; + if (move->effect != EFFECT_PLACEHOLDER) + str = gMoveDescriptionPointers[chosenMove - 1]; + else + str = gNotDoneYetDescription; + AddTextPrinterParameterized(0, FONT_NARROW, str, 0, 0x41, 0, NULL); } diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 2befc159f..d47253b71 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -41,13 +41,14 @@ #include "text.h" #include "tv.h" #include "window.h" +#include "constants/battle_config.h" +#include "constants/battle_move_effects.h" #include "constants/items.h" #include "constants/moves.h" #include "constants/party_menu.h" #include "constants/region_map_sections.h" #include "constants/rgb.h" #include "constants/songs.h" -#include "constants/battle_config.h" enum { PSS_PAGE_INFO, @@ -3730,15 +3731,21 @@ static void PrintContestMoveDescription(u8 moveSlot) static void PrintMoveDetails(u16 move) { u8 windowId = AddWindowFromTemplateList(sPageMovesTemplate, PSS_DATA_WINDOW_MOVE_DESCRIPTION); + u8 moveEffect; FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); if (move != MOVE_NONE) { if (sMonSummaryScreen->currPageIndex == PSS_PAGE_BATTLE_MOVES) { + moveEffect = gBattleMoves[move].effect; if (B_SHOW_SPLIT_ICON == TRUE) ShowSplitIcon(GetBattleMoveSplit(move)); PrintMovePowerAndAccuracy(move); - PrintTextOnWindow(windowId, gMoveDescriptionPointers[move - 1], 6, 1, 0, 0); + + if (moveEffect != EFFECT_PLACEHOLDER) + PrintTextOnWindow(windowId, gMoveDescriptionPointers[move - 1], 6, 1, 0, 0); + else + PrintTextOnWindow(windowId, gNotDoneYetDescription, 6, 1, 0, 0); } else {