Merge pull request #1744 from AsparagusEduardo/BE_configHiddenPow
Setting for pre-Gen6 Hidden Power Damage.
This commit is contained in:
commit
e66820e646
3 changed files with 18 additions and 1 deletions
|
@ -123,6 +123,7 @@
|
|||
#define B_CRASH_IF_TARGET_IMMUNE GEN_7 // In Gen4+, The user of Jump Kick or High Jump Kick will "keep going and crash" if it attacks a target that is immune to the move.
|
||||
#define B_TAILWIND_TIMER GEN_7 // In Gen5+, Tailwind lasts 4 turns instead of 3.
|
||||
#define B_MEMENTO_FAIL GEN_7 // In Gen4+, Memento fails if there is no target or if the target is protected or behind substitute. But not if Atk/Sp. Atk are at -6.
|
||||
#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.
|
||||
|
||||
// Ability settings
|
||||
#define B_ABILITY_WEATHER GEN_7 // In Gen6+, ability-induced weather lasts 5 turns. Before, it lasted until the battle ended or until it was changed by a move or a different weather-affecting ability.
|
||||
|
|
|
@ -7658,6 +7658,22 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef)
|
|||
basePower *= 2;
|
||||
#endif
|
||||
break;
|
||||
case EFFECT_HIDDEN_POWER:
|
||||
{
|
||||
#if B_HIDDEN_POWER_DMG < GEN_6
|
||||
u8 powerBits;
|
||||
|
||||
powerBits = ((gBattleMons[gBattlerAttacker].hpIV & 2) >> 1)
|
||||
| ((gBattleMons[gBattlerAttacker].attackIV & 2) << 0)
|
||||
| ((gBattleMons[gBattlerAttacker].defenseIV & 2) << 1)
|
||||
| ((gBattleMons[gBattlerAttacker].speedIV & 2) << 2)
|
||||
| ((gBattleMons[gBattlerAttacker].spAttackIV & 2) << 3)
|
||||
| ((gBattleMons[gBattlerAttacker].spDefenseIV & 2) << 4);
|
||||
|
||||
basePower = (40 * powerBits) / 63 + 30;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// move-specific base power changes
|
||||
|
|
|
@ -3753,7 +3753,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
|||
|
||||
[MOVE_HIDDEN_POWER] =
|
||||
{
|
||||
#if B_UPDATED_MOVE_DATA >= GEN_6
|
||||
#if B_HIDDEN_POWER_DMG >= GEN_6
|
||||
.power = 60,
|
||||
#else
|
||||
.power = 1,
|
||||
|
|
Loading…
Reference in a new issue