Merge pull request #1776 from ghoulslash/move_target
Expand move target field to u16
This commit is contained in:
commit
9ebc436a9d
7 changed files with 8 additions and 9 deletions
|
@ -491,7 +491,7 @@ struct BattleStruct
|
|||
u8 turnEffectsBattlerId;
|
||||
u8 turnCountersTracker;
|
||||
u16 wrappedMove[MAX_BATTLERS_COUNT];
|
||||
u8 moveTarget[MAX_BATTLERS_COUNT];
|
||||
u16 moveTarget[MAX_BATTLERS_COUNT];
|
||||
u8 expGetterMonId;
|
||||
u8 wildVictorySong;
|
||||
u8 dynamicMoveType;
|
||||
|
|
|
@ -109,7 +109,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn);
|
|||
void ClearFuryCutterDestinyBondGrudge(u8 battlerId);
|
||||
void HandleAction_RunBattleScript(void);
|
||||
u32 SetRandomTarget(u32 battlerId);
|
||||
u8 GetMoveTarget(u16 move, u8 setTarget);
|
||||
u32 GetMoveTarget(u16 move, u8 setTarget);
|
||||
u8 IsMonDisobedient(void);
|
||||
u32 GetBattlerHoldEffect(u8 battlerId, bool32 checkNegating);
|
||||
u32 GetBattlerHoldEffectParam(u8 battlerId);
|
||||
|
|
|
@ -386,7 +386,6 @@
|
|||
#define MOVE_TARGET_FOES_AND_ALLY 0x20
|
||||
#define MOVE_TARGET_OPPONENTS_FIELD 0x40
|
||||
#define MOVE_TARGET_ALLY 0x80
|
||||
|
||||
#define MOVE_TARGET_ALL_BATTLERS (MOVE_TARGET_BOTH | MOVE_TARGET_OPPONENTS_FIELD)
|
||||
#define MOVE_TARGET_ALL_BATTLERS (0x100 | MOVE_TARGET_USER)
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_H
|
||||
|
|
|
@ -216,7 +216,7 @@ struct BattleMove
|
|||
u8 accuracy;
|
||||
u8 pp;
|
||||
u8 secondaryEffectChance;
|
||||
u8 target;
|
||||
u16 target;
|
||||
s8 priority;
|
||||
u32 flags;
|
||||
u8 split;
|
||||
|
|
|
@ -517,7 +517,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
|||
u8 atkPriority = GetMovePriority(battlerAtk, move);
|
||||
u16 moveEffect = gBattleMoves[move].effect;
|
||||
s32 moveType;
|
||||
u8 moveTarget = gBattleMoves[move].target;
|
||||
u16 moveTarget = gBattleMoves[move].target;
|
||||
u16 accuracy = AI_GetMoveAccuracy(battlerAtk, battlerDef, AI_DATA->atkAbility, AI_DATA->defAbility, AI_DATA->atkHoldEffect, AI_DATA->defHoldEffect, move);
|
||||
u8 effectiveness = AI_GetMoveEffectiveness(move, battlerAtk, battlerDef);
|
||||
bool32 isDoubleBattle = IsValidDoubleBattle(battlerAtk);
|
||||
|
@ -2514,7 +2514,7 @@ static s16 AI_DoubleBattle(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
|||
// move data
|
||||
u8 moveType = gBattleMoves[move].type;
|
||||
u16 effect = gBattleMoves[move].effect;
|
||||
u8 target = gBattleMoves[move].target;
|
||||
u16 target = gBattleMoves[move].target;
|
||||
// ally data
|
||||
u8 battlerAtkPartner = AI_DATA->battlerAtkPartner;
|
||||
u16 atkPartnerAbility = AI_DATA->atkPartnerAbility;
|
||||
|
|
|
@ -590,7 +590,7 @@ static void TryShowAsTarget(u32 battlerId)
|
|||
|
||||
static void HandleInputChooseMove(void)
|
||||
{
|
||||
u8 moveTarget;
|
||||
u16 moveTarget;
|
||||
u32 canSelectTarget = 0;
|
||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleResources->bufferA[gActiveBattler][4]);
|
||||
|
||||
|
|
|
@ -7015,7 +7015,7 @@ u32 SetRandomTarget(u32 battlerId)
|
|||
return target;
|
||||
}
|
||||
|
||||
u8 GetMoveTarget(u16 move, u8 setTarget)
|
||||
u32 GetMoveTarget(u16 move, u8 setTarget)
|
||||
{
|
||||
u8 targetBattler = 0;
|
||||
u32 i, moveTarget, side;
|
||||
|
|
Loading…
Reference in a new issue