Sync battle script documentation with Emerald, 1
This commit is contained in:
+1169
-1168
File diff suppressed because it is too large
Load Diff
@@ -169,14 +169,14 @@
|
||||
#define HITMARKER_UNABLE_TO_USE_MOVE 0x00080000
|
||||
#define HITMARKER_x100000 0x00100000
|
||||
#define HITMARKER_x200000 0x00200000
|
||||
#define HITMARKER_x400000 0x00400000
|
||||
#define HITMARKER_PLAYER_FAINTED 0x00400000
|
||||
#define HITMARKER_x800000 0x00800000
|
||||
#define HITMARKER_GRUDGE 0x01000000
|
||||
#define HITMARKER_OBEYS 0x02000000
|
||||
#define HITMARKER_x4000000 0x04000000
|
||||
#define HITMARKER_CHARGING 0x08000000
|
||||
#define HITMARKER_FAINTED(battler) (gBitTable[battler] << 0x1C)
|
||||
#define HITMARKER_UNK(battler) (0x10000000 << battler)
|
||||
#define HITMARKER_FAINTED2(battler) (0x10000000 << battler)
|
||||
|
||||
// Per-side statuses that affect an entire party
|
||||
#define SIDE_STATUS_REFLECT (1 << 0)
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
#define BS_EFFECT_BATTLER 2
|
||||
#define BS_FAINTED 3
|
||||
#define BS_ATTACKER_WITH_PARTNER 4 // for atk98_updatestatusicon
|
||||
#define BS_UNKNOWN_5 5 // for openpartyscreen
|
||||
#define BS_UNKNOWN_6 6 // for openpartyscreen
|
||||
#define BS_BATTLER_0 7
|
||||
#define BS_ATTACKER_SIDE 8 // for atk1E_jumpifability
|
||||
#define BS_NOT_ATTACKER_SIDE 9 // for atk1E_jumpifability
|
||||
@@ -48,6 +50,9 @@
|
||||
#define BS_PLAYER2 13 // for atk98_updatestatusicon
|
||||
#define BS_OPPONENT2 14
|
||||
|
||||
// used for openpartyscreen
|
||||
#define OPEN_PARTY_ALLOW_CANCEL 0x80
|
||||
|
||||
// atk 01, accuracy calc
|
||||
#define NO_ACC_CALC 0xFFFE
|
||||
#define NO_ACC_CALC_CHECK_LOCK_ON 0xFFFF
|
||||
@@ -70,7 +75,7 @@
|
||||
#define VARIOUS_CASE_4 4
|
||||
#define VARIOUS_RESET_INTIMIDATE_TRACE_BITS 5
|
||||
#define VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP 6
|
||||
#define VARIOUS_CASE_7 7
|
||||
#define VARIOUS_RESET_PLAYER_FAINTED_FLAG 7
|
||||
#define VARIOUS_CASE_8 8
|
||||
#define VARIOUS_RETURN_OPPONENT_MON1 9
|
||||
#define VARIOUS_RETURN_OPPONENT_MON2 10
|
||||
|
||||
+1
-1
@@ -2910,7 +2910,7 @@ void BattleTurnPassed(void)
|
||||
TurnValuesCleanUp(FALSE);
|
||||
gHitMarker &= ~(HITMARKER_NO_ATTACKSTRING);
|
||||
gHitMarker &= ~(HITMARKER_UNABLE_TO_USE_MOVE);
|
||||
gHitMarker &= ~(HITMARKER_x400000);
|
||||
gHitMarker &= ~(HITMARKER_PLAYER_FAINTED);
|
||||
gHitMarker &= ~(HITMARKER_x100000);
|
||||
gBattleScripting.animTurn = 0;
|
||||
gBattleScripting.animTargetsHit = 0;
|
||||
|
||||
@@ -2833,7 +2833,7 @@ static void atk19_tryfaintmon(void)
|
||||
gBattlescriptCurrInstr = BS_ptr;
|
||||
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER)
|
||||
{
|
||||
gHitMarker |= HITMARKER_x400000;
|
||||
gHitMarker |= HITMARKER_PLAYER_FAINTED;
|
||||
if (gBattleResults.playerFaintCounter < 0xFF)
|
||||
++gBattleResults.playerFaintCounter;
|
||||
AdjustFriendshipOnBattleFaint(gActiveBattler);
|
||||
@@ -4738,11 +4738,11 @@ static void atk50_openpartyscreen(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gBattlescriptCurrInstr[1] & 0x80)
|
||||
if (gBattlescriptCurrInstr[1] & OPEN_PARTY_ALLOW_CANCEL)
|
||||
hitmarkerFaintBits = PARTY_CHOOSE_MON; // Used here as the caseId for the EmitChoose function.
|
||||
else
|
||||
hitmarkerFaintBits = PARTY_MUST_CHOOSE_MON;
|
||||
battlerId = GetBattlerForBattleScript(gBattlescriptCurrInstr[1] & ~(0x80));
|
||||
battlerId = GetBattlerForBattleScript(gBattlescriptCurrInstr[1] & ~(OPEN_PARTY_ALLOW_CANCEL));
|
||||
if (gSpecialStatuses[battlerId].flag40)
|
||||
{
|
||||
gBattlescriptCurrInstr += 6;
|
||||
@@ -6146,12 +6146,12 @@ static void atk76_various(void)
|
||||
*choicedMove = MOVE_NONE;
|
||||
}
|
||||
break;
|
||||
case VARIOUS_CASE_7:
|
||||
case VARIOUS_RESET_PLAYER_FAINTED_FLAG:
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_DOUBLE))
|
||||
&& gBattleTypeFlags & BATTLE_TYPE_TRAINER
|
||||
&& gBattleMons[0].hp != 0
|
||||
&& gBattleMons[1].hp != 0)
|
||||
gHitMarker &= ~(HITMARKER_x400000);
|
||||
gHitMarker &= ~(HITMARKER_PLAYER_FAINTED);
|
||||
break;
|
||||
case VARIOUS_CASE_8:
|
||||
i = 0; // redundant
|
||||
|
||||
Reference in New Issue
Block a user