diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index 7664eac693..7ae4403ff9 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -798,9 +798,7 @@ 2: .endm - .macro setmultihitcounter value:req - .byte 0x8d - .byte \value + .macro unused_0x8d .endm .macro initmultihitstring diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 07d172cdf8..80d50710ba 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -34742,7 +34742,7 @@ gBattleAnimMove_GMaxTerror:: gBattleAnimMove_MaxPhantasm:: createvisualtask AnimTask_DynamaxGrowth, 0x5, 0x1, 0x1 waitforvisualfinish - goto gBattleAnimMove_PhantomForce + goto gBattleAnimMove_ShadowBall end gBattleAnimMove_GMaxGravitas:: diff --git a/graphics/pokemon/deoxys/anim_front.png b/graphics/pokemon/deoxys/anim_front.png index d2f3e99381..fc782931d1 100644 Binary files a/graphics/pokemon/deoxys/anim_front.png and b/graphics/pokemon/deoxys/anim_front.png differ diff --git a/graphics/pokemon/deoxys/attack/anim_front.png b/graphics/pokemon/deoxys/attack/anim_front.png index 0b43a9fe11..566e80eafd 100644 Binary files a/graphics/pokemon/deoxys/attack/anim_front.png and b/graphics/pokemon/deoxys/attack/anim_front.png differ diff --git a/graphics/pokemon/deoxys/attack/normal.pal b/graphics/pokemon/deoxys/attack/normal.pal index 246d4784a2..52ddbb8fc6 100644 --- a/graphics/pokemon/deoxys/attack/normal.pal +++ b/graphics/pokemon/deoxys/attack/normal.pal @@ -3,8 +3,8 @@ JASC-PAL 16 248 160 176 96 56 56 -248 112 72 -184 104 104 +255 115 74 +204 65 65 24 24 24 104 200 224 80 144 176 diff --git a/graphics/pokemon/deoxys/defense/anim_front.png b/graphics/pokemon/deoxys/defense/anim_front.png index 2ee6e0c527..ce3cdad39c 100644 Binary files a/graphics/pokemon/deoxys/defense/anim_front.png and b/graphics/pokemon/deoxys/defense/anim_front.png differ diff --git a/graphics/pokemon/deoxys/defense/normal.pal b/graphics/pokemon/deoxys/defense/normal.pal index 8b37f5111e..4beda86136 100644 --- a/graphics/pokemon/deoxys/defense/normal.pal +++ b/graphics/pokemon/deoxys/defense/normal.pal @@ -3,9 +3,9 @@ JASC-PAL 16 248 160 176 96 56 56 -192 104 104 -248 112 72 -96 64 48 +204 65 65 +255 115 74 +68 28 89 240 176 144 104 200 224 80 144 176 diff --git a/graphics/pokemon/deoxys/defense/shiny.pal b/graphics/pokemon/deoxys/defense/shiny.pal index c1f34410a4..3f285246c6 100644 --- a/graphics/pokemon/deoxys/defense/shiny.pal +++ b/graphics/pokemon/deoxys/defense/shiny.pal @@ -5,7 +5,7 @@ JASC-PAL 112 96 16 168 168 56 248 232 64 -96 64 48 +49 29 82 248 248 216 112 208 168 72 160 112 diff --git a/graphics/pokemon/deoxys/normal.pal b/graphics/pokemon/deoxys/normal.pal index 59124c56a9..e11c277719 100644 --- a/graphics/pokemon/deoxys/normal.pal +++ b/graphics/pokemon/deoxys/normal.pal @@ -2,12 +2,12 @@ JASC-PAL 0100 16 248 160 176 -184 104 104 +204 65 65 248 176 144 -248 112 72 +255 115 74 96 56 56 104 200 224 -88 56 48 +68 28 89 56 80 96 80 144 176 152 96 176 diff --git a/graphics/pokemon/deoxys/shiny.pal b/graphics/pokemon/deoxys/shiny.pal index 5bbc6b683a..621aac6d42 100644 --- a/graphics/pokemon/deoxys/shiny.pal +++ b/graphics/pokemon/deoxys/shiny.pal @@ -7,7 +7,7 @@ JASC-PAL 248 232 64 112 96 16 112 208 168 -112 96 16 +51 27 101 56 96 88 72 160 112 96 120 192 diff --git a/graphics/pokemon/deoxys/speed/anim_front.png b/graphics/pokemon/deoxys/speed/anim_front.png index 947052f81d..1f2063bddf 100644 Binary files a/graphics/pokemon/deoxys/speed/anim_front.png and b/graphics/pokemon/deoxys/speed/anim_front.png differ diff --git a/graphics/pokemon/deoxys/speed/normal.pal b/graphics/pokemon/deoxys/speed/normal.pal index dad052e1da..ea1073a0ee 100644 --- a/graphics/pokemon/deoxys/speed/normal.pal +++ b/graphics/pokemon/deoxys/speed/normal.pal @@ -6,9 +6,9 @@ JASC-PAL 80 144 176 104 200 224 96 56 56 -248 112 72 +255 115 74 24 24 24 -192 104 104 +204 65 65 192 192 208 152 96 176 248 248 248 diff --git a/include/config/battle.h b/include/config/battle.h index 7467bd47f1..b0184838cb 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -6,7 +6,7 @@ #define B_CRIT_MULTIPLIER GEN_LATEST // In Gen6+, critical hits multiply damage by 1.5 instead of 2. #define B_PARALYSIS_SPEED GEN_LATEST // In Gen7+, Speed is decreased by 50% instead of 75%. #define B_CONFUSION_SELF_DMG_CHANCE GEN_LATEST // In Gen7+, confusion has a 33.3% of self-damage, instead of 50%. -#define B_MULTI_HIT_CHANCE GEN_LATEST // In Gen5+, multi-hit moves have different %. See Cmd_setmultihitcounter for values. +#define B_MULTI_HIT_CHANCE GEN_LATEST // In Gen5+, multi-hit moves have different %. See SetRandomMultiHitCounter for values. #define B_WHITEOUT_MONEY GEN_LATEST // In Gen4+, the amount of money lost by losing a battle is determined by the amount of badges earned. Previously, it would cut the current money by half. (While this change was also in FRLG, for the sake of simplicity, setting this to GEN_3 will result in RSE behavior.) #define B_LIGHT_BALL_ATTACK_BOOST GEN_LATEST // In Gen4+, Light Ball doubles the power of physical moves in addition to special moves. #define B_SANDSTORM_SPDEF_BOOST GEN_LATEST // In Gen4+, Sandstorm weather multiplies the Sp. Defense of Rock-type Pokémon by x1.5. diff --git a/src/battle_dynamax.c b/src/battle_dynamax.c index fae0e8377a..17425b51d8 100644 --- a/src/battle_dynamax.c +++ b/src/battle_dynamax.c @@ -280,7 +280,10 @@ static u16 GetTypeBasedMaxMove(u32 battler, u32 type) // Returns the appropriate Max Move or G-Max Move for a battler to use. u16 GetMaxMove(u32 battler, u32 baseMove) { - u32 move = baseMove; + u32 moveType; + SetTypeBeforeUsingMove(baseMove, battler); + moveType = GetMoveType(baseMove); + if (baseMove == MOVE_NONE) // for move display { return MOVE_NONE; @@ -291,18 +294,12 @@ u16 GetMaxMove(u32 battler, u32 baseMove) } else if (gMovesInfo[baseMove].category == DAMAGE_CATEGORY_STATUS) { - move = MOVE_MAX_GUARD; - } - else if (gBattleStruct->dynamicMoveType) - { - move = GetTypeBasedMaxMove(battler, gBattleStruct->dynamicMoveType & DYNAMIC_TYPE_MASK); + return MOVE_MAX_GUARD; } else { - move = GetTypeBasedMaxMove(battler, gMovesInfo[baseMove].type); + return GetTypeBasedMaxMove(battler, moveType); } - - return move; } // First value is for Fighting, Poison and Multi-Attack. The second is for everything else. diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 844381a205..e7f087c3c8 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -479,7 +479,7 @@ static void Cmd_statbuffchange(void); static void Cmd_normalisebuffs(void); static void Cmd_setbide(void); static void Cmd_twoturnmoveschargestringandanimation(void); -static void Cmd_setmultihitcounter(void); +static void Cmd_unused_0x8d(void); static void Cmd_initmultihitstring(void); static void Cmd_forcerandomswitch(void); static void Cmd_tryconversiontypechange(void); @@ -738,7 +738,7 @@ void (* const gBattleScriptingCommandsTable[])(void) = Cmd_normalisebuffs, //0x8A Cmd_setbide, //0x8B Cmd_twoturnmoveschargestringandanimation, //0x8C - Cmd_setmultihitcounter, //0x8D + Cmd_unused_0x8d, //0x8D Cmd_initmultihitstring, //0x8E Cmd_forcerandomswitch, //0x8F Cmd_tryconversiontypechange, //0x90 @@ -2685,6 +2685,15 @@ static void Cmd_resultmessage(void) if (gMoveResultFlags & MOVE_RESULT_MISSED && (!(gMoveResultFlags & MOVE_RESULT_DOESNT_AFFECT_FOE) || gBattleCommunication[MISS_TYPE] > B_MSG_AVOIDED_ATK)) { + if (gMultiHitCounter && gMultiHitCounter < gMovesInfo[gCurrentMove].strikeCount) + { + gMultiHitCounter = 0; + gMoveResultFlags &= ~MOVE_RESULT_MISSED; + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_MultiHitPrintStrings; + return; + } + if (gBattleCommunication[MISS_TYPE] > B_MSG_AVOIDED_ATK) // Wonder Guard or Levitate - show the ability pop-up CreateAbilityPopUp(gBattlerTarget, gBattleMons[gBattlerTarget].ability, (IsDoubleBattle()) != 0); stringId = gMissStringIds[gBattleCommunication[MISS_TYPE]]; @@ -12031,33 +12040,8 @@ static void Cmd_twoturnmoveschargestringandanimation(void) gBattlescriptCurrInstr = cmd->nextInstr; } -static void Cmd_setmultihitcounter(void) +static void Cmd_unused_0x8d(void) { - CMD_ARGS(u8 value); - - if (cmd->value) - { - gMultiHitCounter = cmd->value; - } - else - { - if (GetBattlerAbility(gBattlerAttacker) == ABILITY_SKILL_LINK) - { - gMultiHitCounter = 5; - } - else - { - // WARNING: These seem to be unused, see SetRandomMultiHitCounter. - if (B_MULTI_HIT_CHANCE >= GEN_5) - // 35%: 2 hits, 35%: 3 hits, 15% 4 hits, 15% 5 hits. - gMultiHitCounter = RandomWeighted(RNG_HITS, 0, 0, 7, 7, 3, 3); - else - // 37.5%: 2 hits, 37.5%: 3 hits, 12.5% 4 hits, 12.5% 5 hits. - gMultiHitCounter = RandomWeighted(RNG_HITS, 0, 0, 3, 3, 1, 1); - } - } - - gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_initmultihitstring(void) diff --git a/src/battle_util.c b/src/battle_util.c index 56bc0e1662..2f1fdabf87 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2776,7 +2776,7 @@ u8 DoBattlerEndTurnEffects(void) && !IsLeafGuardProtected(battler)) { CancelMultiTurnMoves(battler); - gEffectBattler = battler; + gEffectBattler = gBattlerTarget = battler; if (IsBattlerTerrainAffected(battler, STATUS_FIELD_ELECTRIC_TERRAIN)) { gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_TERRAINPREVENTS_ELECTRIC; diff --git a/src/data/pokemon_graphics/front_pic_anims.h b/src/data/pokemon_graphics/front_pic_anims.h index 8452e24732..deceeb0420 100644 --- a/src/data/pokemon_graphics/front_pic_anims.h +++ b/src/data/pokemon_graphics/front_pic_anims.h @@ -5205,8 +5205,7 @@ static const union AnimCmd sAnim_DeoxysNormal_1[] = { ANIMCMD_FRAME(0, 16), ANIMCMD_FRAME(1, 16), - ANIMCMD_FRAME(0, 26), - ANIMCMD_FRAME(1, 16), + ANIMCMD_FRAME(1, 26), ANIMCMD_FRAME(0, 16), ANIMCMD_END, };