mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-27 13:53:52 +01:00
match one function in battlescript cmds
This commit is contained in:
parent
af197ccd3b
commit
7472d639cf
@ -252,11 +252,21 @@
|
|||||||
#define MOVE_TARGET_FOES_AND_ALLY 0x20
|
#define MOVE_TARGET_FOES_AND_ALLY 0x20
|
||||||
#define MOVE_TARGET_OPPONENTS_FIELD 0x40
|
#define MOVE_TARGET_OPPONENTS_FIELD 0x40
|
||||||
|
|
||||||
|
// defines for the u8 array gTypeEffectiveness
|
||||||
|
#define TYPE_EFFECT_ATK_TYPE(i)((gTypeEffectiveness[i + 0]))
|
||||||
|
#define TYPE_EFFECT_DEF_TYPE(i)((gTypeEffectiveness[i + 1]))
|
||||||
|
#define TYPE_EFFECT_MULTIPLIER(i)((gTypeEffectiveness[i + 2]))
|
||||||
|
|
||||||
|
// defines for the gTypeEffectiveness multipliers
|
||||||
#define TYPE_MUL_NO_EFFECT 0
|
#define TYPE_MUL_NO_EFFECT 0
|
||||||
#define TYPE_MUL_NOT_EFFECTIVE 5
|
#define TYPE_MUL_NOT_EFFECTIVE 5
|
||||||
#define TYPE_MUL_NORMAL 10
|
#define TYPE_MUL_NORMAL 10
|
||||||
#define TYPE_MUL_SUPER_EFFECTIVE 20
|
#define TYPE_MUL_SUPER_EFFECTIVE 20
|
||||||
|
|
||||||
|
// special type table Ids
|
||||||
|
#define TYPE_FORESIGHT 0xFE
|
||||||
|
#define TYPE_ENDTABLE 0xFF
|
||||||
|
|
||||||
#define BS_GET_TARGET 0
|
#define BS_GET_TARGET 0
|
||||||
#define BS_GET_ATTACKER 1
|
#define BS_GET_ATTACKER 1
|
||||||
#define BS_GET_EFFECT_BANK 2
|
#define BS_GET_EFFECT_BANK 2
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include "calculate_base_damage.h"
|
#include "calculate_base_damage.h"
|
||||||
#include "rng.h"
|
#include "rng.h"
|
||||||
#include "battle_controllers.h"
|
#include "battle_controllers.h"
|
||||||
|
#include "battle_interface.h"
|
||||||
#include "species.h"
|
#include "species.h"
|
||||||
#include "songs.h"
|
#include "songs.h"
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
@ -118,7 +119,7 @@ struct TrainerMoney
|
|||||||
|
|
||||||
extern const struct BattleMove gBattleMoves[];
|
extern const struct BattleMove gBattleMoves[];
|
||||||
extern const struct BaseStats gBaseStats[];
|
extern const struct BaseStats gBaseStats[];
|
||||||
extern const u8 gTypeEffectiveness[];
|
extern const u8 gTypeEffectiveness[336];
|
||||||
extern const u16 gMissStringIds[];
|
extern const u16 gMissStringIds[];
|
||||||
extern const u16 gTrappingMoves[];
|
extern const u16 gTrappingMoves[];
|
||||||
extern const struct TrainerMoney gTrainerMoneyTable[];
|
extern const struct TrainerMoney gTrainerMoneyTable[];
|
||||||
@ -139,7 +140,6 @@ extern void sub_81A5BF8(void); // battle frontier 2
|
|||||||
extern void sub_81A5D44(void); // battle frontier 2
|
extern void sub_81A5D44(void); // battle frontier 2
|
||||||
extern void sub_81B8E80(u8 bank, u8, u8); // party menu
|
extern void sub_81B8E80(u8 bank, u8, u8); // party menu
|
||||||
extern bool8 sub_81B1250(void); // ?
|
extern bool8 sub_81B1250(void); // ?
|
||||||
extern u8 GetScaledHPFraction(s16 hp, s16 maxhp, u8 scale); // battle interface
|
|
||||||
extern bool8 InBattlePike(void);
|
extern bool8 InBattlePike(void);
|
||||||
extern bool8 InBattlePyramid(void);
|
extern bool8 InBattlePyramid(void);
|
||||||
extern u16 GetBattlePyramidPickupItemId(void);
|
extern u16 GetBattlePyramidPickupItemId(void);
|
||||||
@ -340,7 +340,7 @@ static void atk48_playstatchangeanimation(void);
|
|||||||
static void atk49_moveend(void);
|
static void atk49_moveend(void);
|
||||||
static void atk4A_typecalc2(void);
|
static void atk4A_typecalc2(void);
|
||||||
static void atk4B_return_atk_to_ball(void);
|
static void atk4B_return_atk_to_ball(void);
|
||||||
static void atk4C_copy_poke_data(void);
|
static void atk4C_get_switched_mon_data(void);
|
||||||
static void atk4D_switch_data_update(void);
|
static void atk4D_switch_data_update(void);
|
||||||
static void atk4E_switchin_anim(void);
|
static void atk4E_switchin_anim(void);
|
||||||
static void atk4F_jump_if_cannot_switch(void);
|
static void atk4F_jump_if_cannot_switch(void);
|
||||||
@ -368,7 +368,7 @@ 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);
|
||||||
static void atk67_yesnobox(void);
|
static void atk67_yesnobox(void);
|
||||||
static void atk68_80246A0(void);
|
static void atk68_cancel_everyones_actions(void);
|
||||||
static void atk69_dmg_adjustment3(void);
|
static void atk69_dmg_adjustment3(void);
|
||||||
static void atk6A_removeitem(void);
|
static void atk6A_removeitem(void);
|
||||||
static void atk6B_atknameinbuff1(void);
|
static void atk6B_atknameinbuff1(void);
|
||||||
@ -457,7 +457,7 @@ static void atkBD_copyfoestats(void);
|
|||||||
static void atkBE_rapidspinfree(void);
|
static void atkBE_rapidspinfree(void);
|
||||||
static void atkBF_set_defense_curl(void);
|
static void atkBF_set_defense_curl(void);
|
||||||
static void atkC0_recoverbasedonsunlight(void);
|
static void atkC0_recoverbasedonsunlight(void);
|
||||||
static void atkC1_hidden_power(void);
|
static void atkC1_hidden_power_calc(void);
|
||||||
static void atkC2_selectnexttarget(void);
|
static void atkC2_selectnexttarget(void);
|
||||||
static void atkC3_setfutureattack(void);
|
static void atkC3_setfutureattack(void);
|
||||||
static void atkC4_beat_up(void);
|
static void atkC4_beat_up(void);
|
||||||
@ -592,7 +592,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
|
|||||||
atk49_moveend,
|
atk49_moveend,
|
||||||
atk4A_typecalc2,
|
atk4A_typecalc2,
|
||||||
atk4B_return_atk_to_ball,
|
atk4B_return_atk_to_ball,
|
||||||
atk4C_copy_poke_data,
|
atk4C_get_switched_mon_data,
|
||||||
atk4D_switch_data_update,
|
atk4D_switch_data_update,
|
||||||
atk4E_switchin_anim,
|
atk4E_switchin_anim,
|
||||||
atk4F_jump_if_cannot_switch,
|
atk4F_jump_if_cannot_switch,
|
||||||
@ -620,7 +620,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
|
|||||||
atk65_status2animation,
|
atk65_status2animation,
|
||||||
atk66_chosenstatusanimation,
|
atk66_chosenstatusanimation,
|
||||||
atk67_yesnobox,
|
atk67_yesnobox,
|
||||||
atk68_80246A0,
|
atk68_cancel_everyones_actions,
|
||||||
atk69_dmg_adjustment3,
|
atk69_dmg_adjustment3,
|
||||||
atk6A_removeitem,
|
atk6A_removeitem,
|
||||||
atk6B_atknameinbuff1,
|
atk6B_atknameinbuff1,
|
||||||
@ -709,7 +709,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
|
|||||||
atkBE_rapidspinfree,
|
atkBE_rapidspinfree,
|
||||||
atkBF_set_defense_curl,
|
atkBF_set_defense_curl,
|
||||||
atkC0_recoverbasedonsunlight,
|
atkC0_recoverbasedonsunlight,
|
||||||
atkC1_hidden_power,
|
atkC1_hidden_power_calc,
|
||||||
atkC2_selectnexttarget,
|
atkC2_selectnexttarget,
|
||||||
atkC3_setfutureattack,
|
atkC3_setfutureattack,
|
||||||
atkC4_beat_up,
|
atkC4_beat_up,
|
||||||
@ -828,7 +828,7 @@ static const u32 sStatusFlagsForMoveEffects[] =
|
|||||||
0x00000000,
|
0x00000000,
|
||||||
0x00000000,
|
0x00000000,
|
||||||
STATUS2_ESCAPE_PREVENTION,
|
STATUS2_ESCAPE_PREVENTION,
|
||||||
0x08000000,
|
STATUS2_NIGHTMARE,
|
||||||
0x00000000,
|
0x00000000,
|
||||||
0x00000000,
|
0x00000000,
|
||||||
0x00000000,
|
0x00000000,
|
||||||
@ -1233,7 +1233,7 @@ bool8 JumpIfMoveAffectedByProtect(u16 move)
|
|||||||
return affected;
|
return affected;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 AccuracyCalcHelper(u16 move)
|
static bool8 AccuracyCalcHelper(u16 move)
|
||||||
{
|
{
|
||||||
if (gStatuses3[gBankTarget] & STATUS3_ALWAYS_HITS && gDisableStructs[gBankTarget].bankWithSureHit == gBankAttacker)
|
if (gStatuses3[gBankTarget] & STATUS3_ALWAYS_HITS && gDisableStructs[gBankTarget].bankWithSureHit == gBankAttacker)
|
||||||
{
|
{
|
||||||
@ -1532,9 +1532,6 @@ static void ModulateDmgByType(u8 multiplier)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define TYPE_FORESIGHT 0xFE
|
|
||||||
#define TYPE_ENDTABLE 0xFF
|
|
||||||
|
|
||||||
static void atk06_typecalc(void)
|
static void atk06_typecalc(void)
|
||||||
{
|
{
|
||||||
s32 i = 0;
|
s32 i = 0;
|
||||||
@ -1566,24 +1563,24 @@ static void atk06_typecalc(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
while (gTypeEffectiveness[i] != TYPE_ENDTABLE)
|
while (TYPE_EFFECT_ATK_TYPE(i) != TYPE_ENDTABLE)
|
||||||
{
|
{
|
||||||
if (gTypeEffectiveness[i] == TYPE_FORESIGHT)
|
if (TYPE_EFFECT_ATK_TYPE(i) == TYPE_FORESIGHT)
|
||||||
{
|
{
|
||||||
if (gBattleMons[gBankTarget].status2 & STATUS2_FORESIGHT)
|
if (gBattleMons[gBankTarget].status2 & STATUS2_FORESIGHT)
|
||||||
break;
|
break;
|
||||||
i += 3;
|
i += 3;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (gTypeEffectiveness[i] == moveType)
|
else if (TYPE_EFFECT_ATK_TYPE(i) == moveType)
|
||||||
{
|
{
|
||||||
// check type1
|
// check type1
|
||||||
if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type1)
|
if (TYPE_EFFECT_DEF_TYPE(i) == gBattleMons[gBankTarget].type1)
|
||||||
ModulateDmgByType(gTypeEffectiveness[i + 2]);
|
ModulateDmgByType(TYPE_EFFECT_MULTIPLIER(i));
|
||||||
// check type2
|
// check type2
|
||||||
if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type2 &&
|
if (TYPE_EFFECT_DEF_TYPE(i) == gBattleMons[gBankTarget].type2 &&
|
||||||
gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2)
|
gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2)
|
||||||
ModulateDmgByType(gTypeEffectiveness[i + 2]);
|
ModulateDmgByType(TYPE_EFFECT_MULTIPLIER(i));
|
||||||
}
|
}
|
||||||
i += 3;
|
i += 3;
|
||||||
}
|
}
|
||||||
@ -1625,45 +1622,46 @@ static void CheckWonderGuardAndLevitate(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (gTypeEffectiveness[i] != TYPE_ENDTABLE)
|
while (TYPE_EFFECT_ATK_TYPE(i) != TYPE_ENDTABLE)
|
||||||
{
|
{
|
||||||
if (gTypeEffectiveness[i] == TYPE_FORESIGHT)
|
if (TYPE_EFFECT_ATK_TYPE(i) == TYPE_FORESIGHT)
|
||||||
{
|
{
|
||||||
if (gBattleMons[gBankTarget].status2 & STATUS2_FORESIGHT)
|
if (gBattleMons[gBankTarget].status2 & STATUS2_FORESIGHT)
|
||||||
break;
|
break;
|
||||||
i += 3;
|
i += 3;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (gTypeEffectiveness[i] == moveType)
|
if (TYPE_EFFECT_ATK_TYPE(i) == moveType)
|
||||||
{
|
{
|
||||||
// check no effect
|
// check no effect
|
||||||
if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type1 && gTypeEffectiveness[i + 2] == 0)
|
if (TYPE_EFFECT_DEF_TYPE(i) == gBattleMons[gBankTarget].type1
|
||||||
|
&& TYPE_EFFECT_MULTIPLIER(i) == TYPE_MUL_NO_EFFECT)
|
||||||
{
|
{
|
||||||
gBattleMoveFlags |= MOVESTATUS_NOTAFFECTED;
|
gBattleMoveFlags |= MOVESTATUS_NOTAFFECTED;
|
||||||
gProtectStructs[gBankAttacker].targetNotAffected = 1;
|
gProtectStructs[gBankAttacker].targetNotAffected = 1;
|
||||||
}
|
}
|
||||||
if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type2 &&
|
if (TYPE_EFFECT_DEF_TYPE(i) == gBattleMons[gBankTarget].type2 &&
|
||||||
gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2 &&
|
gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2 &&
|
||||||
gTypeEffectiveness[i + 2] == TYPE_MUL_NO_EFFECT)
|
TYPE_EFFECT_MULTIPLIER(i) == TYPE_MUL_NO_EFFECT)
|
||||||
{
|
{
|
||||||
gBattleMoveFlags |= MOVESTATUS_NOTAFFECTED;
|
gBattleMoveFlags |= MOVESTATUS_NOTAFFECTED;
|
||||||
gProtectStructs[gBankAttacker].targetNotAffected = 1;
|
gProtectStructs[gBankAttacker].targetNotAffected = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check super effective
|
// check super effective
|
||||||
if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type1 && gTypeEffectiveness[i + 2] == 20)
|
if (TYPE_EFFECT_DEF_TYPE(i) == gBattleMons[gBankTarget].type1 && TYPE_EFFECT_MULTIPLIER(i) == 20)
|
||||||
flags |= 1;
|
flags |= 1;
|
||||||
if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type2
|
if (TYPE_EFFECT_DEF_TYPE(i) == gBattleMons[gBankTarget].type2
|
||||||
&& gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2
|
&& gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2
|
||||||
&& gTypeEffectiveness[i + 2] == TYPE_MUL_SUPER_EFFECTIVE)
|
&& TYPE_EFFECT_MULTIPLIER(i) == TYPE_MUL_SUPER_EFFECTIVE)
|
||||||
flags |= 1;
|
flags |= 1;
|
||||||
|
|
||||||
// check not very effective
|
// check not very effective
|
||||||
if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type1 && gTypeEffectiveness[i + 2] == 5)
|
if (TYPE_EFFECT_DEF_TYPE(i) == gBattleMons[gBankTarget].type1 && TYPE_EFFECT_MULTIPLIER(i) == 5)
|
||||||
flags |= 2;
|
flags |= 2;
|
||||||
if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type2
|
if (TYPE_EFFECT_DEF_TYPE(i) == gBattleMons[gBankTarget].type2
|
||||||
&& gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2
|
&& gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2
|
||||||
&& gTypeEffectiveness[i + 2] == TYPE_MUL_NOT_EFFECTIVE)
|
&& TYPE_EFFECT_MULTIPLIER(i) == TYPE_MUL_NOT_EFFECTIVE)
|
||||||
flags |= 2;
|
flags |= 2;
|
||||||
}
|
}
|
||||||
i += 3;
|
i += 3;
|
||||||
@ -1738,9 +1736,9 @@ u8 TypeCalc(u16 move, u8 bankAtk, u8 bankDef)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
while (gTypeEffectiveness[i]!= TYPE_ENDTABLE)
|
while (TYPE_EFFECT_ATK_TYPE(i) != TYPE_ENDTABLE)
|
||||||
{
|
{
|
||||||
if (gTypeEffectiveness[i] == TYPE_FORESIGHT)
|
if (TYPE_EFFECT_ATK_TYPE(i) == TYPE_FORESIGHT)
|
||||||
{
|
{
|
||||||
if (gBattleMons[bankDef].status2 & STATUS2_FORESIGHT)
|
if (gBattleMons[bankDef].status2 & STATUS2_FORESIGHT)
|
||||||
break;
|
break;
|
||||||
@ -1748,15 +1746,15 @@ u8 TypeCalc(u16 move, u8 bankAtk, u8 bankDef)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (gTypeEffectiveness[i] == moveType)
|
else if (TYPE_EFFECT_ATK_TYPE(i) == moveType)
|
||||||
{
|
{
|
||||||
// check type1
|
// check type1
|
||||||
if (gTypeEffectiveness[i + 1] == gBattleMons[bankDef].type1)
|
if (TYPE_EFFECT_DEF_TYPE(i) == gBattleMons[bankDef].type1)
|
||||||
ModulateDmgByType2(gTypeEffectiveness[i + 2], move, &flags);
|
ModulateDmgByType2(TYPE_EFFECT_MULTIPLIER(i), move, &flags);
|
||||||
// check type2
|
// check type2
|
||||||
if (gTypeEffectiveness[i + 1] == gBattleMons[bankDef].type2 &&
|
if (TYPE_EFFECT_DEF_TYPE(i) == gBattleMons[bankDef].type2 &&
|
||||||
gBattleMons[bankDef].type1 != gBattleMons[bankDef].type2)
|
gBattleMons[bankDef].type1 != gBattleMons[bankDef].type2)
|
||||||
ModulateDmgByType2(gTypeEffectiveness[i + 2], move, &flags);
|
ModulateDmgByType2(TYPE_EFFECT_MULTIPLIER(i), move, &flags);
|
||||||
}
|
}
|
||||||
i += 3;
|
i += 3;
|
||||||
}
|
}
|
||||||
@ -1790,21 +1788,21 @@ u8 AI_TypeCalc(u16 move, u16 targetSpecies, u8 targetAbility)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
while (gTypeEffectiveness[i] != TYPE_ENDTABLE)
|
while (TYPE_EFFECT_ATK_TYPE(i) != TYPE_ENDTABLE)
|
||||||
{
|
{
|
||||||
if (gTypeEffectiveness[i] == TYPE_FORESIGHT)
|
if (TYPE_EFFECT_ATK_TYPE(i) == TYPE_FORESIGHT)
|
||||||
{
|
{
|
||||||
i += 3;
|
i += 3;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (gTypeEffectiveness[i] == moveType)
|
if (TYPE_EFFECT_ATK_TYPE(i) == moveType)
|
||||||
{
|
{
|
||||||
// check type1
|
// check type1
|
||||||
if (gTypeEffectiveness[i + 1] == type1)
|
if (TYPE_EFFECT_DEF_TYPE(i) == type1)
|
||||||
ModulateDmgByType2(gTypeEffectiveness[i + 2], move, &flags);
|
ModulateDmgByType2(TYPE_EFFECT_MULTIPLIER(i), move, &flags);
|
||||||
// check type2
|
// check type2
|
||||||
if (gTypeEffectiveness[i + 1] == type2 && type1 != type2)
|
if (TYPE_EFFECT_DEF_TYPE(i) == type2 && type1 != type2)
|
||||||
ModulateDmgByType2(gTypeEffectiveness[i + 2], move, &flags);
|
ModulateDmgByType2(TYPE_EFFECT_MULTIPLIER(i), move, &flags);
|
||||||
}
|
}
|
||||||
i += 3;
|
i += 3;
|
||||||
}
|
}
|
||||||
@ -5224,9 +5222,9 @@ static void atk4A_typecalc2(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
while (gTypeEffectiveness[i]!= TYPE_ENDTABLE)
|
while (TYPE_EFFECT_ATK_TYPE(i) != TYPE_ENDTABLE)
|
||||||
{
|
{
|
||||||
if (gTypeEffectiveness[i] == TYPE_FORESIGHT)
|
if (TYPE_EFFECT_ATK_TYPE(i) == TYPE_FORESIGHT)
|
||||||
{
|
{
|
||||||
if (gBattleMons[gBankTarget].status2 & STATUS2_FORESIGHT)
|
if (gBattleMons[gBankTarget].status2 & STATUS2_FORESIGHT)
|
||||||
{
|
{
|
||||||
@ -5239,43 +5237,43 @@ static void atk4A_typecalc2(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gTypeEffectiveness[i] == moveType)
|
if (TYPE_EFFECT_ATK_TYPE(i) == moveType)
|
||||||
{
|
{
|
||||||
// check type1
|
// check type1
|
||||||
if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type1)
|
if (TYPE_EFFECT_DEF_TYPE(i) == gBattleMons[gBankTarget].type1)
|
||||||
{
|
{
|
||||||
if (gTypeEffectiveness[i + 2] == 0)
|
if (TYPE_EFFECT_MULTIPLIER(i) == TYPE_MUL_NO_EFFECT)
|
||||||
{
|
{
|
||||||
gBattleMoveFlags |= MOVESTATUS_NOTAFFECTED;
|
gBattleMoveFlags |= MOVESTATUS_NOTAFFECTED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (gTypeEffectiveness[i + 2] == 5)
|
if (TYPE_EFFECT_MULTIPLIER(i) == TYPE_MUL_NOT_EFFECTIVE)
|
||||||
{
|
{
|
||||||
flags |= MOVESTATUS_NOTVERYEFFECTIVE;
|
flags |= MOVESTATUS_NOTVERYEFFECTIVE;
|
||||||
}
|
}
|
||||||
if (gTypeEffectiveness[i + 2] == 20)
|
if (TYPE_EFFECT_MULTIPLIER(i) == TYPE_MUL_SUPER_EFFECTIVE)
|
||||||
{
|
{
|
||||||
flags |= MOVESTATUS_SUPEREFFECTIVE;
|
flags |= MOVESTATUS_SUPEREFFECTIVE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// check type2
|
// check type2
|
||||||
if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type2)
|
if (TYPE_EFFECT_DEF_TYPE(i) == gBattleMons[gBankTarget].type2)
|
||||||
{
|
{
|
||||||
if (gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2
|
if (gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2
|
||||||
&& gTypeEffectiveness[i + 2] == 0)
|
&& TYPE_EFFECT_MULTIPLIER(i) == TYPE_MUL_NO_EFFECT)
|
||||||
{
|
{
|
||||||
gBattleMoveFlags |= MOVESTATUS_NOTAFFECTED;
|
gBattleMoveFlags |= MOVESTATUS_NOTAFFECTED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type2
|
if (TYPE_EFFECT_DEF_TYPE(i) == gBattleMons[gBankTarget].type2
|
||||||
&& gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2
|
&& gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2
|
||||||
&& gTypeEffectiveness[i + 2] == 5)
|
&& TYPE_EFFECT_MULTIPLIER(i) == TYPE_MUL_NOT_EFFECTIVE)
|
||||||
{
|
{
|
||||||
flags |= MOVESTATUS_NOTVERYEFFECTIVE;
|
flags |= MOVESTATUS_NOTVERYEFFECTIVE;
|
||||||
}
|
}
|
||||||
if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type2
|
if (TYPE_EFFECT_DEF_TYPE(i) == gBattleMons[gBankTarget].type2
|
||||||
&& gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2
|
&& gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2
|
||||||
&& gTypeEffectiveness[i + 2] == 20)
|
&& TYPE_EFFECT_MULTIPLIER(i) == TYPE_MUL_SUPER_EFFECTIVE)
|
||||||
{
|
{
|
||||||
flags |= MOVESTATUS_SUPEREFFECTIVE;
|
flags |= MOVESTATUS_SUPEREFFECTIVE;
|
||||||
}
|
}
|
||||||
@ -5314,7 +5312,7 @@ static void atk4B_return_atk_to_ball(void)
|
|||||||
gBattlescriptCurrInstr++;
|
gBattlescriptCurrInstr++;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void atk4C_copy_poke_data(void)
|
static void atk4C_get_switched_mon_data(void)
|
||||||
{
|
{
|
||||||
if (gBattleExecBuffer)
|
if (gBattleExecBuffer)
|
||||||
return;
|
return;
|
||||||
@ -5323,7 +5321,7 @@ static void atk4C_copy_poke_data(void)
|
|||||||
|
|
||||||
gBattlePartyID[gActiveBank] = *(gBattleStruct->field_5C + gActiveBank);
|
gBattlePartyID[gActiveBank] = *(gBattleStruct->field_5C + gActiveBank);
|
||||||
|
|
||||||
EmitGetMonData(0, 0, gBitTable[gBattlePartyID[gActiveBank]]);
|
EmitGetMonData(0, REQUEST_ALL_BATTLE, gBitTable[gBattlePartyID[gActiveBank]]);
|
||||||
MarkBufferBankForExecution(gActiveBank);
|
MarkBufferBankForExecution(gActiveBank);
|
||||||
|
|
||||||
gBattlescriptCurrInstr += 2;
|
gBattlescriptCurrInstr += 2;
|
||||||
@ -5360,7 +5358,7 @@ static void atk4D_switch_data_update(void)
|
|||||||
|
|
||||||
if (gBattleMoves[gCurrentMove].effect == EFFECT_BATON_PASS)
|
if (gBattleMoves[gCurrentMove].effect == EFFECT_BATON_PASS)
|
||||||
{
|
{
|
||||||
for (i = 0; i < 8; i++)
|
for (i = 0; i < BATTLE_STATS_NO; i++)
|
||||||
{
|
{
|
||||||
gBattleMons[gActiveBank].statStages[i] = oldData.statStages[i];
|
gBattleMons[gActiveBank].statStages[i] = oldData.statStages[i];
|
||||||
}
|
}
|
||||||
@ -5376,11 +5374,8 @@ static void atk4D_switch_data_update(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
gBattleScripting.bank = gActiveBank;
|
gBattleScripting.bank = gActiveBank;
|
||||||
gBattleTextBuff1[0] = PLACEHOLDER_BEGIN;
|
|
||||||
gBattleTextBuff1[1] = 7;
|
PREPARE_MON_NICK_BUFFER(gBattleTextBuff1, gActiveBank, gBattlePartyID[gActiveBank]);
|
||||||
gBattleTextBuff1[2] = gActiveBank;
|
|
||||||
gBattleTextBuff1[3] = gBattlePartyID[gActiveBank];
|
|
||||||
gBattleTextBuff1[4] = EOS;
|
|
||||||
|
|
||||||
gBattlescriptCurrInstr += 2;
|
gBattlescriptCurrInstr += 2;
|
||||||
}
|
}
|
||||||
@ -6565,7 +6560,7 @@ static void atk67_yesnobox(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void atk68_80246A0(void)
|
static void atk68_cancel_everyones_actions(void)
|
||||||
{
|
{
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
@ -8803,7 +8798,6 @@ static void atkA5_painsplitdmgcalc(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NONMATCHING
|
|
||||||
static void atkA6_settypetorandomresistance(void) // conversion 2
|
static void atkA6_settypetorandomresistance(void) // conversion 2
|
||||||
{
|
{
|
||||||
if (gUnknown_02024250[gBankAttacker] == 0
|
if (gUnknown_02024250[gBankAttacker] == 0
|
||||||
@ -8818,298 +8812,58 @@ static void atkA6_settypetorandomresistance(void) // conversion 2
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
s32 type = 0, rands = 0;
|
s32 i, j, rands;
|
||||||
do
|
|
||||||
|
for (rands = 0; rands < 1000; rands++)
|
||||||
{
|
{
|
||||||
while (((type = (Random() & 0x7F)) > 0x70));
|
while (((i = (Random() & 0x7F)) > sizeof(gTypeEffectiveness) / 3));
|
||||||
|
|
||||||
type *= 3;
|
i *= 3;
|
||||||
|
|
||||||
if (gTypeEffectiveness[type] == gUnknown_02024258[gBankAttacker]
|
if (TYPE_EFFECT_ATK_TYPE(i) == gUnknown_02024258[gBankAttacker]
|
||||||
&& gTypeEffectiveness[type + 2] <= 5
|
&& TYPE_EFFECT_MULTIPLIER(i) <= TYPE_MUL_NOT_EFFECTIVE
|
||||||
&& gBattleMons[gBankAttacker].type1 != gTypeEffectiveness[type + 1]
|
&& gBattleMons[gBankAttacker].type1 != TYPE_EFFECT_DEF_TYPE(i)
|
||||||
&& gBattleMons[gBankAttacker].type2 != gTypeEffectiveness[type + 1])
|
&& gBattleMons[gBankAttacker].type2 != TYPE_EFFECT_DEF_TYPE(i))
|
||||||
{
|
{
|
||||||
gBattleMons[gBankAttacker].type1 = type;
|
gBattleMons[gBankAttacker].type1 = TYPE_EFFECT_DEF_TYPE(i);
|
||||||
gBattleMons[gBankAttacker].type2 = type;
|
gBattleMons[gBankAttacker].type2 = TYPE_EFFECT_DEF_TYPE(i);
|
||||||
|
|
||||||
PREPARE_TYPE_BUFFER(gBattleTextBuff1, type)
|
PREPARE_TYPE_BUFFER(gBattleTextBuff1, TYPE_EFFECT_DEF_TYPE(i))
|
||||||
|
|
||||||
gBattlescriptCurrInstr += 5;
|
gBattlescriptCurrInstr += 5;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
rands++;
|
for (j = 0, rands = 0; rands < sizeof(gTypeEffectiveness); j += 3, rands += 3)
|
||||||
} while (rands <= 999);
|
|
||||||
|
|
||||||
type = 0, rands = 0;
|
|
||||||
do
|
|
||||||
{
|
{
|
||||||
s8 var = (s8)(gTypeEffectiveness[type]);
|
switch (TYPE_EFFECT_ATK_TYPE(j))
|
||||||
if (var > -1 || var < -2)
|
|
||||||
{
|
{
|
||||||
if (gTypeEffectiveness[type] == gUnknown_02024258[gBankAttacker]
|
case TYPE_ENDTABLE:
|
||||||
&& gTypeEffectiveness[type + 2] <= 5
|
case TYPE_FORESIGHT:
|
||||||
&& gBattleMons[gBankAttacker].type1 != gTypeEffectiveness[type + 1]
|
break;
|
||||||
&& gBattleMons[gBankAttacker].type2 != gTypeEffectiveness[type + 1])
|
default:
|
||||||
|
if (TYPE_EFFECT_ATK_TYPE(j) == gUnknown_02024258[gBankAttacker]
|
||||||
|
&& TYPE_EFFECT_MULTIPLIER(j) <= 5
|
||||||
|
&& gBattleMons[gBankAttacker].type1 != TYPE_EFFECT_DEF_TYPE(i)
|
||||||
|
&& gBattleMons[gBankAttacker].type2 != TYPE_EFFECT_DEF_TYPE(i))
|
||||||
{
|
{
|
||||||
gBattleMons[gBankAttacker].type1 = gTypeEffectiveness[rands + 1];
|
gBattleMons[gBankAttacker].type1 = TYPE_EFFECT_DEF_TYPE(rands);
|
||||||
gBattleMons[gBankAttacker].type2 = gTypeEffectiveness[rands + 1];
|
gBattleMons[gBankAttacker].type2 = TYPE_EFFECT_DEF_TYPE(rands);
|
||||||
|
|
||||||
PREPARE_TYPE_BUFFER(gBattleTextBuff1, gTypeEffectiveness[rands + 1])
|
PREPARE_TYPE_BUFFER(gBattleTextBuff1, TYPE_EFFECT_DEF_TYPE(rands))
|
||||||
|
|
||||||
gBattlescriptCurrInstr += 5;
|
gBattlescriptCurrInstr += 5;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
type += 3, rands += 3;
|
}
|
||||||
} while (rands < 336);
|
|
||||||
|
|
||||||
gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1);
|
gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
__attribute__((naked))
|
|
||||||
static void atkA6_settypetorandomresistance(void) // conversion 2
|
|
||||||
{
|
|
||||||
asm(".syntax unified\n\
|
|
||||||
push {r4-r7,lr}\n\
|
|
||||||
mov r7, r10\n\
|
|
||||||
mov r6, r9\n\
|
|
||||||
mov r5, r8\n\
|
|
||||||
push {r5-r7}\n\
|
|
||||||
ldr r1, =gUnknown_02024250\n\
|
|
||||||
ldr r4, =gBankAttacker\n\
|
|
||||||
ldrb r0, [r4]\n\
|
|
||||||
lsls r0, 1\n\
|
|
||||||
adds r2, r0, r1\n\
|
|
||||||
ldrh r1, [r2]\n\
|
|
||||||
cmp r1, 0\n\
|
|
||||||
beq _08052B7E\n\
|
|
||||||
ldr r0, =0x0000ffff\n\
|
|
||||||
cmp r1, r0\n\
|
|
||||||
beq _08052B7E\n\
|
|
||||||
ldrh r0, [r2]\n\
|
|
||||||
bl IsTwoTurnsMove\n\
|
|
||||||
lsls r0, 24\n\
|
|
||||||
cmp r0, 0\n\
|
|
||||||
beq _08052C1C\n\
|
|
||||||
ldr r1, =gBattleMons\n\
|
|
||||||
ldr r2, =gUnknown_02024270\n\
|
|
||||||
ldrb r0, [r4]\n\
|
|
||||||
adds r0, r2\n\
|
|
||||||
ldrb r2, [r0]\n\
|
|
||||||
movs r0, 0x58\n\
|
|
||||||
muls r0, r2\n\
|
|
||||||
adds r1, 0x50\n\
|
|
||||||
adds r0, r1\n\
|
|
||||||
ldr r0, [r0]\n\
|
|
||||||
movs r1, 0x80\n\
|
|
||||||
lsls r1, 5\n\
|
|
||||||
ands r0, r1\n\
|
|
||||||
cmp r0, 0\n\
|
|
||||||
beq _08052C1C\n\
|
|
||||||
_08052B7E:\n\
|
|
||||||
ldr r3, =gBattlescriptCurrInstr\n\
|
|
||||||
ldr r2, [r3]\n\
|
|
||||||
ldrb r1, [r2, 0x1]\n\
|
|
||||||
ldrb r0, [r2, 0x2]\n\
|
|
||||||
lsls r0, 8\n\
|
|
||||||
orrs r1, r0\n\
|
|
||||||
ldrb r0, [r2, 0x3]\n\
|
|
||||||
lsls r0, 16\n\
|
|
||||||
orrs r1, r0\n\
|
|
||||||
ldrb r0, [r2, 0x4]\n\
|
|
||||||
lsls r0, 24\n\
|
|
||||||
orrs r1, r0\n\
|
|
||||||
str r1, [r3]\n\
|
|
||||||
b _08052D08\n\
|
|
||||||
.pool\n\
|
|
||||||
_08052BB4:\n\
|
|
||||||
mov r0, r12\n\
|
|
||||||
strb r5, [r0]\n\
|
|
||||||
mov r1, r10\n\
|
|
||||||
ldrb r0, [r1]\n\
|
|
||||||
muls r0, r2\n\
|
|
||||||
adds r0, r7\n\
|
|
||||||
adds r0, 0x22\n\
|
|
||||||
strb r5, [r0]\n\
|
|
||||||
ldr r1, =gBattleTextBuff1\n\
|
|
||||||
movs r0, 0xFD\n\
|
|
||||||
strb r0, [r1]\n\
|
|
||||||
movs r0, 0x3\n\
|
|
||||||
strb r0, [r1, 0x1]\n\
|
|
||||||
strb r5, [r1, 0x2]\n\
|
|
||||||
movs r0, 0xFF\n\
|
|
||||||
strb r0, [r1, 0x3]\n\
|
|
||||||
ldr r1, =gBattlescriptCurrInstr\n\
|
|
||||||
b _08052C0A\n\
|
|
||||||
.pool\n\
|
|
||||||
_08052BE0:\n\
|
|
||||||
mov r0, r8\n\
|
|
||||||
adds r0, 0x1\n\
|
|
||||||
adds r0, r3\n\
|
|
||||||
ldrb r2, [r0]\n\
|
|
||||||
strb r2, [r4]\n\
|
|
||||||
mov r4, r10\n\
|
|
||||||
ldrb r0, [r4]\n\
|
|
||||||
muls r0, r6\n\
|
|
||||||
ldr r7, =gBattleMons\n\
|
|
||||||
adds r0, r7\n\
|
|
||||||
adds r0, 0x22\n\
|
|
||||||
strb r2, [r0]\n\
|
|
||||||
ldr r1, =gBattleTextBuff1\n\
|
|
||||||
movs r0, 0xFD\n\
|
|
||||||
strb r0, [r1]\n\
|
|
||||||
movs r0, 0x3\n\
|
|
||||||
strb r0, [r1, 0x1]\n\
|
|
||||||
strb r2, [r1, 0x2]\n\
|
|
||||||
movs r0, 0xFF\n\
|
|
||||||
strb r0, [r1, 0x3]\n\
|
|
||||||
mov r1, r12\n\
|
|
||||||
_08052C0A:\n\
|
|
||||||
ldr r0, [r1]\n\
|
|
||||||
adds r0, 0x5\n\
|
|
||||||
str r0, [r1]\n\
|
|
||||||
b _08052D08\n\
|
|
||||||
.pool\n\
|
|
||||||
_08052C1C:\n\
|
|
||||||
movs r4, 0\n\
|
|
||||||
mov r8, r4\n\
|
|
||||||
movs r7, 0x7F\n\
|
|
||||||
mov r9, r7\n\
|
|
||||||
_08052C24:\n\
|
|
||||||
bl Random\n\
|
|
||||||
mov r4, r9\n\
|
|
||||||
ands r4, r0\n\
|
|
||||||
cmp r4, 0x70\n\
|
|
||||||
bhi _08052C24\n\
|
|
||||||
lsls r0, r4, 1\n\
|
|
||||||
adds r4, r0, r4\n\
|
|
||||||
ldr r6, =gTypeEffectiveness\n\
|
|
||||||
adds r3, r4, r6\n\
|
|
||||||
ldr r1, =gUnknown_02024258\n\
|
|
||||||
ldr r2, =gBankAttacker\n\
|
|
||||||
ldrb r5, [r2]\n\
|
|
||||||
lsls r0, r5, 1\n\
|
|
||||||
adds r0, r1\n\
|
|
||||||
ldrb r1, [r3]\n\
|
|
||||||
mov r10, r2\n\
|
|
||||||
ldrh r0, [r0]\n\
|
|
||||||
cmp r1, r0\n\
|
|
||||||
bne _08052C80\n\
|
|
||||||
adds r0, r4, 0x2\n\
|
|
||||||
adds r0, r6\n\
|
|
||||||
ldrb r0, [r0]\n\
|
|
||||||
cmp r0, 0x5\n\
|
|
||||||
bhi _08052C80\n\
|
|
||||||
ldr r7, =gBattleMons\n\
|
|
||||||
movs r2, 0x58\n\
|
|
||||||
adds r0, r5, 0\n\
|
|
||||||
muls r0, r2\n\
|
|
||||||
adds r3, r0, r7\n\
|
|
||||||
movs r0, 0x21\n\
|
|
||||||
adds r0, r3\n\
|
|
||||||
mov r12, r0\n\
|
|
||||||
adds r0, r4, 0x1\n\
|
|
||||||
adds r0, r6\n\
|
|
||||||
ldrb r5, [r0]\n\
|
|
||||||
mov r1, r12\n\
|
|
||||||
ldrb r0, [r1]\n\
|
|
||||||
adds r1, r5, 0\n\
|
|
||||||
cmp r0, r1\n\
|
|
||||||
beq _08052C80\n\
|
|
||||||
adds r0, r3, 0\n\
|
|
||||||
adds r0, 0x22\n\
|
|
||||||
ldrb r0, [r0]\n\
|
|
||||||
cmp r0, r1\n\
|
|
||||||
bne _08052BB4\n\
|
|
||||||
_08052C80:\n\
|
|
||||||
movs r7, 0x1\n\
|
|
||||||
add r8, r7\n\
|
|
||||||
ldr r0, =0x000003e7\n\
|
|
||||||
cmp r8, r0\n\
|
|
||||||
ble _08052C24\n\
|
|
||||||
movs r0, 0\n\
|
|
||||||
mov r8, r0\n\
|
|
||||||
ldr r1, =gBattlescriptCurrInstr\n\
|
|
||||||
mov r12, r1\n\
|
|
||||||
ldr r3, =gTypeEffectiveness\n\
|
|
||||||
adds r0, r4, 0x1\n\
|
|
||||||
adds r0, r3\n\
|
|
||||||
mov r9, r0\n\
|
|
||||||
adds r5, r3, 0\n\
|
|
||||||
_08052C9C:\n\
|
|
||||||
ldrb r1, [r5]\n\
|
|
||||||
cmp r1, 0xFF\n\
|
|
||||||
bgt _08052CA6\n\
|
|
||||||
cmp r1, 0xFE\n\
|
|
||||||
bge _08052CE0\n\
|
|
||||||
_08052CA6:\n\
|
|
||||||
mov r4, r10\n\
|
|
||||||
ldrb r2, [r4]\n\
|
|
||||||
lsls r0, r2, 1\n\
|
|
||||||
ldr r7, =gUnknown_02024258\n\
|
|
||||||
adds r0, r7\n\
|
|
||||||
ldrh r0, [r0]\n\
|
|
||||||
cmp r1, r0\n\
|
|
||||||
bne _08052CE0\n\
|
|
||||||
ldrb r0, [r5, 0x2]\n\
|
|
||||||
cmp r0, 0x5\n\
|
|
||||||
bhi _08052CE0\n\
|
|
||||||
movs r6, 0x58\n\
|
|
||||||
adds r0, r2, 0\n\
|
|
||||||
muls r0, r6\n\
|
|
||||||
ldr r1, =gBattleMons\n\
|
|
||||||
adds r2, r0, r1\n\
|
|
||||||
adds r4, r2, 0\n\
|
|
||||||
adds r4, 0x21\n\
|
|
||||||
ldrb r0, [r4]\n\
|
|
||||||
mov r7, r9\n\
|
|
||||||
ldrb r1, [r7]\n\
|
|
||||||
cmp r0, r1\n\
|
|
||||||
beq _08052CE0\n\
|
|
||||||
adds r0, r2, 0\n\
|
|
||||||
adds r0, 0x22\n\
|
|
||||||
ldrb r0, [r0]\n\
|
|
||||||
cmp r0, r1\n\
|
|
||||||
beq _08052CE0\n\
|
|
||||||
b _08052BE0\n\
|
|
||||||
_08052CE0:\n\
|
|
||||||
adds r5, 0x3\n\
|
|
||||||
movs r0, 0x3\n\
|
|
||||||
add r8, r0\n\
|
|
||||||
ldr r0, =0x0000014f\n\
|
|
||||||
cmp r8, r0\n\
|
|
||||||
bls _08052C9C\n\
|
|
||||||
mov r1, r12\n\
|
|
||||||
ldr r2, [r1]\n\
|
|
||||||
ldrb r1, [r2, 0x1]\n\
|
|
||||||
ldrb r0, [r2, 0x2]\n\
|
|
||||||
lsls r0, 8\n\
|
|
||||||
orrs r1, r0\n\
|
|
||||||
ldrb r0, [r2, 0x3]\n\
|
|
||||||
lsls r0, 16\n\
|
|
||||||
orrs r1, r0\n\
|
|
||||||
ldrb r0, [r2, 0x4]\n\
|
|
||||||
lsls r0, 24\n\
|
|
||||||
orrs r1, r0\n\
|
|
||||||
mov r4, r12\n\
|
|
||||||
str r1, [r4]\n\
|
|
||||||
_08052D08:\n\
|
|
||||||
pop {r3-r5}\n\
|
|
||||||
mov r8, r3\n\
|
|
||||||
mov r9, r4\n\
|
|
||||||
mov r10, r5\n\
|
|
||||||
pop {r4-r7}\n\
|
|
||||||
pop {r0}\n\
|
|
||||||
bx r0\n\
|
|
||||||
.pool\n\
|
|
||||||
.syntax divided");
|
|
||||||
}
|
|
||||||
#endif // NONMATCHING
|
|
||||||
|
|
||||||
static void atkA7_setalwayshitflag(void)
|
static void atkA7_setalwayshitflag(void)
|
||||||
{
|
{
|
||||||
gStatuses3[gBankTarget] &= ~(STATUS3_ALWAYS_HITS);
|
gStatuses3[gBankTarget] &= ~(STATUS3_ALWAYS_HITS);
|
||||||
@ -9848,7 +9602,7 @@ static void atkC0_recoverbasedonsunlight(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NONMATCHING
|
#ifdef NONMATCHING
|
||||||
static void atkC1_hidden_power(void)
|
static void atkC1_hidden_power_calc(void)
|
||||||
{
|
{
|
||||||
s32 powerBits;
|
s32 powerBits;
|
||||||
s32 typeBits;
|
s32 typeBits;
|
||||||
@ -9879,7 +9633,7 @@ static void atkC1_hidden_power(void)
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
__attribute__((naked))
|
__attribute__((naked))
|
||||||
static void atkC1_hidden_power(void)
|
static void atkC1_hidden_power_calc(void)
|
||||||
{
|
{
|
||||||
asm(".syntax unified\n\
|
asm(".syntax unified\n\
|
||||||
push {r4-r7,lr}\n\
|
push {r4-r7,lr}\n\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user