Moved scripts array to src/data/battle_move_effects.h (#3994)
* Created gMoveBattleEffects array * Renamed array to gBattleMoveEffects Applied array in battle_util.c and battle_script_commands.c; doesn't build yet... * Got it building... * Added missing battle_tv effects * Fixed and got it building I'm an idiot sometimes * Added battle_tv scores, encourage Encore flag All works and builds just fine * Merge fixes * Reformatted battle_move_effects Also tweaked struct, added macro --------- Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
This commit is contained in:
parent
7e8ea89ded
commit
89a632cfa4
11 changed files with 2686 additions and 938 deletions
File diff suppressed because it is too large
Load diff
|
@ -48,6 +48,17 @@
|
|||
// Special indicator value for shellBellDmg in SpecialStatus
|
||||
#define IGNORE_SHELL_BELL 0xFFFF
|
||||
|
||||
// For defining EFFECT_HIT etc. with battle TV scores and flags etc.
|
||||
struct __attribute__((packed, aligned(2))) BattleMoveEffect
|
||||
{
|
||||
const u8 *battleScript;
|
||||
u16 battleTvScore:3;
|
||||
u16 encourageEncore:1;
|
||||
u16 flags:12; // coming soon...
|
||||
};
|
||||
|
||||
#define GET_MOVE_BATTLESCRIPT(move) gBattleMoveEffects[gBattleMoves[move].effect].battleScript
|
||||
|
||||
struct ResourceFlags
|
||||
{
|
||||
u32 flags[MAX_BATTLERS_COUNT];
|
||||
|
@ -1081,6 +1092,7 @@ extern struct FieldTimer gFieldTimers;
|
|||
extern u8 gBattlerAbility;
|
||||
extern u16 gPartnerSpriteId;
|
||||
extern struct QueuedStatBoost gQueuedStatBoosts[MAX_BATTLERS_COUNT];
|
||||
extern const struct BattleMoveEffect gBattleMoveEffects[];
|
||||
|
||||
extern void (*gPreBattleCallback1)(void);
|
||||
extern void (*gBattleMainFunc)(void);
|
||||
|
|
|
@ -110,7 +110,6 @@ bool32 IsStatLoweringMoveEffect(u32 moveEffect);
|
|||
bool32 IsMoveRedirectionPrevented(u32 move, u32 atkAbility);
|
||||
bool32 IsMoveEncouragedToHit(u32 battlerAtk, u32 battlerDef, u32 move);
|
||||
bool32 IsHazardMoveEffect(u32 moveEffect);
|
||||
bool32 IsEncoreEncouragedEffect(u32 moveEffect);
|
||||
bool32 IsChargingMove(u32 battlerAtk, u32 effect);
|
||||
void ProtectChecks(u32 battlerAtk, u32 battlerDef, u32 move, u32 predictedMove, s32 *score);
|
||||
bool32 ShouldSetSandstorm(u32 battler, u32 ability, u32 holdEffect);
|
||||
|
|
|
@ -533,4 +533,294 @@ extern const u8 BattleScript_DynamaxBegins[];
|
|||
extern const u8 BattleScript_DynamaxEnds[];
|
||||
extern const u8 BattleScript_MoveBlockedByDynamax[];
|
||||
|
||||
// Battle move scripts
|
||||
extern const u8 BattleScript_EffectSleep[];
|
||||
extern const u8 BattleScript_EffectAbsorb[];
|
||||
extern const u8 BattleScript_EffectExplosion[];
|
||||
extern const u8 BattleScript_EffectDreamEater[];
|
||||
extern const u8 BattleScript_EffectMirrorMove[];
|
||||
extern const u8 BattleScript_EffectAttackUp[];
|
||||
extern const u8 BattleScript_EffectDefenseUp[];
|
||||
extern const u8 BattleScript_EffectSpeedUp[];
|
||||
extern const u8 BattleScript_EffectSpecialAttackUp[];
|
||||
extern const u8 BattleScript_EffectSpecialDefenseUp[];
|
||||
extern const u8 BattleScript_EffectAccuracyUp[];
|
||||
extern const u8 BattleScript_EffectEvasionUp[];
|
||||
extern const u8 BattleScript_EffectSpecialAttackUp3[];
|
||||
extern const u8 BattleScript_EffectAttackDown[];
|
||||
extern const u8 BattleScript_EffectDefenseDown[];
|
||||
extern const u8 BattleScript_EffectSpeedDown[];
|
||||
extern const u8 BattleScript_EffectSpecialAttackDown[];
|
||||
extern const u8 BattleScript_EffectSpecialDefenseDown[];
|
||||
extern const u8 BattleScript_EffectAccuracyDown[];
|
||||
extern const u8 BattleScript_EffectEvasionDown[];
|
||||
extern const u8 BattleScript_EffectHaze[];
|
||||
extern const u8 BattleScript_EffectBide[];
|
||||
extern const u8 BattleScript_EffectRoar[];
|
||||
extern const u8 BattleScript_EffectHit[];
|
||||
extern const u8 BattleScript_EffectConversion[];
|
||||
extern const u8 BattleScript_EffectRestoreHp[];
|
||||
extern const u8 BattleScript_EffectToxic[];
|
||||
extern const u8 BattleScript_EffectLightScreen[];
|
||||
extern const u8 BattleScript_EffectRest[];
|
||||
extern const u8 BattleScript_EffectOHKO[];
|
||||
extern const u8 BattleScript_EffectSuperFang[];
|
||||
extern const u8 BattleScript_EffectFixedDamageArg[];
|
||||
extern const u8 BattleScript_EffectHealBlock[];
|
||||
extern const u8 BattleScript_EffectRecoilIfMiss[];
|
||||
extern const u8 BattleScript_EffectMist[];
|
||||
extern const u8 BattleScript_EffectFocusEnergy[];
|
||||
extern const u8 BattleScript_EffectConfuse[];
|
||||
extern const u8 BattleScript_EffectAttackUp2[];
|
||||
extern const u8 BattleScript_EffectDefenseUp2[];
|
||||
extern const u8 BattleScript_EffectSpeedUp2[];
|
||||
extern const u8 BattleScript_EffectSpecialAttackUp2[];
|
||||
extern const u8 BattleScript_EffectSpecialDefenseUp2[];
|
||||
extern const u8 BattleScript_EffectAccuracyUp2[];
|
||||
extern const u8 BattleScript_EffectEvasionUp2[];
|
||||
extern const u8 BattleScript_EffectTransform[];
|
||||
extern const u8 BattleScript_EffectAttackDown2[];
|
||||
extern const u8 BattleScript_EffectDefenseDown2[];
|
||||
extern const u8 BattleScript_EffectSpeedDown2[];
|
||||
extern const u8 BattleScript_EffectSpecialAttackDown2[];
|
||||
extern const u8 BattleScript_EffectSpecialDefenseDown2[];
|
||||
extern const u8 BattleScript_EffectAccuracyDown2[];
|
||||
extern const u8 BattleScript_EffectEvasionDown2[];
|
||||
extern const u8 BattleScript_EffectReflect[];
|
||||
extern const u8 BattleScript_EffectPoison[];
|
||||
extern const u8 BattleScript_EffectParalyze[];
|
||||
extern const u8 BattleScript_EffectTwoTurnsAttack[];
|
||||
extern const u8 BattleScript_EffectSubstitute[];
|
||||
extern const u8 BattleScript_EffectRage[];
|
||||
extern const u8 BattleScript_EffectMimic[];
|
||||
extern const u8 BattleScript_EffectMetronome[];
|
||||
extern const u8 BattleScript_EffectLeechSeed[];
|
||||
extern const u8 BattleScript_EffectDoNothing[];
|
||||
extern const u8 BattleScript_EffectDisable[];
|
||||
extern const u8 BattleScript_EffectLevelDamage[];
|
||||
extern const u8 BattleScript_EffectPsywave[];
|
||||
extern const u8 BattleScript_EffectCounter[];
|
||||
extern const u8 BattleScript_EffectEncore[];
|
||||
extern const u8 BattleScript_EffectPainSplit[];
|
||||
extern const u8 BattleScript_EffectSnore[];
|
||||
extern const u8 BattleScript_EffectConversion2[];
|
||||
extern const u8 BattleScript_EffectLockOn[];
|
||||
extern const u8 BattleScript_EffectSketch[];
|
||||
extern const u8 BattleScript_EffectSleepTalk[];
|
||||
extern const u8 BattleScript_EffectDestinyBond[];
|
||||
extern const u8 BattleScript_EffectSpite[];
|
||||
extern const u8 BattleScript_EffectHealBell[];
|
||||
extern const u8 BattleScript_EffectTripleKick[];
|
||||
extern const u8 BattleScript_EffectMeanLook[];
|
||||
extern const u8 BattleScript_EffectNightmare[];
|
||||
extern const u8 BattleScript_EffectMinimize[];
|
||||
extern const u8 BattleScript_EffectCurse[];
|
||||
extern const u8 BattleScript_EffectHealingWish[];
|
||||
extern const u8 BattleScript_EffectProtect[];
|
||||
extern const u8 BattleScript_EffectSpikes[];
|
||||
extern const u8 BattleScript_EffectForesight[];
|
||||
extern const u8 BattleScript_EffectPerishSong[];
|
||||
extern const u8 BattleScript_EffectSandstorm[];
|
||||
extern const u8 BattleScript_EffectEndure[];
|
||||
extern const u8 BattleScript_EffectRollout[];
|
||||
extern const u8 BattleScript_EffectSwagger[];
|
||||
extern const u8 BattleScript_EffectFuryCutter[];
|
||||
extern const u8 BattleScript_EffectAttract[];
|
||||
extern const u8 BattleScript_EffectPresent[];
|
||||
extern const u8 BattleScript_EffectSafeguard[];
|
||||
extern const u8 BattleScript_EffectMagnitude[];
|
||||
extern const u8 BattleScript_EffectBatonPass[];
|
||||
extern const u8 BattleScript_EffectCaptivate[];
|
||||
extern const u8 BattleScript_EffectMorningSun[];
|
||||
extern const u8 BattleScript_EffectSynthesis[];
|
||||
extern const u8 BattleScript_EffectMoonlight[];
|
||||
extern const u8 BattleScript_EffectRainDance[];
|
||||
extern const u8 BattleScript_EffectSunnyDay[];
|
||||
extern const u8 BattleScript_EffectBellyDrum[];
|
||||
extern const u8 BattleScript_EffectPsychUp[];
|
||||
extern const u8 BattleScript_EffectMirrorCoat[];
|
||||
extern const u8 BattleScript_EffectSkullBash[];
|
||||
extern const u8 BattleScript_EffectFutureSight[];
|
||||
extern const u8 BattleScript_EffectGust[];
|
||||
extern const u8 BattleScript_EffectSolarBeam[];
|
||||
extern const u8 BattleScript_EffectTeleport[];
|
||||
extern const u8 BattleScript_EffectBeatUp[];
|
||||
extern const u8 BattleScript_EffectSemiInvulnerable[];
|
||||
extern const u8 BattleScript_EffectDefenseCurl[];
|
||||
extern const u8 BattleScript_EffectSoftboiled[];
|
||||
extern const u8 BattleScript_EffectFakeOut[];
|
||||
extern const u8 BattleScript_EffectUproar[];
|
||||
extern const u8 BattleScript_EffectStockpile[];
|
||||
extern const u8 BattleScript_EffectSpitUp[];
|
||||
extern const u8 BattleScript_EffectSwallow[];
|
||||
extern const u8 BattleScript_EffectWorrySeed[];
|
||||
extern const u8 BattleScript_EffectHail[];
|
||||
extern const u8 BattleScript_EffectTorment[];
|
||||
extern const u8 BattleScript_EffectFlatter[];
|
||||
extern const u8 BattleScript_EffectWillOWisp[];
|
||||
extern const u8 BattleScript_EffectMemento[];
|
||||
extern const u8 BattleScript_EffectFocusPunch[];
|
||||
extern const u8 BattleScript_EffectFollowMe[];
|
||||
extern const u8 BattleScript_EffectNaturePower[];
|
||||
extern const u8 BattleScript_EffectCharge[];
|
||||
extern const u8 BattleScript_EffectTaunt[];
|
||||
extern const u8 BattleScript_EffectHelpingHand[];
|
||||
extern const u8 BattleScript_EffectTrick[];
|
||||
extern const u8 BattleScript_EffectRolePlay[];
|
||||
extern const u8 BattleScript_EffectWish[];
|
||||
extern const u8 BattleScript_EffectAssist[];
|
||||
extern const u8 BattleScript_EffectIngrain[];
|
||||
extern const u8 BattleScript_EffectMagicCoat[];
|
||||
extern const u8 BattleScript_EffectRecycle[];
|
||||
extern const u8 BattleScript_EffectBrickBreak[];
|
||||
extern const u8 BattleScript_EffectYawn[];
|
||||
extern const u8 BattleScript_EffectEndeavor[];
|
||||
extern const u8 BattleScript_EffectSkillSwap[];
|
||||
extern const u8 BattleScript_EffectImprison[];
|
||||
extern const u8 BattleScript_EffectRefresh[];
|
||||
extern const u8 BattleScript_EffectGrudge[];
|
||||
extern const u8 BattleScript_EffectSnatch[];
|
||||
extern const u8 BattleScript_EffectTeeterDance[];
|
||||
extern const u8 BattleScript_EffectHitEscape[];
|
||||
extern const u8 BattleScript_EffectMudSport[];
|
||||
extern const u8 BattleScript_EffectTickle[];
|
||||
extern const u8 BattleScript_EffectCosmicPower[];
|
||||
extern const u8 BattleScript_EffectSkyUppercut[];
|
||||
extern const u8 BattleScript_EffectBulkUp[];
|
||||
extern const u8 BattleScript_EffectPlaceholder[];
|
||||
extern const u8 BattleScript_EffectWaterSport[];
|
||||
extern const u8 BattleScript_EffectCalmMind[];
|
||||
extern const u8 BattleScript_EffectDragonDance[];
|
||||
extern const u8 BattleScript_EffectCamouflage[];
|
||||
extern const u8 BattleScript_EffectPledge[];
|
||||
extern const u8 BattleScript_EffectFling[];
|
||||
extern const u8 BattleScript_EffectNaturalGift[];
|
||||
extern const u8 BattleScript_EffectRoost[];
|
||||
extern const u8 BattleScript_EffectGravity[];
|
||||
extern const u8 BattleScript_EffectMircleEye[];
|
||||
extern const u8 BattleScript_EffectTailwind[];
|
||||
extern const u8 BattleScript_EffectEmbargo[];
|
||||
extern const u8 BattleScript_EffectAquaRing[];
|
||||
extern const u8 BattleScript_EffectTrickRoom[];
|
||||
extern const u8 BattleScript_EffectWonderRoom[];
|
||||
extern const u8 BattleScript_EffectMagicRoom[];
|
||||
extern const u8 BattleScript_EffectMagnetRise[];
|
||||
extern const u8 BattleScript_EffectToxicSpikes[];
|
||||
extern const u8 BattleScript_EffectGastroAcid[];
|
||||
extern const u8 BattleScript_EffectStealthRock[];
|
||||
extern const u8 BattleScript_EffectTelekinesis[];
|
||||
extern const u8 BattleScript_EffectPowerSwap[];
|
||||
extern const u8 BattleScript_EffectGuardSwap[];
|
||||
extern const u8 BattleScript_EffectHeartSwap[];
|
||||
extern const u8 BattleScript_EffectPowerSplit[];
|
||||
extern const u8 BattleScript_EffectGuardSplit[];
|
||||
extern const u8 BattleScript_EffectStickyWeb[];
|
||||
extern const u8 BattleScript_EffectMetalBurst[];
|
||||
extern const u8 BattleScript_EffectLuckyChant[];
|
||||
extern const u8 BattleScript_EffectSuckerPunch[];
|
||||
extern const u8 BattleScript_EffectSimpleBeam[];
|
||||
extern const u8 BattleScript_EffectEntrainment[];
|
||||
extern const u8 BattleScript_EffectHealPulse[];
|
||||
extern const u8 BattleScript_EffectQuash[];
|
||||
extern const u8 BattleScript_EffectIonDeluge[];
|
||||
extern const u8 BattleScript_EffectTopsyTurvy[];
|
||||
extern const u8 BattleScript_EffectMistyTerrain[];
|
||||
extern const u8 BattleScript_EffectGrassyTerrain[];
|
||||
extern const u8 BattleScript_EffectElectricTerrain[];
|
||||
extern const u8 BattleScript_EffectPsychicTerrain[];
|
||||
extern const u8 BattleScript_EffectAttackAccUp[];
|
||||
extern const u8 BattleScript_EffectAttackSpAttackUp[];
|
||||
extern const u8 BattleScript_EffectMeFirst[];
|
||||
extern const u8 BattleScript_EffectQuiverDance[];
|
||||
extern const u8 BattleScript_EffectCoil[];
|
||||
extern const u8 BattleScript_EffectElectrify[];
|
||||
extern const u8 BattleScript_EffectReflectType[];
|
||||
extern const u8 BattleScript_EffectSoak[];
|
||||
extern const u8 BattleScript_EffectGrowth[];
|
||||
extern const u8 BattleScript_EffectLastResort[];
|
||||
extern const u8 BattleScript_EffectShellSmash[];
|
||||
extern const u8 BattleScript_EffectShiftGear[];
|
||||
extern const u8 BattleScript_EffectDefenseUp3[];
|
||||
extern const u8 BattleScript_EffectNobleRoar[];
|
||||
extern const u8 BattleScript_EffectVenomDrench[];
|
||||
extern const u8 BattleScript_EffectToxicThread[];
|
||||
extern const u8 BattleScript_EffectHitSwitchTarget[];
|
||||
extern const u8 BattleScript_EffectFinalGambit[];
|
||||
extern const u8 BattleScript_EffectAutotomize[];
|
||||
extern const u8 BattleScript_EffectCopycat[];
|
||||
extern const u8 BattleScript_EffectDefog[];
|
||||
extern const u8 BattleScript_EffectHitEnemyHealAlly[];
|
||||
extern const u8 BattleScript_EffectSynchronoise[];
|
||||
extern const u8 BattleScript_EffectPsychoShift[];
|
||||
extern const u8 BattleScript_EffectPowerTrick[];
|
||||
extern const u8 BattleScript_EffectAfterYou[];
|
||||
extern const u8 BattleScript_EffectBestow[];
|
||||
extern const u8 BattleScript_EffectRototiller[];
|
||||
extern const u8 BattleScript_EffectFlowerShield[];
|
||||
extern const u8 BattleScript_EffectSpeedSwap[];
|
||||
extern const u8 BattleScript_EffectAuroraVeil[];
|
||||
extern const u8 BattleScript_EffectThirdType[];
|
||||
extern const u8 BattleScript_EffectAcupressure[];
|
||||
extern const u8 BattleScript_EffectAromaticMist[];
|
||||
extern const u8 BattleScript_EffectPowder[];
|
||||
extern const u8 BattleScript_EffectPartingShot[];
|
||||
extern const u8 BattleScript_EffectMatBlock[];
|
||||
extern const u8 BattleScript_EffectInstruct[];
|
||||
extern const u8 BattleScript_EffectLaserFocus[];
|
||||
extern const u8 BattleScript_EffectMagneticFlux[];
|
||||
extern const u8 BattleScript_EffectGearUp[];
|
||||
extern const u8 BattleScript_EffectStrengthSap[];
|
||||
extern const u8 BattleScript_EffectMindBlown[];
|
||||
extern const u8 BattleScript_EffectPurify[];
|
||||
extern const u8 BattleScript_FailIfNotArgType[];
|
||||
extern const u8 BattleScript_EffectShoreUp[];
|
||||
extern const u8 BattleScript_EffectGeomancy[];
|
||||
extern const u8 BattleScript_EffectFairyLock[];
|
||||
extern const u8 BattleScript_EffectAllySwitch[];
|
||||
extern const u8 BattleScript_EffectRelicSong[];
|
||||
extern const u8 BattleScript_EffectEerieSpell[];
|
||||
extern const u8 BattleScript_EffectJungleHealing[];
|
||||
extern const u8 BattleScript_EffectCoaching[];
|
||||
extern const u8 BattleScript_EffectDecorate[];
|
||||
extern const u8 BattleScript_EffectRecoilHP25[];
|
||||
extern const u8 BattleScript_EffectStuffCheeks[];
|
||||
extern const u8 BattleScript_EffectGlitzyGlow[];
|
||||
extern const u8 BattleScript_EffectBaddyBad[];
|
||||
extern const u8 BattleScript_EffectSappySeed[];
|
||||
extern const u8 BattleScript_EffectFreezyFrost[];
|
||||
extern const u8 BattleScript_EffectSparklySwirl[];
|
||||
extern const u8 BattleScript_EffectPlasmaFists[];
|
||||
extern const u8 BattleScript_EffectHyperspaceFury[];
|
||||
extern const u8 BattleScript_EffectAuraWheel[];
|
||||
extern const u8 BattleScript_EffectPhotonGeyser[];
|
||||
extern const u8 BattleScript_EffectShellSideArm[];
|
||||
extern const u8 BattleScript_EffectNoRetreat[];
|
||||
extern const u8 BattleScript_EffectTarShot[];
|
||||
extern const u8 BattleScript_EffectPoltergeist[];
|
||||
extern const u8 BattleScript_EffectOctolock[];
|
||||
extern const u8 BattleScript_EffectClangorousSoul[];
|
||||
extern const u8 BattleScript_EffectSkyDrop[];
|
||||
extern const u8 BattleScript_EffectMeteorBeam[];
|
||||
extern const u8 BattleScript_EffectCourtChange[];
|
||||
extern const u8 BattleScript_EffectSteelBeam[];
|
||||
extern const u8 BattleScript_EffectExtremeEvoboost[];
|
||||
extern const u8 BattleScript_EffectHitSetRemoveTerrain[];
|
||||
extern const u8 BattleScript_EffectDarkVoid[];
|
||||
extern const u8 BattleScript_EffectVictoryDance[];
|
||||
extern const u8 BattleScript_EffectTeatime[];
|
||||
extern const u8 BattleScript_EffectAttackUpUserAlly[];
|
||||
extern const u8 BattleScript_EffectShellTrap[];
|
||||
extern const u8 BattleScript_EffectRevivalBlessing[];
|
||||
extern const u8 BattleScript_EffectSnow[];
|
||||
extern const u8 BattleScript_EffectTakeHeart[];
|
||||
extern const u8 BattleScript_EffectCorrosiveGas[];
|
||||
extern const u8 BattleScript_EffectSaltCure[];
|
||||
extern const u8 BattleScript_EffectChillyReception[];
|
||||
extern const u8 BattleScript_EffectMaxMove[];
|
||||
extern const u8 BattleScript_EffectGlaiveRush[];
|
||||
extern const u8 BattleScript_EffectBrickBreak[];
|
||||
extern const u8 BattleScript_EffectDoodle[];
|
||||
extern const u8 BattleScript_EffectFilletAway[];
|
||||
extern const u8 BattleScript_EffectShedTail[];
|
||||
|
||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||
|
|
|
@ -126,7 +126,7 @@ enum {
|
|||
EFFECT_BEAT_UP,
|
||||
EFFECT_SEMI_INVULNERABLE,
|
||||
EFFECT_DEFENSE_CURL,
|
||||
EFFECT_SOFTBOILED,
|
||||
EFFECT_SOFTBOILED, // differences vs Recover - can be used outside of battle to restore HP
|
||||
EFFECT_FAKE_OUT,
|
||||
EFFECT_UPROAR,
|
||||
EFFECT_STOCKPILE,
|
||||
|
|
|
@ -3688,7 +3688,7 @@ static u32 AI_CalcMoveScore(u32 battlerAtk, u32 battlerDef, u32 move)
|
|||
if (gDisableStructs[battlerDef].encoreTimer == 0
|
||||
&& (B_MENTAL_HERB < GEN_5 || aiData->holdEffects[battlerDef] != HOLD_EFFECT_MENTAL_HERB))
|
||||
{
|
||||
if (IsEncoreEncouragedEffect(gBattleMoves[gLastMoves[battlerDef]].effect))
|
||||
if (gBattleMoveEffects[gBattleMoves[gLastMoves[battlerDef]].effect].encourageEncore)
|
||||
ADJUST_SCORE(3);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -34,75 +34,6 @@
|
|||
|
||||
static u32 AI_GetEffectiveness(uq4_12_t multiplier);
|
||||
|
||||
// Const Data
|
||||
static const u16 sEncouragedEncoreEffects[] =
|
||||
{
|
||||
EFFECT_DREAM_EATER,
|
||||
EFFECT_ATTACK_UP,
|
||||
EFFECT_DEFENSE_UP,
|
||||
EFFECT_SPEED_UP,
|
||||
EFFECT_SPECIAL_ATTACK_UP,
|
||||
EFFECT_HAZE,
|
||||
EFFECT_ROAR,
|
||||
EFFECT_CONVERSION,
|
||||
EFFECT_TOXIC,
|
||||
EFFECT_LIGHT_SCREEN,
|
||||
EFFECT_REST,
|
||||
EFFECT_SUPER_FANG,
|
||||
EFFECT_SPECIAL_DEFENSE_UP_2,
|
||||
EFFECT_CONFUSE,
|
||||
EFFECT_POISON,
|
||||
EFFECT_PARALYZE,
|
||||
EFFECT_LEECH_SEED,
|
||||
EFFECT_DO_NOTHING,
|
||||
EFFECT_ATTACK_UP_2,
|
||||
EFFECT_ENCORE,
|
||||
EFFECT_CONVERSION_2,
|
||||
EFFECT_LOCK_ON,
|
||||
EFFECT_HEAL_BELL,
|
||||
EFFECT_MEAN_LOOK,
|
||||
EFFECT_NIGHTMARE,
|
||||
EFFECT_PROTECT,
|
||||
EFFECT_SKILL_SWAP,
|
||||
EFFECT_FORESIGHT,
|
||||
EFFECT_PERISH_SONG,
|
||||
EFFECT_SANDSTORM,
|
||||
EFFECT_ENDURE,
|
||||
EFFECT_SWAGGER,
|
||||
EFFECT_ATTRACT,
|
||||
EFFECT_SAFEGUARD,
|
||||
EFFECT_RAIN_DANCE,
|
||||
EFFECT_SUNNY_DAY,
|
||||
EFFECT_BELLY_DRUM,
|
||||
EFFECT_PSYCH_UP,
|
||||
EFFECT_FUTURE_SIGHT,
|
||||
EFFECT_FAKE_OUT,
|
||||
EFFECT_STOCKPILE,
|
||||
EFFECT_SPIT_UP,
|
||||
EFFECT_SWALLOW,
|
||||
EFFECT_HAIL,
|
||||
EFFECT_SNOWSCAPE,
|
||||
EFFECT_TORMENT,
|
||||
EFFECT_WILL_O_WISP,
|
||||
EFFECT_FOLLOW_ME,
|
||||
EFFECT_CHARGE,
|
||||
EFFECT_TRICK,
|
||||
EFFECT_ROLE_PLAY,
|
||||
EFFECT_INGRAIN,
|
||||
EFFECT_RECYCLE,
|
||||
EFFECT_KNOCK_OFF,
|
||||
EFFECT_SKILL_SWAP,
|
||||
EFFECT_IMPRISON,
|
||||
EFFECT_REFRESH,
|
||||
EFFECT_GRUDGE,
|
||||
EFFECT_TEETER_DANCE,
|
||||
EFFECT_MUD_SPORT,
|
||||
EFFECT_WATER_SPORT,
|
||||
EFFECT_DRAGON_DANCE,
|
||||
EFFECT_CAMOUFLAGE,
|
||||
EFFECT_FILLET_AWAY,
|
||||
};
|
||||
|
||||
// Functions
|
||||
u32 GetAIChosenMove(u32 battlerId)
|
||||
{
|
||||
|
@ -2049,18 +1980,6 @@ bool32 HasSnatchAffectedMove(u32 battler)
|
|||
CHECK_MOVE_FLAG(snatchAffected);
|
||||
}
|
||||
|
||||
bool32 IsEncoreEncouragedEffect(u32 moveEffect)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sEncouragedEncoreEffects); i++)
|
||||
{
|
||||
if (moveEffect == sEncouragedEncoreEffects[i])
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool32 IsChargingMove(u32 battlerAtk, u32 effect)
|
||||
{
|
||||
switch (effect)
|
||||
|
@ -2071,9 +1990,7 @@ bool32 IsChargingMove(u32 battlerAtk, u32 effect)
|
|||
case EFFECT_SKULL_BASH:
|
||||
case EFFECT_METEOR_BEAM:
|
||||
case EFFECT_TWO_TURNS_ATTACK:
|
||||
if (AI_DATA->holdEffects[battlerAtk] == HOLD_EFFECT_POWER_HERB)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
return !(AI_DATA->holdEffects[battlerAtk] == HOLD_EFFECT_POWER_HERB);
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
#include "battle_util.h"
|
||||
#include "constants/pokemon.h"
|
||||
#include "config/battle.h"
|
||||
#include "data/battle_move_effects.h"
|
||||
|
||||
// Helper for accessing command arguments and advancing gBattlescriptCurrInstr.
|
||||
//
|
||||
|
@ -96,8 +97,6 @@
|
|||
#define MEMBERS_7(a, b, c, d, e, f, g) a; b; c; d; e; f; g;
|
||||
#define MEMBERS_8(a, b, c, d, e, f, g, h) a; b; c; d; e; f; g; h;
|
||||
|
||||
extern const u8 *const gBattleScriptsForMoveEffects[];
|
||||
|
||||
// table to avoid ugly powing on gba (courtesy of doesnt)
|
||||
// this returns (i^2.5)/4
|
||||
// the quarters cancel so no need to re-quadruple them in actual calculation
|
||||
|
@ -5882,7 +5881,7 @@ static void Cmd_moveend(void)
|
|||
gBattleScripting.moveendState = 0;
|
||||
MoveValuesCleanUp();
|
||||
gBattleScripting.moveEffect = gBattleScripting.savedMoveEffect;
|
||||
BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]);
|
||||
BattleScriptPush(GET_MOVE_BATTLESCRIPT(gCurrentMove));
|
||||
gBattlescriptCurrInstr = BattleScript_FlushMessageBox;
|
||||
return;
|
||||
}
|
||||
|
@ -5903,7 +5902,7 @@ static void Cmd_moveend(void)
|
|||
gBattleScripting.animTurn = 0;
|
||||
gBattleScripting.animTargetsHit = 0;
|
||||
MoveValuesCleanUp();
|
||||
BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]);
|
||||
BattleScriptPush(GET_MOVE_BATTLESCRIPT(gCurrentMove));
|
||||
gBattlescriptCurrInstr = BattleScript_FlushMessageBox;
|
||||
return;
|
||||
}
|
||||
|
@ -5959,7 +5958,7 @@ static void Cmd_moveend(void)
|
|||
gSpecialStatuses[gBattlerTarget].focusSashed = 0; // Delete this line to make Focus Sash last for the duration of the whole move turn.
|
||||
gSpecialStatuses[gBattlerAttacker].multiHitOn = TRUE;
|
||||
MoveValuesCleanUp();
|
||||
BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]);
|
||||
BattleScriptPush(GET_MOVE_BATTLESCRIPT(gCurrentMove));
|
||||
gBattlescriptCurrInstr = BattleScript_FlushMessageBox;
|
||||
return;
|
||||
}
|
||||
|
@ -7635,7 +7634,7 @@ static void Cmd_jumptocalledmove(void)
|
|||
else
|
||||
gChosenMove = gCurrentMove = gCalledMove;
|
||||
|
||||
gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect];
|
||||
gBattlescriptCurrInstr = GET_MOVE_BATTLESCRIPT(gCurrentMove);
|
||||
}
|
||||
|
||||
static void Cmd_statusanimation(void)
|
||||
|
@ -10906,7 +10905,7 @@ static void SetMoveForMirrorMove(u32 move)
|
|||
gCurrentMove = move;
|
||||
SetAtkCancellerForCalledMove();
|
||||
gBattlerTarget = GetMoveTarget(gCurrentMove, NO_TARGET_OVERRIDE);
|
||||
gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect];
|
||||
gBattlescriptCurrInstr = GET_MOVE_BATTLESCRIPT(gCurrentMove);
|
||||
}
|
||||
|
||||
static void Cmd_trymirrormove(void)
|
||||
|
@ -12493,7 +12492,7 @@ static void Cmd_metronome(void)
|
|||
gCurrentMove = RandomUniformExcept(RNG_METRONOME, 1, moveCount - 1, InvalidMetronomeMove);
|
||||
gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED;
|
||||
SetAtkCancellerForCalledMove();
|
||||
gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect];
|
||||
gBattlescriptCurrInstr = GET_MOVE_BATTLESCRIPT(gCurrentMove);
|
||||
gBattlerTarget = GetMoveTarget(gCurrentMove, NO_TARGET_OVERRIDE);
|
||||
}
|
||||
|
||||
|
@ -13745,7 +13744,7 @@ static void Cmd_callterrainattack(void)
|
|||
gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED;
|
||||
gCurrentMove = GetNaturePowerMove();
|
||||
gBattlerTarget = GetMoveTarget(gCurrentMove, NO_TARGET_OVERRIDE);
|
||||
BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]);
|
||||
BattleScriptPush(GET_MOVE_BATTLESCRIPT(gCurrentMove));
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
}
|
||||
|
||||
|
|
344
src/battle_tv.c
344
src/battle_tv.c
|
@ -84,347 +84,6 @@ static const u16 sVariableDmgMoves[] =
|
|||
MOVE_MAGNITUDE, MOVE_PSYWAVE, TABLE_END
|
||||
};
|
||||
|
||||
static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] =
|
||||
{
|
||||
[EFFECT_HIT] = 1,
|
||||
[EFFECT_SLEEP] = 1,
|
||||
[EFFECT_ABSORB] = 4,
|
||||
[EFFECT_EXPLOSION] = 0,
|
||||
[EFFECT_DREAM_EATER] = 5,
|
||||
[EFFECT_MIRROR_MOVE] = 1,
|
||||
[EFFECT_ATTACK_UP] = 1,
|
||||
[EFFECT_DEFENSE_UP] = 1,
|
||||
[EFFECT_SPEED_UP] = 1,
|
||||
[EFFECT_SPECIAL_ATTACK_UP] = 1,
|
||||
[EFFECT_SPECIAL_DEFENSE_UP] = 1,
|
||||
[EFFECT_ACCURACY_UP] = 1,
|
||||
[EFFECT_EVASION_UP] = 1,
|
||||
[EFFECT_ATTACK_DOWN] = 1,
|
||||
[EFFECT_DEFENSE_DOWN] = 1,
|
||||
[EFFECT_SPEED_DOWN] = 1,
|
||||
[EFFECT_SPECIAL_ATTACK_DOWN] = 1,
|
||||
[EFFECT_SPECIAL_DEFENSE_DOWN] = 1,
|
||||
[EFFECT_ACCURACY_DOWN] = 1,
|
||||
[EFFECT_EVASION_DOWN] = 1,
|
||||
[EFFECT_HAZE] = 5,
|
||||
[EFFECT_BIDE] = 5,
|
||||
[EFFECT_ROAR] = 5,
|
||||
[EFFECT_MULTI_HIT] = 1,
|
||||
[EFFECT_CONVERSION] = 3,
|
||||
[EFFECT_RESTORE_HP] = 3,
|
||||
[EFFECT_TOXIC] = 5,
|
||||
[EFFECT_LIGHT_SCREEN] = 7,
|
||||
[EFFECT_REST] = 7,
|
||||
[EFFECT_OHKO] = 7,
|
||||
[EFFECT_SUPER_FANG] = 5,
|
||||
[EFFECT_RECOIL_IF_MISS] = 1,
|
||||
[EFFECT_MIST] = 5,
|
||||
[EFFECT_FOCUS_ENERGY] = 1,
|
||||
[EFFECT_CONFUSE] = 4,
|
||||
[EFFECT_ATTACK_UP_2] = 1,
|
||||
[EFFECT_DEFENSE_UP_2] = 1,
|
||||
[EFFECT_SPEED_UP_2] = 1,
|
||||
[EFFECT_SPECIAL_ATTACK_UP_2] = 1,
|
||||
[EFFECT_SPECIAL_DEFENSE_UP_2] = 1,
|
||||
[EFFECT_ACCURACY_UP_2] = 1,
|
||||
[EFFECT_EVASION_UP_2] = 1,
|
||||
[EFFECT_TRANSFORM] = 0,
|
||||
[EFFECT_ATTACK_DOWN_2] = 1,
|
||||
[EFFECT_DEFENSE_DOWN_2] = 1,
|
||||
[EFFECT_SPEED_DOWN_2] = 1,
|
||||
[EFFECT_SPECIAL_ATTACK_DOWN_2] = 1,
|
||||
[EFFECT_SPECIAL_DEFENSE_DOWN_2] = 1,
|
||||
[EFFECT_ACCURACY_DOWN_2] = 1,
|
||||
[EFFECT_EVASION_DOWN_2] = 1,
|
||||
[EFFECT_REFLECT] = 7,
|
||||
[EFFECT_POISON] = 4,
|
||||
[EFFECT_PARALYZE] = 4,
|
||||
[EFFECT_SUBSTITUTE] = 4,
|
||||
[EFFECT_RAGE] = 2,
|
||||
[EFFECT_MIMIC] = 4,
|
||||
[EFFECT_METRONOME] = 1,
|
||||
[EFFECT_LEECH_SEED] = 4,
|
||||
[EFFECT_DO_NOTHING] = 1,
|
||||
[EFFECT_DISABLE] = 7,
|
||||
[EFFECT_LEVEL_DAMAGE] = 2,
|
||||
[EFFECT_PSYWAVE] = 1,
|
||||
[EFFECT_COUNTER] = 5,
|
||||
[EFFECT_ENCORE] = 7,
|
||||
[EFFECT_PAIN_SPLIT] = 3,
|
||||
[EFFECT_SNORE] = 3,
|
||||
[EFFECT_CONVERSION_2] = 4,
|
||||
[EFFECT_LOCK_ON] = 3,
|
||||
[EFFECT_SKETCH] = 3,
|
||||
[EFFECT_SLEEP_TALK] = 3,
|
||||
[EFFECT_DESTINY_BOND] = 3,
|
||||
[EFFECT_FLAIL] = 2,
|
||||
[EFFECT_SPITE] = 4,
|
||||
[EFFECT_FALSE_SWIPE] = 1,
|
||||
[EFFECT_HEAL_BELL] = 5,
|
||||
[EFFECT_TRIPLE_KICK] = 1,
|
||||
[EFFECT_MEAN_LOOK] = 5,
|
||||
[EFFECT_NIGHTMARE] = 3,
|
||||
[EFFECT_MINIMIZE] = 1,
|
||||
[EFFECT_CURSE] = 2,
|
||||
[EFFECT_PROTECT] = 5,
|
||||
[EFFECT_SPIKES] = 4,
|
||||
[EFFECT_FORESIGHT] = 3,
|
||||
[EFFECT_PERISH_SONG] = 6,
|
||||
[EFFECT_SANDSTORM] = 4,
|
||||
[EFFECT_ENDURE] = 3,
|
||||
[EFFECT_ROLLOUT] = 3,
|
||||
[EFFECT_SWAGGER] = 3,
|
||||
[EFFECT_FURY_CUTTER] = 2,
|
||||
[EFFECT_ATTRACT] = 4,
|
||||
[EFFECT_RETURN] = 1,
|
||||
[EFFECT_PRESENT] = 1,
|
||||
[EFFECT_FRUSTRATION] = 1,
|
||||
[EFFECT_SAFEGUARD] = 5,
|
||||
[EFFECT_MAGNITUDE] = 1,
|
||||
[EFFECT_BATON_PASS] = 7,
|
||||
[EFFECT_PURSUIT] = 2,
|
||||
[EFFECT_FIXED_DAMAGE_ARG] = 1,
|
||||
[EFFECT_MORNING_SUN] = 4,
|
||||
[EFFECT_SYNTHESIS] = 4,
|
||||
[EFFECT_MOONLIGHT] = 4,
|
||||
[EFFECT_HIDDEN_POWER] = 1,
|
||||
[EFFECT_RAIN_DANCE] = 4,
|
||||
[EFFECT_SUNNY_DAY] = 4,
|
||||
[EFFECT_BELLY_DRUM] = 7,
|
||||
[EFFECT_PSYCH_UP] = 7,
|
||||
[EFFECT_MIRROR_COAT] = 6,
|
||||
[EFFECT_SKULL_BASH] = 3,
|
||||
[EFFECT_EARTHQUAKE] = 1,
|
||||
[EFFECT_FUTURE_SIGHT] = 1,
|
||||
[EFFECT_GUST] = 1,
|
||||
[EFFECT_SOLAR_BEAM] = 1,
|
||||
[EFFECT_THUNDER] = 1,
|
||||
[EFFECT_TELEPORT] = 1,
|
||||
[EFFECT_BEAT_UP] = 2,
|
||||
[EFFECT_SEMI_INVULNERABLE] = 3,
|
||||
[EFFECT_DEFENSE_CURL] = 1,
|
||||
[EFFECT_SOFTBOILED] = 1,
|
||||
[EFFECT_FAKE_OUT] = 4,
|
||||
[EFFECT_UPROAR] = 4,
|
||||
[EFFECT_STOCKPILE] = 3,
|
||||
[EFFECT_SPIT_UP] = 3,
|
||||
[EFFECT_SWALLOW] = 3,
|
||||
[EFFECT_HAIL] = 4,
|
||||
[EFFECT_TORMENT] = 7,
|
||||
[EFFECT_FLATTER] = 7,
|
||||
[EFFECT_WILL_O_WISP] = 5,
|
||||
[EFFECT_MEMENTO] = 7,
|
||||
[EFFECT_FACADE] = 1,
|
||||
[EFFECT_FOCUS_PUNCH] = 7,
|
||||
[EFFECT_DOUBLE_POWER_ON_ARG_STATUS] = 1,
|
||||
[EFFECT_FOLLOW_ME] = 5,
|
||||
[EFFECT_NATURE_POWER] = 0,
|
||||
[EFFECT_CHARGE] = 4,
|
||||
[EFFECT_TAUNT] = 4,
|
||||
[EFFECT_HELPING_HAND] = 4,
|
||||
[EFFECT_TRICK] = 4,
|
||||
[EFFECT_ROLE_PLAY] = 4,
|
||||
[EFFECT_WISH] = 2,
|
||||
[EFFECT_ASSIST] = 2,
|
||||
[EFFECT_INGRAIN] = 6,
|
||||
[EFFECT_MAGIC_COAT] = 6,
|
||||
[EFFECT_RECYCLE] = 4,
|
||||
[EFFECT_REVENGE] = 4,
|
||||
[EFFECT_BRICK_BREAK] = 2,
|
||||
[EFFECT_YAWN] = 5,
|
||||
[EFFECT_KNOCK_OFF] = 2,
|
||||
[EFFECT_ENDEAVOR] = 1,
|
||||
[EFFECT_ERUPTION] = 1,
|
||||
[EFFECT_SKILL_SWAP] = 6,
|
||||
[EFFECT_IMPRISON] = 6,
|
||||
[EFFECT_REFRESH] = 6,
|
||||
[EFFECT_GRUDGE] = 1,
|
||||
[EFFECT_SNATCH] = 1,
|
||||
[EFFECT_LOW_KICK] = 1,
|
||||
[EFFECT_TEETER_DANCE] = 6,
|
||||
[EFFECT_MUD_SPORT] = 4,
|
||||
[EFFECT_WEATHER_BALL] = 1,
|
||||
[EFFECT_TICKLE] = 1,
|
||||
[EFFECT_COSMIC_POWER] = 1,
|
||||
[EFFECT_SKY_UPPERCUT] = 1,
|
||||
[EFFECT_BULK_UP] = 1,
|
||||
[EFFECT_WATER_SPORT] = 4,
|
||||
[EFFECT_CALM_MIND] = 1,
|
||||
[EFFECT_DRAGON_DANCE] = 1,
|
||||
[EFFECT_CAMOUFLAGE] = 3,
|
||||
[EFFECT_PLEDGE] = 0, // TODO: Assign points
|
||||
[EFFECT_FLING] = 0, // TODO: Assign points
|
||||
[EFFECT_NATURAL_GIFT] = 0, // TODO: Assign points
|
||||
[EFFECT_WRING_OUT] = 0, // TODO: Assign points
|
||||
[EFFECT_ASSURANCE] = 0, // TODO: Assign points
|
||||
[EFFECT_TRUMP_CARD] = 0, // TODO: Assign points
|
||||
[EFFECT_ACROBATICS] = 0, // TODO: Assign points
|
||||
[EFFECT_HEAT_CRASH] = 0, // TODO: Assign points
|
||||
[EFFECT_PUNISHMENT] = 0, // TODO: Assign points
|
||||
[EFFECT_STORED_POWER] = 0, // TODO: Assign points
|
||||
[EFFECT_ELECTRO_BALL] = 0, // TODO: Assign points
|
||||
[EFFECT_GYRO_BALL] = 0, // TODO: Assign points
|
||||
[EFFECT_ECHOED_VOICE] = 0, // TODO: Assign points
|
||||
[EFFECT_PAYBACK] = 0, // TODO: Assign points
|
||||
[EFFECT_ROUND] = 0, // TODO: Assign points
|
||||
[EFFECT_BRINE] = 0, // TODO: Assign points
|
||||
[EFFECT_RETALIATE] = 0, // TODO: Assign points
|
||||
[EFFECT_BULLDOZE] = 0, // TODO: Assign points
|
||||
[EFFECT_FOUL_PLAY] = 0, // TODO: Assign points
|
||||
[EFFECT_PSYSHOCK] = 0, // TODO: Assign points
|
||||
[EFFECT_ROOST] = 0, // TODO: Assign points
|
||||
[EFFECT_GRAVITY] = 0, // TODO: Assign points
|
||||
[EFFECT_MIRACLE_EYE] = 0, // TODO: Assign points
|
||||
[EFFECT_TAILWIND] = 0, // TODO: Assign points
|
||||
[EFFECT_EMBARGO] = 0, // TODO: Assign points
|
||||
[EFFECT_AQUA_RING] = 0, // TODO: Assign points
|
||||
[EFFECT_TRICK_ROOM] = 0, // TODO: Assign points
|
||||
[EFFECT_WONDER_ROOM] = 0, // TODO: Assign points
|
||||
[EFFECT_MAGIC_ROOM] = 0, // TODO: Assign points
|
||||
[EFFECT_MAGNET_RISE] = 0, // TODO: Assign points
|
||||
[EFFECT_TOXIC_SPIKES] = 0, // TODO: Assign points
|
||||
[EFFECT_GASTRO_ACID] = 0, // TODO: Assign points
|
||||
[EFFECT_STEALTH_ROCK] = 0, // TODO: Assign points
|
||||
[EFFECT_TELEKINESIS] = 0, // TODO: Assign points
|
||||
[EFFECT_POWER_SWAP] = 0, // TODO: Assign points
|
||||
[EFFECT_GUARD_SWAP] = 0, // TODO: Assign points
|
||||
[EFFECT_HEART_SWAP] = 0, // TODO: Assign points
|
||||
[EFFECT_POWER_SPLIT] = 0, // TODO: Assign points
|
||||
[EFFECT_GUARD_SPLIT] = 0, // TODO: Assign points
|
||||
[EFFECT_STICKY_WEB] = 0, // TODO: Assign points
|
||||
[EFFECT_METAL_BURST] = 0, // TODO: Assign points
|
||||
[EFFECT_LUCKY_CHANT] = 0, // TODO: Assign points
|
||||
[EFFECT_SUCKER_PUNCH] = 0, // TODO: Assign points
|
||||
[EFFECT_SIMPLE_BEAM] = 0, // TODO: Assign points
|
||||
[EFFECT_ENTRAINMENT] = 0, // TODO: Assign points
|
||||
[EFFECT_HEAL_PULSE] = 0, // TODO: Assign points
|
||||
[EFFECT_QUASH] = 0, // TODO: Assign points
|
||||
[EFFECT_ION_DELUGE] = 0, // TODO: Assign points
|
||||
[EFFECT_FREEZE_DRY] = 0, // TODO: Assign points
|
||||
[EFFECT_TOPSY_TURVY] = 0, // TODO: Assign points
|
||||
[EFFECT_MISTY_TERRAIN] = 0, // TODO: Assign points
|
||||
[EFFECT_GRASSY_TERRAIN] = 0, // TODO: Assign points
|
||||
[EFFECT_ELECTRIC_TERRAIN] = 0, // TODO: Assign points
|
||||
[EFFECT_PSYCHIC_TERRAIN] = 0, // TODO: Assign points
|
||||
[EFFECT_ATTACK_ACCURACY_UP] = 0, // TODO: Assign points
|
||||
[EFFECT_ATTACK_SPATK_UP] = 0, // TODO: Assign points
|
||||
[EFFECT_TWO_TYPED_MOVE] = 0, // TODO: Assign points
|
||||
[EFFECT_ME_FIRST] = 0, // TODO: Assign points
|
||||
[EFFECT_QUIVER_DANCE] = 0, // TODO: Assign points
|
||||
[EFFECT_COIL] = 0, // TODO: Assign points
|
||||
[EFFECT_ELECTRIFY] = 0, // TODO: Assign points
|
||||
[EFFECT_REFLECT_TYPE] = 0, // TODO: Assign points
|
||||
[EFFECT_SOAK] = 0, // TODO: Assign points
|
||||
[EFFECT_GROWTH] = 0, // TODO: Assign points
|
||||
[EFFECT_LAST_RESORT] = 0, // TODO: Assign points
|
||||
[EFFECT_SHELL_SMASH] = 0, // TODO: Assign points
|
||||
[EFFECT_SHIFT_GEAR] = 0, // TODO: Assign points
|
||||
[EFFECT_DEFENSE_UP_3] = 0, // TODO: Assign points
|
||||
[EFFECT_NOBLE_ROAR] = 0, // TODO: Assign points
|
||||
[EFFECT_VENOM_DRENCH] = 0, // TODO: Assign points
|
||||
[EFFECT_TOXIC_THREAD] = 0, // TODO: Assign points
|
||||
[EFFECT_HIT_SWITCH_TARGET] = 0, // TODO: Assign points
|
||||
[EFFECT_FINAL_GAMBIT] = 0, // TODO: Assign points
|
||||
[EFFECT_CHANGE_TYPE_ON_ITEM] = 0, // TODO: Assign points
|
||||
[EFFECT_AUTOTOMIZE] = 0, // TODO: Assign points
|
||||
[EFFECT_COPYCAT] = 0, // TODO: Assign points
|
||||
[EFFECT_DEFOG] = 0, // TODO: Assign points
|
||||
[EFFECT_HIT_ENEMY_HEAL_ALLY] = 0, // TODO: Assign points
|
||||
[EFFECT_SYNCHRONOISE] = 0, // TODO: Assign points
|
||||
[EFFECT_PSYCHO_SHIFT] = 0, // TODO: Assign points
|
||||
[EFFECT_POWER_TRICK] = 0, // TODO: Assign points
|
||||
[EFFECT_AFTER_YOU] = 0, // TODO: Assign points
|
||||
[EFFECT_BESTOW] = 0, // TODO: Assign points
|
||||
[EFFECT_ROTOTILLER] = 0, // TODO: Assign points
|
||||
[EFFECT_FLOWER_SHIELD] = 0, // TODO: Assign points
|
||||
[EFFECT_SPEED_SWAP] = 0, // TODO: Assign points
|
||||
[EFFECT_REVELATION_DANCE] = 0, // TODO: Assign points
|
||||
[EFFECT_AURORA_VEIL] = 0, // TODO: Assign points
|
||||
[EFFECT_THIRD_TYPE] = 0, // TODO: Assign points
|
||||
[EFFECT_ACUPRESSURE] = 0, // TODO: Assign points
|
||||
[EFFECT_AROMATIC_MIST] = 0, // TODO: Assign points
|
||||
[EFFECT_POWDER] = 0, // TODO: Assign points
|
||||
[EFFECT_BELCH] = 0, // TODO: Assign points
|
||||
[EFFECT_PARTING_SHOT] = 0, // TODO: Assign points
|
||||
[EFFECT_MAT_BLOCK] = 0, // TODO: Assign points
|
||||
[EFFECT_STOMPING_TANTRUM] = 0, // TODO: Assign points
|
||||
[EFFECT_INSTRUCT] = 0, // TODO: Assign points
|
||||
[EFFECT_LASER_FOCUS] = 0, // TODO: Assign points
|
||||
[EFFECT_MAGNETIC_FLUX] = 0, // TODO: Assign points
|
||||
[EFFECT_GEAR_UP] = 0, // TODO: Assign points
|
||||
[EFFECT_STRENGTH_SAP] = 0, // TODO: Assign points
|
||||
[EFFECT_MIND_BLOWN] = 0, // TODO: Assign points
|
||||
[EFFECT_PURIFY] = 0, // TODO: Assign points
|
||||
[EFFECT_SHORE_UP] = 0, // TODO: Assign points
|
||||
[EFFECT_GEOMANCY] = 0, // TODO: Assign points
|
||||
[EFFECT_FAIRY_LOCK] = 0, // TODO: Assign points
|
||||
[EFFECT_ALLY_SWITCH] = 0, // TODO: Assign points
|
||||
[EFFECT_RELIC_SONG] = 0, // TODO: Assign points
|
||||
[EFFECT_BODY_PRESS] = 0, // TODO: Assign points
|
||||
[EFFECT_EERIE_SPELL] = 0, // TODO: Assign points
|
||||
[EFFECT_JUNGLE_HEALING] = 0, // TODO: Assign points
|
||||
[EFFECT_COACHING] = 0, // TODO: Assign points
|
||||
[EFFECT_LASH_OUT] = 0, // TODO: Assign points
|
||||
[EFFECT_GRASSY_GLIDE] = 0, // TODO: Assign points
|
||||
[EFFECT_DYNAMAX_DOUBLE_DMG] = 0, // TODO: Assign points
|
||||
[EFFECT_DECORATE] = 0, // TODO: Assign points
|
||||
[EFFECT_SNIPE_SHOT] = 0, // TODO: Assign points
|
||||
[EFFECT_RECOIL_HP_25] = 0, // TODO: Assign points
|
||||
[EFFECT_STUFF_CHEEKS] = 0, // TODO: Assign points
|
||||
[EFFECT_GRAV_APPLE] = 0, // TODO: Assign points
|
||||
[EFFECT_GLITZY_GLOW] = 0, // TODO: Assign points
|
||||
[EFFECT_BADDY_BAD] = 0, // TODO: Assign points
|
||||
[EFFECT_SAPPY_SEED] = 0, // TODO: Assign points
|
||||
[EFFECT_FREEZY_FROST] = 0, // TODO: Assign points
|
||||
[EFFECT_SPARKLY_SWIRL] = 0, // TODO: Assign points
|
||||
[EFFECT_PLASMA_FISTS] = 0, // TODO: Assign points
|
||||
[EFFECT_HYPERSPACE_FURY] = 0, // TODO: Assign points
|
||||
[EFFECT_AURA_WHEEL] = 0, // TODO: Assign points
|
||||
[EFFECT_PHOTON_GEYSER] = 0, // TODO: Assign points
|
||||
[EFFECT_SHELL_SIDE_ARM] = 0, // TODO: Assign points
|
||||
[EFFECT_TERRAIN_PULSE] = 0, // TODO: Assign points
|
||||
[EFFECT_NO_RETREAT] = 0, // TODO: Assign points
|
||||
[EFFECT_TAR_SHOT] = 0, // TODO: Assign points
|
||||
[EFFECT_POLTERGEIST] = 0, // TODO: Assign points
|
||||
[EFFECT_OCTOLOCK] = 0, // TODO: Assign points
|
||||
[EFFECT_CLANGOROUS_SOUL] = 0, // TODO: Assign points
|
||||
[EFFECT_BOLT_BEAK] = 0, // TODO: Assign points
|
||||
[EFFECT_SKY_DROP] = 0, // TODO: Assign points
|
||||
[EFFECT_EXPANDING_FORCE] = 0, // TODO: Assign points
|
||||
[EFFECT_METEOR_BEAM] = 0, // TODO: Assign points
|
||||
[EFFECT_RISING_VOLTAGE] = 0, // TODO: Assign points
|
||||
[EFFECT_BEAK_BLAST] = 0, // TODO: Assign points
|
||||
[EFFECT_COURT_CHANGE] = 0, // TODO: Assign points
|
||||
[EFFECT_STEEL_BEAM] = 0, // TODO: Assign points
|
||||
[EFFECT_EXTREME_EVOBOOST] = 0, // TODO: Assign points
|
||||
[EFFECT_HIT_SET_REMOVE_TERRAIN] = 0, // TODO: Assign points
|
||||
[EFFECT_DARK_VOID] = 0, // TODO: Assign points
|
||||
[EFFECT_VICTORY_DANCE] = 0, // TODO: Assign points
|
||||
[EFFECT_TEATIME] = 0, // TODO: Assign points
|
||||
[EFFECT_ATTACK_UP_USER_ALLY] = 0, // TODO: Assign points
|
||||
[EFFECT_SHELL_TRAP] = 0, // TODO: Assign points
|
||||
[EFFECT_PSYBLADE] = 0, // TODO: Assign points
|
||||
[EFFECT_HYDRO_STEAM] = 0, // TODO: Assign points
|
||||
[EFFECT_REVIVAL_BLESSING] = 0, // TODO: Assign points
|
||||
[EFFECT_SNOWSCAPE] = 4,
|
||||
[EFFECT_TAKE_HEART] = 0, // TODO: Assign points
|
||||
[EFFECT_COLLISION_COURSE] = 0, // TODO: Assign points
|
||||
[EFFECT_CORROSIVE_GAS] = 0, // TODO: Assign points
|
||||
[EFFECT_POPULATION_BOMB] = 0, // TODO: Assign points
|
||||
[EFFECT_SALT_CURE] = 0, // TODO: Assign points
|
||||
[EFFECT_CHILLY_RECEPTION] = 0, // TODO: Assign points
|
||||
[EFFECT_MAX_MOVE] = 0, // TODO: Assign points
|
||||
[EFFECT_GLAIVE_RUSH] = 0, // TODO: Assign points
|
||||
[EFFECT_RAGING_BULL] = 0, // TODO: Assign points
|
||||
[EFFECT_RAGE_FIST] = 0, // TODO: Assign points
|
||||
[EFFECT_DOODLE] = 0, // TODO: Assign points
|
||||
[EFFECT_FILLET_AWAY] = 0, // TODO: Assign points
|
||||
[EFFECT_IVY_CUDGEL] = 0, // TODO: Assign points
|
||||
[EFFECT_FICKLE_BEAM] = 0, // TODO: Assign points
|
||||
[EFFECT_BLIZZARD] = 0, // TODO: Assign points
|
||||
[EFFECT_RAIN_ALWAYS_HIT] = 0, // TODO: Assign points
|
||||
};
|
||||
|
||||
static const u16 sPoints_Effectiveness[] =
|
||||
{
|
||||
4, // Super Effective
|
||||
|
@ -618,7 +277,6 @@ static const u16 sPoints_StatIncreaseNotSelf[NUM_BATTLE_STATS - 1] =
|
|||
|
||||
static const u16 *const sPointsArray[] =
|
||||
{
|
||||
[PTS_MOVE_EFFECT] = sPoints_MoveEffect,
|
||||
[PTS_EFFECTIVENESS] = sPoints_Effectiveness,
|
||||
[PTS_SET_UP] = sPoints_SetUp,
|
||||
[PTS_RAIN] = sPoints_RainMoves,
|
||||
|
@ -1279,7 +937,7 @@ static void AddMovePoints(u8 caseId, u16 arg1, u8 arg2, u8 arg3)
|
|||
{
|
||||
case PTS_MOVE_EFFECT: // arg1 -> move slot, arg2 -> move
|
||||
{
|
||||
u8 baseFromEffect = sPointsArray[caseId][gBattleMoves[arg2].effect];
|
||||
u8 baseFromEffect = gBattleMoveEffects[gBattleMoves[arg2].effect].battleTvScore;
|
||||
|
||||
// Various cases to add/remove points
|
||||
if (gBattleMoves[arg2].recoil > 0)
|
||||
|
|
|
@ -63,7 +63,6 @@ static u32 GetBattlerItemHoldEffectParam(u32 battler, u32 item);
|
|||
static uq4_12_t GetSupremeOverlordModifier(u32 battler);
|
||||
static bool32 CanBeInfinitelyConfused(u32 battler);
|
||||
|
||||
extern const u8 *const gBattleScriptsForMoveEffects[];
|
||||
extern const u8 *const gBattlescriptsForRunningByItem[];
|
||||
extern const u8 *const gBattlescriptsForUsingItem[];
|
||||
extern const u8 *const gBattlescriptsForSafariActions[];
|
||||
|
@ -393,7 +392,7 @@ void HandleAction_UseMove(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect];
|
||||
gBattlescriptCurrInstr = GET_MOVE_BATTLESCRIPT(gCurrentMove);
|
||||
}
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_ARENA)
|
||||
|
|
2226
src/data/battle_move_effects.h
Normal file
2226
src/data/battle_move_effects.h
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue