mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 04:04:17 +01:00
gRandomMove to gCalledMove
This commit is contained in:
parent
a1edceb595
commit
e362c06aea
@ -530,7 +530,7 @@
|
|||||||
.byte \battler
|
.byte \battler
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumptorandomattack param0
|
.macro jumptocalledattack param0
|
||||||
.byte 0x63
|
.byte 0x63
|
||||||
.byte \param0
|
.byte \param0
|
||||||
.endm
|
.endm
|
||||||
|
@ -1354,7 +1354,7 @@ BattleScript_SleepTalkUsingMove::
|
|||||||
waitanimation
|
waitanimation
|
||||||
setbyte sB_ANIM_TURN, 0x0
|
setbyte sB_ANIM_TURN, 0x0
|
||||||
setbyte sB_ANIM_TARGETS_HIT, 0x0
|
setbyte sB_ANIM_TARGETS_HIT, 0x0
|
||||||
jumptorandomattack TRUE
|
jumptocalledattack TRUE
|
||||||
|
|
||||||
BattleScript_EffectDestinyBond::
|
BattleScript_EffectDestinyBond::
|
||||||
attackcanceler
|
attackcanceler
|
||||||
@ -2399,7 +2399,7 @@ BattleScript_EffectAssist::
|
|||||||
waitanimation
|
waitanimation
|
||||||
setbyte sB_ANIM_TURN, 0x0
|
setbyte sB_ANIM_TURN, 0x0
|
||||||
setbyte sB_ANIM_TARGETS_HIT, 0x0
|
setbyte sB_ANIM_TARGETS_HIT, 0x0
|
||||||
jumptorandomattack TRUE
|
jumptocalledattack TRUE
|
||||||
|
|
||||||
BattleScript_EffectIngrain::
|
BattleScript_EffectIngrain::
|
||||||
attackcanceler
|
attackcanceler
|
||||||
@ -4260,7 +4260,7 @@ BattleScript_IgnoresWhileAsleep::
|
|||||||
BattleScript_IgnoresAndUsesRandomMove::
|
BattleScript_IgnoresAndUsesRandomMove::
|
||||||
printstring STRINGID_PKMNIGNOREDORDERS
|
printstring STRINGID_PKMNIGNOREDORDERS
|
||||||
waitmessage 0x40
|
waitmessage 0x40
|
||||||
jumptorandomattack FALSE
|
jumptocalledattack FALSE
|
||||||
|
|
||||||
BattleScript_MoveUsedLoafingAround::
|
BattleScript_MoveUsedLoafingAround::
|
||||||
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x4, BattleScript_82DB6C7
|
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x4, BattleScript_82DB6C7
|
||||||
|
@ -730,7 +730,7 @@ extern u8 gCurrMovePos;
|
|||||||
extern u8 gChosenMovePos;
|
extern u8 gChosenMovePos;
|
||||||
extern u16 gCurrentMove;
|
extern u16 gCurrentMove;
|
||||||
extern u16 gChosenMove;
|
extern u16 gChosenMove;
|
||||||
extern u16 gRandomMove;
|
extern u16 gCalledMove;
|
||||||
extern s32 gBattleMoveDamage;
|
extern s32 gBattleMoveDamage;
|
||||||
extern s32 gHpDealt;
|
extern s32 gHpDealt;
|
||||||
extern s32 gTakenDmg[MAX_BATTLERS_COUNT];
|
extern s32 gTakenDmg[MAX_BATTLERS_COUNT];
|
||||||
|
@ -219,7 +219,7 @@ EWRAM_DATA u8 gCurrMovePos = 0;
|
|||||||
EWRAM_DATA u8 gChosenMovePos = 0;
|
EWRAM_DATA u8 gChosenMovePos = 0;
|
||||||
EWRAM_DATA u16 gCurrentMove = 0;
|
EWRAM_DATA u16 gCurrentMove = 0;
|
||||||
EWRAM_DATA u16 gChosenMove = 0;
|
EWRAM_DATA u16 gChosenMove = 0;
|
||||||
EWRAM_DATA u16 gRandomMove = 0;
|
EWRAM_DATA u16 gCalledMove = 0;
|
||||||
EWRAM_DATA s32 gBattleMoveDamage = 0;
|
EWRAM_DATA s32 gBattleMoveDamage = 0;
|
||||||
EWRAM_DATA s32 gHpDealt = 0;
|
EWRAM_DATA s32 gHpDealt = 0;
|
||||||
EWRAM_DATA s32 gTakenDmg[MAX_BATTLERS_COUNT] = {0};
|
EWRAM_DATA s32 gTakenDmg[MAX_BATTLERS_COUNT] = {0};
|
||||||
|
@ -190,7 +190,7 @@ static void atk5F_swapattackerwithtarget(void);
|
|||||||
static void atk60_incrementgamestat(void);
|
static void atk60_incrementgamestat(void);
|
||||||
static void atk61_drawpartystatussummary(void);
|
static void atk61_drawpartystatussummary(void);
|
||||||
static void atk62_hidepartystatussummary(void);
|
static void atk62_hidepartystatussummary(void);
|
||||||
static void atk63_jumptorandomattack(void);
|
static void atk63_jumptocalledattack(void);
|
||||||
static void atk64_statusanimation(void);
|
static void atk64_statusanimation(void);
|
||||||
static void atk65_status2animation(void);
|
static void atk65_status2animation(void);
|
||||||
static void atk66_chosenstatusanimation(void);
|
static void atk66_chosenstatusanimation(void);
|
||||||
@ -442,7 +442,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
|
|||||||
atk60_incrementgamestat,
|
atk60_incrementgamestat,
|
||||||
atk61_drawpartystatussummary,
|
atk61_drawpartystatussummary,
|
||||||
atk62_hidepartystatussummary,
|
atk62_hidepartystatussummary,
|
||||||
atk63_jumptorandomattack,
|
atk63_jumptocalledattack,
|
||||||
atk64_statusanimation,
|
atk64_statusanimation,
|
||||||
atk65_status2animation,
|
atk65_status2animation,
|
||||||
atk66_chosenstatusanimation,
|
atk66_chosenstatusanimation,
|
||||||
@ -6049,12 +6049,12 @@ static void atk62_hidepartystatussummary(void)
|
|||||||
gBattlescriptCurrInstr += 2;
|
gBattlescriptCurrInstr += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void atk63_jumptorandomattack(void)
|
static void atk63_jumptocalledattack(void)
|
||||||
{
|
{
|
||||||
if (gBattlescriptCurrInstr[1])
|
if (gBattlescriptCurrInstr[1])
|
||||||
gCurrentMove = gRandomMove;
|
gCurrentMove = gCalledMove;
|
||||||
else
|
else
|
||||||
gChosenMove = gCurrentMove = gRandomMove;
|
gChosenMove = gCurrentMove = gCalledMove;
|
||||||
|
|
||||||
gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect];
|
gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect];
|
||||||
}
|
}
|
||||||
@ -8509,10 +8509,10 @@ static void atkA9_trychoosesleeptalkmove(void)
|
|||||||
movePosition = Random() & 3;
|
movePosition = Random() & 3;
|
||||||
} while ((gBitTable[movePosition] & unusableMovesBits));
|
} while ((gBitTable[movePosition] & unusableMovesBits));
|
||||||
|
|
||||||
gRandomMove = gBattleMons[gBattlerAttacker].moves[movePosition];
|
gCalledMove = gBattleMons[gBattlerAttacker].moves[movePosition];
|
||||||
gCurrMovePos = movePosition;
|
gCurrMovePos = movePosition;
|
||||||
gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED);
|
gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED);
|
||||||
gBattlerTarget = GetMoveTarget(gRandomMove, 0);
|
gBattlerTarget = GetMoveTarget(gCalledMove, 0);
|
||||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
|
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -9737,8 +9737,8 @@ static void atkDE_asistattackselect(void)
|
|||||||
if (chooseableMovesNo)
|
if (chooseableMovesNo)
|
||||||
{
|
{
|
||||||
gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED);
|
gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED);
|
||||||
gRandomMove = movesArray[((Random() & 0xFF) * chooseableMovesNo) >> 8];
|
gCalledMove = movesArray[((Random() & 0xFF) * chooseableMovesNo) >> 8];
|
||||||
gBattlerTarget = GetMoveTarget(gRandomMove, 0);
|
gBattlerTarget = GetMoveTarget(gCalledMove, 0);
|
||||||
gBattlescriptCurrInstr += 5;
|
gBattlescriptCurrInstr += 5;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3408,9 +3408,9 @@ u8 IsMonDisobedient(void)
|
|||||||
gCurrMovePos = gChosenMovePos = Random() & 3;
|
gCurrMovePos = gChosenMovePos = Random() & 3;
|
||||||
} while (gBitTable[gCurrMovePos] & calc);
|
} while (gBitTable[gCurrMovePos] & calc);
|
||||||
|
|
||||||
gRandomMove = gBattleMons[gBattlerAttacker].moves[gCurrMovePos];
|
gCalledMove = gBattleMons[gBattlerAttacker].moves[gCurrMovePos];
|
||||||
gBattlescriptCurrInstr = BattleScript_IgnoresAndUsesRandomMove;
|
gBattlescriptCurrInstr = BattleScript_IgnoresAndUsesRandomMove;
|
||||||
gBattlerTarget = GetMoveTarget(gRandomMove, 0);
|
gBattlerTarget = GetMoveTarget(gCalledMove, 0);
|
||||||
gHitMarker |= HITMARKER_x200000;
|
gHitMarker |= HITMARKER_x200000;
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user