mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-26 21:33:53 +01:00
After you
This commit is contained in:
parent
b9cf1fdcfe
commit
7623eabdee
@ -1440,6 +1440,11 @@
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro tryafteryou ptr
|
||||
various BS_ATTACKER, VARIOUS_AFTER_YOU
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro invertstatstages battler
|
||||
various \battler, VARIOUS_INVERT_STAT_STAGES
|
||||
.endm
|
||||
|
@ -324,6 +324,19 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
|
||||
.4byte BattleScript_EffectPsychoShift
|
||||
.4byte BattleScript_EffectPowerTrick
|
||||
.4byte BattleScript_EffectFlameBurst
|
||||
.4byte BattleScript_EffectAfterYou
|
||||
|
||||
BattleScript_EffectAfterYou:
|
||||
attackcanceler
|
||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||
attackstring
|
||||
ppreduce
|
||||
tryafteryou BattleScript_ButItFailed
|
||||
attackanimation
|
||||
waitanimation
|
||||
printstring STRINGID_KINDOFFER
|
||||
waitmessage 0x40
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectFlameBurst:
|
||||
setmoveeffect MOVE_EFFECT_FLAME_BURST | MOVE_EFFECT_AFFECTS_USER
|
||||
|
@ -313,5 +313,6 @@
|
||||
#define EFFECT_PSYCHO_SHIFT 307
|
||||
#define EFFECT_POWER_TRICK 308
|
||||
#define EFFECT_FLAME_BURST 309
|
||||
#define EFFECT_AFTER_YOU 310
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||
|
@ -115,6 +115,7 @@
|
||||
#define VARIOUS_PSYCHO_SHIFT 61
|
||||
#define VARIOUS_CURE_STATUS 62
|
||||
#define VARIOUS_POWER_TRICK 63
|
||||
#define VARIOUS_AFTER_YOU 64
|
||||
|
||||
// atk80, dmg manipulation
|
||||
#define ATK80_DMG_CHANGE_SIGN 0
|
||||
|
@ -6980,6 +6980,36 @@ static void atk76_various(void)
|
||||
gStatuses3[gActiveBattler] ^= STATUS3_POWER_TRICK;
|
||||
SWAP(gBattleMons[gActiveBattler].attack, gBattleMons[gActiveBattler].defense, i);
|
||||
break;
|
||||
case VARIOUS_AFTER_YOU:
|
||||
if (GetBattlerTurnOrderNum(gBattlerAttacker) > GetBattlerTurnOrderNum(gBattlerTarget)
|
||||
|| GetBattlerTurnOrderNum(gBattlerAttacker) == GetBattlerTurnOrderNum(gBattlerTarget) + 1)
|
||||
{
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
data[i] = gBattlerByTurnOrder[i];
|
||||
if (GetBattlerTurnOrderNum(gBattlerAttacker) == 0 && GetBattlerTurnOrderNum(gBattlerTarget) == 2)
|
||||
{
|
||||
gBattlerByTurnOrder[1] = gBattlerTarget;
|
||||
gBattlerByTurnOrder[2] = data[1];
|
||||
gBattlerByTurnOrder[3] = data[3];
|
||||
}
|
||||
else if (GetBattlerTurnOrderNum(gBattlerAttacker) == 0 && GetBattlerTurnOrderNum(gBattlerTarget) == 3)
|
||||
{
|
||||
gBattlerByTurnOrder[1] = gBattlerTarget;
|
||||
gBattlerByTurnOrder[2] = data[1];
|
||||
gBattlerByTurnOrder[3] = data[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattlerByTurnOrder[2] = gBattlerTarget;
|
||||
gBattlerByTurnOrder[3] = data[2];
|
||||
}
|
||||
gBattlescriptCurrInstr += 7;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
gBattlescriptCurrInstr += 3;
|
||||
|
@ -5949,7 +5949,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
.split = SPLIT_STATUS,
|
||||
},
|
||||
{ // MOVE_AFTER_YOU
|
||||
.effect = EFFECT_PLACEHOLDER, // Needs a custom move effect
|
||||
.effect = EFFECT_AFTER_YOU,
|
||||
.power = 0,
|
||||
.type = TYPE_NORMAL,
|
||||
.accuracy = 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user