Merge branch '_RHH/master' into _RHH/upcoming

This commit is contained in:
Eduardo Quezada 2024-12-01 08:11:32 -03:00
commit 1a581c407c
17 changed files with 35 additions and 57 deletions

View file

@ -798,9 +798,7 @@
2:
.endm
.macro setmultihitcounter value:req
.byte 0x8d
.byte \value
.macro unused_0x8d
.endm
.macro initmultihitstring

View file

@ -34742,7 +34742,7 @@ gBattleAnimMove_GMaxTerror::
gBattleAnimMove_MaxPhantasm::
createvisualtask AnimTask_DynamaxGrowth, 0x5, 0x1, 0x1
waitforvisualfinish
goto gBattleAnimMove_PhantomForce
goto gBattleAnimMove_ShadowBall
end
gBattleAnimMove_GMaxGravitas::

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -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

View file

@ -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.

View file

@ -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.

View file

@ -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)

View file

@ -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;

View file

@ -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,
};