mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-14 23:53:41 +01:00
Gen 5 move names, telekinesis, power/guard split/swap
This commit is contained in:
parent
fcca2afc81
commit
4ec43cbed1
@ -1223,6 +1223,16 @@
|
|||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
.macro swapstatstages stat
|
||||||
|
.byte 0xfa
|
||||||
|
.byte \stat
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro averagestats stat
|
||||||
|
.byte 0xfb
|
||||||
|
.byte \stat
|
||||||
|
.endm
|
||||||
|
|
||||||
@ various command changed to more readable macros
|
@ various command changed to more readable macros
|
||||||
.macro cancelmultiturnmoves bank
|
.macro cancelmultiturnmoves bank
|
||||||
various \bank, VARIOUS_CANCEL_MULTI_TURN_MOVES
|
various \bank, VARIOUS_CANCEL_MULTI_TURN_MOVES
|
||||||
|
@ -265,6 +265,81 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
|
|||||||
.4byte BattleScript_EffectGastroAcid
|
.4byte BattleScript_EffectGastroAcid
|
||||||
.4byte BattleScript_EffectStealthRock
|
.4byte BattleScript_EffectStealthRock
|
||||||
.4byte BattleScript_EffectTelekinesis
|
.4byte BattleScript_EffectTelekinesis
|
||||||
|
.4byte BattleScript_EffectPowerSwap
|
||||||
|
.4byte BattleScript_EffectGuardSwap
|
||||||
|
.4byte BattleScript_EffectHeartSwap
|
||||||
|
.4byte BattleScript_EffectPowerSplit
|
||||||
|
.4byte BattleScript_EffectGuardSplit
|
||||||
|
|
||||||
|
BattleScript_EffectPowerSplit:
|
||||||
|
attackcanceler
|
||||||
|
attackstring
|
||||||
|
ppreduce
|
||||||
|
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
|
||||||
|
averagestats STAT_ATK
|
||||||
|
averagestats STAT_SPATK
|
||||||
|
attackanimation
|
||||||
|
waitanimation
|
||||||
|
printstring STRINGID_SHAREDITSPOWER
|
||||||
|
waitmessage 0x40
|
||||||
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
|
BattleScript_EffectGuardSplit:
|
||||||
|
attackcanceler
|
||||||
|
attackstring
|
||||||
|
ppreduce
|
||||||
|
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
|
||||||
|
averagestats STAT_DEF
|
||||||
|
averagestats STAT_SPDEF
|
||||||
|
attackanimation
|
||||||
|
waitanimation
|
||||||
|
printstring STRINGID_SHAREDITSGUARD
|
||||||
|
waitmessage 0x40
|
||||||
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
|
BattleScript_EffectHeartSwap:
|
||||||
|
attackcanceler
|
||||||
|
attackstring
|
||||||
|
ppreduce
|
||||||
|
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
|
||||||
|
swapstatstages STAT_ATK
|
||||||
|
swapstatstages STAT_DEF
|
||||||
|
swapstatstages STAT_SPEED
|
||||||
|
swapstatstages STAT_SPATK
|
||||||
|
swapstatstages STAT_SPDEF
|
||||||
|
swapstatstages STAT_EVASION
|
||||||
|
swapstatstages STAT_ACC
|
||||||
|
attackanimation
|
||||||
|
waitanimation
|
||||||
|
printstring STRINGID_PKMNSWITCHEDSTATCHANGES
|
||||||
|
waitmessage 0x40
|
||||||
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
|
BattleScript_EffectPowerSwap:
|
||||||
|
attackcanceler
|
||||||
|
attackstring
|
||||||
|
ppreduce
|
||||||
|
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
|
||||||
|
swapstatstages STAT_ATK
|
||||||
|
swapstatstages STAT_SPATK
|
||||||
|
attackanimation
|
||||||
|
waitanimation
|
||||||
|
printstring STRINGID_PKMNSWITCHEDSTATCHANGES
|
||||||
|
waitmessage 0x40
|
||||||
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
|
BattleScript_EffectGuardSwap:
|
||||||
|
attackcanceler
|
||||||
|
attackstring
|
||||||
|
ppreduce
|
||||||
|
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
|
||||||
|
swapstatstages STAT_DEF
|
||||||
|
swapstatstages STAT_SPDEF
|
||||||
|
attackanimation
|
||||||
|
waitanimation
|
||||||
|
printstring STRINGID_PKMNSWITCHEDSTATCHANGES
|
||||||
|
waitmessage 0x40
|
||||||
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
BattleScript_EffectTelekinesis:
|
BattleScript_EffectTelekinesis:
|
||||||
attackcanceler
|
attackcanceler
|
||||||
@ -2700,7 +2775,7 @@ BattleScript_EffectEndeavor::
|
|||||||
adjustdamage
|
adjustdamage
|
||||||
goto BattleScript_HitFromAtkAnimation
|
goto BattleScript_HitFromAtkAnimation
|
||||||
|
|
||||||
BattleScript_EffectSkillSwap::
|
BattleScript_EffectSkillSwap:
|
||||||
attackcanceler
|
attackcanceler
|
||||||
attackstring
|
attackstring
|
||||||
ppreduce
|
ppreduce
|
||||||
|
@ -467,3 +467,96 @@ gMoveNames:: @ 831977C
|
|||||||
.string "Seed Flare$", 13
|
.string "Seed Flare$", 13
|
||||||
.string "Ominous Wind$", 13
|
.string "Ominous Wind$", 13
|
||||||
.string "Shadow Force$", 13
|
.string "Shadow Force$", 13
|
||||||
|
.string "Hone Claws$", 13
|
||||||
|
.string "Wide Guard$", 13
|
||||||
|
.string "Guard Split$", 13
|
||||||
|
.string "Power Split$", 13
|
||||||
|
.string "Wonder Room$", 13
|
||||||
|
.string "Psyshock$", 13
|
||||||
|
.string "Venoshock$", 13
|
||||||
|
.string "Autotomize$", 13
|
||||||
|
.string "Rage Powder$", 13
|
||||||
|
.string "Telekinesis$", 13
|
||||||
|
.string "Magic Room$", 13
|
||||||
|
.string "Smack Down$", 13
|
||||||
|
.string "Storm Throw$", 13
|
||||||
|
.string "Flame Burst$", 13
|
||||||
|
.string "Sludge Wave$", 13
|
||||||
|
.string "Quiver Dance$", 13
|
||||||
|
.string "Heavy Slam$", 13
|
||||||
|
.string "Synchronoise$", 13
|
||||||
|
.string "Electro Ball$", 13
|
||||||
|
.string "Soak$", 13
|
||||||
|
.string "Flame Charge$", 13
|
||||||
|
.string "Coil$", 13
|
||||||
|
.string "Low Sweep$", 13
|
||||||
|
.string "Acid Spray$", 13
|
||||||
|
.string "Foul Play$", 13
|
||||||
|
.string "Simple Beam$", 13
|
||||||
|
.string "Entrainment$", 13
|
||||||
|
.string "After You$", 13
|
||||||
|
.string "Round$", 13
|
||||||
|
.string "Echoed Voice$", 13
|
||||||
|
.string "Chip Away$", 13
|
||||||
|
.string "Clear Smog$", 13
|
||||||
|
.string "Stored Power$", 13
|
||||||
|
.string "Quick Guard$", 13
|
||||||
|
.string "Ally Switch$", 13
|
||||||
|
.string "Scald$", 13
|
||||||
|
.string "Shell Smash$", 13
|
||||||
|
.string "Heal Pulse$", 13
|
||||||
|
.string "Hex$", 13
|
||||||
|
.string "Sky Drop$", 13
|
||||||
|
.string "Shift Gear$", 13
|
||||||
|
.string "Circle Throw$", 13
|
||||||
|
.string "Incinerate$", 13
|
||||||
|
.string "Quash$", 13
|
||||||
|
.string "Acrobatics$", 13
|
||||||
|
.string "Reflect Type$", 13
|
||||||
|
.string "Retaliate$", 13
|
||||||
|
.string "Final Gambit$", 13
|
||||||
|
.string "Bestow$", 13
|
||||||
|
.string "Inferno$", 13
|
||||||
|
.string "Water Pledge$", 13
|
||||||
|
.string "Fire Pledge$", 13
|
||||||
|
.string "Grass Pledge$", 13
|
||||||
|
.string "Volt Switch$", 13
|
||||||
|
.string "Struggle Bug$", 13
|
||||||
|
.string "Bulldoze$", 13
|
||||||
|
.string "Frost Breath$", 13
|
||||||
|
.string "Dragon Tail$", 13
|
||||||
|
.string "Work Up$", 13
|
||||||
|
.string "Electroweb$", 13
|
||||||
|
.string "Wild Charge$", 13
|
||||||
|
.string "Drill Run$", 13
|
||||||
|
.string "Dual Chop$", 13
|
||||||
|
.string "Heart Stamp$", 13
|
||||||
|
.string "Horn Leech$", 13
|
||||||
|
.string "Sacred Sword$", 13
|
||||||
|
.string "Razor Shell$", 13
|
||||||
|
.string "Heat Crash$", 13
|
||||||
|
.string "Leaf Tornado$", 13
|
||||||
|
.string "Steamroller$", 13
|
||||||
|
.string "Cotton Guard$", 13
|
||||||
|
.string "Night Daze$", 13
|
||||||
|
.string "Psystrike$", 13
|
||||||
|
.string "Tail Slap$", 13
|
||||||
|
.string "Hurricane$", 13
|
||||||
|
.string "Head Charge$", 13
|
||||||
|
.string "Gear Grind$", 13
|
||||||
|
.string "Searing Shot$", 13
|
||||||
|
.string "Techno Blast$", 13
|
||||||
|
.string "Relic Song$", 13
|
||||||
|
.string "Secret Sword$", 13
|
||||||
|
.string "Glaciate$", 13
|
||||||
|
.string "Bolt Strike$", 13
|
||||||
|
.string "Blue Flare$", 13
|
||||||
|
.string "Fiery Dance$", 13
|
||||||
|
.string "Freeze Shock$", 13
|
||||||
|
.string "Ice Burn$", 13
|
||||||
|
.string "Snarl$", 13
|
||||||
|
.string "Icicle Crash$", 13
|
||||||
|
.string "V Create$", 13
|
||||||
|
.string "Fusion Flare$", 13
|
||||||
|
.string "Fusion Bolt$", 13
|
||||||
|
.string "Flying Press$", 13
|
||||||
|
@ -254,5 +254,10 @@
|
|||||||
#define EFFECT_GASTRO_ACID 248
|
#define EFFECT_GASTRO_ACID 248
|
||||||
#define EFFECT_STEALTH_ROCK 249
|
#define EFFECT_STEALTH_ROCK 249
|
||||||
#define EFFECT_TELEKINESIS 250
|
#define EFFECT_TELEKINESIS 250
|
||||||
|
#define EFFECT_POWER_SWAP 251
|
||||||
|
#define EFFECT_GUARD_SWAP 252
|
||||||
|
#define EFFECT_HEART_SWAP 253
|
||||||
|
#define EFFECT_POWER_SPLIT 254
|
||||||
|
#define EFFECT_GUARD_SPLIT 255
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||||
|
@ -5656,7 +5656,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_GEN6] =
|
|||||||
.split = SPLIT_STATUS,
|
.split = SPLIT_STATUS,
|
||||||
},
|
},
|
||||||
{ // MOVE_POWER_SPLIT
|
{ // MOVE_POWER_SPLIT
|
||||||
.effect = EFFECT_PLACEHOLDER_209,
|
.effect = EFFECT_POWER_SPLIT,
|
||||||
.power = 0,
|
.power = 0,
|
||||||
.type = TYPE_PSYCHIC,
|
.type = TYPE_PSYCHIC,
|
||||||
.accuracy = 0,
|
.accuracy = 0,
|
||||||
|
@ -1134,7 +1134,7 @@ static void SetUpModifyArrows(struct BattleDebugMenu *data)
|
|||||||
break;
|
break;
|
||||||
case LIST_ITEM_MOVES:
|
case LIST_ITEM_MOVES:
|
||||||
data->modifyArrows.minValue = 0;
|
data->modifyArrows.minValue = 0;
|
||||||
data->modifyArrows.maxValue = MOVES_COUNT - 1;
|
data->modifyArrows.maxValue = MOVES_COUNT_GEN5 - 1;
|
||||||
data->modifyArrows.maxDigits = 3;
|
data->modifyArrows.maxDigits = 3;
|
||||||
data->modifyArrows.modifiedValPtr = &gBattleMons[data->battlerId].moves[data->currentSecondaryListItemId];
|
data->modifyArrows.modifiedValPtr = &gBattleMons[data->battlerId].moves[data->currentSecondaryListItemId];
|
||||||
data->modifyArrows.typeOfVal = VAL_U16;
|
data->modifyArrows.typeOfVal = VAL_U16;
|
||||||
|
@ -341,6 +341,8 @@ static void atkF6_finishaction(void);
|
|||||||
static void atkF7_finishturn(void);
|
static void atkF7_finishturn(void);
|
||||||
static void atkF8_trainerslideout(void);
|
static void atkF8_trainerslideout(void);
|
||||||
static void atkF9_settelekinesis(void);
|
static void atkF9_settelekinesis(void);
|
||||||
|
static void atkFA_swapstatstages(void);
|
||||||
|
static void atkFB_averagestats(void);
|
||||||
|
|
||||||
void (* const gBattleScriptingCommandsTable[])(void) =
|
void (* const gBattleScriptingCommandsTable[])(void) =
|
||||||
{
|
{
|
||||||
@ -594,6 +596,8 @@ void (* const gBattleScriptingCommandsTable[])(void) =
|
|||||||
atkF7_finishturn,
|
atkF7_finishturn,
|
||||||
atkF8_trainerslideout,
|
atkF8_trainerslideout,
|
||||||
atkF9_settelekinesis,
|
atkF9_settelekinesis,
|
||||||
|
atkFA_swapstatstages,
|
||||||
|
atkFB_averagestats,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct StatFractions
|
struct StatFractions
|
||||||
@ -10247,3 +10251,28 @@ static void atkF9_settelekinesis(void)
|
|||||||
gBattlescriptCurrInstr += 5;
|
gBattlescriptCurrInstr += 5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void atkFA_swapstatstages(void)
|
||||||
|
{
|
||||||
|
u8 statId = T1_READ_8(gBattlescriptCurrInstr + 1);
|
||||||
|
s8 atkStatStage = gBattleMons[gBattlerAttacker].statStages[statId];
|
||||||
|
s8 defStatStage = gBattleMons[gBattlerTarget].statStages[statId];
|
||||||
|
|
||||||
|
gBattleMons[gBattlerAttacker].statStages[statId] = defStatStage;
|
||||||
|
gBattleMons[gBattlerTarget].statStages[statId] = atkStatStage;
|
||||||
|
|
||||||
|
gBattlescriptCurrInstr += 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void atkFB_averagestats(void)
|
||||||
|
{
|
||||||
|
u8 statId = T1_READ_8(gBattlescriptCurrInstr + 1);
|
||||||
|
u16 atkStat = *(u16*)((&gBattleMons[gBattlerAttacker].attack) + (statId - 1));
|
||||||
|
u16 defStat = *(u16*)((&gBattleMons[gBattlerTarget].attack) + (statId - 1));
|
||||||
|
u16 average = (atkStat + defStat) / 2;
|
||||||
|
|
||||||
|
*(u16*)((&gBattleMons[gBattlerAttacker].attack) + (statId - 1)) = average;
|
||||||
|
*(u16*)((&gBattleMons[gBattlerTarget].attack) + (statId - 1)) = average;
|
||||||
|
|
||||||
|
gBattlescriptCurrInstr += 2;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user