Moved a couple more flags
This commit is contained in:
parent
02ffd05aea
commit
086375ab13
5 changed files with 29 additions and 27 deletions
|
@ -55,7 +55,9 @@ struct __attribute__((packed, aligned(2))) BattleMoveEffect
|
|||
u16 battleTvScore:3;
|
||||
u16 encourageEncore:1;
|
||||
u16 twoTurnEffect:1;
|
||||
u16 padding:11;
|
||||
u16 usesProtectCounter:1;
|
||||
u16 forcePressure:1;
|
||||
u16 padding:9;
|
||||
};
|
||||
|
||||
#define GET_MOVE_EFFECT(move) gBattleMoveEffects[gMovesInfo[move].effect]
|
||||
|
@ -796,7 +798,6 @@ STATIC_ASSERT(sizeof(((struct BattleStruct *)0)->palaceFlags) * 8 >= MAX_BATTLER
|
|||
#define IS_MOVE_STATUS(move)(gMovesInfo[move].category == DAMAGE_CATEGORY_STATUS)
|
||||
|
||||
#define IS_MOVE_RECOIL(move)(gMovesInfo[move].recoil > 0 || gMovesInfo[move].effect == EFFECT_RECOIL_IF_MISS)
|
||||
#define MOVE_USES_PROTECT_COUNTER(move)(gMovesInfo[move].effect == EFFECT_ENDURE || gMovesInfo[move].effect == EFFECT_PROTECT)
|
||||
|
||||
#define BATTLER_MAX_HP(battlerId)(gBattleMons[battlerId].hp == gBattleMons[battlerId].maxHP)
|
||||
#define TARGET_TURN_DAMAGED ((gSpecialStatuses[gBattlerTarget].physicalDmg != 0 || gSpecialStatuses[gBattlerTarget].specialDmg != 0) || (gBattleStruct->enduredDamage & gBitTable[gBattlerTarget]))
|
||||
|
|
|
@ -468,21 +468,6 @@ struct MoveInfo
|
|||
u32 alwaysCriticalHit:1;
|
||||
u32 numAdditionalEffects:2; // limited to 3 - don't want to get too crazy
|
||||
|
||||
// Ban flags
|
||||
u32 gravityBanned:1;
|
||||
u32 mirrorMoveBanned:1;
|
||||
u32 meFirstBanned:1;
|
||||
u32 mimicBanned:1;
|
||||
u32 metronomeBanned:1;
|
||||
u32 copycatBanned:1;
|
||||
u32 assistBanned:1; // Matches same moves as copycatBanned + semi-invulnerable moves and Mirror Coat.
|
||||
u32 sleepTalkBanned:1;
|
||||
u32 instructBanned:1;
|
||||
u32 encoreBanned:1;
|
||||
u32 parentalBondBanned:1;
|
||||
u32 skyBattleBanned:1;
|
||||
u32 sketchBanned:1;
|
||||
|
||||
// Flags
|
||||
u32 makesContact:1;
|
||||
u32 ignoresProtect:1;
|
||||
|
@ -498,6 +483,7 @@ struct MoveInfo
|
|||
u32 danceMove:1;
|
||||
u32 windMove:1;
|
||||
u32 slicingMove:1;
|
||||
u32 healingMove:1;
|
||||
u32 minimizeDoubleDamage:1;
|
||||
u32 ignoresTargetAbility:1;
|
||||
u32 ignoresTargetDefenseEvasionStages:1;
|
||||
|
@ -508,9 +494,22 @@ struct MoveInfo
|
|||
u32 ignoreTypeIfFlyingAndUngrounded:1;
|
||||
u32 thawsUser:1;
|
||||
u32 ignoresSubstitute:1;
|
||||
u32 forcePressure:1;
|
||||
u32 cantUseTwice:1;
|
||||
u32 healingMove:1;
|
||||
|
||||
// Ban flags
|
||||
u32 gravityBanned:1;
|
||||
u32 mirrorMoveBanned:1;
|
||||
u32 meFirstBanned:1;
|
||||
u32 mimicBanned:1;
|
||||
u32 metronomeBanned:1;
|
||||
u32 copycatBanned:1;
|
||||
u32 assistBanned:1; // Matches same moves as copycatBanned + semi-invulnerable moves and Mirror Coat.
|
||||
u32 sleepTalkBanned:1;
|
||||
u32 instructBanned:1;
|
||||
u32 encoreBanned:1;
|
||||
u32 parentalBondBanned:1;
|
||||
u32 skyBattleBanned:1;
|
||||
u32 sketchBanned:1;
|
||||
|
||||
u32 argument;
|
||||
|
||||
|
@ -532,11 +531,11 @@ struct MoveInfo
|
|||
|
||||
struct AdditionalEffect
|
||||
{
|
||||
u16 moveEffect;
|
||||
u8 self:1;
|
||||
u8 onlyIfTargetRaisedStats:1;
|
||||
u8 onChargeTurnOnly:1;
|
||||
u8 chance; // 0% = effect certain, primary effect
|
||||
u16 moveEffect;
|
||||
};
|
||||
|
||||
struct Ability
|
||||
|
|
|
@ -1836,7 +1836,7 @@ static void Cmd_ppreduce(void)
|
|||
if (moveTarget == MOVE_TARGET_BOTH
|
||||
|| moveTarget == MOVE_TARGET_FOES_AND_ALLY
|
||||
|| moveTarget == MOVE_TARGET_ALL_BATTLERS
|
||||
|| gMovesInfo[gCurrentMove].forcePressure)
|
||||
|| GET_MOVE_EFFECT(gCurrentMove).forcePressure)
|
||||
{
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
|
@ -10717,7 +10717,7 @@ static void TryResetProtectUseCounter(u32 battler)
|
|||
{
|
||||
u32 lastMove = gLastResultingMoves[battler];
|
||||
if (lastMove == MOVE_UNAVAILABLE
|
||||
|| (!MOVE_USES_PROTECT_COUNTER(lastMove) && (B_ALLY_SWITCH_FAIL_CHANCE >= GEN_9 && gMovesInfo[lastMove].effect != EFFECT_ALLY_SWITCH)))
|
||||
|| (!GET_MOVE_EFFECT(lastMove).usesProtectCounter && (B_ALLY_SWITCH_FAIL_CHANCE >= GEN_9 && gMovesInfo[lastMove].effect != EFFECT_ALLY_SWITCH)))
|
||||
gDisableStructs[battler].protectUses = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -570,12 +570,14 @@ const struct BattleMoveEffect gBattleMoveEffects[NUM_BATTLE_MOVE_EFFECTS] =
|
|||
.battleScript = BattleScript_EffectProtect,
|
||||
.battleTvScore = 5,
|
||||
.encourageEncore = TRUE,
|
||||
.usesProtectCounter = TRUE,
|
||||
},
|
||||
|
||||
[EFFECT_SPIKES] =
|
||||
{
|
||||
.battleScript = BattleScript_EffectSpikes,
|
||||
.battleTvScore = 4,
|
||||
.forcePressure = TRUE,
|
||||
},
|
||||
|
||||
[EFFECT_FORESIGHT] =
|
||||
|
@ -604,6 +606,7 @@ const struct BattleMoveEffect gBattleMoveEffects[NUM_BATTLE_MOVE_EFFECTS] =
|
|||
.battleScript = BattleScript_EffectEndure,
|
||||
.battleTvScore = 3,
|
||||
.encourageEncore = TRUE,
|
||||
.usesProtectCounter = TRUE,
|
||||
},
|
||||
|
||||
[EFFECT_ROLLOUT] =
|
||||
|
@ -1039,6 +1042,7 @@ const struct BattleMoveEffect gBattleMoveEffects[NUM_BATTLE_MOVE_EFFECTS] =
|
|||
.battleScript = BattleScript_EffectImprison,
|
||||
.battleTvScore = 6,
|
||||
.encourageEncore = TRUE,
|
||||
.forcePressure = TRUE,
|
||||
},
|
||||
|
||||
[EFFECT_REFRESH] =
|
||||
|
@ -1059,6 +1063,7 @@ const struct BattleMoveEffect gBattleMoveEffects[NUM_BATTLE_MOVE_EFFECTS] =
|
|||
{
|
||||
.battleScript = BattleScript_EffectSnatch,
|
||||
.battleTvScore = 1,
|
||||
.forcePressure = TRUE,
|
||||
},
|
||||
|
||||
[EFFECT_LOW_KICK] =
|
||||
|
@ -1339,6 +1344,7 @@ const struct BattleMoveEffect gBattleMoveEffects[NUM_BATTLE_MOVE_EFFECTS] =
|
|||
{
|
||||
.battleScript = BattleScript_EffectToxicSpikes,
|
||||
.battleTvScore = 0, // TODO: Assign points
|
||||
.forcePressure = TRUE,
|
||||
},
|
||||
|
||||
[EFFECT_GASTRO_ACID] =
|
||||
|
@ -1352,6 +1358,7 @@ const struct BattleMoveEffect gBattleMoveEffects[NUM_BATTLE_MOVE_EFFECTS] =
|
|||
.battleScript = BattleScript_EffectStealthRock,
|
||||
.battleTvScore = 0, // TODO: Assign points
|
||||
.encourageEncore = TRUE,
|
||||
.forcePressure = TRUE,
|
||||
},
|
||||
|
||||
[EFFECT_TELEKINESIS] =
|
||||
|
|
|
@ -4661,7 +4661,6 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] =
|
|||
.ignoresProtect = TRUE,
|
||||
.mirrorMoveBanned = TRUE,
|
||||
.magicCoatAffected = B_UPDATED_MOVE_FLAGS >= GEN_5,
|
||||
.forcePressure = TRUE,
|
||||
.skyBattleBanned = TRUE,
|
||||
.contestEffect = CONTEST_EFFECT_MAKE_FOLLOWING_MONS_NERVOUS,
|
||||
.contestCategory = CONTEST_CATEGORY_SMART,
|
||||
|
@ -6947,7 +6946,6 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] =
|
|||
.ignoresProtect = TRUE,
|
||||
.ignoresSubstitute = TRUE,
|
||||
.mirrorMoveBanned = TRUE,
|
||||
.forcePressure = TRUE,
|
||||
.contestEffect = CONTEST_EFFECT_WORSEN_CONDITION_OF_PREV_MONS,
|
||||
.contestCategory = CONTEST_CATEGORY_SMART,
|
||||
.contestComboStarterId = 0,
|
||||
|
@ -7018,7 +7016,6 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] =
|
|||
.category = DAMAGE_CATEGORY_STATUS,
|
||||
.zMove = { .effect = Z_EFFECT_SPD_UP_2 },
|
||||
.ignoresSubstitute = TRUE,
|
||||
.forcePressure = TRUE,
|
||||
.metronomeBanned = TRUE,
|
||||
.copycatBanned = TRUE,
|
||||
.assistBanned = TRUE,
|
||||
|
@ -9385,7 +9382,6 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] =
|
|||
.ignoresProtect = TRUE,
|
||||
.mirrorMoveBanned = TRUE,
|
||||
.magicCoatAffected = B_UPDATED_MOVE_FLAGS >= GEN_5,
|
||||
.forcePressure = TRUE,
|
||||
.skyBattleBanned = TRUE,
|
||||
.contestEffect = CONTEST_EFFECT_MAKE_FOLLOWING_MONS_NERVOUS,
|
||||
.contestCategory = CONTEST_CATEGORY_SMART,
|
||||
|
@ -10706,7 +10702,6 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] =
|
|||
.magicCoatAffected = B_UPDATED_MOVE_FLAGS >= GEN_5,
|
||||
.ignoresProtect = TRUE,
|
||||
.mirrorMoveBanned = TRUE,
|
||||
.forcePressure = TRUE,
|
||||
.contestEffect = CONTEST_EFFECT_MAKE_FOLLOWING_MONS_NERVOUS,
|
||||
.contestCategory = CONTEST_CATEGORY_COOL,
|
||||
.contestComboStarterId = 0,
|
||||
|
|
Loading…
Reference in a new issue