mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-26 21:33:53 +01:00
Aurora Veil, Revelation Dance, Diamond Storm
This commit is contained in:
parent
52a68f6f1c
commit
bc42de5f60
@ -1566,6 +1566,10 @@
|
||||
.macro trytrainerslidelastonmsg battler
|
||||
various \battler, VARIOUS_TRY_TRAINER_SLIDE_MSG_LAST_ON
|
||||
.endm
|
||||
|
||||
.macro setauroraveil battler
|
||||
various \battler, VARIOUS_SET_AURORA_VEIL
|
||||
.endm
|
||||
|
||||
@ helpful macros
|
||||
.macro setstatchanger stat, stages, down
|
||||
|
@ -331,6 +331,13 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
|
||||
.4byte BattleScript_EffectFlowerShield
|
||||
.4byte BattleScript_EffectHitPreventEscape
|
||||
.4byte BattleScript_EffectSpeedSwap
|
||||
.4byte BattleScript_EffectDefenseUp2Hit
|
||||
.4byte BattleScript_EffectRevelationDance
|
||||
.4byte BattleScript_EffectAuroraVeil
|
||||
|
||||
BattleScript_EffectDefenseUp2Hit:
|
||||
setmoveeffect MOVE_EFFECT_DEF_PLUS_2 | MOVE_EFFECT_AFFECTS_USER
|
||||
goto BattleScript_EffectHit
|
||||
|
||||
BattleScript_EffectFlowerShield:
|
||||
attackcanceler
|
||||
@ -1579,6 +1586,7 @@ BattleScript_EffectTwoTypedMove:
|
||||
BattleScript_EffectTechnoBlast:
|
||||
BattleScript_EffectJudgment:
|
||||
BattleScript_EffectFusionCombo:
|
||||
BattleScript_EffectRevelationDance:
|
||||
jumpifnotmove MOVE_SURF, BattleScript_HitFromAtkCanceler
|
||||
jumpifnostatus3 BS_TARGET, STATUS3_UNDERWATER, BattleScript_HitFromAtkCanceler
|
||||
orword gHitMarker, HITMARKER_IGNORE_UNDERWATER
|
||||
@ -2114,6 +2122,13 @@ BattleScript_ImmunityProtected::
|
||||
BattleScript_EffectPayDay::
|
||||
setmoveeffect MOVE_EFFECT_PAYDAY
|
||||
goto BattleScript_EffectHit
|
||||
|
||||
BattleScript_EffectAuroraVeil:
|
||||
attackcanceler
|
||||
attackstring
|
||||
ppreduce
|
||||
setauroraveil BS_ATTACKER
|
||||
goto BattleScript_PrintReflectLightScreenSafeguardString
|
||||
|
||||
BattleScript_EffectLightScreen::
|
||||
attackcanceler
|
||||
|
@ -319,5 +319,8 @@
|
||||
#define EFFECT_FLOWER_SHIELD 313
|
||||
#define EFFECT_HIT_PREVENT_ESCAPE 314
|
||||
#define EFFECT_SPEED_SWAP 315
|
||||
#define EFFECT_DEFENSE_UP2_HIT 316
|
||||
#define EFFECT_REVELATION_DANCE 317
|
||||
#define EFFECT_AURORA_VEIL 318
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||
|
@ -123,6 +123,7 @@
|
||||
#define VARIOUS_HANDLE_TRAINER_SLIDE_MSG 68
|
||||
#define VARIOUS_TRY_TRAINER_SLIDE_MSG_FIRST_OFF 69
|
||||
#define VARIOUS_TRY_TRAINER_SLIDE_MSG_LAST_ON 70
|
||||
#define VARIOUS_SET_AURORA_VEIL 71
|
||||
|
||||
// atk80, dmg manipulation
|
||||
#define ATK80_DMG_CHANGE_SIGN 0
|
||||
|
@ -5422,6 +5422,13 @@ void SetTypeBeforeUsingMove(u16 move, u8 battlerAtk)
|
||||
{
|
||||
// TODO:
|
||||
}
|
||||
else if (gBattleMoves[move].effect == EFFECT_REVELATION_DANCE)
|
||||
{
|
||||
if (gBattleMons[battlerAtk].type1 != TYPE_MYSTERY)
|
||||
gBattleStruct->dynamicMoveType = gBattleMons[battlerAtk].type1 | 0x80;
|
||||
else if (gBattleMons[battlerAtk].type2 != TYPE_MYSTERY)
|
||||
gBattleStruct->dynamicMoveType = gBattleMons[battlerAtk].type2 | 0x80;
|
||||
}
|
||||
|
||||
attackerAbility = GetBattlerAbility(battlerAtk);
|
||||
GET_MOVE_TYPE(move, moveType);
|
||||
|
@ -7109,6 +7109,27 @@ static void atk76_various(void)
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case VARIOUS_SET_AURORA_VEIL:
|
||||
if (gSideStatuses[GET_BATTLER_SIDE(gActiveBattler)] & SIDE_STATUS_AURORA_VEIL)
|
||||
{
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSideStatuses[GET_BATTLER_SIDE(gActiveBattler)] |= SIDE_STATUS_AURORA_VEIL;
|
||||
if (GetBattlerHoldEffect(gActiveBattler, TRUE) == HOLD_EFFECT_LIGHT_CLAY)
|
||||
gSideTimers[GET_BATTLER_SIDE(gActiveBattler)].auroraVeilTimer = 8;
|
||||
else
|
||||
gSideTimers[GET_BATTLER_SIDE(gActiveBattler)].auroraVeilTimer = 5;
|
||||
gSideTimers[GET_BATTLER_SIDE(gActiveBattler)].auroraVeilBattlerId = gActiveBattler;
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && CountAliveMonsInBattle(BATTLE_ALIVE_ATK_SIDE) == 2)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 5;
|
||||
else
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 5;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
gBattlescriptCurrInstr += 3;
|
||||
@ -7331,7 +7352,10 @@ static void atk7E_setreflect(void)
|
||||
else
|
||||
{
|
||||
gSideStatuses[GET_BATTLER_SIDE(gBattlerAttacker)] |= SIDE_STATUS_REFLECT;
|
||||
gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].reflectTimer = 5;
|
||||
if (GetBattlerHoldEffect(gBattlerAttacker, TRUE) == HOLD_EFFECT_LIGHT_CLAY)
|
||||
gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].reflectTimer = 8;
|
||||
else
|
||||
gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].reflectTimer = 5;
|
||||
gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].reflectBattlerId = gBattlerAttacker;
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && CountAliveMonsInBattle(BATTLE_ALIVE_ATK_SIDE) == 2)
|
||||
@ -8090,7 +8114,10 @@ static void atk92_setlightscreen(void)
|
||||
else
|
||||
{
|
||||
gSideStatuses[GET_BATTLER_SIDE(gBattlerAttacker)] |= SIDE_STATUS_LIGHTSCREEN;
|
||||
gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].lightscreenTimer = 5;
|
||||
if (GetBattlerHoldEffect(gBattlerAttacker, TRUE) == HOLD_EFFECT_LIGHT_CLAY)
|
||||
gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].lightscreenTimer = 8;
|
||||
else
|
||||
gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].lightscreenTimer = 5;
|
||||
gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].lightscreenBattlerId = gBattlerAttacker;
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && CountAliveMonsInBattle(BATTLE_ALIVE_ATK_SIDE) == 2)
|
||||
|
@ -7106,7 +7106,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
.split = SPLIT_STATUS,
|
||||
},
|
||||
{ // MOVE_DIAMOND_STORM
|
||||
.effect = EFFECT_PLACEHOLDER, // Needs a custom move effect
|
||||
.effect = EFFECT_DEFENSE_UP2_HIT,
|
||||
.power = 100,
|
||||
.type = TYPE_ROCK,
|
||||
.accuracy = 95,
|
||||
@ -7383,7 +7383,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
.argument = 75, // restores 75% HP instead of 50% HP
|
||||
},
|
||||
{ // MOVE_THOUSAND_ARROWS
|
||||
.effect = EFFECT_PLACEHOLDER, // Needs a custom move effect
|
||||
.effect = EFFECT_SMACK_DOWN,
|
||||
.power = 90,
|
||||
.type = TYPE_GROUND,
|
||||
.accuracy = 100,
|
||||
@ -7455,7 +7455,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
.split = SPLIT_PHYSICAL,
|
||||
},
|
||||
{ // MOVE_DRAGON_ASCENT
|
||||
.effect = EFFECT_PLACEHOLDER, // Needs a custom move effect
|
||||
.effect = EFFECT_CLOSE_COMBAT,
|
||||
.power = 120,
|
||||
.type = TYPE_FLYING,
|
||||
.accuracy = 100,
|
||||
@ -7803,7 +7803,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
.split = SPLIT_STATUS,
|
||||
},
|
||||
{ // MOVE_REVELATION_DANCE
|
||||
.effect = EFFECT_PLACEHOLDER,
|
||||
.effect = EFFECT_REVELATION_DANCE,
|
||||
.power = 90,
|
||||
.type = TYPE_NORMAL,
|
||||
.accuracy = 100,
|
||||
@ -7812,7 +7812,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
.target = MOVE_TARGET_SELECTED,
|
||||
.priority = 0,
|
||||
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED,
|
||||
.split = SPLIT_STATUS,
|
||||
.split = SPLIT_SPECIAL,
|
||||
},
|
||||
{ // MOVE_CORE_ENFORCER
|
||||
.effect = EFFECT_PLACEHOLDER,
|
||||
@ -7899,7 +7899,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
.split = SPLIT_PHYSICAL,
|
||||
},
|
||||
{ // MOVE_AURORA_VEIL
|
||||
.effect = EFFECT_PLACEHOLDER,
|
||||
.effect = EFFECT_AURORA_VEIL,
|
||||
.power = 0,
|
||||
.type = TYPE_ICE,
|
||||
.accuracy = 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user