diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index c7256dc7e..4ea8042a7 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -2235,7 +2235,7 @@ BattleScript_EffectAbsorb:: waitmessage B_WAIT_TIME_LONG setdrainedhp manipulatedamage DMG_BIG_ROOT - orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE jumpifability BS_TARGET, ABILITY_LIQUID_OOZE, BattleScript_AbsorbLiquidOoze setbyte cMULTISTRING_CHOOSER, B_MSG_ABSORB goto BattleScript_AbsorbUpdateHp @@ -2837,7 +2837,7 @@ BattleScript_MoveMissedDoDamage:: .else bichalfword gMoveResultFlags, MOVE_RESULT_MISSED .endif - orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER tryfaintmon BS_ATTACKER, FALSE, NULL @@ -4319,6 +4319,7 @@ BattleScript_EffectWillOWisp:: jumpifstatus BS_TARGET, STATUS1_BURN, BattleScript_AlreadyBurned jumpiftype BS_TARGET, TYPE_FIRE, BattleScript_NotAffected jumpifability BS_TARGET, ABILITY_WATER_VEIL, BattleScript_WaterVeilPrevents + jumpifability BS_TARGET, ABILITY_WATER_BUBBLE, BattleScript_WaterVeilPrevents jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects jumpifflowerveil BattleScript_FlowerVeilProtects jumpifleafguard BattleScript_LeafGuardProtects @@ -4333,6 +4334,7 @@ BattleScript_EffectWillOWisp:: goto BattleScript_MoveEnd BattleScript_WaterVeilPrevents:: + call BattleScript_AbilityPopUp copybyte gEffectBattler, gBattlerTarget setbyte cMULTISTRING_CHOOSER, B_MSG_ABILITY_PREVENTS_MOVE_STATUS call BattleScript_BRNPrevention @@ -6527,6 +6529,18 @@ BattleScript_TargetPRLZHeal:: updatestatusicon BS_TARGET return +BattleScript_TargetWokeUp:: + printstring STRINGID_TARGETWOKEUP + waitmessage B_WAIT_TIME_LONG + updatestatusicon BS_TARGET + return + +BattleScript_TargetBurnHeal:: + printstring STRINGID_PKMNBURNHEALED + waitmessage B_WAIT_TIME_LONG + updatestatusicon BS_TARGET + return + BattleScript_MoveEffectSleep:: statusanimation BS_EFFECT_BATTLER printfromtable gFellAsleepStringIds @@ -6630,7 +6644,7 @@ BattleScript_MoveEffectRecoil:: jumpifmove MOVE_STRUGGLE, BattleScript_DoRecoil jumpifability BS_ATTACKER, ABILITY_ROCK_HEAD, BattleScript_RecoilEnd BattleScript_DoRecoil:: - orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 | HITMARKER_IGNORE_DISGUISE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER printstring STRINGID_PKMNHITWITHRECOIL @@ -6669,9 +6683,11 @@ BattleScript_DefiantActivates:: return BattleScript_AbilityPopUp: + .if B_ABILITY_POP_UP == TRUE showabilitypopup BS_ABILITY_BATTLER recordability BS_ABILITY_BATTLER pause 40 + .endif sethword sABILITY_OVERWRITE, 0 return @@ -7048,6 +7064,7 @@ BattleScript_MoveStatDrain:: waitanimation printstring STRINGID_TARGETABILITYSTATRAISE waitmessage B_WAIT_TIME_LONG + tryfaintmon BS_ATTACKER, FALSE, NULL goto BattleScript_MoveEnd BattleScript_MonMadeMoveUseless_PPLoss:: @@ -7058,6 +7075,7 @@ BattleScript_MonMadeMoveUseless:: call BattleScript_AbilityPopUp printstring STRINGID_PKMNSXMADEYUSELESS waitmessage B_WAIT_TIME_LONG + tryfaintmon BS_ATTACKER, FALSE, NULL orhalfword gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE goto BattleScript_MoveEnd @@ -7069,6 +7087,7 @@ BattleScript_FlashFireBoost:: call BattleScript_AbilityPopUp printfromtable gFlashFireStringIds waitmessage B_WAIT_TIME_LONG + tryfaintmon BS_ATTACKER, FALSE, NULL goto BattleScript_MoveEnd BattleScript_AbilityPreventsPhasingOut:: @@ -7672,7 +7691,7 @@ BattleScript_AirBaloonMsgPop:: return BattleScript_ItemHurtRet:: - orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 | HITMARKER_IGNORE_DISGUISE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER printstring STRINGID_HURTBYITEM @@ -7690,7 +7709,7 @@ BattleScript_ItemHealHP_Ret:: playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMRESTOREDHPALITTLE waitmessage B_WAIT_TIME_LONG - orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER return diff --git a/include/battle.h b/include/battle.h index 39d58b70b..a3f7d027d 100644 --- a/include/battle.h +++ b/include/battle.h @@ -144,6 +144,7 @@ struct ProtectStruct u32 usedThroatChopPreventedMove:1; u32 micle:1; u32 custap:1; // also quick claw + u32 touchedProtectLike:1; u32 physicalDmg; u32 specialDmg; u8 physicalBattlerId; @@ -217,7 +218,6 @@ struct FieldTimer u8 mistyTerrainTimer; u8 electricTerrainTimer; u8 psychicTerrainTimer; - u8 echoVoiceCounter; u8 gravityTimer; u8 fairyLockTimer; }; @@ -492,7 +492,9 @@ struct BattleStruct u16 assistPossibleMoves[PARTY_SIZE * MAX_MON_MOVES]; // Each of mons can know max 4 moves. u8 focusPunchBattlerId; u8 battlerPreventingSwitchout; - u8 moneyMultiplier; + u8 moneyMultiplier:6; + u8 moneyMultiplierItem:1; + u8 moneyMultiplierMove:1; u8 savedTurnActionNumber; u8 switchInAbilitiesCounter; u8 faintedActionsState; diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 7fa2751d6..6debc436a 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -124,6 +124,8 @@ extern const u8 BattleScript_MoveUsedIsInLoveCantAttack[]; extern const u8 BattleScript_NightmareTurnDmg[]; extern const u8 BattleScript_CurseTurnDmg[]; extern const u8 BattleScript_TargetPRLZHeal[]; +extern const u8 BattleScript_TargetWokeUp[]; +extern const u8 BattleScript_TargetBurnHeal[]; extern const u8 BattleScript_MoveEffectSleep[]; extern const u8 BattleScript_YawnMakesAsleep[]; extern const u8 BattleScript_MoveEffectPoison[]; diff --git a/include/constants/battle.h b/include/constants/battle.h index b158076bd..73d5c3deb 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -185,7 +185,8 @@ #define HITMARKER_IGNORE_SAFEGUARD (1 << 13) #define HITMARKER_SYNCHRONISE_EFFECT (1 << 14) #define HITMARKER_RUN (1 << 15) -// 3 free spots because of change in handling of UNDERGROUND/UNDERGWATER/ON AIR +#define HITMARKER_IGNORE_DISGUISE (1 << 16) +// 3 free spots because of change in handling of UNDERGROUND/UNDERWATER/ON AIR #define HITMARKER_UNABLE_TO_USE_MOVE (1 << 19) #define HITMARKER_x100000 (1 << 20) #define HITMARKER_x200000 (1 << 21) diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index 95f463804..adda66518 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -572,10 +572,11 @@ #define STRINGID_PKMNGOTOVERITSINFATUATION 568 #define STRINGID_ITEMCANNOTBEREMOVED 569 #define STRINGID_STICKYBARBTRANSFER 570 -#define STRINGID_REDCARDACTIVATE 571 -#define STRINGID_EJECTBUTTONACTIVATE 572 +#define STRINGID_PKMNBURNHEALED 571 +#define STRINGID_REDCARDACTIVATE 572 +#define STRINGID_EJECTBUTTONACTIVATE 573 -#define BATTLESTRINGS_COUNT 573 +#define BATTLESTRINGS_COUNT 574 // The below IDs are all indexes into battle message tables, // used to determine which of a set of messages to print. diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index 565c0f261..e8e399935 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -795,6 +795,9 @@ static bool8 ShouldUseItem(void) if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_RIGHT) return FALSE; + + if (gStatuses3[gActiveBattler] & STATUS3_EMBARGO) + return FALSE; if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) party = gPlayerParty; diff --git a/src/battle_message.c b/src/battle_message.c index 130d24e2d..fc057f2f9 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -698,14 +698,15 @@ static const u8 sText_PkmnShookOffTheTaunt[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX static const u8 sText_PkmnGotOverItsInfatuation[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} got over\nits infatuation!"); static const u8 sText_ItemCannotBeRemoved[] = _("{B_ATK_NAME_WITH_PREFIX}'s item cannot be removed!"); static const u8 sText_StickyBarbTransfer[] = _("The {B_LAST_ITEM} attached itself to\n{B_ATK_NAME_WITH_PREFIX}!"); +static const u8 sText_PkmnBurnHealed[] = _("{B_DEF_NAME_WITH_PREFIX}'s\nburn was healed."); static const u8 sText_RedCardActivate[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} held up its {B_LAST_ITEM}\nagainst {B_ATK_NAME_WITH_PREFIX}!"); static const u8 sText_EjectButtonActivate[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is switched\nout with the {B_LAST_ITEM}!"); - const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { [STRINGID_EJECTBUTTONACTIVATE - 12] = sText_EjectButtonActivate, [STRINGID_REDCARDACTIVATE - 12] = sText_RedCardActivate, + [STRINGID_PKMNBURNHEALED - 12] = sText_PkmnBurnHealed, [STRINGID_STICKYBARBTRANSFER - 12] = sText_StickyBarbTransfer, [STRINGID_ITEMCANNOTBEREMOVED - 12] = sText_ItemCannotBeRemoved, [STRINGID_PKMNGOTOVERITSINFATUATION - 12] = sText_PkmnGotOverItsInfatuation, diff --git a/src/battle_pike.c b/src/battle_pike.c index e44ad81cc..5d958dec2 100644 --- a/src/battle_pike.c +++ b/src/battle_pike.c @@ -821,7 +821,7 @@ static bool8 DoesAbilityPreventStatus(struct Pokemon *mon, u32 status) ret = TRUE; break; case STATUS1_BURN: - if (ability == ABILITY_WATER_VEIL) + if (ability == ABILITY_WATER_VEIL || ability == ABILITY_WATER_BUBBLE) ret = TRUE; break; case STATUS1_PARALYSIS: diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 9f1b0ba93..044090069 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1452,8 +1452,11 @@ static void Cmd_attackcanceler(void) } else if (IsBattlerProtected(gBattlerTarget, gCurrentMove) && (gCurrentMove != MOVE_CURSE || IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_GHOST)) - && ((!IsTwoTurnsMove(gCurrentMove) || (gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS)))) + && ((!IsTwoTurnsMove(gCurrentMove) || (gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS))) + && gBattleMoves[gCurrentMove].effect != EFFECT_SUCKER_PUNCH) { + if (gBattleMoves[gCurrentMove].flags & FLAG_MAKES_CONTACT) + gProtectStructs[gBattlerAttacker].touchedProtectLike = 1; CancelMultiTurnMoves(gBattlerAttacker); gMoveResultFlags |= MOVE_RESULT_MISSED; gLastLandedMoves[gBattlerTarget] = 0; @@ -1743,7 +1746,7 @@ static void Cmd_ppreduce(void) if (!(gHitMarker & (HITMARKER_NO_PPDEDUCT | HITMARKER_NO_ATTACKSTRING)) && gBattleMons[gBattlerAttacker].pp[gCurrMovePos]) { gProtectStructs[gBattlerAttacker].notFirstStrike = 1; - // For item Metronome + // For item Metronome, echoed voice if (gCurrentMove == gLastResultingMoves[gBattlerAttacker] && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) && !WasUnableToUseMove(gBattlerAttacker)) @@ -2356,6 +2359,7 @@ static void Cmd_resultmessage(void) if (gSpecialStatuses[gBattlerTarget].berryReduced && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)) { + gLastUsedItem = gBattleMons[gBattlerTarget].item; gSpecialStatuses[gBattlerTarget].berryReduced = 0; BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_PrintBerryReduceString; @@ -2615,11 +2619,11 @@ void SetMoveEffect(bool32 primary, u32 certain) statusChanged = TRUE; break; case STATUS1_BURN: - if (GetBattlerAbility(gEffectBattler) == ABILITY_WATER_VEIL + if ((GetBattlerAbility(gEffectBattler) == ABILITY_WATER_VEIL || GetBattlerAbility(gEffectBattler) == ABILITY_WATER_BUBBLE) && (primary == TRUE || certain == MOVE_EFFECT_CERTAIN)) { - gLastUsedAbility = ABILITY_WATER_VEIL; - RecordAbilityBattle(gEffectBattler, ABILITY_WATER_VEIL); + gLastUsedAbility = GetBattlerAbility(gEffectBattler); + RecordAbilityBattle(gEffectBattler, GetBattlerAbility(gEffectBattler)); BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_BRNPrevention; @@ -2648,6 +2652,7 @@ void SetMoveEffect(bool32 primary, u32 certain) break; if (GetBattlerAbility(gEffectBattler) == ABILITY_WATER_VEIL || GetBattlerAbility(gEffectBattler) == ABILITY_COMATOSE + || GetBattlerAbility(gEffectBattler) == ABILITY_WATER_BUBBLE || IsAbilityStatusProtected(gEffectBattler)) break; if (gBattleMons[gEffectBattler].status1) @@ -2878,9 +2883,10 @@ void SetMoveEffect(bool32 primary, u32 certain) gBattlescriptCurrInstr = sMoveEffectBS_Ptrs[gBattleScripting.moveEffect]; break; case MOVE_EFFECT_HAPPY_HOUR: - if (GET_BATTLER_SIDE(gBattlerAttacker) == B_SIDE_PLAYER) + if (GET_BATTLER_SIDE(gBattlerAttacker) == B_SIDE_PLAYER && !gBattleStruct->moneyMultiplierMove) { gBattleStruct->moneyMultiplier *= 2; + gBattleStruct->moneyMultiplierMove = 1; } gBattlescriptCurrInstr++; break; @@ -3109,7 +3115,18 @@ void SetMoveEffect(bool32 primary, u32 certain) MarkBattlerForControllerExec(gActiveBattler); BattleScriptPush(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = BattleScript_TargetPRLZHeal; + switch (gBattleMoves[gCurrentMove].argument) + { + case STATUS1_PARALYSIS: + gBattlescriptCurrInstr = BattleScript_TargetPRLZHeal; + break; + case STATUS1_SLEEP: + gBattlescriptCurrInstr = BattleScript_TargetWokeUp; + break; + case STATUS1_BURN: + gBattlescriptCurrInstr = BattleScript_TargetBurnHeal; + break; + } } break; case MOVE_EFFECT_ATK_DEF_DOWN: // SuperPower @@ -4748,10 +4765,11 @@ static void Cmd_moveend(void) switch (gBattleScripting.moveendState) { case MOVEEND_PROTECT_LIKE_EFFECT: - if (gBattleMoves[gCurrentMove].flags & FLAG_MAKES_CONTACT) + if (gProtectStructs[gBattlerAttacker].touchedProtectLike) { if (gProtectStructs[gBattlerTarget].spikyShielded && GetBattlerAbility(gBattlerAttacker) != ABILITY_MAGIC_GUARD) { + gProtectStructs[gBattlerAttacker].touchedProtectLike = 0; gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 8; if (gBattleMoveDamage == 0) gBattleMoveDamage = 1; @@ -4762,6 +4780,7 @@ static void Cmd_moveend(void) } else if (gProtectStructs[gBattlerTarget].kingsShielded) { + gProtectStructs[gBattlerAttacker].touchedProtectLike = 0; i = gBattlerAttacker; gBattlerAttacker = gBattlerTarget; gBattlerTarget = i; // gBattlerTarget and gBattlerAttacker are swapped in order to activate Defiant, if applicable @@ -4772,6 +4791,7 @@ static void Cmd_moveend(void) } else if (gProtectStructs[gBattlerTarget].banefulBunkered) { + gProtectStructs[gBattlerAttacker].touchedProtectLike = 0; gBattleScripting.moveEffect = MOVE_EFFECT_POISON | MOVE_EFFECT_AFFECTS_USER; PREPARE_MOVE_BUFFER(gBattleTextBuff1, MOVE_BANEFUL_BUNKER); BattleScriptPushCursor(); @@ -7317,9 +7337,14 @@ static void Cmd_various(void) return; case VARIOUS_JUMP_IF_NO_HOLD_EFFECT: if (GetBattlerHoldEffect(gActiveBattler, TRUE) != gBattlescriptCurrInstr[3]) + { gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 4); + } else + { + gLastUsedItem = gBattleMons[gActiveBattler].item; // For B_LAST_USED_ITEM gBattlescriptCurrInstr += 8; + } return; case VARIOUS_JUMP_IF_NO_ALLY: if (!IsBattlerAlive(BATTLE_PARTNER(gActiveBattler))) @@ -8290,7 +8315,8 @@ static void Cmd_various(void) } else if (gBattleMons[gBattlerAttacker].status1 & STATUS1_BURN) { - if (GetBattlerAbility(gBattlerTarget) == ABILITY_WATER_VEIL) + if (GetBattlerAbility(gBattlerTarget) == ABILITY_WATER_VEIL + || GetBattlerAbility(gBattlerTarget) == ABILITY_WATER_BUBBLE) { gBattlerAbility = gBattlerTarget; BattleScriptPush(T1_READ_PTR(gBattlescriptCurrInstr + 3)); @@ -12048,7 +12074,8 @@ bool32 DoesDisguiseBlockMove(u8 battlerAtk, u8 battlerDef, u32 move) if (GetBattlerAbility(battlerDef) != ABILITY_DISGUISE || gBattleMons[battlerDef].species != SPECIES_MIMIKYU || gBattleMons[battlerDef].status2 & STATUS2_TRANSFORMED - || gBattleMoves[move].power == 0) + || gBattleMoves[move].power == 0 + || gHitMarker & HITMARKER_IGNORE_DISGUISE) return FALSE; else return TRUE; diff --git a/src/battle_util.c b/src/battle_util.c index 466ebcfe6..bc5c7e0e7 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -859,7 +859,7 @@ void HandleAction_ActionFinished(void) gHitMarker &= ~(HITMARKER_DESTINYBOND | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_IGNORE_SAFEGUARD | HITMARKER_x100000 | HITMARKER_OBEYS | HITMARKER_x10 | HITMARKER_SYNCHRONISE_EFFECT - | HITMARKER_CHARGING | HITMARKER_x4000000); + | HITMARKER_CHARGING | HITMARKER_x4000000 | HITMARKER_IGNORE_DISGUISE); gCurrentMove = 0; gBattleMoveDamage = 0; @@ -4864,6 +4864,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move && TARGET_TURN_DAMAGED && !IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_FIRE) && GetBattlerAbility(gBattlerAttacker) != ABILITY_WATER_VEIL + && GetBattlerAbility(gBattlerAttacker) != ABILITY_WATER_BUBBLE && !(gBattleMons[gBattlerAttacker].status1 & STATUS1_ANY) && !IsAbilityStatusProtected(gBattlerAttacker) && (Random() % 3) == 0) @@ -5071,6 +5072,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move } break; case ABILITY_WATER_VEIL: + case ABILITY_WATER_BUBBLE: if (gBattleMons[battler].status1 & STATUS1_BURN) { StringCopy(gBattleTextBuff1, gStatusConditionString_BurnJpn); @@ -5654,8 +5656,11 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) switch (battlerHoldEffect) { case HOLD_EFFECT_DOUBLE_PRIZE: - if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) + if (GetBattlerSide(battlerId) == B_SIDE_PLAYER && !gBattleStruct->moneyMultiplierItem) + { gBattleStruct->moneyMultiplier *= 2; + gBattleStruct->moneyMultiplierItem = 1; + } break; case HOLD_EFFECT_RESTORE_STATS: for (i = 0; i < NUM_BATTLE_STATS; i++) @@ -7313,12 +7318,12 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef) basePower = 150; break; case EFFECT_ECHOED_VOICE: - if (gFieldTimers.echoVoiceCounter != 0) + // gBattleStruct->sameMoveTurns incremented in ppreduce + if (gBattleStruct->sameMoveTurns[battlerAtk] != 0) { - if (gFieldTimers.echoVoiceCounter >= 5) - basePower *= 5; - else - basePower *= gFieldTimers.echoVoiceCounter; + basePower += (basePower * gBattleStruct->sameMoveTurns[battlerAtk]); + if (basePower > 200) + basePower = 200; } break; case EFFECT_PAYBACK: diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 9fc79581f..657341b5e 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -5711,7 +5711,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .type = TYPE_FIGHTING, .accuracy = 90, .pp = 10, - .secondaryEffectChance = 0, + .secondaryEffectChance = 100, .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_IRON_FIST_BOOST, @@ -9767,8 +9767,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .type = TYPE_WATER, .accuracy = 100, .pp = 10, - .secondaryEffectChance = 0, - .target = MOVE_TARGET_SELECTED, + .secondaryEffectChance = 100, + .target = MOVE_TARGET_FOES_AND_ALLY, .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SOUND | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, @@ -9782,7 +9782,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .type = TYPE_ICE, .accuracy = 90, .pp = 10, - .secondaryEffectChance = 0, + .secondaryEffectChance = 100, .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_IRON_FIST_BOOST, @@ -10289,7 +10289,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .secondaryEffectChance = 20, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, }, diff --git a/src/party_menu.c b/src/party_menu.c index 34b038861..24bd6b2ea 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -4313,7 +4313,13 @@ static bool8 IsItemFlute(u16 item) static bool8 ExecuteTableBasedItemEffect_(u8 partyMonIndex, u16 item, u8 monMoveIndex) { if (gMain.inBattle) - return ExecuteTableBasedItemEffect(&gPlayerParty[partyMonIndex], item, GetPartyIdFromBattleSlot(partyMonIndex), monMoveIndex); + { + if ((partyMonIndex == 0 && gStatuses3[B_POSITION_PLAYER_LEFT] & STATUS3_EMBARGO) + || (partyMonIndex == 1 && gStatuses3[B_POSITION_PLAYER_RIGHT] & STATUS3_EMBARGO)) + return TRUE; // cannot use on this mon + else + return ExecuteTableBasedItemEffect(&gPlayerParty[partyMonIndex], item, GetPartyIdFromBattleSlot(partyMonIndex), monMoveIndex); + } else return ExecuteTableBasedItemEffect(&gPlayerParty[partyMonIndex], item, partyMonIndex, monMoveIndex); }