mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-26 21:33:53 +01:00
Get rid of scripting dmg multiplier
This commit is contained in:
parent
baf172d605
commit
2ebf14a83d
@ -1052,7 +1052,7 @@
|
||||
.4byte \param0
|
||||
.endm
|
||||
|
||||
.macro doubledamagedealtifdamaged
|
||||
.macro nop_D6
|
||||
.byte 0xd6
|
||||
.endm
|
||||
|
||||
|
@ -229,38 +229,38 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
|
||||
.4byte BattleScript_EffectDragonDance
|
||||
.4byte BattleScript_EffectCamouflage
|
||||
|
||||
BattleScript_EffectSpeedUp::
|
||||
BattleScript_EffectSpecialDefenseUp::
|
||||
BattleScript_EffectAccuracyUp::
|
||||
BattleScript_EffectAlwaysHit::
|
||||
BattleScript_EffectSpecialAttackDown::
|
||||
BattleScript_EffectSpecialDefenseDown::
|
||||
BattleScript_EffectPlaceholder43::
|
||||
BattleScript_EffectAccuracyUp2::
|
||||
BattleScript_EffectEvasionUp2::
|
||||
BattleScript_EffectSpecialAttackDown2::
|
||||
BattleScript_EffectAccuracyDown2::
|
||||
BattleScript_EffectEvasionDown2::
|
||||
BattleScript_EffectEvasionDownHit::
|
||||
BattleScript_EffectVitalThrow::
|
||||
BattleScript_EffectUnused60::
|
||||
BattleScript_EffectFalseSwipe::
|
||||
BattleScript_EffectPlaceholder103::
|
||||
BattleScript_EffectUnused6e::
|
||||
BattleScript_EffectPursuit::
|
||||
BattleScript_EffectUnused83::
|
||||
BattleScript_EffectUnused8d::
|
||||
BattleScript_EffectUnusedA3::
|
||||
BattleScript_EffectPlaceholder200::
|
||||
BattleScript_EffectSpeedUp:
|
||||
BattleScript_EffectSpecialDefenseUp:
|
||||
BattleScript_EffectAccuracyUp:
|
||||
BattleScript_EffectAlwaysHit:
|
||||
BattleScript_EffectSpecialAttackDown:
|
||||
BattleScript_EffectSpecialDefenseDown:
|
||||
BattleScript_EffectPlaceholder43:
|
||||
BattleScript_EffectAccuracyUp2:
|
||||
BattleScript_EffectEvasionUp2:
|
||||
BattleScript_EffectSpecialAttackDown2:
|
||||
BattleScript_EffectAccuracyDown2:
|
||||
BattleScript_EffectEvasionDown2:
|
||||
BattleScript_EffectEvasionDownHit:
|
||||
BattleScript_EffectVitalThrow:
|
||||
BattleScript_EffectUnused60:
|
||||
BattleScript_EffectFalseSwipe:
|
||||
BattleScript_EffectPlaceholder103:
|
||||
BattleScript_EffectUnused6e:
|
||||
BattleScript_EffectPursuit:
|
||||
BattleScript_EffectUnused83:
|
||||
BattleScript_EffectUnused8d:
|
||||
BattleScript_EffectUnusedA3:
|
||||
BattleScript_EffectPlaceholder200:
|
||||
BattleScript_EffectPlaceholder209:
|
||||
BattleScript_EffectHit::
|
||||
BattleScript_EffectLowKick:
|
||||
BattleScript_EffectFlail:
|
||||
BattleScript_EffectFacade:
|
||||
BattleScript_EffectRevenge:
|
||||
jumpifnotmove MOVE_SURF, BattleScript_HitFromAtkCanceler
|
||||
jumpifnostatus3 BS_TARGET, STATUS3_UNDERWATER, BattleScript_HitFromAtkCanceler
|
||||
orword gHitMarker, HITMARKER_IGNORE_UNDERWATER
|
||||
setbyte sDMG_MULTIPLIER, 0x2
|
||||
BattleScript_HitFromAtkCanceler::
|
||||
attackcanceler
|
||||
BattleScript_HitFromAccCheck::
|
||||
@ -860,7 +860,6 @@ BattleScript_EffectTrap::
|
||||
jumpifnotmove MOVE_WHIRLPOOL, BattleScript_DoWrapEffect
|
||||
jumpifnostatus3 BS_TARGET, STATUS3_UNDERWATER, BattleScript_DoWrapEffect
|
||||
orword gHitMarker, HITMARKER_IGNORE_UNDERWATER
|
||||
setbyte sDMG_MULTIPLIER, 0x2
|
||||
BattleScript_DoWrapEffect::
|
||||
setmoveeffect MOVE_EFFECT_WRAP
|
||||
goto BattleScript_EffectHit
|
||||
@ -1850,11 +1849,11 @@ BattleScript_EffectSkullBash::
|
||||
BattleScript_SkullBashEnd::
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectTwister::
|
||||
BattleScript_EffectTwister:
|
||||
jumpifnostatus3 BS_TARGET, STATUS3_ON_AIR, BattleScript_FlinchEffect
|
||||
orword gHitMarker, HITMARKER_IGNORE_ON_AIR
|
||||
setbyte sDMG_MULTIPLIER, 0x2
|
||||
BattleScript_FlinchEffect::
|
||||
BattleScript_FlinchEffect:
|
||||
BattleScript_EffectStomp:
|
||||
setmoveeffect MOVE_EFFECT_FLINCH
|
||||
goto BattleScript_EffectHit
|
||||
|
||||
@ -1867,11 +1866,9 @@ BattleScript_HitsAllWithUndergroundBonusLoop::
|
||||
movevaluescleanup
|
||||
jumpifnostatus3 BS_TARGET, STATUS3_UNDERGROUND, BattleScript_HitsAllNoUndergroundBonus
|
||||
orword gHitMarker, HITMARKER_IGNORE_UNDERGROUND
|
||||
setbyte sDMG_MULTIPLIER, 0x2
|
||||
goto BattleScript_DoHitAllWithUndergroundBonus
|
||||
BattleScript_HitsAllNoUndergroundBonus::
|
||||
bicword gHitMarker, HITMARKER_IGNORE_UNDERGROUND
|
||||
setbyte sDMG_MULTIPLIER, 0x1
|
||||
BattleScript_DoHitAllWithUndergroundBonus::
|
||||
accuracycheck BattleScript_HitAllWithUndergroundBonusMissed, ACC_CURR_MOVE
|
||||
critcalc
|
||||
@ -1921,14 +1918,8 @@ BattleScript_EffectFutureSight::
|
||||
BattleScript_EffectGust::
|
||||
jumpifnostatus3 BS_TARGET, STATUS3_ON_AIR, BattleScript_EffectHit
|
||||
orword gHitMarker, HITMARKER_IGNORE_ON_AIR
|
||||
setbyte sDMG_MULTIPLIER, 0x2
|
||||
goto BattleScript_EffectHit
|
||||
|
||||
BattleScript_EffectStomp::
|
||||
jumpifnostatus3 BS_TARGET, STATUS3_MINIMIZED, BattleScript_FlinchEffect
|
||||
setbyte sDMG_MULTIPLIER, 0x2
|
||||
goto BattleScript_FlinchEffect
|
||||
|
||||
BattleScript_EffectSolarbeam::
|
||||
jumpifabilitypresent ABILITY_CLOUD_NINE, BattleScript_SolarbeamDecideTurn
|
||||
jumpifabilitypresent ABILITY_AIR_LOCK, BattleScript_SolarbeamDecideTurn
|
||||
@ -2287,11 +2278,6 @@ BattleScript_EffectFocusPunch::
|
||||
BattleScript_EffectSmellingsalt::
|
||||
jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_EffectHit
|
||||
setmoveeffect MOVE_EFFECT_REMOVE_PARALYSIS | MOVE_EFFECT_CERTAIN
|
||||
jumpifstatus BS_TARGET, STATUS1_PARALYSIS, BattleScript_SmellingsaltDoubleDmg
|
||||
goto BattleScript_EffectHit
|
||||
|
||||
BattleScript_SmellingsaltDoubleDmg::
|
||||
setbyte sDMG_MULTIPLIER, 0x2
|
||||
goto BattleScript_EffectHit
|
||||
|
||||
BattleScript_EffectFollowMe::
|
||||
@ -2431,10 +2417,6 @@ BattleScript_EffectRecycle::
|
||||
waitmessage 0x40
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectRevenge::
|
||||
doubledamagedealtifdamaged
|
||||
goto BattleScript_EffectHit
|
||||
|
||||
BattleScript_EffectBrickBreak::
|
||||
attackcanceler
|
||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||
@ -3096,7 +3078,6 @@ BattleScript_PrintFullBox::
|
||||
BattleScript_ActionSwitch::
|
||||
hpthresholds2 BS_ATTACKER
|
||||
printstring STRINGID_RETURNMON
|
||||
setbyte sDMG_MULTIPLIER, 0x2
|
||||
jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_PursuitSwitchDmgSetMultihit
|
||||
setmultihit 0x1
|
||||
goto BattleScript_PursuitSwitchDmgLoop
|
||||
|
@ -598,7 +598,7 @@ struct BattleScripting
|
||||
s32 painSplitHp;
|
||||
s32 bideDmg;
|
||||
u8 multihitString[6];
|
||||
u8 dmgMultiplier;
|
||||
u8 unused_E;
|
||||
u8 twoTurnsMoveStringId;
|
||||
u8 animArg1;
|
||||
u8 animArg2;
|
||||
|
@ -5,7 +5,6 @@
|
||||
#define sPAINSPLIT_HP gBattleScripting
|
||||
#define sBIDE_DMG gBattleScripting + 4
|
||||
#define sMULTIHIT_STRING gBattleScripting + 8
|
||||
#define sDMG_MULTIPLIER gBattleScripting + 0xE
|
||||
#define sTWOTURN_STRINGID gBattleScripting + 0xF
|
||||
#define sB_ANIM_ARG1 gBattleScripting + 0x10
|
||||
#define sB_ANIM_ARG2 gBattleScripting + 0x11
|
||||
|
@ -1179,7 +1179,6 @@ static void BattleAICmd_get_how_powerful_move_is(void)
|
||||
{
|
||||
gDynamicBasePower = 0;
|
||||
*(&gBattleStruct->dynamicMoveType) = 0;
|
||||
gBattleScripting.dmgMultiplier = 1;
|
||||
gMoveResultFlags = 0;
|
||||
gCritMultiplier = 1;
|
||||
|
||||
@ -1460,7 +1459,6 @@ static void BattleAICmd_get_highest_type_effectiveness(void)
|
||||
gDynamicBasePower = 0;
|
||||
dynamicMoveType = &gBattleStruct->dynamicMoveType;
|
||||
*dynamicMoveType = 0;
|
||||
gBattleScripting.dmgMultiplier = 1;
|
||||
gMoveResultFlags = 0;
|
||||
gCritMultiplier = 1;
|
||||
AI_THINKING_STRUCT->funcResult = 0;
|
||||
@ -1500,7 +1498,6 @@ static void BattleAICmd_if_type_effectiveness(void)
|
||||
|
||||
gDynamicBasePower = 0;
|
||||
gBattleStruct->dynamicMoveType = 0;
|
||||
gBattleScripting.dmgMultiplier = 1;
|
||||
gMoveResultFlags = 0;
|
||||
gCritMultiplier = 1;
|
||||
|
||||
@ -1712,7 +1709,6 @@ static void BattleAICmd_if_can_faint(void)
|
||||
|
||||
gDynamicBasePower = 0;
|
||||
gBattleStruct->dynamicMoveType = 0;
|
||||
gBattleScripting.dmgMultiplier = 1;
|
||||
gMoveResultFlags = 0;
|
||||
gCritMultiplier = 1;
|
||||
gCurrentMove = AI_THINKING_STRUCT->moveConsidered;
|
||||
@ -1741,7 +1737,6 @@ static void BattleAICmd_if_cant_faint(void)
|
||||
|
||||
gDynamicBasePower = 0;
|
||||
gBattleStruct->dynamicMoveType = 0;
|
||||
gBattleScripting.dmgMultiplier = 1;
|
||||
gMoveResultFlags = 0;
|
||||
gCritMultiplier = 1;
|
||||
gCurrentMove = AI_THINKING_STRUCT->moveConsidered;
|
||||
|
@ -735,7 +735,6 @@ u8 GetMostSuitableMonToSwitchInto(void)
|
||||
|
||||
gDynamicBasePower = 0;
|
||||
gBattleStruct->dynamicMoveType = 0;
|
||||
gBattleScripting.dmgMultiplier = 1;
|
||||
gMoveResultFlags = 0;
|
||||
gCritMultiplier = 1;
|
||||
bestDmg = 0;
|
||||
|
@ -5296,7 +5296,6 @@ static void HandleAction_UseMove(void)
|
||||
}
|
||||
|
||||
gCritMultiplier = 1;
|
||||
gBattleScripting.dmgMultiplier = 1;
|
||||
gBattleStruct->atkCancellerTracker = 0;
|
||||
gMoveResultFlags = 0;
|
||||
gMultiHitCounter = 0;
|
||||
|
@ -304,7 +304,7 @@ static void atkD2_tryswapitems(void);
|
||||
static void atkD3_trycopyability(void);
|
||||
static void atkD4_trywish(void);
|
||||
static void atkD5_trysetroots(void);
|
||||
static void atkD6_doubledamagedealtifdamaged(void);
|
||||
static void atkD6_nop(void);
|
||||
static void atkD7_setyawn(void);
|
||||
static void atkD8_setdamagetohealthdifference(void);
|
||||
static void atkD9_scaledamagebyhealthratio(void);
|
||||
@ -556,7 +556,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
|
||||
atkD3_trycopyability,
|
||||
atkD4_trywish,
|
||||
atkD5_trysetroots,
|
||||
atkD6_doubledamagedealtifdamaged,
|
||||
atkD6_nop,
|
||||
atkD7_setyawn,
|
||||
atkD8_setdamagetohealthdifference,
|
||||
atkD9_scaledamagebyhealthratio,
|
||||
@ -1286,7 +1286,7 @@ static void atk05_damagecalc(void)
|
||||
gBattleMoveDamage = CalculateBaseDamage(&gBattleMons[gBattlerAttacker], &gBattleMons[gBattlerTarget], gCurrentMove,
|
||||
sideStatus, gDynamicBasePower,
|
||||
gBattleStruct->dynamicMoveType, gBattlerAttacker, gBattlerTarget);
|
||||
gBattleMoveDamage = gBattleMoveDamage * gCritMultiplier * gBattleScripting.dmgMultiplier;
|
||||
gBattleMoveDamage = gBattleMoveDamage * gCritMultiplier;
|
||||
|
||||
if (gStatuses3[gBattlerAttacker] & STATUS3_CHARGED_UP && gBattleMoves[gCurrentMove].type == TYPE_ELECTRIC)
|
||||
gBattleMoveDamage *= 2;
|
||||
@ -1303,7 +1303,7 @@ void AI_CalcDmg(u8 attacker, u8 defender)
|
||||
sideStatus, gDynamicBasePower,
|
||||
gBattleStruct->dynamicMoveType, attacker, defender);
|
||||
gDynamicBasePower = 0;
|
||||
gBattleMoveDamage = gBattleMoveDamage * gCritMultiplier * gBattleScripting.dmgMultiplier;
|
||||
gBattleMoveDamage = gBattleMoveDamage * gCritMultiplier;
|
||||
|
||||
if (gStatuses3[attacker] & STATUS3_CHARGED_UP && gBattleMoves[gCurrentMove].type == TYPE_ELECTRIC)
|
||||
gBattleMoveDamage *= 2;
|
||||
@ -3882,7 +3882,6 @@ static void atk24(void)
|
||||
static void MoveValuesCleanUp(void)
|
||||
{
|
||||
gMoveResultFlags = 0;
|
||||
gBattleScripting.dmgMultiplier = 1;
|
||||
gCritMultiplier = 1;
|
||||
gBattleCommunication[MOVE_EFFECT_BYTE] = 0;
|
||||
gBattleCommunication[6] = 0;
|
||||
@ -9492,16 +9491,8 @@ static void atkD5_trysetroots(void) // ingrain
|
||||
}
|
||||
}
|
||||
|
||||
static void atkD6_doubledamagedealtifdamaged(void)
|
||||
static void atkD6_nop(void)
|
||||
{
|
||||
if ((gProtectStructs[gBattlerAttacker].physicalDmg
|
||||
&& gProtectStructs[gBattlerAttacker].physicalBattlerId == gBattlerTarget)
|
||||
|| (gProtectStructs[gBattlerAttacker].specialDmg
|
||||
&& gProtectStructs[gBattlerAttacker].specialBattlerId == gBattlerTarget))
|
||||
{
|
||||
gBattleScripting.dmgMultiplier = 2;
|
||||
}
|
||||
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
|
||||
@ -9927,8 +9918,6 @@ static void atkE9_setweatherballtype(void)
|
||||
{
|
||||
if (WEATHER_HAS_EFFECT)
|
||||
{
|
||||
if (gBattleWeather & WEATHER_ANY)
|
||||
gBattleScripting.dmgMultiplier = 2;
|
||||
if (gBattleWeather & WEATHER_RAIN_ANY)
|
||||
*(&gBattleStruct->dynamicMoveType) = TYPE_WATER | 0x80;
|
||||
else if (gBattleWeather & WEATHER_SANDSTORM_ANY)
|
||||
|
@ -33,6 +33,122 @@ static const u16 sSoundMovesTable[] =
|
||||
MOVE_UPROAR, MOVE_METAL_SOUND, MOVE_GRASS_WHISTLE, MOVE_HYPER_VOICE, 0xFFFF
|
||||
};
|
||||
|
||||
static const u8 sAbilitiesAffectedByMoldBreaker[] =
|
||||
{
|
||||
[ABILITY_BATTLE_ARMOR] = 1,
|
||||
[ABILITY_CLEAR_BODY] = 1,
|
||||
[ABILITY_DAMP] = 1,
|
||||
[ABILITY_DRY_SKIN] = 1,
|
||||
[ABILITY_FILTER] = 1,
|
||||
[ABILITY_FLASH_FIRE] = 1,
|
||||
[ABILITY_FLOWER_GIFT] = 1,
|
||||
[ABILITY_HEATPROOF] = 1,
|
||||
[ABILITY_HYPER_CUTTER] = 1,
|
||||
[ABILITY_IMMUNITY] = 1,
|
||||
[ABILITY_INNER_FOCUS] = 1,
|
||||
[ABILITY_INSOMNIA] = 1,
|
||||
[ABILITY_KEEN_EYE] = 1,
|
||||
[ABILITY_LEAF_GUARD] = 1,
|
||||
[ABILITY_LEVITATE] = 1,
|
||||
[ABILITY_LIGHTNING_ROD] = 1,
|
||||
[ABILITY_LIMBER] = 1,
|
||||
[ABILITY_MAGMA_ARMOR] = 1,
|
||||
[ABILITY_MARVEL_SCALE] = 1,
|
||||
[ABILITY_MOTOR_DRIVE] = 1,
|
||||
[ABILITY_OBLIVIOUS] = 1,
|
||||
[ABILITY_OWN_TEMPO] = 1,
|
||||
[ABILITY_SAND_VEIL] = 1,
|
||||
[ABILITY_SHELL_ARMOR] = 1,
|
||||
[ABILITY_SHIELD_DUST] = 1,
|
||||
[ABILITY_SIMPLE] = 1,
|
||||
[ABILITY_SNOW_CLOAK] = 1,
|
||||
[ABILITY_SOLID_ROCK] = 1,
|
||||
[ABILITY_SOUNDPROOF] = 1,
|
||||
[ABILITY_STICKY_HOLD] = 1,
|
||||
[ABILITY_STORM_DRAIN] = 1,
|
||||
[ABILITY_STURDY] = 1,
|
||||
[ABILITY_SUCTION_CUPS] = 1,
|
||||
[ABILITY_TANGLED_FEET] = 1,
|
||||
[ABILITY_THICK_FAT] = 1,
|
||||
[ABILITY_UNAWARE] = 1,
|
||||
[ABILITY_VITAL_SPIRIT] = 1,
|
||||
[ABILITY_VOLT_ABSORB] = 1,
|
||||
[ABILITY_WATER_ABSORB] = 1,
|
||||
[ABILITY_WATER_VEIL] = 1,
|
||||
[ABILITY_WHITE_SMOKE] = 1,
|
||||
[ABILITY_WONDER_GUARD] = 1,
|
||||
[ABILITY_BIG_PECKS] = 1,
|
||||
[ABILITY_CONTRARY] = 1,
|
||||
[ABILITY_FRIEND_GUARD] = 1,
|
||||
[ABILITY_HEAVY_METAL] = 1,
|
||||
[ABILITY_LIGHT_METAL] = 1,
|
||||
[ABILITY_MAGIC_BOUNCE] = 1,
|
||||
[ABILITY_MULTISCALE] = 1,
|
||||
[ABILITY_SAP_SIPPER] = 1,
|
||||
[ABILITY_TELEPATHY] = 1,
|
||||
[ABILITY_WONDER_SKIN] = 1,
|
||||
[ABILITY_AROMA_VEIL] = 1,
|
||||
[ABILITY_BULLETPROOF] = 1,
|
||||
[ABILITY_FLOWER_VEIL] = 1,
|
||||
[ABILITY_FUR_COAT] = 1,
|
||||
[ABILITY_OVERCOAT] = 1,
|
||||
[ABILITY_SWEET_VEIL] = 1,
|
||||
[ABILITY_DAZZLING] = 1,
|
||||
[ABILITY_DISGUISE] = 1,
|
||||
[ABILITY_FLUFFY] = 1,
|
||||
[ABILITY_QUEENLY_MAJESTY] = 1,
|
||||
[ABILITY_WATER_BUBBLE] = 1,
|
||||
};
|
||||
|
||||
static const u8 sFlailHpScaleToPowerTable[] =
|
||||
{
|
||||
1, 200,
|
||||
4, 150,
|
||||
9, 100,
|
||||
16, 80,
|
||||
32, 40,
|
||||
48, 20
|
||||
};
|
||||
|
||||
// format: min. weight (hectograms), base power
|
||||
static const u16 sWeightToDamageTable[] =
|
||||
{
|
||||
100, 20,
|
||||
250, 40,
|
||||
500, 60,
|
||||
1000, 80,
|
||||
2000, 100,
|
||||
0xFFFF, 0xFFFF
|
||||
};
|
||||
|
||||
static const u16 sSpeedDiffToDmgTable[] =
|
||||
{
|
||||
40, 60, 80, 120, 150
|
||||
};
|
||||
|
||||
static const u8 sHoldEffectToType[][2] =
|
||||
{
|
||||
{HOLD_EFFECT_BUG_POWER, TYPE_BUG},
|
||||
{HOLD_EFFECT_STEEL_POWER, TYPE_STEEL},
|
||||
{HOLD_EFFECT_GROUND_POWER, TYPE_GROUND},
|
||||
{HOLD_EFFECT_ROCK_POWER, TYPE_ROCK},
|
||||
{HOLD_EFFECT_GRASS_POWER, TYPE_GRASS},
|
||||
{HOLD_EFFECT_DARK_POWER, TYPE_DARK},
|
||||
{HOLD_EFFECT_FIGHTING_POWER, TYPE_FIGHTING},
|
||||
{HOLD_EFFECT_ELECTRIC_POWER, TYPE_ELECTRIC},
|
||||
{HOLD_EFFECT_WATER_POWER, TYPE_WATER},
|
||||
{HOLD_EFFECT_FLYING_POWER, TYPE_FLYING},
|
||||
{HOLD_EFFECT_POISON_POWER, TYPE_POISON},
|
||||
{HOLD_EFFECT_ICE_POWER, TYPE_ICE},
|
||||
{HOLD_EFFECT_GHOST_POWER, TYPE_GHOST},
|
||||
{HOLD_EFFECT_PSYCHIC_POWER, TYPE_PSYCHIC},
|
||||
{HOLD_EFFECT_FIRE_POWER, TYPE_FIRE},
|
||||
{HOLD_EFFECT_DRAGON_POWER, TYPE_DRAGON},
|
||||
{HOLD_EFFECT_NORMAL_POWER, TYPE_NORMAL},
|
||||
{HOLD_EFFECT_FAIRY_POWER, TYPE_FAIRY},
|
||||
};
|
||||
|
||||
// code
|
||||
u8 GetBattlerForBattleScript(u8 caseId)
|
||||
{
|
||||
u8 ret = 0;
|
||||
@ -3371,73 +3487,6 @@ u8 IsMonDisobedient(void)
|
||||
}
|
||||
}
|
||||
|
||||
static const u8 sAbilitiesAffectedByMoldBreaker[] =
|
||||
{
|
||||
[ABILITY_BATTLE_ARMOR] = 1,
|
||||
[ABILITY_CLEAR_BODY] = 1,
|
||||
[ABILITY_DAMP] = 1,
|
||||
[ABILITY_DRY_SKIN] = 1,
|
||||
[ABILITY_FILTER] = 1,
|
||||
[ABILITY_FLASH_FIRE] = 1,
|
||||
[ABILITY_FLOWER_GIFT] = 1,
|
||||
[ABILITY_HEATPROOF] = 1,
|
||||
[ABILITY_HYPER_CUTTER] = 1,
|
||||
[ABILITY_IMMUNITY] = 1,
|
||||
[ABILITY_INNER_FOCUS] = 1,
|
||||
[ABILITY_INSOMNIA] = 1,
|
||||
[ABILITY_KEEN_EYE] = 1,
|
||||
[ABILITY_LEAF_GUARD] = 1,
|
||||
[ABILITY_LEVITATE] = 1,
|
||||
[ABILITY_LIGHTNING_ROD] = 1,
|
||||
[ABILITY_LIMBER] = 1,
|
||||
[ABILITY_MAGMA_ARMOR] = 1,
|
||||
[ABILITY_MARVEL_SCALE] = 1,
|
||||
[ABILITY_MOTOR_DRIVE] = 1,
|
||||
[ABILITY_OBLIVIOUS] = 1,
|
||||
[ABILITY_OWN_TEMPO] = 1,
|
||||
[ABILITY_SAND_VEIL] = 1,
|
||||
[ABILITY_SHELL_ARMOR] = 1,
|
||||
[ABILITY_SHIELD_DUST] = 1,
|
||||
[ABILITY_SIMPLE] = 1,
|
||||
[ABILITY_SNOW_CLOAK] = 1,
|
||||
[ABILITY_SOLID_ROCK] = 1,
|
||||
[ABILITY_SOUNDPROOF] = 1,
|
||||
[ABILITY_STICKY_HOLD] = 1,
|
||||
[ABILITY_STORM_DRAIN] = 1,
|
||||
[ABILITY_STURDY] = 1,
|
||||
[ABILITY_SUCTION_CUPS] = 1,
|
||||
[ABILITY_TANGLED_FEET] = 1,
|
||||
[ABILITY_THICK_FAT] = 1,
|
||||
[ABILITY_UNAWARE] = 1,
|
||||
[ABILITY_VITAL_SPIRIT] = 1,
|
||||
[ABILITY_VOLT_ABSORB] = 1,
|
||||
[ABILITY_WATER_ABSORB] = 1,
|
||||
[ABILITY_WATER_VEIL] = 1,
|
||||
[ABILITY_WHITE_SMOKE] = 1,
|
||||
[ABILITY_WONDER_GUARD] = 1,
|
||||
[ABILITY_BIG_PECKS] = 1,
|
||||
[ABILITY_CONTRARY] = 1,
|
||||
[ABILITY_FRIEND_GUARD] = 1,
|
||||
[ABILITY_HEAVY_METAL] = 1,
|
||||
[ABILITY_LIGHT_METAL] = 1,
|
||||
[ABILITY_MAGIC_BOUNCE] = 1,
|
||||
[ABILITY_MULTISCALE] = 1,
|
||||
[ABILITY_SAP_SIPPER] = 1,
|
||||
[ABILITY_TELEPATHY] = 1,
|
||||
[ABILITY_WONDER_SKIN] = 1,
|
||||
[ABILITY_AROMA_VEIL] = 1,
|
||||
[ABILITY_BULLETPROOF] = 1,
|
||||
[ABILITY_FLOWER_VEIL] = 1,
|
||||
[ABILITY_FUR_COAT] = 1,
|
||||
[ABILITY_OVERCOAT] = 1,
|
||||
[ABILITY_SWEET_VEIL] = 1,
|
||||
[ABILITY_DAZZLING] = 1,
|
||||
[ABILITY_DISGUISE] = 1,
|
||||
[ABILITY_FLUFFY] = 1,
|
||||
[ABILITY_QUEENLY_MAJESTY] = 1,
|
||||
[ABILITY_WATER_BUBBLE] = 1,
|
||||
};
|
||||
|
||||
u32 GetBattlerAbility(u8 battlerId)
|
||||
{
|
||||
if (gStatuses3[battlerId] & STATUS3_GASTRO_ACID)
|
||||
|
@ -1036,27 +1036,6 @@ const u16 gUnknown_08329D54[] =
|
||||
FACILITY_CLASS_BEAUTY
|
||||
};
|
||||
|
||||
static const u8 sHoldEffectToType[][2] =
|
||||
{
|
||||
{HOLD_EFFECT_BUG_POWER, TYPE_BUG},
|
||||
{HOLD_EFFECT_STEEL_POWER, TYPE_STEEL},
|
||||
{HOLD_EFFECT_GROUND_POWER, TYPE_GROUND},
|
||||
{HOLD_EFFECT_ROCK_POWER, TYPE_ROCK},
|
||||
{HOLD_EFFECT_GRASS_POWER, TYPE_GRASS},
|
||||
{HOLD_EFFECT_DARK_POWER, TYPE_DARK},
|
||||
{HOLD_EFFECT_FIGHTING_POWER, TYPE_FIGHTING},
|
||||
{HOLD_EFFECT_ELECTRIC_POWER, TYPE_ELECTRIC},
|
||||
{HOLD_EFFECT_WATER_POWER, TYPE_WATER},
|
||||
{HOLD_EFFECT_FLYING_POWER, TYPE_FLYING},
|
||||
{HOLD_EFFECT_POISON_POWER, TYPE_POISON},
|
||||
{HOLD_EFFECT_ICE_POWER, TYPE_ICE},
|
||||
{HOLD_EFFECT_GHOST_POWER, TYPE_GHOST},
|
||||
{HOLD_EFFECT_PSYCHIC_POWER, TYPE_PSYCHIC},
|
||||
{HOLD_EFFECT_FIRE_POWER, TYPE_FIRE},
|
||||
{HOLD_EFFECT_DRAGON_POWER, TYPE_DRAGON},
|
||||
{HOLD_EFFECT_NORMAL_POWER, TYPE_NORMAL},
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_08329D98[MAX_BATTLERS_COUNT] =
|
||||
{
|
||||
{ // B_POSITION_PLAYER_LEFT
|
||||
@ -2260,19 +2239,6 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
|
||||
if (ShouldGetStatBadgeBoost(FLAG_BADGE07_GET, battlerIdDef))
|
||||
spDefense = (110 * spDefense) / 100;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sHoldEffectToType); i++)
|
||||
{
|
||||
if (attackerHoldEffect == sHoldEffectToType[i][0]
|
||||
&& type == sHoldEffectToType[i][1])
|
||||
{
|
||||
if (type <= 8)
|
||||
attack = (attack * (attackerHoldEffectParam + 100)) / 100;
|
||||
else
|
||||
spAttack = (spAttack * (attackerHoldEffectParam + 100)) / 100;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (attackerHoldEffect == HOLD_EFFECT_CHOICE_BAND)
|
||||
attack = (150 * attack) / 100;
|
||||
if (attackerHoldEffect == HOLD_EFFECT_SOUL_DEW && !(gBattleTypeFlags & (BATTLE_TYPE_FRONTIER)) && (attacker->species == SPECIES_LATIAS || attacker->species == SPECIES_LATIOS))
|
||||
|
Loading…
x
Reference in New Issue
Block a user