Merge pull request #1642 from ghoulslash/echoed_voice

Fix echoed voice power boost
This commit is contained in:
DizzyEggg 2021-09-09 17:32:27 +02:00 committed by GitHub
commit 90c837deb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -217,7 +217,6 @@ struct FieldTimer
u8 mistyTerrainTimer;
u8 electricTerrainTimer;
u8 psychicTerrainTimer;
u8 echoVoiceCounter;
u8 gravityTimer;
u8 fairyLockTimer;
};

View file

@ -1743,7 +1743,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))

View file

@ -7192,12 +7192,13 @@ 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)
if (gBattleStruct->sameMoveTurns[battlerAtk] >= 5)
basePower *= 5;
else
basePower *= gFieldTimers.echoVoiceCounter;
basePower *= gBattleStruct->sameMoveTurns[battlerAtk];
}
break;
case EFFECT_PAYBACK: