implemented G-Max Resonance

This commit is contained in:
AgustinGDLV 2023-02-27 14:34:08 -08:00
parent 05fe62cbab
commit 93d8efd51f
3 changed files with 22 additions and 2 deletions

View file

@ -10451,6 +10451,11 @@ BattleScript_DamageNonTypesContinuesEnd::
bicword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_GRUDGE
end2
BattleScript_EffectSetAuroraVeil::
printstring STRINGID_PKMNCOVEREDBYVEIL
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_PokemonCantUseTheMove::
attackstring
ppreduce

View file

@ -454,7 +454,6 @@ extern const u8 BattleScript_HealingWishActivates[];
extern const u8 BattleScript_LunarDanceActivates[];
extern const u8 BattleScript_ShellTrapSetUp[];
extern const u8 BattleScript_StealthRockActivates[];
extern const u8 BattleScript_DefogTryHazards[];
// zmoves
extern const u8 BattleScript_ZMoveActivateDamaging[];
@ -474,5 +473,7 @@ extern const u8 BattleScript_SteelsurgeActivates[];
extern const u8 BattleScript_SteelsurgeFree[];
extern const u8 BattleScript_DamageNonTypesStarts[];
extern const u8 BattleScript_DamageNonTypesContinues[];
extern const u8 BattleScript_DefogTryHazards[];
extern const u8 BattleScript_EffectSetAuroraVeil[];
#endif // GUARD_BATTLE_SCRIPTS_H

View file

@ -86,7 +86,7 @@ bool8 ShouldUseMaxMove(u16 battlerId, u16 baseMove)
// return !IsRaidBossUsingRegularMove(battlerId, baseMove);
if (gBattleStruct->dynamax.dynamaxTurns[battlerId] > 0)
return TRUE;
return TRUE;
return FALSE;
}
// Returns the appropriate Max Move or G-Max Move for a battler to use.
@ -324,6 +324,20 @@ u16 SetMaxMoveEffect(u16 move)
effect++;
}
break;
case MAX_EFFECT_AURORA_VEIL:
if (!(gSideStatuses[GetBattlerSide(gBattlerAttacker)] & SIDE_STATUS_AURORA_VEIL))
{
gSideStatuses[GetBattlerSide(gBattlerAttacker)] |= SIDE_STATUS_AURORA_VEIL;
if (GetBattlerHoldEffect(gBattlerAttacker, TRUE) == HOLD_EFFECT_LIGHT_CLAY)
gSideTimers[GetBattlerSide(gBattlerAttacker)].auroraVeilTimer = 8;
else
gSideTimers[GetBattlerSide(gBattlerAttacker)].auroraVeilTimer = 5;
gSideTimers[GetBattlerSide(gBattlerAttacker)].auroraVeilBattlerId = gBattlerAttacker;
BattleScriptPush(gBattlescriptCurrInstr + 1);
gBattlescriptCurrInstr = BattleScript_EffectSetAuroraVeil;
effect++;
}
break;
}
return effect;
}