Implemented Punk Rock

This commit is contained in:
LOuroboros 2020-12-11 19:46:33 -03:00
parent 2b0702ec04
commit c930a63c84
3 changed files with 22 additions and 13 deletions

View File

@ -264,6 +264,7 @@
#define FLAG_DANCE (1 << 21) #define FLAG_DANCE (1 << 21)
#define FLAG_DMG_IN_AIR (1 << 22) // X2 dmg on air, always hits target on air #define FLAG_DMG_IN_AIR (1 << 22) // X2 dmg on air, always hits target on air
#define FLAG_HIT_IN_AIR (1 << 23) // dmg is normal, always hits target on air #define FLAG_HIT_IN_AIR (1 << 23) // dmg is normal, always hits target on air
#define FLAG_PUNK_ROCK_AFFECTED (1 << 24) // To do: Add it to Eerie Spell's move data.
// Split defines. // Split defines.
#define SPLIT_PHYSICAL 0x0 #define SPLIT_PHYSICAL 0x0

View File

@ -6777,6 +6777,10 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
if (moveType == TYPE_NORMAL && gBattleStruct->ateBoost[battlerAtk]) if (moveType == TYPE_NORMAL && gBattleStruct->ateBoost[battlerAtk])
MulModifier(&modifier, UQ_4_12(1.2)); MulModifier(&modifier, UQ_4_12(1.2));
break; break;
case ABILITY_PUNK_ROCK:
if (gBattleMoves[move].flags & FLAG_PUNK_ROCK_AFFECTED)
MulModifier(&modifier, UQ_4_12(1.3));
break;
} }
// field abilities // field abilities
@ -7222,6 +7226,10 @@ static u32 CalcDefenseStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType,
if (gBattleMons[battlerDef].species == SPECIES_CHERRIM && WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_SUN_ANY && !usesDefStat) if (gBattleMons[battlerDef].species == SPECIES_CHERRIM && WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_SUN_ANY && !usesDefStat)
MulModifier(&modifier, UQ_4_12(1.5)); MulModifier(&modifier, UQ_4_12(1.5));
break; break;
case ABILITY_PUNK_ROCK:
if (gBattleMoves[move].flags & FLAG_PUNK_ROCK_AFFECTED)
MulModifier(&modifier, UQ_4_12(1.3));
break;
} }
// ally's abilities // ally's abilities

View File

@ -2720,7 +2720,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.secondaryEffectChance = 30, .secondaryEffectChance = 30,
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_SOUND, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_SOUND | FLAG_PUNK_ROCK_AFFECTED,
.split = SPLIT_SPECIAL, .split = SPLIT_SPECIAL,
}, },
@ -3993,7 +3993,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.secondaryEffectChance = 100, .secondaryEffectChance = 100,
.target = MOVE_TARGET_RANDOM, .target = MOVE_TARGET_RANDOM,
.priority = 0, .priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_SOUND, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_SOUND | FLAG_PUNK_ROCK_AFFECTED,
.split = SPLIT_SPECIAL, .split = SPLIT_SPECIAL,
}, },
@ -4764,7 +4764,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.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_SOUND, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND | FLAG_PUNK_ROCK_AFFECTED,
.split = SPLIT_SPECIAL, .split = SPLIT_SPECIAL,
}, },
@ -6354,7 +6354,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.secondaryEffectChance = 10, .secondaryEffectChance = 10,
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_SOUND | FLAG_SHEER_FORCE_BOOST, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_SOUND | FLAG_SHEER_FORCE_BOOST | FLAG_PUNK_ROCK_AFFECTED,
.split = SPLIT_SPECIAL, .split = SPLIT_SPECIAL,
}, },
@ -7715,7 +7715,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.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_KINGSROCK_AFFECTED, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_PUNK_ROCK_AFFECTED,
.split = SPLIT_SPECIAL, .split = SPLIT_SPECIAL,
}, },
@ -7729,7 +7729,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.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_KINGSROCK_AFFECTED | FLAG_SOUND, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_SOUND | FLAG_PUNK_ROCK_AFFECTED,
.split = SPLIT_SPECIAL, .split = SPLIT_SPECIAL,
}, },
@ -8479,7 +8479,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.secondaryEffectChance = 10, .secondaryEffectChance = 10,
.target = MOVE_TARGET_BOTH, .target = MOVE_TARGET_BOTH,
.priority = 0, .priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND | FLAG_SHEER_FORCE_BOOST, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND | FLAG_SHEER_FORCE_BOOST | FLAG_PUNK_ROCK_AFFECTED,
.split = SPLIT_SPECIAL, .split = SPLIT_SPECIAL,
}, },
@ -8593,7 +8593,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.secondaryEffectChance = 100, .secondaryEffectChance = 100,
.target = MOVE_TARGET_BOTH, .target = MOVE_TARGET_BOTH,
.priority = 0, .priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_SOUND, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_SOUND | FLAG_PUNK_ROCK_AFFECTED,
.split = SPLIT_SPECIAL, .split = SPLIT_SPECIAL,
}, },
@ -8876,7 +8876,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.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_KINGSROCK_AFFECTED | FLAG_SOUND, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_SOUND | FLAG_PUNK_ROCK_AFFECTED,
.split = SPLIT_SPECIAL, .split = SPLIT_SPECIAL,
}, },
@ -9050,7 +9050,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.secondaryEffectChance = 0, .secondaryEffectChance = 0,
.target = MOVE_TARGET_FOES_AND_ALLY, .target = MOVE_TARGET_FOES_AND_ALLY,
.priority = 0, .priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_SOUND, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_SOUND | FLAG_PUNK_ROCK_AFFECTED,
.split = SPLIT_SPECIAL, .split = SPLIT_SPECIAL,
}, },
@ -9637,7 +9637,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.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_KINGSROCK_AFFECTED | FLAG_SOUND | FLAG_SHEER_FORCE_BOOST, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_SOUND | FLAG_SHEER_FORCE_BOOST | FLAG_PUNK_ROCK_AFFECTED,
.split = SPLIT_SPECIAL, .split = SPLIT_SPECIAL,
.argument = STATUS1_BURN, .argument = STATUS1_BURN,
}, },
@ -10016,7 +10016,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.secondaryEffectChance = 100, .secondaryEffectChance = 100,
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND | FLAG_PUNK_ROCK_AFFECTED,
.split = SPLIT_SPECIAL, .split = SPLIT_SPECIAL,
}, },
@ -10936,7 +10936,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.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_KINGSROCK_AFFECTED | FLAG_SOUND, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_SOUND | FLAG_PUNK_ROCK_AFFECTED,
.split = SPLIT_SPECIAL, .split = SPLIT_SPECIAL,
}, },