mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-29 05:40:41 +01:00
Merge pull request #1947 from LOuroboros/lightBall
Updated Light Ball's effect and improved readability
This commit is contained in:
commit
4ca9f406f6
@ -8338,6 +8338,9 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b
|
|||||||
u8 atkStage;
|
u8 atkStage;
|
||||||
u32 atkStat;
|
u32 atkStat;
|
||||||
u16 modifier;
|
u16 modifier;
|
||||||
|
u16 atkBaseSpeciesId;
|
||||||
|
|
||||||
|
atkBaseSpeciesId = GET_BASE_SPECIES_ID(gBattleMons[battlerAtk].species);
|
||||||
|
|
||||||
if (gBattleMoves[move].effect == EFFECT_FOUL_PLAY)
|
if (gBattleMoves[move].effect == EFFECT_FOUL_PLAY)
|
||||||
{
|
{
|
||||||
@ -8484,9 +8487,7 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b
|
|||||||
switch (GetBattlerHoldEffect(battlerAtk, TRUE))
|
switch (GetBattlerHoldEffect(battlerAtk, TRUE))
|
||||||
{
|
{
|
||||||
case HOLD_EFFECT_THICK_CLUB:
|
case HOLD_EFFECT_THICK_CLUB:
|
||||||
if ((GET_BASE_SPECIES_ID(gBattleMons[battlerAtk].species) == SPECIES_CUBONE
|
if ((atkBaseSpeciesId == SPECIES_CUBONE || atkBaseSpeciesId == SPECIES_MAROWAK) && IS_MOVE_PHYSICAL(move))
|
||||||
|| GET_BASE_SPECIES_ID(gBattleMons[battlerAtk].species) == SPECIES_MAROWAK)
|
|
||||||
&& IS_MOVE_PHYSICAL(move))
|
|
||||||
MulModifier(&modifier, UQ_4_12(2.0));
|
MulModifier(&modifier, UQ_4_12(2.0));
|
||||||
break;
|
break;
|
||||||
case HOLD_EFFECT_DEEP_SEA_TOOTH:
|
case HOLD_EFFECT_DEEP_SEA_TOOTH:
|
||||||
@ -8494,7 +8495,7 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b
|
|||||||
MulModifier(&modifier, UQ_4_12(2.0));
|
MulModifier(&modifier, UQ_4_12(2.0));
|
||||||
break;
|
break;
|
||||||
case HOLD_EFFECT_LIGHT_BALL:
|
case HOLD_EFFECT_LIGHT_BALL:
|
||||||
if (gBattleMons[battlerAtk].species == SPECIES_PIKACHU)
|
if (atkBaseSpeciesId == SPECIES_PIKACHU)
|
||||||
MulModifier(&modifier, UQ_4_12(2.0));
|
MulModifier(&modifier, UQ_4_12(2.0));
|
||||||
break;
|
break;
|
||||||
case HOLD_EFFECT_CHOICE_BAND:
|
case HOLD_EFFECT_CHOICE_BAND:
|
||||||
|
Loading…
Reference in New Issue
Block a user