Stamina, Liquid Voice, Water Compaction

This commit is contained in:
DizzyEggg 2020-04-15 09:37:12 +02:00
parent 8ea7fcc348
commit 83b251a69c
2 changed files with 30 additions and 0 deletions

View File

@ -5055,6 +5055,11 @@ void SetTypeBeforeUsingMove(u16 move, u8 battlerAtk)
gBattleStruct->dynamicMoveType = 0x80 | TYPE_NORMAL;
gBattleStruct->ateBoost[battlerAtk] = 1;
}
else if (gBattleMoves[move].flags & FLAG_SOUND
&& attackerAbility == ABILITY_LIQUID_VOICE)
{
gBattleStruct->dynamicMoveType = 0x80 | TYPE_WATER;
}
// Check if a gem should activate.
GET_MOVE_TYPE(move, moveType);

View File

@ -3291,6 +3291,31 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
effect++;
}
break;
case ABILITY_WATER_COMPACTION:
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
&& TARGET_TURN_DAMAGED
&& IsBattlerAlive(battler)
&& moveType == TYPE_WATER
&& gBattleMons[battler].statStages[STAT_DEF] != 12)
{
SET_STATCHANGER(STAT_DEF, 2, FALSE);
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaise;
effect++;
}
break;
case ABILITY_STAMINA:
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
&& TARGET_TURN_DAMAGED
&& IsBattlerAlive(battler)
&& gBattleMons[battler].statStages[STAT_DEF] != 12)
{
SET_STATCHANGER(STAT_DEF, 1, FALSE);
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaise;
effect++;
}
break;
case ABILITY_BERSERK:
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
&& TARGET_TURN_DAMAGED