remove recordability script cmd, use RecordAbilityBattle in CreateAbilityPopup to catch popupOverwite abilities
This commit is contained in:
parent
a7fca616b0
commit
7a9a500b15
4 changed files with 7 additions and 11 deletions
|
@ -649,9 +649,8 @@
|
||||||
.byte \battler
|
.byte \battler
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro recordability battler:req
|
.macro unused70
|
||||||
.byte 0x70
|
.byte 0x70
|
||||||
.byte \battler
|
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro buffermovetolearn
|
.macro buffermovetolearn
|
||||||
|
|
|
@ -7599,7 +7599,6 @@ BattleScript_AbilityPopUp:
|
||||||
showabilitypopup BS_ABILITY_BATTLER
|
showabilitypopup BS_ABILITY_BATTLER
|
||||||
pause 40
|
pause 40
|
||||||
.endif
|
.endif
|
||||||
recordability BS_ABILITY_BATTLER
|
|
||||||
sethword sABILITY_OVERWRITE, 0
|
sethword sABILITY_OVERWRITE, 0
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -7608,7 +7607,6 @@ BattleScript_AbilityPopUpScripting:
|
||||||
showabilitypopup BS_SCRIPTING
|
showabilitypopup BS_SCRIPTING
|
||||||
pause 40
|
pause 40
|
||||||
.endif
|
.endif
|
||||||
recordability BS_SCRIPTING
|
|
||||||
sethword sABILITY_OVERWRITE, 0
|
sethword sABILITY_OVERWRITE, 0
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "malloc.h"
|
#include "malloc.h"
|
||||||
#include "battle.h"
|
#include "battle.h"
|
||||||
|
#include "battle_ai_util.h"
|
||||||
#include "pokemon.h"
|
#include "pokemon.h"
|
||||||
#include "battle_controllers.h"
|
#include "battle_controllers.h"
|
||||||
#include "battle_interface.h"
|
#include "battle_interface.h"
|
||||||
|
@ -2718,6 +2719,7 @@ void CreateAbilityPopUp(u8 battlerId, u32 ability, bool32 isDoubleBattle)
|
||||||
LoadSpriteSheet(&sSpriteSheet_AbilityPopUp);
|
LoadSpriteSheet(&sSpriteSheet_AbilityPopUp);
|
||||||
LoadSpritePalette(&sSpritePalette_AbilityPopUp);
|
LoadSpritePalette(&sSpritePalette_AbilityPopUp);
|
||||||
}
|
}
|
||||||
|
RecordAbilityBattle(battlerId, ability);
|
||||||
gBattleStruct->activeAbilityPopUps |= 1u << battlerId;
|
gBattleStruct->activeAbilityPopUps |= 1u << battlerId;
|
||||||
battlerPosition = GetBattlerPosition(battlerId);
|
battlerPosition = GetBattlerPosition(battlerId);
|
||||||
|
|
||||||
|
|
|
@ -450,7 +450,7 @@ static void Cmd_drawlvlupbox(void);
|
||||||
static void Cmd_resetsentmonsvalue(void);
|
static void Cmd_resetsentmonsvalue(void);
|
||||||
static void Cmd_setatktoplayer0(void);
|
static void Cmd_setatktoplayer0(void);
|
||||||
static void Cmd_makevisible(void);
|
static void Cmd_makevisible(void);
|
||||||
static void Cmd_recordability(void);
|
static void Cmd_unused70(void);
|
||||||
static void Cmd_buffermovetolearn(void);
|
static void Cmd_buffermovetolearn(void);
|
||||||
static void Cmd_jumpifplayerran(void);
|
static void Cmd_jumpifplayerran(void);
|
||||||
static void Cmd_hpthresholds(void);
|
static void Cmd_hpthresholds(void);
|
||||||
|
@ -709,7 +709,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
|
||||||
Cmd_resetsentmonsvalue, //0x6D
|
Cmd_resetsentmonsvalue, //0x6D
|
||||||
Cmd_setatktoplayer0, //0x6E
|
Cmd_setatktoplayer0, //0x6E
|
||||||
Cmd_makevisible, //0x6F
|
Cmd_makevisible, //0x6F
|
||||||
Cmd_recordability, //0x70
|
Cmd_unused70, //0x70
|
||||||
Cmd_buffermovetolearn, //0x71
|
Cmd_buffermovetolearn, //0x71
|
||||||
Cmd_jumpifplayerran, //0x72
|
Cmd_jumpifplayerran, //0x72
|
||||||
Cmd_hpthresholds, //0x73
|
Cmd_hpthresholds, //0x73
|
||||||
|
@ -8610,12 +8610,9 @@ static void Cmd_makevisible(void)
|
||||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_recordability(void)
|
static void Cmd_unused70(void)
|
||||||
{
|
{
|
||||||
CMD_ARGS(u8 battler);
|
CMD_ARGS();
|
||||||
|
|
||||||
u8 battler = GetBattlerForBattleScript(cmd->battler);
|
|
||||||
RecordAbilityBattle(battler, gBattleMons[battler].ability);
|
|
||||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue