Implemented Sharpness' effect

This commit is contained in:
LOuroboros 2022-12-06 01:41:06 -03:00
parent f96137eb5e
commit 3c30e6bdc3
3 changed files with 23 additions and 18 deletions

View File

@ -236,6 +236,7 @@
#define FLAG_HIT_IN_SUBSTITUTE (1 << 26) // Hyperspace Fury #define FLAG_HIT_IN_SUBSTITUTE (1 << 26) // Hyperspace Fury
#define FLAG_TWO_STRIKES (1 << 27) // A move with this flag will strike twice, and may apply its effect on each hit #define FLAG_TWO_STRIKES (1 << 27) // A move with this flag will strike twice, and may apply its effect on each hit
#define FLAG_WIND_MOVE (1 << 28) #define FLAG_WIND_MOVE (1 << 28)
#define FLAG_SLICING_MOVE (1 << 29)
// Split defines. // Split defines.
#define SPLIT_PHYSICAL 0x0 #define SPLIT_PHYSICAL 0x0

View File

@ -8862,6 +8862,10 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN) if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN)
MulModifier(&modifier, UQ_4_12(1.3)); MulModifier(&modifier, UQ_4_12(1.3));
break; break;
case ABILITY_SHARPNESS:
if (gBattleMoves[move].flags & FLAG_SLICING_MOVE)
MulModifier(&modifier, UQ_4_12(1.5));
break;
} }
// field abilities // field abilities

View File

