Fix Knock Off, add config
Added a config for Knock Off's damage boost. Also fixed the conditions it checks to do bonus damage.
This commit is contained in:
parent
e2e43444ad
commit
bdbdd0564f
2 changed files with 5 additions and 1 deletions
|
@ -114,6 +114,7 @@
|
||||||
#define B_PAYBACK_SWITCH_BOOST GEN_7 // In Gen5+, if the opponent switches out, Payback's damage will no longer be doubled.
|
#define B_PAYBACK_SWITCH_BOOST GEN_7 // In Gen5+, if the opponent switches out, Payback's damage will no longer be doubled.
|
||||||
#define B_HIDDEN_POWER_DMG GEN_7 // In Gen6+, Hidden Power's base power was set to always be 60. Before, it was determined by the mon's IVs.
|
#define B_HIDDEN_POWER_DMG GEN_7 // In Gen6+, Hidden Power's base power was set to always be 60. Before, it was determined by the mon's IVs.
|
||||||
#define B_ROUGH_SKIN_DMG GEN_7 // In Gen4+, Rough Skin contact damage is 1/8th of max HP instead of 1/16th. This will also affect Iron Barbs.
|
#define B_ROUGH_SKIN_DMG GEN_7 // In Gen4+, Rough Skin contact damage is 1/8th of max HP instead of 1/16th. This will also affect Iron Barbs.
|
||||||
|
#define B_KNOCK_OFF_DMG GEN_8 // In Gen6+, Knock Off deals 50% more damage when knocking off an item
|
||||||
|
|
||||||
// Type settings
|
// Type settings
|
||||||
#define B_GHOSTS_ESCAPE GEN_7 // In Gen6+, abilities like Shadow Tag or moves like Mean Look fail on Ghost-type Pokémon. They can also escape any Wild Battle.
|
#define B_GHOSTS_ESCAPE GEN_7 // In Gen6+, abilities like Shadow Tag or moves like Mean Look fail on Ghost-type Pokémon. They can also escape any Wild Battle.
|
||||||
|
|
|
@ -8191,8 +8191,11 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
|
||||||
MulModifier(&modifier, UQ_4_12(0.5));
|
MulModifier(&modifier, UQ_4_12(0.5));
|
||||||
break;
|
break;
|
||||||
case EFFECT_KNOCK_OFF:
|
case EFFECT_KNOCK_OFF:
|
||||||
if (gBattleMons[battlerDef].item != ITEM_NONE && GetBattlerAbility(battlerDef) != ABILITY_STICKY_HOLD)
|
#if B_KNOCK_OFF_DMG >= GEN_6
|
||||||
|
if (gBattleMons[battlerDef].item != ITEM_NONE
|
||||||
|
&& CanBattlerGetOrLoseItem(battlerDef, gBattleMons[battlerDef].item))
|
||||||
MulModifier(&modifier, UQ_4_12(1.5));
|
MulModifier(&modifier, UQ_4_12(1.5));
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue