diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 05eb64d15a..4e29e3be03 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -214,27 +214,25 @@ BattleScript_EffectDoodle:: attackcanceler attackstring ppreduce + trycopyability BS_ATTACKER, BattleScript_ButItFailed attackanimation waitanimation setbyte gBattleCommunication, 0 + goto BattleScript_EffectDoodle_AfterCopy BattleScript_EffectDoodle_CopyAbility: - trycopyability BS_ATTACKER, BattleScript_ButItFailed + trycopyability BS_ATTACKER, BattleScript_MoveEnd +BattleScript_EffectDoodle_AfterCopy: .if B_ABILITY_POP_UP == TRUE - setbyte sFIXED_ABILITY_POPUP, TRUE - showabilitypopup BS_ATTACKER - pause 60 - sethword sABILITY_OVERWRITE, 0 - updateabilitypopup BS_ATTACKER - pause 20 - destroyabilitypopup - pause 40 + copybyte gBattlerAbility, gBattlerAttacker + call BattleScript_AbilityPopUpOverwriteThenNormal .endif + recordability BS_ATTACKER printstring STRINGID_PKMNCOPIEDFOE waitmessage B_WAIT_TIME_LONG switchinabilities BS_ATTACKER jumpifbyte CMP_NOT_EQUAL, gBattleCommunication, 0x0, BattleScript_MoveEnd addbyte gBattleCommunication, 1 - jumpifnoally BS_TARGET, BattleScript_MoveEnd + jumpifnoally BS_ATTACKER, BattleScript_MoveEnd setallytonextattacker BattleScript_EffectDoodle_CopyAbility goto BattleScript_MoveEnd @@ -2346,6 +2344,11 @@ BattleScript_EffectSimpleBeam:: setabilitysimple BS_TARGET, BattleScript_ButItFailed attackanimation waitanimation +.if B_ABILITY_POP_UP == TRUE + copybyte gBattlerAbility, gBattlerTarget + call BattleScript_AbilityPopUpOverwriteThenNormal +.endif + recordability BS_TARGET printstring STRINGID_PKMNACQUIREDSIMPLE waitmessage B_WAIT_TIME_LONG trytoclearprimalweather @@ -2444,11 +2447,17 @@ BattleScript_EffectWorrySeed:: tryworryseed BattleScript_ButItFailed attackanimation waitanimation +.if B_ABILITY_POP_UP == TRUE + copybyte gBattlerAbility, gBattlerTarget + call BattleScript_AbilityPopUpOverwriteThenNormal +.endif + recordability BS_TARGET printstring STRINGID_PKMNACQUIREDABILITY waitmessage B_WAIT_TIME_LONG trytoclearprimalweather tryrevertweatherform flushtextbox + tryendneutralizinggas BS_TARGET goto BattleScript_MoveEnd BattleScript_EffectPowerSplit:: @@ -5038,15 +5047,10 @@ BattleScript_EffectRolePlay:: attackanimation waitanimation .if B_ABILITY_POP_UP == TRUE - setbyte sFIXED_ABILITY_POPUP, TRUE - showabilitypopup BS_ATTACKER - pause 60 - sethword sABILITY_OVERWRITE, 0 - updateabilitypopup BS_ATTACKER - pause 20 - destroyabilitypopup - pause 40 + copybyte gBattlerAbility, gBattlerAttacker + call BattleScript_AbilityPopUpOverwriteThenNormal .endif + recordability BS_ATTACKER printstring STRINGID_PKMNCOPIEDFOE waitmessage B_WAIT_TIME_LONG switchinabilities BS_ATTACKER @@ -5189,12 +5193,17 @@ BattleScript_EffectSkillSwap:: tryswapabilities BattleScript_ButItFailed attackanimation waitanimation + jumpiftargetally BattleScript_EffectSkillSwap_AfterAbilityPopUp .if B_ABILITY_POP_UP == TRUE - call BattleScript_AbilityPopUpTarget - pause 20 copybyte gBattlerAbility, gBattlerAttacker - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpOverwriteThenNormal + copybyte gBattlerAbility, gBattlerTarget + copyhword sABILITY_OVERWRITE, gLastUsedAbility + call BattleScript_AbilityPopUpOverwriteThenNormal .endif +BattleScript_EffectSkillSwap_AfterAbilityPopUp: + recordability BS_ATTACKER + recordability BS_TARGET printstring STRINGID_PKMNSWAPPEDABILITIES waitmessage B_WAIT_TIME_LONG .if B_SKILL_SWAP >= GEN_4 @@ -7612,6 +7621,18 @@ BattleScript_AbilityPopUpScripting: sethword sABILITY_OVERWRITE, 0 return +BattleScript_AbilityPopUpOverwriteThenNormal: + setbyte sFIXED_ABILITY_POPUP, TRUE + showabilitypopup BS_ABILITY_BATTLER + pause 60 + sethword sABILITY_OVERWRITE, 0 + updateabilitypopup BS_ABILITY_BATTLER + pause 20 + recordability BS_ABILITY_BATTLER + destroyabilitypopup + pause 40 + return + BattleScript_SpeedBoostActivates:: statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_SpeedBoostActivatesEnd call BattleScript_AbilityPopUp @@ -8414,33 +8435,30 @@ BattleScript_CursedBodyActivates:: return BattleScript_MummyActivates:: - call BattleScript_AbilityPopUp +.if B_ABILITY_POP_UP == TRUE + call BattleScript_AbilityPopUpTarget + setbyte sFIXED_ABILITY_POPUP, TRUE + copybyte gBattlerAbility, gBattlerAttacker + copyhword sABILITY_OVERWRITE, gLastUsedAbility + call BattleScript_AbilityPopUpOverwriteThenNormal +.endif + recordability BS_TARGET + recordability BS_ATTACKER printstring STRINGID_ATTACKERACQUIREDABILITY waitmessage B_WAIT_TIME_LONG return BattleScript_WanderingSpiritActivates:: .if B_ABILITY_POP_UP == TRUE - setbyte sFIXED_ABILITY_POPUP, TRUE + copybyte gBattlerAbility, gBattlerTarget sethword sABILITY_OVERWRITE, ABILITY_WANDERING_SPIRIT - showabilitypopup BS_TARGET - pause 60 - sethword sABILITY_OVERWRITE, 0 - updateabilitypopup BS_TARGET - pause 20 - destroyabilitypopup - pause 40 + call BattleScript_AbilityPopUpOverwriteThenNormal copybyte gBattlerAbility, gBattlerAttacker - setbyte sFIXED_ABILITY_POPUP, TRUE copyhword sABILITY_OVERWRITE, gLastUsedAbility - showabilitypopup BS_ATTACKER - pause 60 - sethword sABILITY_OVERWRITE, 0 - updateabilitypopup BS_ATTACKER - pause 20 - destroyabilitypopup - pause 40 + call BattleScript_AbilityPopUpOverwriteThenNormal .endif + recordability BS_TARGET + recordability BS_ATTACKER printstring STRINGID_SWAPPEDABILITIES waitmessage B_WAIT_TIME_LONG switchinabilities BS_ATTACKER diff --git a/data/scripts/field_move_scripts.inc b/data/scripts/field_move_scripts.inc index 6e2450822c..0a7660b4ce 100644 --- a/data/scripts/field_move_scripts.inc +++ b/data/scripts/field_move_scripts.inc @@ -368,6 +368,23 @@ EventScript_EndSurface:: releaseall end +EventScript_DigCommon: + isfollowerfieldmoveuser VAR_0x8004 + setfieldeffectargument 3, VAR_0x8004 @ skip pose if true + dofieldeffect FLDEFF_USE_DIG + waitstate +EventScript_DigSealedChamber:: @ fallthrough + setflag FLAG_SAFE_FOLLOWER_MOVEMENT + call_if_eq VAR_0x8004, TRUE, EventScript_FollowerFieldMove + callnative DoBrailleDigEffect + releaseall + end + +@ Use Dig from party menu +EventScript_UseDig:: + lockall + goto EventScript_DigCommon + Text_CantDive: .string "The sea is deep here. A POKéMON\n" .string "may be able to go underwater.$" diff --git a/include/battle_anim.h b/include/battle_anim.h index 71f494c87b..34aad8e94b 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -346,7 +346,6 @@ extern const union AnimCmd *const gAnims_WaterPulseBubble[]; // battle_anim_flying.c void DestroyAnimSpriteAfterTimer(struct Sprite *sprite); -void sub_810E2C8(struct Sprite *sprite); void AnimAirWaveCrescent(struct Sprite *sprite); void AnimFlyBallUp(struct Sprite *sprite); void AnimFlyBallAttack(struct Sprite *sprite); diff --git a/include/event_scripts.h b/include/event_scripts.h index 91846f8ce4..60a8d6123e 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -404,6 +404,7 @@ extern const u8 EventScript_FailSweetScent[]; extern const u8 EventScript_UseFlash[]; extern const u8 EventScript_UseCut[]; extern const u8 EventScript_UseRockSmash[]; +extern const u8 EventScript_UseDig[]; //player pc extern const u8 LittlerootTown_BrendansHouse_2F_EventScript_TurnOffPlayerPC[]; diff --git a/ld_script_modern.ld b/ld_script_modern.ld index fd35a1ca31..11e53db63d 100644 --- a/ld_script_modern.ld +++ b/ld_script_modern.ld @@ -19,6 +19,7 @@ SECTIONS { { __ewram_start = .; *(.ewram*) + . = ALIGN(4); __ewram_end = .; } > EWRAM @@ -34,6 +35,7 @@ SECTIONS { { __iwram_start = .; *(.iwram*); + . = ALIGN(4); __iwram_end = .; } > IWRAM diff --git a/src/battle_main.c b/src/battle_main.c index ab84ab9079..6d6b6c5e97 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -3753,7 +3753,6 @@ static void DoBattleIntro(void) gBattleStruct->eventsBeforeFirstTurnState = 0; gBattleStruct->switchInBattlerCounter = 0; gBattleStruct->overworldWeatherDone = FALSE; - SetAiLogicDataForTurn(AI_DATA); // get assumed abilities, hold effects, etc of all battlers Ai_InitPartyStruct(); // Save mons party counts, and first 2/4 mons on the battlefield. // Try to set a status to start the battle with diff --git a/src/battle_message.c b/src/battle_message.c index 30f83b14c4..b1846594bc 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -643,7 +643,7 @@ static const u8 sText_HealingWishCameTrue[] = _("The healing wish came true\nfor static const u8 sText_HealingWishHealed[] = _("{B_ATK_NAME_WITH_PREFIX} regained health!"); static const u8 sText_LunarDanceCameTrue[] = _("{B_ATK_NAME_WITH_PREFIX} became cloaked\nin mystical moonlight!"); static const u8 sText_CursedBodyDisabled[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_BUFF1} was disabled\nby {B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY}!"); -static const u8 sText_AttackerAquiredAbility[] = _("{B_ATK_NAME_WITH_PREFIX} acquired\n{B_LAST_ABILITY}!"); +static const u8 sText_AttackerAcquiredAbility[] = _("{B_ATK_NAME_WITH_PREFIX} acquired\n{B_ATK_ABILITY}!"); static const u8 sText_TargetStatWontGoHigher[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}\nwon't go higher!"); static const u8 sText_PkmnMoveBouncedViaAbility[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_CURRENT_MOVE} was\nbounced back by {B_DEF_NAME_WITH_PREFIX}'s\l{B_DEF_ABILITY}!"); static const u8 sText_ImposterTransform[] = _("{B_ATK_NAME_WITH_PREFIX} transformed into\n{B_DEF_NAME_WITH_PREFIX} using {B_LAST_ABILITY}!"); @@ -1482,7 +1482,7 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = [STRINGID_HEALINGWISHHEALED - BATTLESTRINGS_TABLE_START] = sText_HealingWishHealed, [STRINGID_LUNARDANCECAMETRUE - BATTLESTRINGS_TABLE_START] = sText_LunarDanceCameTrue, [STRINGID_CUSEDBODYDISABLED - BATTLESTRINGS_TABLE_START] = sText_CursedBodyDisabled, - [STRINGID_ATTACKERACQUIREDABILITY - BATTLESTRINGS_TABLE_START] = sText_AttackerAquiredAbility, + [STRINGID_ATTACKERACQUIREDABILITY - BATTLESTRINGS_TABLE_START] = sText_AttackerAcquiredAbility, [STRINGID_TARGETABILITYSTATLOWER - BATTLESTRINGS_TABLE_START] = sText_TargetAbilityLoweredStat, [STRINGID_TARGETSTATWONTGOHIGHER - BATTLESTRINGS_TABLE_START] = sText_TargetStatWontGoHigher, [STRINGID_PKMNMOVEBOUNCEDABILITY - BATTLESTRINGS_TABLE_START] = sText_PkmnMoveBouncedViaAbility, diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index f55eff3b7b..a4f8d0b885 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -9854,6 +9854,7 @@ static void Cmd_various(void) if (gBattleMons[gBattlerTarget].ability == ABILITY_NEUTRALIZING_GAS) gSpecialStatuses[gBattlerTarget].neutralizingGasRemoved = TRUE; + gBattleScripting.abilityPopupOverwrite = gBattleMons[gBattlerTarget].ability; gBattleMons[gBattlerTarget].ability = gBattleStruct->overwrittenAbilities[gBattlerTarget] = ABILITY_SIMPLE; gBattlescriptCurrInstr = cmd->nextInstr; } @@ -14334,7 +14335,7 @@ static void Cmd_trycopyability(void) if (gBattleMons[battler].ability == defAbility || defAbility == ABILITY_NONE || gAbilitiesInfo[gBattleMons[battler].ability].cantBeSuppressed - || gAbilitiesInfo[gBattleMons[BATTLE_PARTNER(battler)].ability].cantBeSuppressed + || (IsBattlerAlive(BATTLE_PARTNER(battler)) && gAbilitiesInfo[gBattleMons[BATTLE_PARTNER(battler)].ability].cantBeSuppressed && gMovesInfo[gCurrentMove].effect == EFFECT_DOODLE) || gAbilitiesInfo[defAbility].cantBeCopied) { gBattlescriptCurrInstr = cmd->failInstr; @@ -14530,9 +14531,11 @@ static void Cmd_tryswapabilities(void) } else { - u16 abilityAtk = gBattleMons[gBattlerAttacker].ability; - gBattleMons[gBattlerAttacker].ability = gBattleStruct->overwrittenAbilities[gBattlerAttacker] = gBattleMons[gBattlerTarget].ability; - gBattleMons[gBattlerTarget].ability = gBattleStruct->overwrittenAbilities[gBattlerTarget] = abilityAtk; + if (GetBattlerSide(gBattlerAttacker) != GetBattlerSide(gBattlerTarget)) + gBattleScripting.abilityPopupOverwrite = gBattleMons[gBattlerAttacker].ability; + gLastUsedAbility = gBattleMons[gBattlerTarget].ability; + gBattleMons[gBattlerTarget].ability = gBattleStruct->overwrittenAbilities[gBattlerTarget] = gBattleMons[gBattlerAttacker].ability; + gBattleMons[gBattlerAttacker].ability = gBattleStruct->overwrittenAbilities[gBattlerAttacker] = gLastUsedAbility; gBattlescriptCurrInstr = cmd->nextInstr; } @@ -15824,6 +15827,7 @@ static void Cmd_tryworryseed(void) } else { + gBattleScripting.abilityPopupOverwrite = gBattleMons[gBattlerTarget].ability; gBattleMons[gBattlerTarget].ability = gBattleStruct->overwrittenAbilities[gBattlerTarget] = ABILITY_INSOMNIA; gBattlescriptCurrInstr = cmd->nextInstr; } diff --git a/src/battle_util.c b/src/battle_util.c index 2971b36840..38e4b1e61d 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5591,7 +5591,8 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32 break; } - gLastUsedAbility = gBattleMons[gBattlerAttacker].ability = gBattleStruct->overwrittenAbilities[gBattlerAttacker] = gBattleMons[gBattlerTarget].ability; + gLastUsedAbility = gBattleMons[gBattlerAttacker].ability; + gBattleMons[gBattlerAttacker].ability = gBattleStruct->overwrittenAbilities[gBattlerAttacker] = gBattleMons[gBattlerTarget].ability; BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_MummyActivates; effect++; diff --git a/src/berry.c b/src/berry.c index 1f41973e74..88278db47b 100644 --- a/src/berry.c +++ b/src/berry.c @@ -2388,6 +2388,8 @@ static u8 GetTreeMutationValue(u8 id) myMutation.asField.a = tree->mutationA; myMutation.asField.b = tree->mutationB; myMutation.asField.unused = 0; + if (myMutation.value == 0) // no mutation + return 0; return sBerryMutations[myMutation.value - 1][2]; #else return 0; diff --git a/src/braille_puzzles.c b/src/braille_puzzles.c index ab0f610fd7..757cac43b8 100644 --- a/src/braille_puzzles.c +++ b/src/braille_puzzles.c @@ -87,7 +87,6 @@ void DoBrailleDigEffect(void) DrawWholeMapView(); PlaySE(SE_BANG); FlagSet(FLAG_SYS_BRAILLE_DIG); - UnlockPlayerFieldControls(); } bool8 CheckRelicanthWailord(void) diff --git a/src/data/abilities.h b/src/data/abilities.h index 30a34ffe90..9e60122d2c 100644 --- a/src/data/abilities.h +++ b/src/data/abilities.h @@ -1514,7 +1514,7 @@ const struct Ability gAbilitiesInfo[ABILITIES_COUNT] = [ABILITY_SLUSH_RUSH] = { .name = _("Slush Rush"), - .description = COMPOUND_STRING("Raises Speed in Hail or Snow."), + .description = COMPOUND_STRING("Raises Speed in Hail/Snow."), .aiRating = 5, }, @@ -2381,7 +2381,7 @@ const struct Ability gAbilitiesInfo[ABILITIES_COUNT] = [ABILITY_TERA_SHELL] = { .name = _("Tera Shell"), - .description = COMPOUND_STRING("Resistant to types at full HP."), + .description = COMPOUND_STRING("Resists all at full HP."), .aiRating = 10, .cantBeCopied = TRUE, .cantBeSwapped = TRUE, @@ -2392,7 +2392,7 @@ const struct Ability gAbilitiesInfo[ABILITIES_COUNT] = [ABILITY_TERAFORM_ZERO] = { .name = _("Teraform Zero"), - .description = COMPOUND_STRING("Removes weather and terrain."), + .description = COMPOUND_STRING("Zeroes weather and terrain."), .aiRating = 10, .cantBeCopied = TRUE, .cantBeSwapped = TRUE, diff --git a/src/data/items.h b/src/data/items.h index c3d8469e68..3587bf5b85 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -532,9 +532,9 @@ const struct Item gItemsInfo[] = .name = _("Sport Ball"), .price = (I_PRICE < GEN_3 || I_PRICE >= GEN_9) ? 0 : 300, .description = COMPOUND_STRING( - "A special Ball used\n" - "in the Bug-Catching\n" - "Contest."), + "A special Ball\n" + "used in the Bug-\n" + "Catching Contest."), .pocket = POCKET_POKE_BALLS, .type = ITEM_USE_BAG_MENU, .battleUsage = EFFECT_ITEM_THROW_BALL, @@ -3170,9 +3170,9 @@ const struct Item gItemsInfo[] = .name = _("Jaw Fossil"), .price = (I_PRICE >= GEN_7) ? 7000: 1000, .description = COMPOUND_STRING( - "A piece of a prehis-\n" - "toric Pokémon's\n" - "large jaw."), + "A piece of a\n" + "prehistoric Poké-\n" + "mon's large jaw."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -3186,9 +3186,9 @@ const struct Item gItemsInfo[] = .name = _("Sail Fossil"), .price = (I_PRICE >= GEN_7) ? 7000: 1000, .description = COMPOUND_STRING( - "A piece of a prehis-\n" - "toric Pokémon's\n" - "skin sail."), + "A piece of a\n" + "prehistoric Poké-\n" + "mon's skin sail."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4163,8 +4163,8 @@ const struct Item gItemsInfo[] = .price = (I_PRICE >= GEN_7) ? 2000 * TREASURE_FACTOR : 2100, .description = COMPOUND_STRING( "Loved by a certain\n" - "Pokémon. Imbued with\n" - "spiritual energy."), + "Pokémon. Imbued\n" + "with spirit energy."), .pocket = POCKET_ITEMS, .type = EVO_HELD_ITEM_TYPE, .fieldUseFunc = EVO_HELD_ITEM_FIELD_FUNC, @@ -4180,8 +4180,8 @@ const struct Item gItemsInfo[] = .price = (I_PRICE >= GEN_9) ? 3000 : ((I_PRICE >= GEN_7) ? 2000 : 500), .description = COMPOUND_STRING( "A mysterious scale\n" - "that evolves certain\n" - "Pokémon. It shines."), + "that evolves a\n" + "certain Pokémon."), .pocket = POCKET_ITEMS, .type = EVO_HELD_ITEM_TYPE, .fieldUseFunc = EVO_HELD_ITEM_FIELD_FUNC, @@ -4214,8 +4214,8 @@ const struct Item gItemsInfo[] = .name = _("Sachet"), .price = (I_PRICE >= GEN_7) ? 2000 * TREASURE_FACTOR : 2100, .description = COMPOUND_STRING( - "A sachet filled with\n" - "perfumes loved by\n" + "A sachet of strong\n" + "perfumes, loved by\n" "a certain Pokémon."), .pocket = POCKET_ITEMS, .type = EVO_HELD_ITEM_TYPE, @@ -4231,9 +4231,9 @@ const struct Item gItemsInfo[] = .name = _("Oval Stone"), .price = (I_PRICE >= GEN_7) ? 2000 : 2100, .description = COMPOUND_STRING( - "Makes a certain\n" - "Pokémon evolve. It's\n" - "shaped like an egg."), + "Peculiar stone\n" + "that evolves a\n" + "certain Pokémon."), .pocket = POCKET_ITEMS, .type = EVO_HELD_ITEM_TYPE, .fieldUseFunc = EVO_HELD_ITEM_FIELD_FUNC, @@ -4743,8 +4743,8 @@ const struct Item gItemsInfo[] = .holdEffect = HOLD_EFFECT_PLATE, .holdEffectParam = 20, .description = COMPOUND_STRING( - "A stone tablet that\n" - "boosts the power of\n" + "A tablet that ups\n" + "the power of\n" "Fairy-type moves."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, @@ -4939,7 +4939,7 @@ const struct Item gItemsInfo[] = .holdEffect = HOLD_EFFECT_MEMORY, .holdEffectParam = 0, .description = COMPOUND_STRING( - "A disc with Fighting\n" + "Disc with Fighting\n" "type data. It swaps\n" "Silvally's type."), .pocket = POCKET_ITEMS, @@ -7047,9 +7047,9 @@ const struct Item gItemsInfo[] = .price = (I_PRICE >= GEN_7) ? 1000 : 10, .holdEffect = HOLD_EFFECT_QUICK_POWDER, .description = COMPOUND_STRING( - "An item to be held\n" - "by Ditto. This odd\n" - "powder boosts Speed."), + "A hold item that\n" + "raises the Speed\n" + "of Ditto."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -7126,9 +7126,9 @@ const struct Item gItemsInfo[] = .holdEffect = HOLD_EFFECT_ADAMANT_ORB, .holdEffectParam = 20, .description = COMPOUND_STRING( - "Boosts the power of\n" - "Dialga's Dragon and\n" - "Steel-type moves."), + "Powers up Dialga's\n" + "Dragon and Steel-\n" + "type moves."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -7144,9 +7144,9 @@ const struct Item gItemsInfo[] = .holdEffect = HOLD_EFFECT_LUSTROUS_ORB, .holdEffectParam = 20, .description = COMPOUND_STRING( - "Boosts the power of\n" - "Palkia's Dragon and\n" - "Water-type moves."), + "Powers up Palkia's\n" + "Dragon and Water-\n" + "type moves."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -7162,7 +7162,7 @@ const struct Item gItemsInfo[] = .holdEffect = HOLD_EFFECT_GRISEOUS_ORB, .holdEffectParam = 20, .description = COMPOUND_STRING( - "Powers up Giratina's\n" + "Boosts Giratina's\n" "Dragon and Ghost-\n" "type moves."), .pocket = POCKET_ITEMS, @@ -8101,9 +8101,9 @@ const struct Item gItemsInfo[] = .holdEffect = HOLD_EFFECT_CELL_BATTERY, .holdEffectParam = 0, .description = COMPOUND_STRING( - "Raises Atk if the\n" - "holder is hit by an\n" - "Electric-type move."), + "Raises Attack if\n" + "the holder is hit by\n" + "an Electric move."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -8448,8 +8448,8 @@ const struct Item gItemsInfo[] = .holdEffectParam = 10, .description = COMPOUND_STRING( "A headband that\n" - "boosts the power of\n" - "physical moves."), + "boosts the power\n" + "of physical moves."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -8519,9 +8519,9 @@ const struct Item gItemsInfo[] = .price = (I_PRICE >= GEN_9) ? 50000 : ((I_PRICE >= GEN_7) ? 4000 : 200), .holdEffect = HOLD_EFFECT_LIFE_ORB, .description = COMPOUND_STRING( - "Boosts the power of\n" - "moves at the cost\n" - "of some HP per turn."), + "Boosts move power\n" + "but holder loses HP\n" + "with each attack."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -8608,9 +8608,9 @@ const struct Item gItemsInfo[] = .price = (I_PRICE >= GEN_9) ? 20000 : ((I_PRICE >= GEN_7) ? 4000 : 200), .holdEffect = HOLD_EFFECT_IRON_BALL, .description = COMPOUND_STRING( - "Cuts Speed and lets\n" - "Flying-types be hit\n" - "by Ground moves."), + "Cuts Speed and\n" + "becomes vulnerable\n" + "to Ground moves."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -8657,9 +8657,9 @@ const struct Item gItemsInfo[] = .price = (I_PRICE >= GEN_9) ? 10000 : ((I_PRICE >= GEN_7) ? 4000 : 200), .holdEffect = HOLD_EFFECT_BLACK_SLUDGE, .description = COMPOUND_STRING( - "Gradually restores\n" - "HP of Poison-types.\n" - "Damages others."), + "Restores HP for\n" + "Poison-types.\n" + "Damages all others."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -8674,9 +8674,9 @@ const struct Item gItemsInfo[] = .price = (I_PRICE >= GEN_9) ? 10000 : ((I_PRICE >= GEN_7) ? 4000 : 200), .holdEffect = HOLD_EFFECT_GRIP_CLAW, .description = COMPOUND_STRING( - "Makes binding moves\n" - "used by the holder\n" - "go on for 7 turns."), + "A held item that\n" + "extends binding\n" + "moves like Wrap."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -8692,8 +8692,8 @@ const struct Item gItemsInfo[] = .holdEffect = HOLD_EFFECT_STICKY_BARB, .description = COMPOUND_STRING( "Damages the holder\n" - "each turn. May latch\n" - "on to foes."), + "each turn. May\n" + "latch on to foes."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -8708,9 +8708,9 @@ const struct Item gItemsInfo[] = .price = (I_PRICE >= GEN_9) ? 20000 : ((I_PRICE >= GEN_7) ? 4000 : 100), .holdEffect = HOLD_EFFECT_SHED_SHELL, .description = COMPOUND_STRING( - "Enables the holder\n" - "to switch out of\n" - "battle without fail."), + "Allows the holder\n" + "to switch out\n" + "without fail."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -8727,7 +8727,7 @@ const struct Item gItemsInfo[] = .holdEffectParam = 30, .description = COMPOUND_STRING( "A held item that\n" - "boosts the power of\n" + "ups the power of\n" "HP-stealing moves."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, @@ -8831,9 +8831,9 @@ const struct Item gItemsInfo[] = .holdEffect = HOLD_EFFECT_AIR_BALLOON, .holdEffectParam = 0, .description = COMPOUND_STRING( - "Elevates the holder\n" - "in the air. If hit,\n" - "this item will burst."), + "Makes the holder\n" + "float but bursts\n" + "if hit by an attack."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -8867,9 +8867,9 @@ const struct Item gItemsInfo[] = .holdEffect = HOLD_EFFECT_RING_TARGET, .holdEffectParam = 0, .description = COMPOUND_STRING( - "Moves that wouldn't\n" - "have effect will\n" - "land on its holder."), + "Moves that usually\n" + "have no effect will\n" + "hit the holder."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -8921,9 +8921,9 @@ const struct Item gItemsInfo[] = .holdEffect = HOLD_EFFECT_WEAKNESS_POLICY, .holdEffectParam = 0, .description = COMPOUND_STRING( - "If hit by a Super\n" - "Effective move, ups\n" - "Atk and Sp. Atk."), + "If hit by a super-\n" + "effective move,\n" + "ups Atk and Sp. Atk."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -8974,9 +8974,9 @@ const struct Item gItemsInfo[] = .price = (I_PRICE >= GEN_9) ? 5000 : ((I_PRICE >= GEN_8) ? 4000 : 300), .holdEffect = HOLD_EFFECT_ADRENALINE_ORB, .description = COMPOUND_STRING( - "Boosts Speed if the\n" - "user is intimidated,\n" - "but only one time."), + "This orb boosts\n" + "Speed if the holder\n" + "is intimidated."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -13037,9 +13037,9 @@ const struct Item gItemsInfo[] = .price = 20000, .holdEffect = HOLD_EFFECT_COVERT_CLOAK, .description = COMPOUND_STRING( - "Protects the holder\n" - "from secondary\n" - "move effects."), + "Protects holder\n" + "from additional\n" + "effects of moves."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -14004,11 +14004,11 @@ const struct Item gItemsInfo[] = .description = COMPOUND_STRING( #if B_X_ITEMS_BUFF >= GEN_7 "Sharply raises\n" - "offenses & defenses\n" + "offense & defense\n" "during one battle."), #else - "Raises offenses\n" - "and defenses during\n" + "Raises offense\n" + "and defense during\n" "one battle."), #endif .pocket = POCKET_ITEMS, @@ -14063,9 +14063,9 @@ const struct Item gItemsInfo[] = .name = _("Pokéshi Doll"), .price = 2000, .description = COMPOUND_STRING( - "A wooden toy carved\n" - "in the image of a\n" - "Pokémon. Can be sold."), + "A wooden toy\n" + "resembling a Poké-.\n" + "mon. Can be sold."), .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, diff --git a/src/data/moves_info.h b/src/data/moves_info.h index f42886bf61..1665749d23 100644 --- a/src/data/moves_info.h +++ b/src/data/moves_info.h @@ -14192,8 +14192,8 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] = { .name = COMPOUND_STRING("Parabolic Charge"), .description = COMPOUND_STRING( - "Damages adjacent Pokémon and\n" - "heals up by half of it."), + "Damages adjacent Pokémon\n" + "and heals up by half of it."), .effect = EFFECT_ABSORB, .power = B_UPDATED_MOVE_DATA >= GEN_7 ? 65 : 50, .type = TYPE_ELECTRIC, @@ -16751,7 +16751,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] = .name = COMPOUND_STRING("Plasma Fists"), .description = COMPOUND_STRING( "Hits with electrical fists.\n" - "Normal moves become Electric."), + "Normal moves turn Electric."), .effect = EFFECT_PLASMA_FISTS, .power = 100, .type = TYPE_ELECTRIC, @@ -17110,8 +17110,8 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] = { .name = COMPOUND_STRING("Dynamax Cannon"), .description = COMPOUND_STRING( - "Fires a strong beam. Deals\n" - "2x damage to Dynamaxed foes."), + "Unleashes core energy.\n" + "2x against Dynamaxed foes."), .effect = EFFECT_DYNAMAX_DOUBLE_DMG, .power = 100, .type = TYPE_DRAGON, @@ -18631,8 +18631,8 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] = { .name = COMPOUND_STRING("Glacial Lance"), .description = COMPOUND_STRING( - "Strikes by hurling a blizzard-\n" - "cloaked icicle lance at foes."), + "Hurls a blizzard-cloaked\n" + "icicle lance at foes."), .effect = EFFECT_HIT, .power = B_UPDATED_MOVE_DATA >= GEN_9 ? 120 : 130, .type = TYPE_ICE, @@ -18653,8 +18653,8 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] = { .name = COMPOUND_STRING("Astral Barrage"), .description = COMPOUND_STRING( - "Strikes by sending a frightful\n" - "amount of ghosts at foes."), + "Sends a frightful amount\n" + "of small ghosts at foes."), .effect = EFFECT_HIT, .power = 120, .type = TYPE_GHOST, @@ -20380,8 +20380,8 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] = { .name = COMPOUND_STRING("Electro Shot"), .description = COMPOUND_STRING( - "Absorbs electricity in one turn,\n" - "then attacks next turn."), + "Gathers electricity, then\n" + "fires a high-voltage shot."), .effect = EFFECT_TWO_TURNS_ATTACK, .power = 130, .type = TYPE_ELECTRIC, @@ -20403,8 +20403,8 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] = { .name = COMPOUND_STRING("Tera Starstorm"), .description = COMPOUND_STRING( - "Damages all opponents if user is\n" - "Stellar form Terapagos."), + "In Terapagos's Stellar\n" + "Form, it hits all foes."), .effect = EFFECT_TERA_STARSTORM, .power = 120, .type = TYPE_NORMAL, @@ -20551,8 +20551,8 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] = { .name = COMPOUND_STRING("Alluring Voice"), .description = COMPOUND_STRING( - "Confuses the target if their\n" - "stats were boosted this turn."), + "Confuses foe if its stats\n" + "were boosted this turn."), .effect = EFFECT_HIT, .power = 80, .type = TYPE_FAIRY, diff --git a/src/data/pokemon/species_info/gen_2_families.h b/src/data/pokemon/species_info/gen_2_families.h index ae5a69439a..12be3b0576 100644 --- a/src/data/pokemon/species_info/gen_2_families.h +++ b/src/data/pokemon/species_info/gen_2_families.h @@ -4122,8 +4122,8 @@ const struct SpeciesInfo gSpeciesInfoGen2[] = .weight = 474, .description = COMPOUND_STRING( "A recent study uncovered that the\n" - "number of segments a\n" - "Dudunsparce's body has is determined by the\n" + "number of segments a Dudunsparce's\n" + "body has is determined by the\n" "Pokémon's genes."), .pokemonScale = 356, .pokemonOffset = 17, diff --git a/src/data/pokemon/species_info/gen_3_families.h b/src/data/pokemon/species_info/gen_3_families.h index 002e0d460c..79b65de85d 100644 --- a/src/data/pokemon/species_info/gen_3_families.h +++ b/src/data/pokemon/species_info/gen_3_families.h @@ -4699,9 +4699,9 @@ const struct SpeciesInfo gSpeciesInfoGen3[] = .weight = 315, .description = COMPOUND_STRING( "It uses its amped-up willpower to create\n" - "additional arms for itself. The more it has\n" - "trained its spirit, the more realistic and\n" - "dexterous these self-created arms become."), + "additional arms for itself. The more it\n" + "has trained its spirit, the more realistic\n" + "and dexterous these arms become."), .pokemonScale = 298, .pokemonOffset = 5, .trainerScale = 256, diff --git a/src/data/pokemon/species_info/gen_4_families.h b/src/data/pokemon/species_info/gen_4_families.h index fd7b8c0f70..f35e74c151 100644 --- a/src/data/pokemon/species_info/gen_4_families.h +++ b/src/data/pokemon/species_info/gen_4_families.h @@ -569,10 +569,10 @@ const struct SpeciesInfo gSpeciesInfoGen4[] = .height = 17, .weight = 845, .description = COMPOUND_STRING( - "The three horns that extend from its beak\n" - "attest to its power. It avoids unnecessary\n" - "disputes, but it will decimate anything\n" - "that threatens its pride."), + "The three horns that extend from its\n" + "beak attest to its power. It avoids\n" + "unnecessary disputes, but it will decimate\n" + "anything that threatens its pride."), .pokemonScale = 259, .pokemonOffset = 0, .trainerScale = 290, @@ -5096,10 +5096,10 @@ const struct SpeciesInfo gSpeciesInfoGen4[] = .height = 3, .weight = 3, .description = COMPOUND_STRING( - "If the convection microwave oven is not\n" - "working properly, then the Rotom inhabiting\n" - "it will become lethargic. It will gleefully\n" - "burn your favorite outfit in mischief."), + "If the convection microwave oven is\n" + "not working properly, then the Rotom\n" + "inhabiting it will become lethargic. It\n" + "makes mischief by turning up the heat."), .pokemonScale = 530, .pokemonOffset = 13, .trainerScale = 256, diff --git a/src/data/pokemon/species_info/gen_5_families.h b/src/data/pokemon/species_info/gen_5_families.h index 87c1bf561c..5c76dd0716 100644 --- a/src/data/pokemon/species_info/gen_5_families.h +++ b/src/data/pokemon/species_info/gen_5_families.h @@ -10520,10 +10520,10 @@ const struct SpeciesInfo gSpeciesInfoGen5[] = .height = 14, .weight = 580, .description = COMPOUND_STRING( - "It draws in air through its tail, transforms\n" - "it into fire, and uses it like a tongue.\n" - "They burn through Durant's steel bodies\n" - "and consume their insides."), + "It draws in air through its tail,\n" + "transforms it into fire, and uses it like\n" + "a tongue. They burn through Durant's steel\n" + "bodies and consume their insides."), .pokemonScale = 265, .pokemonOffset = 2, .trainerScale = 262, @@ -11360,10 +11360,10 @@ const struct SpeciesInfo gSpeciesInfoGen5[] = .height = 30, .weight = 610, .description = COMPOUND_STRING( - "It pulverizes foes into\n" - "nothingness with showers of devastatingly\n" - "powerful lightning bolts launched from\n" - "the string of orbs on its tail."), + "It pulverizes foes into nothingness\n" + "with showers of devastatingly\n" + "powerful lightning bolts launched\n" + "from the string of orbs on its tail."), .pokemonScale = 268, .pokemonOffset = 2, .trainerScale = 271, @@ -11560,9 +11560,9 @@ const struct SpeciesInfo gSpeciesInfoGen5[] = .height = 15, .weight = 680, .description = COMPOUND_STRING( - "The energy that comes pouring from its tail\n" - "increases the nutrition in the soil, making\n" - "crops grow to great size. It has been\n" + "The energy that comes pouring from its\n" + "tail increases the nutrition in the soil,\n" + "granting bountiful crops. It has been\n" "hailed as “The Guardian of the Fields.”"), .pokemonScale = 268, .pokemonOffset = 2, diff --git a/src/data/pokemon/species_info/gen_6_families.h b/src/data/pokemon/species_info/gen_6_families.h index 47df7969ca..befac86c5c 100644 --- a/src/data/pokemon/species_info/gen_6_families.h +++ b/src/data/pokemon/species_info/gen_6_families.h @@ -650,11 +650,7 @@ const struct SpeciesInfo gSpeciesInfoGen6[] = .categoryName = _("Ninja"), .height = 15, .weight = 400, - .description = COMPOUND_STRING( - "It appears and vanishes with a ninja's\n" - "grace. It toys with its enemies using swift\n" - "movements, while slicing them with throwing\n" - "stars made of compressed water."), + .description = gGreninjaPokedexText, .pokemonScale = 268, .pokemonOffset = 2, .trainerScale = 271, @@ -1836,8 +1832,8 @@ const struct SpeciesInfo gSpeciesInfoGen6[] = { FLORGES_MISC_INFO(Red, 0), .description = COMPOUND_STRING( - "This Pokémon creates an\n" - "impressive flower garden in its territory. It\n" + "This Pokémon creates an impressive\n" + "flower garden in its territory. It\n" "draws forth the power of the red\n" "flowers around its neck."), }, @@ -4280,8 +4276,8 @@ const struct SpeciesInfo gSpeciesInfoGen6[] = .height = 17, .weight = 3341, .description = COMPOUND_STRING( - "It loathes solitude and is\n" - "extremely clingy-it will fume and run riot if\n" + "It loathes solitude and is extremely\n" + "clingy--it will fume and run riot if\n" "those dearest to it ever leave its\n" "side."), .pokemonScale = 261, @@ -5322,9 +5318,9 @@ const struct SpeciesInfo gSpeciesInfoGen6[] = .weight = 850, .description = COMPOUND_STRING( "They fly around on moonless nights and\n" - "attack careless prey. The ultrasonic waves\n" - "it emits from its ears can reduce a large\n" - "boulder to pebbles."), + "attack careless prey. The ultrasonic\n" + "waves it emits from its ears can reduce\n" + "a large boulder to pebbles."), .pokemonScale = 268, .pokemonOffset = 2, .trainerScale = 271, diff --git a/src/data/pokemon/species_info/gen_7_families.h b/src/data/pokemon/species_info/gen_7_families.h index c6f0e0faf3..3dba85be85 100644 --- a/src/data/pokemon/species_info/gen_7_families.h +++ b/src/data/pokemon/species_info/gen_7_families.h @@ -3890,8 +3890,8 @@ const struct SpeciesInfo gSpeciesInfoGen7[] = .height = 5, .weight = 700, .description = COMPOUND_STRING( - "It takes control of anyone who puts a hand\n" - "in its mouth, to add to the accumulation\n" + "It takes control of anyone who puts a\n" + "hand in its mouth, to add to the pile\n" "of its sand-mound body. This Pokémon\n" "embodies the grudges of the departed."), .pokemonScale = 432, @@ -6335,10 +6335,10 @@ const struct SpeciesInfo gSpeciesInfoGen7[] = .height = 38, .weight = 4600, .description = COMPOUND_STRING( - "This is its form while it is\n" - "devouring the light of Solgaleo. It pounces\n" - "on foes and then slashes them with\n" - "the claws on its four limbs and back."), + "This is its form while it is devouring\n" + "the light of Solgaleo. It pounces on\n" + "foes and then slashes them with the\n" + "claws on its four limbs and back."), .pokemonScale = 256, .pokemonOffset = 3, .trainerScale = 369, @@ -7125,9 +7125,9 @@ const struct SpeciesInfo gSpeciesInfoGen7[] = .height = 25, .weight = 800, .description = COMPOUND_STRING( - "Revered long ago for its capacity to create\n" - "iron from nothing, for some reason it has\n" - "come back to life after 3,000 years."), + "Revered long ago for its capacity to\n" + "create iron from nothing, for some reason\n" + "it has come back to life after 3,000 years."), .pokemonScale = 257, .pokemonOffset = 10, .trainerScale = 423, diff --git a/src/data/pokemon/species_info/gen_8_families.h b/src/data/pokemon/species_info/gen_8_families.h index 0794527921..7df9c777e7 100644 --- a/src/data/pokemon/species_info/gen_8_families.h +++ b/src/data/pokemon/species_info/gen_8_families.h @@ -899,8 +899,8 @@ const struct SpeciesInfo gSpeciesInfoGen8[] = .description = COMPOUND_STRING( "It will bravely challenge any opponent,\n" "no matter how powerful. This Pokémon\n" - "benefits from every battle--even a defeat\n" - "increases its strength a bit."), + "benefits from every battle--even a\n" + "defeat increases its strength a bit."), .pokemonScale = 682, .pokemonOffset = 24, .trainerScale = 256, @@ -1339,8 +1339,8 @@ const struct SpeciesInfo gSpeciesInfoGen8[] = .height = 140, .weight = 0, .description = COMPOUND_STRING( - "Its brain has grown to a\n" - "gargantuan size, as has the rest of its body.\n" + "Its brain has grown to a gargantuan\n" + "size, as has the rest of its body.\n" "This Pokémon's intellect and\n" "psychic abilities are overpowering."), .pokemonScale = 491, @@ -3680,9 +3680,9 @@ const struct SpeciesInfo gSpeciesInfoGen8[] = .weight = 0, .description = COMPOUND_STRING( "The heat that comes off a\n" - "Gigantamax Centiskorch may destabilize air\n" - "currents. Sometimes it can even\n" - "cause storms."), + "Gigantamax Centiskorch may\n" + "destabilize air currents. Sometimes\n" + "it can even cause storms."), .pokemonScale = 275, .pokemonOffset = 7, .trainerScale = 256, @@ -4364,9 +4364,9 @@ const struct SpeciesInfo gSpeciesInfoGen8[] = .weight = 55, .description = COMPOUND_STRING( "Through its nose, it sucks in the\n" - "emanations produced by people and Pokémon\n" - "when they feel annoyed. It thrives off\n" - "this negative energy."), + "emanations produced by people and\n" + "Pokémon when they feel annoyed. It\n" + "thrives off this negative energy."), .pokemonScale = 491, .pokemonOffset = 12, .trainerScale = 256, @@ -5667,9 +5667,9 @@ const struct SpeciesInfo gSpeciesInfoGen8[] = .height = 230, .weight = 0, .description = COMPOUND_STRING( - "After this Pokémon has\n" - "Gigantamaxed, its massive nose can utterly\n" - "demolish large structures with a single\n" + "After this Pokémon has Gigantamaxed,\n" + "its massive nose can utterly demolish\n" + "large structures with a single\n" "smashing blow."), .pokemonScale = 275, .pokemonOffset = 7, @@ -6356,8 +6356,8 @@ const struct SpeciesInfo gSpeciesInfoGen8[] = .weight = 1100, .description = COMPOUND_STRING( "Known as a legendary hero, this Pokémon\n" - "absorbs metal particles, transforming them\n" - "into a weapon it uses to battle."), + "absorbs metal particles, transforming\n" + "them into a weapon it uses to battle."), .pokemonScale = 275, .pokemonOffset = 7, .trainerScale = 256, diff --git a/src/data/pokemon/species_info/gen_9_families.h b/src/data/pokemon/species_info/gen_9_families.h index e0346d63a9..ae99f198a6 100644 --- a/src/data/pokemon/species_info/gen_9_families.h +++ b/src/data/pokemon/species_info/gen_9_families.h @@ -1035,8 +1035,8 @@ const struct SpeciesInfo gSpeciesInfoGen9[] = .height = 3, .weight = 25, .description = COMPOUND_STRING( - "The pads of its paws are\n" - "electricity-discharging organs. Pawmi fires\n" + "The pads of its paws are electricity-\n" + "discharging organs. Pawmi fires\n" "electricity from its forepaws while\n" "standing unsteadily on its hind legs."), .pokemonScale = 356, @@ -4002,8 +4002,8 @@ const struct SpeciesInfo gSpeciesInfoGen9[] = .height = 13, .weight = 602, .description = COMPOUND_STRING( - "This Pokémon changes its\n" - "appearance if it hears its allies calling for\n" + "This Pokémon changes its appearance\n" + "if it hears its allies calling for\n" "help. Palafin will never show\n" "anybody its moment of transformation."), .pokemonScale = 356, @@ -4066,8 +4066,8 @@ const struct SpeciesInfo gSpeciesInfoGen9[] = .weight = 974, .description = COMPOUND_STRING( "This Pokémon's ancient genes have\n" - "awakened. It is now so\n" - "extraordinarily strong that it can easily lift a\n" + "awakened. It is now so extraordinarily\n" + "strong that it can easily lift a\n" "cruise ship with one fin."), .pokemonScale = 356, .pokemonOffset = 17, diff --git a/src/data/pokemon/species_info/shared_dex_text.h b/src/data/pokemon/species_info/shared_dex_text.h index 0c591bd811..bf7e12aefb 100644 --- a/src/data/pokemon/species_info/shared_dex_text.h +++ b/src/data/pokemon/species_info/shared_dex_text.h @@ -73,9 +73,9 @@ const u8 gGenesectPokedexText[] = _( // Gen 6 families const u8 gGreninjaPokedexText[] = _( "It appears and vanishes with a ninja's\n" - "grace. It toys with its enemies using swift\n" - "movements, while slicing them with throwing\n" - "stars made of compressed water."); + "grace. It toys with its enemies using\n" + "swift movements, while slicing them with\n" + "throwing stars made of compressed water."); const u8 gScatterbugPokedexText[] = _( "When under attack from bird Pokémon,\n" @@ -207,7 +207,7 @@ const u8 gKommoOPokedexText[] = _( // Gen 8 families const u8 gAlcremieVanillaCreamPokedexText[] = _( "If Alcremie is content, the secreted cream\n" - "from its hands becomes sweeter and richer." + "from its hands becomes sweeter and richer.\n" "When it trusts a Trainer, it will treat\n" "them to berries it's decorated with cream."); @@ -279,8 +279,8 @@ const u8 gOgerponWellspringMaskPokedexText[] = _( const u8 gOgerponHearthflameMaskPokedexText[] = _( "This form is the most aggressive,\n" - "bombarding enemies with the\n" - "intensity of flames blazing within a hearth."); + "bombarding enemies with the intensity\n" + "of flames blazing within a hearth."); const u8 gOgerponCornerstoneMaskPokedexText[] = _( "In this form, it draws on the power\n" diff --git a/src/fldeff_dig.c b/src/fldeff_dig.c index c3ab989cd8..63eb848bf2 100644 --- a/src/fldeff_dig.c +++ b/src/fldeff_dig.c @@ -1,11 +1,13 @@ #include "global.h" #include "braille_puzzles.h" +#include "event_scripts.h" #include "field_effect.h" #include "field_player_avatar.h" #include "fldeff.h" #include "item_use.h" #include "overworld.h" #include "party_menu.h" +#include "script.h" #include "sprite.h" #include "constants/field_effects.h" @@ -31,8 +33,8 @@ bool8 SetUpFieldMove_Dig(void) static void FieldCallback_Dig(void) { Overworld_ResetStateAfterDigEscRope(); - FieldEffectStart(FLDEFF_USE_DIG); gFieldEffectArguments[0] = GetCursorSelectionMonId(); + ScriptContext_SetupScript(EventScript_UseDig); } bool8 FldEff_UseDig(void) @@ -53,7 +55,8 @@ static void StartDigFieldEffect(void) FieldEffectActiveListRemove(FLDEFF_USE_DIG); if (ShouldDoBrailleDigEffect()) { - DoBrailleDigEffect(); + // EventScript_DigSealedChamber handles DoBrailleDigEffect call + ScriptContext_Enable(); } else { diff --git a/src/pokemon.c b/src/pokemon.c index 84e0688c6b..90e66389f3 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -61,7 +61,7 @@ #include "constants/weather.h" #include "wild_encounter.h" -#define FRIENDSHIP_EVO_THRESHOLD ((P_FRIENDSHIP_EVO_THRESHOLD >= GEN_9) ? 160 : 220) +#define FRIENDSHIP_EVO_THRESHOLD ((P_FRIENDSHIP_EVO_THRESHOLD >= GEN_8) ? 160 : 220) struct SpeciesItem { diff --git a/test/battle/ability/mummy.c b/test/battle/ability/mummy.c index b6323e83ee..74461ec2ee 100644 --- a/test/battle/ability/mummy.c +++ b/test/battle/ability/mummy.c @@ -70,19 +70,19 @@ SINGLE_BATTLE_TEST("Mummy doesn't replace abilities that can't be suppressed") PARAMETRIZE { species = SPECIES_ARCEUS; ability = ABILITY_MULTITYPE; } PARAMETRIZE { species = SPECIES_AEGISLASH; ability = ABILITY_STANCE_CHANGE; } - PARAMETRIZE { species = SPECIES_WISHIWASHI; ability = ABILITY_SCHOOLING; } - PARAMETRIZE { species = SPECIES_KOMALA; ability = ABILITY_COMATOSE; } PARAMETRIZE { species = SPECIES_MINIOR; ability = ABILITY_SHIELDS_DOWN; } + PARAMETRIZE { species = SPECIES_WISHIWASHI; ability = ABILITY_SCHOOLING; } PARAMETRIZE { species = SPECIES_MIMIKYU; ability = ABILITY_DISGUISE; } - PARAMETRIZE { species = SPECIES_SILVALLY; ability = ABILITY_RKS_SYSTEM; } PARAMETRIZE { species = SPECIES_GRENINJA_BATTLE_BOND; ability = ABILITY_BATTLE_BOND; } PARAMETRIZE { species = SPECIES_ZYGARDE; ability = ABILITY_POWER_CONSTRUCT; } - PARAMETRIZE { species = SPECIES_EISCUE; ability = ABILITY_ICE_FACE; } + PARAMETRIZE { species = SPECIES_KOMALA; ability = ABILITY_COMATOSE; } + PARAMETRIZE { species = SPECIES_SILVALLY; ability = ABILITY_RKS_SYSTEM; } PARAMETRIZE { species = SPECIES_CRAMORANT; ability = ABILITY_GULP_MISSILE; } + PARAMETRIZE { species = SPECIES_EISCUE; ability = ABILITY_ICE_FACE; } + PARAMETRIZE { species = SPECIES_CALYREX_ICE; ability = ABILITY_AS_ONE_ICE_RIDER; } + PARAMETRIZE { species = SPECIES_CALYREX_SHADOW; ability = ABILITY_AS_ONE_SHADOW_RIDER; } PARAMETRIZE { species = SPECIES_PALAFIN_ZERO; ability = ABILITY_ZERO_TO_HERO; } PARAMETRIZE { species = SPECIES_TATSUGIRI; ability = ABILITY_COMMANDER; } - PARAMETRIZE { species = SPECIES_CALYREX_SHADOW; ability = ABILITY_AS_ONE_SHADOW_RIDER; } - PARAMETRIZE { species = SPECIES_CALYREX_ICE; ability = ABILITY_AS_ONE_ICE_RIDER; } GIVEN { PLAYER(SPECIES_YAMASK); diff --git a/test/battle/move_effect/doodle.c b/test/battle/move_effect/doodle.c index bf7e208646..ba7729a895 100644 --- a/test/battle/move_effect/doodle.c +++ b/test/battle/move_effect/doodle.c @@ -35,8 +35,8 @@ DOUBLE_BATTLE_TEST("Doodle can't copy a banned ability") } WHEN { TURN { MOVE(playerLeft, MOVE_DOODLE, target: opponentLeft); } } SCENE { - ANIMATION(ANIM_TYPE_MOVE, MOVE_DOODLE, playerLeft); NONE_OF { + ANIMATION(ANIM_TYPE_MOVE, MOVE_DOODLE, playerLeft); MESSAGE("Wynaut copied Foe Great Tusk's Protosynthesis!"); MESSAGE("Wynaut copied Foe Great Tusk's Protosynthesis!"); } @@ -56,7 +56,7 @@ DOUBLE_BATTLE_TEST("Doodle fails if user has a banned Ability") } WHEN { TURN { MOVE(playerLeft, MOVE_DOODLE, target: opponentLeft); } } SCENE { - ANIMATION(ANIM_TYPE_MOVE, MOVE_DOODLE, playerLeft); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_DOODLE, playerLeft); MESSAGE("But it failed!"); } THEN { EXPECT(playerLeft->ability == ABILITY_GULP_MISSILE); @@ -74,10 +74,44 @@ DOUBLE_BATTLE_TEST("Doodle fails if partner has a banned Ability") } WHEN { TURN { MOVE(playerLeft, MOVE_DOODLE, target: opponentLeft); } } SCENE { - ANIMATION(ANIM_TYPE_MOVE, MOVE_DOODLE, playerLeft); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_DOODLE, playerLeft); MESSAGE("But it failed!"); } THEN { EXPECT(playerLeft->ability == ABILITY_SHADOW_TAG); EXPECT(playerRight->ability == ABILITY_GULP_MISSILE); } } + +DOUBLE_BATTLE_TEST("Doodle fails if ally's ability can't be suppressed") +{ + u32 species, ability; + + PARAMETRIZE { species = SPECIES_ARCEUS; ability = ABILITY_MULTITYPE; } + PARAMETRIZE { species = SPECIES_DARMANITAN; ability = ABILITY_ZEN_MODE; } + PARAMETRIZE { species = SPECIES_AEGISLASH; ability = ABILITY_STANCE_CHANGE; } + PARAMETRIZE { species = SPECIES_MINIOR; ability = ABILITY_SHIELDS_DOWN; } + PARAMETRIZE { species = SPECIES_WISHIWASHI; ability = ABILITY_SCHOOLING; } + PARAMETRIZE { species = SPECIES_MIMIKYU; ability = ABILITY_DISGUISE; } + PARAMETRIZE { species = SPECIES_GRENINJA_BATTLE_BOND; ability = ABILITY_BATTLE_BOND; } + PARAMETRIZE { species = SPECIES_ZYGARDE; ability = ABILITY_POWER_CONSTRUCT; } + PARAMETRIZE { species = SPECIES_KOMALA; ability = ABILITY_COMATOSE; } + PARAMETRIZE { species = SPECIES_SILVALLY; ability = ABILITY_RKS_SYSTEM; } + PARAMETRIZE { species = SPECIES_CRAMORANT; ability = ABILITY_GULP_MISSILE; } + PARAMETRIZE { species = SPECIES_EISCUE; ability = ABILITY_ICE_FACE; } + PARAMETRIZE { species = SPECIES_CALYREX_ICE; ability = ABILITY_AS_ONE_ICE_RIDER; } + PARAMETRIZE { species = SPECIES_CALYREX_SHADOW; ability = ABILITY_AS_ONE_SHADOW_RIDER; } + PARAMETRIZE { species = SPECIES_PALAFIN_ZERO; ability = ABILITY_ZERO_TO_HERO; } + PARAMETRIZE { species = SPECIES_TATSUGIRI; ability = ABILITY_COMMANDER; } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); } + PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); } + OPPONENT(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); } + OPPONENT(species) { Ability(ability); } + } WHEN { + TURN { MOVE(opponentLeft, MOVE_DOODLE, target: playerLeft); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_DOODLE, opponentLeft); + MESSAGE("But it failed!"); + } +} diff --git a/test/battle/move_effect/role_play.c b/test/battle/move_effect/role_play.c index cf82632fd8..ab0d801ee9 100644 --- a/test/battle/move_effect/role_play.c +++ b/test/battle/move_effect/role_play.c @@ -1,23 +1,63 @@ #include "global.h" #include "test/battle.h" -// Technically also covers Skill Swap and Doodle since both moves use the same command as Role Play ASSUMPTIONS { ASSUME(gMovesInfo[MOVE_ROLE_PLAY].effect == EFFECT_ROLE_PLAY); } -SINGLE_BATTLE_TEST("Role Play fails if target has a banned ability") +SINGLE_BATTLE_TEST("Role Play copies target's ability") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); } + OPPONENT(SPECIES_CHARMANDER) { Ability(ABILITY_BLAZE); } + }WHEN { + TURN { MOVE(player, MOVE_ROLE_PLAY); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_ROLE_PLAY, player); + ABILITY_POPUP(player, ABILITY_TELEPATHY); + } THEN { + EXPECT_EQ(player->ability, ABILITY_BLAZE); + EXPECT_EQ(opponent->ability, ABILITY_BLAZE); + } +} + +DOUBLE_BATTLE_TEST("Role Play copies target's current ability even if it changed during that turn") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); } + PLAYER(SPECIES_CHARMANDER) { Ability(ABILITY_BLAZE); } + OPPONENT(SPECIES_BULBASAUR) { Ability(ABILITY_OVERGROW); } + OPPONENT(SPECIES_SQUIRTLE) { Ability(ABILITY_TORRENT); } + } WHEN { + TURN { MOVE(playerLeft, MOVE_ROLE_PLAY, target: opponentLeft); MOVE(opponentRight, MOVE_ROLE_PLAY, target: playerLeft); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_ROLE_PLAY, playerLeft); + ABILITY_POPUP(playerLeft, ABILITY_TELEPATHY); + if (MOVE_ROLE_PLAY == MOVE_DOODLE) + ABILITY_POPUP(playerRight, ABILITY_BLAZE); + ANIMATION(ANIM_TYPE_MOVE, MOVE_ROLE_PLAY, opponentRight); + ABILITY_POPUP(opponentRight, ABILITY_TORRENT); + NOT ABILITY_POPUP(opponentLeft, ABILITY_OVERGROW); // Already has ability (Doodle) + } THEN { + EXPECT_EQ(playerLeft->ability, ABILITY_OVERGROW); + if (MOVE_ROLE_PLAY == MOVE_DOODLE) + EXPECT_EQ(playerRight->ability, ABILITY_OVERGROW); + EXPECT_EQ(opponentLeft->ability, ABILITY_OVERGROW); + EXPECT_EQ(opponentRight->ability, ABILITY_OVERGROW); + } +} + +SINGLE_BATTLE_TEST("Role Play and Doodle fail if target's ability can't be copied'") { u32 species, ability; PARAMETRIZE { species = SPECIES_SHEDINJA; ability = ABILITY_WONDER_GUARD; } PARAMETRIZE { species = SPECIES_CASTFORM; ability = ABILITY_FORECAST; } - PARAMETRIZE { species = SPECIES_CHERRIM; ability = ABILITY_FLOWER_GIFT; } PARAMETRIZE { species = SPECIES_ARCEUS; ability = ABILITY_MULTITYPE; } + PARAMETRIZE { species = SPECIES_CHERRIM; ability = ABILITY_FLOWER_GIFT; } PARAMETRIZE { species = SPECIES_ZORUA; ability = ABILITY_ILLUSION; } PARAMETRIZE { species = SPECIES_DARMANITAN; ability = ABILITY_ZEN_MODE; } - PARAMETRIZE { species = SPECIES_DITTO; ability = ABILITY_IMPOSTER; } PARAMETRIZE { species = SPECIES_AEGISLASH; ability = ABILITY_STANCE_CHANGE; } PARAMETRIZE { species = SPECIES_MUK_ALOLA; ability = ABILITY_POWER_OF_ALCHEMY; } PARAMETRIZE { species = SPECIES_PASSIMIAN; ability = ABILITY_RECEIVER; } @@ -38,29 +78,34 @@ SINGLE_BATTLE_TEST("Role Play fails if target has a banned ability") PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); } OPPONENT(species) { Ability(ability); } } WHEN { - TURN { MOVE(player,MOVE_ROLE_PLAY); } + TURN { MOVE(player, MOVE_ROLE_PLAY); } + TURN { MOVE(player, MOVE_DOODLE); } } SCENE { NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_ROLE_PLAY, player); MESSAGE("But it failed!"); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_DOODLE, player); + MESSAGE("But it failed!"); } } -SINGLE_BATTLE_TEST("Role Play fails if user has a banned ability") +SINGLE_BATTLE_TEST("Role Play fails if user's ability can't be suppressed") { u32 species, ability; PARAMETRIZE { species = SPECIES_ARCEUS; ability = ABILITY_MULTITYPE; } PARAMETRIZE { species = SPECIES_DARMANITAN; ability = ABILITY_ZEN_MODE; } PARAMETRIZE { species = SPECIES_AEGISLASH; ability = ABILITY_STANCE_CHANGE; } - PARAMETRIZE { species = SPECIES_WISHIWASHI; ability = ABILITY_SCHOOLING; } - PARAMETRIZE { species = SPECIES_KOMALA; ability = ABILITY_COMATOSE; } PARAMETRIZE { species = SPECIES_MINIOR; ability = ABILITY_SHIELDS_DOWN; } + PARAMETRIZE { species = SPECIES_WISHIWASHI; ability = ABILITY_SCHOOLING; } PARAMETRIZE { species = SPECIES_MIMIKYU; ability = ABILITY_DISGUISE; } - PARAMETRIZE { species = SPECIES_SILVALLY; ability = ABILITY_RKS_SYSTEM; } - PARAMETRIZE { species = SPECIES_ZYGARDE; ability = ABILITY_POWER_CONSTRUCT; } PARAMETRIZE { species = SPECIES_GRENINJA_BATTLE_BOND; ability = ABILITY_BATTLE_BOND; } - PARAMETRIZE { species = SPECIES_EISCUE; ability = ABILITY_ICE_FACE; } + PARAMETRIZE { species = SPECIES_ZYGARDE; ability = ABILITY_POWER_CONSTRUCT; } + PARAMETRIZE { species = SPECIES_KOMALA; ability = ABILITY_COMATOSE; } + PARAMETRIZE { species = SPECIES_SILVALLY; ability = ABILITY_RKS_SYSTEM; } PARAMETRIZE { species = SPECIES_CRAMORANT; ability = ABILITY_GULP_MISSILE; } + PARAMETRIZE { species = SPECIES_EISCUE; ability = ABILITY_ICE_FACE; } + PARAMETRIZE { species = SPECIES_CALYREX_ICE; ability = ABILITY_AS_ONE_ICE_RIDER; } + PARAMETRIZE { species = SPECIES_CALYREX_SHADOW; ability = ABILITY_AS_ONE_SHADOW_RIDER; } PARAMETRIZE { species = SPECIES_PALAFIN_ZERO; ability = ABILITY_ZERO_TO_HERO; } PARAMETRIZE { species = SPECIES_TATSUGIRI; ability = ABILITY_COMMANDER; } @@ -68,9 +113,12 @@ SINGLE_BATTLE_TEST("Role Play fails if user has a banned ability") PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); } OPPONENT(species) { Ability(ability); } } WHEN { - TURN { MOVE(opponent,MOVE_ROLE_PLAY); } + TURN { MOVE(opponent, MOVE_ROLE_PLAY); } + TURN { MOVE(opponent, MOVE_DOODLE); } } SCENE { NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_ROLE_PLAY, opponent); MESSAGE("But it failed!"); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_DOODLE, opponent); + MESSAGE("But it failed!"); } } diff --git a/test/battle/move_effect/simple_beam.c b/test/battle/move_effect/simple_beam.c new file mode 100644 index 0000000000..e91bf0b8ce --- /dev/null +++ b/test/battle/move_effect/simple_beam.c @@ -0,0 +1,74 @@ +#include "global.h" +#include "test/battle.h" + +ASSUMPTIONS +{ + ASSUME(gMovesInfo[MOVE_SIMPLE_BEAM].effect == EFFECT_SIMPLE_BEAM); +} + +SINGLE_BATTLE_TEST("Simple Beam replaces target's ability with Simple") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); } + OPPONENT(SPECIES_CHARMANDER) { Ability(ABILITY_BLAZE); } + }WHEN { + TURN { MOVE(player, MOVE_SIMPLE_BEAM); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_SIMPLE_BEAM, player); + ABILITY_POPUP(opponent, ABILITY_BLAZE); + } THEN { + EXPECT_EQ(opponent->ability, ABILITY_SIMPLE); + } +} + +DOUBLE_BATTLE_TEST("Simple Beam fails if the target already has Simple") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); } + PLAYER(SPECIES_CHARMANDER) { Ability(ABILITY_BLAZE); } + OPPONENT(SPECIES_BULBASAUR) { Ability(ABILITY_OVERGROW); } + OPPONENT(SPECIES_SQUIRTLE) { Ability(ABILITY_TORRENT); } + } WHEN { + TURN { MOVE(playerLeft, MOVE_SIMPLE_BEAM, target: opponentLeft); MOVE(playerRight, MOVE_SIMPLE_BEAM, target: opponentLeft); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_SIMPLE_BEAM, playerLeft); + ABILITY_POPUP(opponentLeft, ABILITY_OVERGROW); + NONE_OF { + ANIMATION(ANIM_TYPE_MOVE, MOVE_SIMPLE_BEAM, playerRight); + ABILITY_POPUP(opponentLeft, ABILITY_SIMPLE); + } + } THEN { + EXPECT_EQ(opponentLeft->ability, ABILITY_SIMPLE); + } +} + +SINGLE_BATTLE_TEST("Simple Beam fails if target has an ability that can't be overwritten") +{ + u32 species, ability; + + PARAMETRIZE { species = SPECIES_ARCEUS; ability = ABILITY_MULTITYPE; } + PARAMETRIZE { species = SPECIES_AEGISLASH; ability = ABILITY_STANCE_CHANGE; } + PARAMETRIZE { species = SPECIES_MINIOR; ability = ABILITY_SHIELDS_DOWN; } + PARAMETRIZE { species = SPECIES_WISHIWASHI; ability = ABILITY_SCHOOLING; } + PARAMETRIZE { species = SPECIES_MIMIKYU; ability = ABILITY_DISGUISE; } + PARAMETRIZE { species = SPECIES_GRENINJA_BATTLE_BOND; ability = ABILITY_BATTLE_BOND; } + PARAMETRIZE { species = SPECIES_ZYGARDE; ability = ABILITY_POWER_CONSTRUCT; } + PARAMETRIZE { species = SPECIES_KOMALA; ability = ABILITY_COMATOSE; } + PARAMETRIZE { species = SPECIES_SILVALLY; ability = ABILITY_RKS_SYSTEM; } + PARAMETRIZE { species = SPECIES_CRAMORANT; ability = ABILITY_GULP_MISSILE; } + PARAMETRIZE { species = SPECIES_EISCUE; ability = ABILITY_ICE_FACE; } + PARAMETRIZE { species = SPECIES_CALYREX_ICE; ability = ABILITY_AS_ONE_ICE_RIDER; } + PARAMETRIZE { species = SPECIES_CALYREX_SHADOW; ability = ABILITY_AS_ONE_SHADOW_RIDER; } + PARAMETRIZE { species = SPECIES_PALAFIN_ZERO; ability = ABILITY_ZERO_TO_HERO; } + PARAMETRIZE { species = SPECIES_TATSUGIRI; ability = ABILITY_COMMANDER; } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); } + OPPONENT(species) { Ability(ability); } + } WHEN { + TURN { MOVE(player, MOVE_SIMPLE_BEAM); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_SIMPLE_BEAM, player); + MESSAGE("But it failed!"); + } +} diff --git a/test/battle/move_effect/skill_swap.c b/test/battle/move_effect/skill_swap.c new file mode 100644 index 0000000000..9c31ae59a7 --- /dev/null +++ b/test/battle/move_effect/skill_swap.c @@ -0,0 +1,111 @@ +#include "global.h" +#include "test/battle.h" + +ASSUMPTIONS +{ + ASSUME(gMovesInfo[MOVE_SKILL_SWAP].effect == EFFECT_SKILL_SWAP); +} + +SINGLE_BATTLE_TEST("Skill Swap swaps user and target's abilities") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); } + OPPONENT(SPECIES_CHARMANDER) { Ability(ABILITY_BLAZE); } + }WHEN { + TURN { MOVE(player, MOVE_SKILL_SWAP); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_SKILL_SWAP, player); + ABILITY_POPUP(player, ABILITY_TELEPATHY); + ABILITY_POPUP(opponent, ABILITY_BLAZE); + } THEN { + EXPECT_EQ(player->ability, ABILITY_BLAZE); + EXPECT_EQ(opponent->ability, ABILITY_TELEPATHY); + } +} + +DOUBLE_BATTLE_TEST("Skill Swap only swaps user's ability with target's ability") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); } + PLAYER(SPECIES_CHARMANDER) { Ability(ABILITY_BLAZE); } + OPPONENT(SPECIES_BULBASAUR) { Ability(ABILITY_OVERGROW); } + OPPONENT(SPECIES_SQUIRTLE) { Ability(ABILITY_TORRENT); } + } WHEN { + TURN { MOVE(playerLeft, MOVE_SKILL_SWAP, target: opponentLeft); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_SKILL_SWAP, playerLeft); + ABILITY_POPUP(playerLeft, ABILITY_TELEPATHY); + ABILITY_POPUP(opponentLeft, ABILITY_OVERGROW); + } THEN { + EXPECT_EQ(playerLeft->ability, ABILITY_OVERGROW); + EXPECT_EQ(playerRight->ability, ABILITY_BLAZE); + EXPECT_EQ(opponentLeft->ability, ABILITY_TELEPATHY); + EXPECT_EQ(opponentRight->ability, ABILITY_TORRENT); + } +} + +DOUBLE_BATTLE_TEST("Skill Swap doesn't display ability popups when swapping with an ally") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); } + PLAYER(SPECIES_CHARMANDER) { Ability(ABILITY_BLAZE); } + OPPONENT(SPECIES_BULBASAUR) { Ability(ABILITY_OVERGROW); } + OPPONENT(SPECIES_SQUIRTLE) { Ability(ABILITY_TORRENT); } + } WHEN { + TURN { MOVE(playerLeft, MOVE_SKILL_SWAP, target: playerRight); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_SKILL_SWAP, playerLeft); + NONE_OF { + ABILITY_POPUP(playerLeft, ABILITY_TELEPATHY); + ABILITY_POPUP(playerRight, ABILITY_BLAZE); + } + } THEN { + EXPECT_EQ(playerLeft->ability, ABILITY_BLAZE); + EXPECT_EQ(playerRight->ability, ABILITY_TELEPATHY); + } +} + +SINGLE_BATTLE_TEST("Skill Swap fails if user or target has an ability that can't be swapped") +{ + u32 species, ability; + + PARAMETRIZE { species = SPECIES_SHEDINJA; ability = ABILITY_WONDER_GUARD; } + PARAMETRIZE { species = SPECIES_ARCEUS; ability = ABILITY_MULTITYPE; } + PARAMETRIZE { species = SPECIES_ZORUA; ability = ABILITY_ILLUSION; } + PARAMETRIZE { species = SPECIES_DARMANITAN; ability = ABILITY_ZEN_MODE; } + PARAMETRIZE { species = SPECIES_AEGISLASH; ability = ABILITY_STANCE_CHANGE; } + PARAMETRIZE { species = SPECIES_MINIOR; ability = ABILITY_SHIELDS_DOWN; } + PARAMETRIZE { species = SPECIES_WISHIWASHI; ability = ABILITY_SCHOOLING; } + PARAMETRIZE { species = SPECIES_MIMIKYU; ability = ABILITY_DISGUISE; } + PARAMETRIZE { species = SPECIES_GRENINJA_BATTLE_BOND; ability = ABILITY_BATTLE_BOND; } + PARAMETRIZE { species = SPECIES_ZYGARDE; ability = ABILITY_POWER_CONSTRUCT; } + PARAMETRIZE { species = SPECIES_KOMALA; ability = ABILITY_COMATOSE; } + PARAMETRIZE { species = SPECIES_SILVALLY; ability = ABILITY_RKS_SYSTEM; } + PARAMETRIZE { species = SPECIES_EISCUE; ability = ABILITY_ICE_FACE; } + PARAMETRIZE { species = SPECIES_KOFFING; ability = ABILITY_NEUTRALIZING_GAS; } + PARAMETRIZE { species = SPECIES_MORPEKO; ability = ABILITY_HUNGER_SWITCH; } + PARAMETRIZE { species = SPECIES_CALYREX_ICE; ability = ABILITY_AS_ONE_ICE_RIDER; } + PARAMETRIZE { species = SPECIES_CALYREX_SHADOW; ability = ABILITY_AS_ONE_SHADOW_RIDER; } + PARAMETRIZE { species = SPECIES_PALAFIN_ZERO; ability = ABILITY_ZERO_TO_HERO; } + PARAMETRIZE { species = SPECIES_TATSUGIRI; ability = ABILITY_COMMANDER; } + PARAMETRIZE { species = SPECIES_GREAT_TUSK; ability = ABILITY_PROTOSYNTHESIS; } + PARAMETRIZE { species = SPECIES_IRON_TREADS; ability = ABILITY_QUARK_DRIVE; } + PARAMETRIZE { species = SPECIES_OGERPON_TEAL_TERA; ability = ABILITY_EMBODY_ASPECT_TEAL_MASK; } + PARAMETRIZE { species = SPECIES_OGERPON_HEARTHFLAME_TERA; ability = ABILITY_EMBODY_ASPECT_HEARTHFLAME_MASK; } + PARAMETRIZE { species = SPECIES_OGERPON_WELLSPRING_TERA; ability = ABILITY_EMBODY_ASPECT_WELLSPRING_MASK; } + PARAMETRIZE { species = SPECIES_OGERPON_CORNERSTONE_TERA; ability = ABILITY_EMBODY_ASPECT_CORNERSTONE_MASK; } + PARAMETRIZE { species = SPECIES_TERAPAGOS_TERASTAL; ability = ABILITY_TERA_SHELL; } + PARAMETRIZE { species = SPECIES_TERAPAGOS_STELLAR; ability = ABILITY_TERAFORM_ZERO; } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); } + OPPONENT(species) { Ability(ability); } + } WHEN { + TURN { MOVE(player, MOVE_SKILL_SWAP); MOVE(opponent, MOVE_SKILL_SWAP); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_SKILL_SWAP, player); + MESSAGE("But it failed!"); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_SKILL_SWAP, opponent); + MESSAGE("But it failed!"); + } +} diff --git a/test/battle/move_effect/worry_seed.c b/test/battle/move_effect/worry_seed.c new file mode 100644 index 0000000000..3e74c883e7 --- /dev/null +++ b/test/battle/move_effect/worry_seed.c @@ -0,0 +1,74 @@ +#include "global.h" +#include "test/battle.h" + +ASSUMPTIONS +{ + ASSUME(gMovesInfo[MOVE_WORRY_SEED].effect == EFFECT_WORRY_SEED); +} + +SINGLE_BATTLE_TEST("Worry Seed replaces target's ability with Insomnia") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); } + OPPONENT(SPECIES_CHARMANDER) { Ability(ABILITY_BLAZE); } + }WHEN { + TURN { MOVE(player, MOVE_WORRY_SEED); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_WORRY_SEED, player); + ABILITY_POPUP(opponent, ABILITY_BLAZE); + } THEN { + EXPECT_EQ(opponent->ability, ABILITY_INSOMNIA); + } +} + +DOUBLE_BATTLE_TEST("Worry Seed fails if the target already has Insomnia") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); } + PLAYER(SPECIES_CHARMANDER) { Ability(ABILITY_BLAZE); } + OPPONENT(SPECIES_BULBASAUR) { Ability(ABILITY_OVERGROW); } + OPPONENT(SPECIES_SQUIRTLE) { Ability(ABILITY_TORRENT); } + } WHEN { + TURN { MOVE(playerLeft, MOVE_WORRY_SEED, target: opponentLeft); MOVE(playerRight, MOVE_WORRY_SEED, target: opponentLeft); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_WORRY_SEED, playerLeft); + ABILITY_POPUP(opponentLeft, ABILITY_OVERGROW); + NONE_OF { + ANIMATION(ANIM_TYPE_MOVE, MOVE_WORRY_SEED, playerRight); + ABILITY_POPUP(opponentLeft, ABILITY_INSOMNIA); + } + } THEN { + EXPECT_EQ(opponentLeft->ability, ABILITY_INSOMNIA); + } +} + +SINGLE_BATTLE_TEST("Worry Seed fails if target has an ability that can't be overwritten") +{ + u32 species, ability; + + PARAMETRIZE { species = SPECIES_ARCEUS; ability = ABILITY_MULTITYPE; } + PARAMETRIZE { species = SPECIES_AEGISLASH; ability = ABILITY_STANCE_CHANGE; } + PARAMETRIZE { species = SPECIES_MINIOR; ability = ABILITY_SHIELDS_DOWN; } + PARAMETRIZE { species = SPECIES_WISHIWASHI; ability = ABILITY_SCHOOLING; } + PARAMETRIZE { species = SPECIES_MIMIKYU; ability = ABILITY_DISGUISE; } + PARAMETRIZE { species = SPECIES_GRENINJA_BATTLE_BOND; ability = ABILITY_BATTLE_BOND; } + PARAMETRIZE { species = SPECIES_ZYGARDE; ability = ABILITY_POWER_CONSTRUCT; } + PARAMETRIZE { species = SPECIES_KOMALA; ability = ABILITY_COMATOSE; } + PARAMETRIZE { species = SPECIES_SILVALLY; ability = ABILITY_RKS_SYSTEM; } + PARAMETRIZE { species = SPECIES_CRAMORANT; ability = ABILITY_GULP_MISSILE; } + PARAMETRIZE { species = SPECIES_EISCUE; ability = ABILITY_ICE_FACE; } + PARAMETRIZE { species = SPECIES_CALYREX_ICE; ability = ABILITY_AS_ONE_ICE_RIDER; } + PARAMETRIZE { species = SPECIES_CALYREX_SHADOW; ability = ABILITY_AS_ONE_SHADOW_RIDER; } + PARAMETRIZE { species = SPECIES_PALAFIN_ZERO; ability = ABILITY_ZERO_TO_HERO; } + PARAMETRIZE { species = SPECIES_TATSUGIRI; ability = ABILITY_COMMANDER; } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); } + OPPONENT(species) { Ability(ability); } + } WHEN { + TURN { MOVE(player, MOVE_WORRY_SEED); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_WORRY_SEED, player); + MESSAGE("But it failed!"); + } +} diff --git a/test/text.c b/test/text.c index 0e6900edad..7713784198 100644 --- a/test/text.c +++ b/test/text.c @@ -79,6 +79,18 @@ TEST("Move names fit on Move Relearner Screen") EXPECT_LE(GetStringWidth(fontId, gMovesInfo[move].name, 0), widthPx); } +TEST("Move descriptions fit on Pokemon Summary Screen") +{ + u32 i; + const u32 fontId = FONT_NORMAL, widthPx = 152; + u32 move = MOVE_NONE; + for (i = 1; i < MOVES_COUNT; i++) + { + PARAMETRIZE_LABEL("%S", gMovesInfo[i].description) { move = i; } + } + EXPECT_LE(GetStringWidth(fontId, gMovesInfo[move].description, 0), widthPx); +} + TEST("Item names fit on Bag Screen (list)") { u32 i; @@ -272,6 +284,18 @@ TEST("Item names fit on Shop Screen") EXPECT_LE(GetStringWidth(fontId, gItemsInfo[item].name, 0), widthPx); } +TEST("Item descriptions fit on Bag and Shop Screen") +{ + u32 i; + const u32 fontId = FONT_NORMAL, widthPx = 102; + u32 item = ITEM_NONE; + for (i = 1; i < ITEMS_COUNT; i++) + { + PARAMETRIZE_LABEL("%S", gItemsInfo[i].description) { item = i; } + } + EXPECT_LE(GetStringWidth(fontId, gItemsInfo[item].description, 0), widthPx); +} + TEST("Species names fit on Battle Screen HP box") { u32 i, genderWidthPx; @@ -520,6 +544,21 @@ TEST("Species names fit on Battle Screen HP box for vanilla mons with the defaul EXPECT_LE(GetStringWidth(fontId, gSpeciesInfo[species].speciesName, 0), widthPx); } +TEST("Species dex entries fit on Pokedex Screen") +{ + u32 i; + const u32 fontId = FONT_NORMAL, widthPx = 224; + u32 species = SPECIES_NONE; + for (i = 1; i < NUM_SPECIES; i++) + { + if (IsSpeciesEnabled(i)) + { + PARAMETRIZE_LABEL("%S", gSpeciesInfo[i].description) { species = i; } + } + } + EXPECT_LE(GetStringWidth(fontId, gSpeciesInfo[species].description, 0), widthPx); +} + TEST("Ability names fit on Pokemon Summary Screen") { u32 i; @@ -544,6 +583,18 @@ TEST("Ability names fit on Ability Pop-Up") EXPECT_LE(GetStringWidth(fontId, gAbilitiesInfo[ability].name, 0), widthPx); } +TEST("Ability descriptions fit on Pokemon Summary Screen") +{ + u32 i; + const u32 fontId = FONT_NORMAL, widthPx = 146; + u32 ability = ABILITY_NONE; + for (i = 1; i < ABILITIES_COUNT; i++) + { + PARAMETRIZE_LABEL("%S", gAbilitiesInfo[i].description) { ability = i; } + } + EXPECT_LE(GetStringWidth(fontId, gAbilitiesInfo[ability].description, 0), widthPx); +} + TEST("Type names fit on Battle Screen") { u32 i;