@ -256,7 +256,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.secondaryEffectChance = 0, .secondaryEffectChance = 0,
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE,
.split = SPLIT_PHYSICAL, .split = SPLIT_PHYSICAL,
.zMovePower = 100, .zMovePower = 100,
.zMoveEffect = Z_EFFECT_NONE, .zMoveEffect = Z_EFFECT_NONE,
@ -1354,7 +1354,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.secondaryEffectChance = 0, .secondaryEffectChance = 0,
.target = MOVE_TARGET_BOTH, .target = MOVE_TARGET_BOTH,
.priority = 0, .priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SLICING_MOVE,
.split = SPLIT_PHYSICAL, .split = SPLIT_PHYSICAL,
.zMovePower = 100, .zMovePower = 100,
.zMoveEffect = Z_EFFECT_NONE, .zMoveEffect = Z_EFFECT_NONE,
@ -2922,7 +2922,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.secondaryEffectChance = 0, .secondaryEffectChance = 0,
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SLICING_MOVE,
.split = SPLIT_PHYSICAL, .split = SPLIT_PHYSICAL,
.zMovePower = 140, .zMovePower = 140,
.zMoveEffect = Z_EFFECT_NONE, .zMoveEffect = Z_EFFECT_NONE,
@ -3805,7 +3805,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.secondaryEffectChance = 0, .secondaryEffectChance = 0,
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE,
.split = SPLIT_PHYSICAL, .split = SPLIT_PHYSICAL,
.zMovePower = 100, .zMovePower = 100,
.zMoveEffect = Z_EFFECT_NONE, .zMoveEffect = Z_EFFECT_NONE,
@ -5656,7 +5656,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.secondaryEffectChance = 0, .secondaryEffectChance = 0,
.target = MOVE_TARGET_BOTH, .target = MOVE_TARGET_BOTH,
.priority = 0, .priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_WIND_MOVE, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SLICING_MOVE | FLAG_WIND_MOVE,
.split = SPLIT_SPECIAL, .split = SPLIT_SPECIAL,
.zMoveEffect = Z_EFFECT_NONE, .zMoveEffect = Z_EFFECT_NONE,
}, },
@ -5989,7 +5989,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.secondaryEffectChance = 0, .secondaryEffectChance = 0,
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE,
.split = SPLIT_PHYSICAL, .split = SPLIT_PHYSICAL,
.zMovePower = 120, .zMovePower = 120,
.zMoveEffect = Z_EFFECT_NONE, .zMoveEffect = Z_EFFECT_NONE,
@ -6286,7 +6286,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.secondaryEffectChance = 0, .secondaryEffectChance = 0,
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SLICING_MOVE,
.split = SPLIT_PHYSICAL, .split = SPLIT_PHYSICAL,
.zMoveEffect = Z_EFFECT_NONE, .zMoveEffect = Z_EFFECT_NONE,
}, },
@ -7217,7 +7217,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.secondaryEffectChance = 0, .secondaryEffectChance = 0,
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SLICING_MOVE,
.split = SPLIT_PHYSICAL, .split = SPLIT_PHYSICAL,
.zMovePower = 140, .zMovePower = 140,
.zMoveEffect = Z_EFFECT_NONE, .zMoveEffect = Z_EFFECT_NONE,
@ -7259,7 +7259,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
{ {
#if B_UPDATED_MOVE_DATA >= GEN_6 #if B_UPDATED_MOVE_DATA >= GEN_6
.pp = 15, .pp = 15,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_SLICING_MOVE,
#elif B_UPDATED_MOVE_DATA == GEN_5 #elif B_UPDATED_MOVE_DATA == GEN_5
.pp = 20, .pp = 20,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST,
@ -7289,7 +7289,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.secondaryEffectChance = 0, .secondaryEffectChance = 0,
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE,
.split = SPLIT_PHYSICAL, .split = SPLIT_PHYSICAL,
.zMovePower = 160, .zMovePower = 160,
.zMoveEffect = Z_EFFECT_NONE, .zMoveEffect = Z_EFFECT_NONE,
@ -7699,7 +7699,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.secondaryEffectChance = 0, .secondaryEffectChance = 0,
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SLICING_MOVE,
.split = SPLIT_PHYSICAL, .split = SPLIT_PHYSICAL,
.zMovePower = 140, .zMovePower = 140,
.zMoveEffect = Z_EFFECT_NONE, .zMoveEffect = Z_EFFECT_NONE,
@ -7921,7 +7921,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.secondaryEffectChance = 10, .secondaryEffectChance = 10,
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SHEER_FORCE_BOOST, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SHEER_FORCE_BOOST | FLAG_SLICING_MOVE,
.split = SPLIT_PHYSICAL, .split = SPLIT_PHYSICAL,
.zMovePower = 140, .zMovePower = 140,
.zMoveEffect = Z_EFFECT_NONE, .zMoveEffect = Z_EFFECT_NONE,
@ -9537,7 +9537,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.secondaryEffectChance = 0, .secondaryEffectChance = 0,
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_STAT_STAGES_IGNORED, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_STAT_STAGES_IGNORED | FLAG_SLICING_MOVE,
.split = SPLIT_PHYSICAL, .split = SPLIT_PHYSICAL,
.zMovePower = 175, .zMovePower = 175,
.zMoveEffect = Z_EFFECT_NONE, .zMoveEffect = Z_EFFECT_NONE,
@ -9553,7 +9553,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.secondaryEffectChance = 50, .secondaryEffectChance = 50,
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_SLICING_MOVE,
.split = SPLIT_PHYSICAL, .split = SPLIT_PHYSICAL,
.zMovePower = 140, .zMovePower = 140,
.zMoveEffect = Z_EFFECT_NONE, .zMoveEffect = Z_EFFECT_NONE,
@ -11182,7 +11182,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.secondaryEffectChance = 0, .secondaryEffectChance = 0,
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE,
.split = SPLIT_PHYSICAL, .split = SPLIT_PHYSICAL,
.zMovePower = 190, .zMovePower = 190,
.zMoveEffect = Z_EFFECT_NONE, .zMoveEffect = Z_EFFECT_NONE,
@ -12509,7 +12509,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.secondaryEffectChance = 0, .secondaryEffectChance = 0,
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE,
.split = SPLIT_PHYSICAL, .split = SPLIT_PHYSICAL,
.zMovePower = 180, .zMovePower = 180,
.zMoveEffect = Z_EFFECT_NONE, .zMoveEffect = Z_EFFECT_NONE,
@ -13292,7 +13292,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.secondaryEffectChance = 0, .secondaryEffectChance = 0,
.target = MOVE_TARGET_USER, .target = MOVE_TARGET_USER,
.priority = 0, .priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE,
.split = SPLIT_PHYSICAL, .split = SPLIT_PHYSICAL,
.zMovePower = 120, .zMovePower = 120,
.zMoveEffect = Z_EFFECT_NONE, .zMoveEffect = Z_EFFECT_NONE,
@ -13532,7 +13532,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.secondaryEffectChance = 0, .secondaryEffectChance = 0,
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE,
.split = SPLIT_PHYSICAL, .split = SPLIT_PHYSICAL,
.zMovePower = 120, .zMovePower = 120,
.zMoveEffect = Z_EFFECT_NONE, .zMoveEffect = Z_EFFECT_NONE,