z move effects

This commit is contained in:
Evan 2020-11-30 10:55:46 -05:00
parent 71857f4c89
commit a0bde70493
15 changed files with 932 additions and 43 deletions

View File

@ -365,6 +365,8 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
.4byte BattleScript_EffectFairyLock .4byte BattleScript_EffectFairyLock
.4byte BattleScript_EffectAllySwitch .4byte BattleScript_EffectAllySwitch
.4byte BattleScript_EffectSleepHit .4byte BattleScript_EffectSleepHit
.4byte BattleScript_EffectExtremeEvoboost
.4byte BattleScript_EffectTerrainHit
BattleScript_EffectSleepHit: BattleScript_EffectSleepHit:
setmoveeffect MOVE_EFFECT_SLEEP setmoveeffect MOVE_EFFECT_SLEEP
@ -7687,9 +7689,109 @@ BattleScript_PrintPlayerForfeitedLinkBattle::
waitmessage 0x40 waitmessage 0x40
end2 end2
BattleScript_ZMoveActivate:: @ z moves / effects
BattleScript_ZMoveActivateDamaging::
printstring STRINGID_ZPOWERSURROUNDS printstring STRINGID_ZPOWERSURROUNDS
playanimation BS_ATTACKER, B_ANIM_ZMOVE_ACTIVATE, NULL playanimation BS_ATTACKER, B_ANIM_ZMOVE_ACTIVATE, NULL
printstring STRINGID_ZMOVEUNLEASHED printstring STRINGID_ZMOVEUNLEASHED
waitmessage 0x40 waitmessage 0x40
return return
BattleScript_ZMoveActivateStatus::
printstring STRINGID_ZPOWERSURROUNDS
playanimation BS_ATTACKER, B_ANIM_ZMOVE_ACTIVATE, NULL
setzeffect
printstring STRINGID_ZMOVEUNLEASHED
waitmessage 0x40
return
BattleScript_ZEffectPrintString::
printfromtable gZEffectStringIds
waitmessage 0x40
return
BattleScript_RecoverHPZMove::
healthbarupdate BS_SCRIPTING
datahpupdate BS_SCRIPTING
printfromtable gZEffectStringIds
waitmessage 0x40
return
BattleScript_StatUpZMove::
statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_StatUpZMoveEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x3, BattleScript_StatUpZMoveEnd
playanimation BS_SCRIPTING, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gZEffectStringIds
waitmessage 0x40
BattleScript_StatUpZMoveEnd:
return
BattleScript_EffectExtremeEvoboost::
attackcanceler
attackstring
ppreduce
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, MAX_STAT_STAGE, BattleScript_ExtremeEvoboostAnim
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_DEF, MAX_STAT_STAGE, BattleScript_ExtremeEvoboostAnim
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPEED, MAX_STAT_STAGE, BattleScript_ExtremeEvoboostAnim
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPATK, MAX_STAT_STAGE, BattleScript_ExtremeEvoboostAnim
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPDEF, MAX_STAT_STAGE, BattleScript_ExtremeEvoboostAnim
goto BattleScript_ButItFailed
BattleScript_ExtremeEvoboostAnim:
attackanimation
waitanimation
BattleScript_ExtremeEvoboostAtk::
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF | BIT_SPEED | BIT_SPATK | BIT_SPDEF, 0x0
setstatchanger STAT_ATK, 2, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_ExtremeEvoboostDef
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_ExtremeEvoboostDef::
setstatchanger STAT_DEF, 2, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_ExtremeEvoboostSpeed
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_ExtremeEvoboostSpeed::
setstatchanger STAT_SPEED, 2, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_ExtremeEvoboostSpAtk
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_ExtremeEvoboostSpAtk::
setstatchanger STAT_SPATK, 2, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_ExtremeEvoboostSpDef
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_ExtremeEvoboostSpDef::
setstatchanger STAT_SPDEF, 2, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_ExtremeEvoboostEnd
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_ExtremeEvoboostEnd::
goto BattleScript_MoveEnd
BattleScript_EffectTerrainHit:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
setterrain BattleScript_TryFaint
@@@ TODO - 'restore' bg @@@
printfromtable gTerrainStringIds
BattleScript_TryFaint:
tryfaintmon BS_TARGET, FALSE, NULL
goto BattleScript_MoveEnd

View File

@ -50,8 +50,9 @@ InsideOfTruck_EventScript_SetIntroFlagsFemale:: @ 823BF46
end end
InsideOfTruck_EventScript_MovingBox:: @ 823BF6C InsideOfTruck_EventScript_MovingBox:: @ 823BF6C
givemon SPECIES_SNEASEL, 70, ITEM_DARKINIUM_Z givemon SPECIES_MEW, 55, ITEM_MEWNIUM_Z
setwildbattle SPECIES_WALREIN, 53, 0 givemon SPECIES_CHARIZARD, 50, ITEM_FIRIUM_Z
setwildbattle SPECIES_AGGRON, 40, 0
dowildbattle dowildbattle
@msgbox InsideOfTruck_Text_BoxPrintedWithMonLogo, MSGBOX_SIGN @msgbox InsideOfTruck_Text_BoxPrintedWithMonLogo, MSGBOX_SIGN
end end

View File

@ -433,11 +433,16 @@ struct ZMoveData
u8 viewing:1; //if player is viewing the z move name instead of regular moves u8 viewing:1; //if player is viewing the z move name instead of regular moves
u8 split:2; u8 split:2;
u8 active:1; //is z move being used this turn u8 active:1; //is z move being used this turn
u8 zUnused:4; u8 zStatusActive:1;
u8 healReplacement:1; //TODO: z-parting shot
u8 zUnused:2;
/*0x02*/ u16 currZMove; //z move of cursor / selected z move /*0x02*/ u16 currZMove; //z move of cursor / selected z move
/*0x04*/ u16 baseMove; //move turned into z move /*0x04*/ u16 baseMove; //move turned into z move
/*0x06*/ u8 triggerSpriteId; /*0x06*/ u8 triggerSpriteId;
u8 effect;
u8 used[MAX_BATTLERS_COUNT]; //one per bank for multi-battles u8 used[MAX_BATTLERS_COUNT]; //one per bank for multi-battles
u16 toBeUsed[MAX_BATTLERS_COUNT]; //TODO z moves per battler to be used
u8 splits[MAX_BATTLERS_COUNT];
}; /* size = 8 */ }; /* size = 8 */
struct BattleStruct struct BattleStruct

View File

@ -349,6 +349,12 @@ extern const u8 BattleScript_EmergencyExitNoPopUp[];
extern const u8 BattleScript_EmergencyExitWild[]; extern const u8 BattleScript_EmergencyExitWild[];
extern const u8 BattleScript_EmergencyExitWildNoPopUp[]; extern const u8 BattleScript_EmergencyExitWildNoPopUp[];
extern const u8 BattleScript_CheekPouchActivates[]; extern const u8 BattleScript_CheekPouchActivates[];
extern const u8 BattleScript_ZMoveActivate[]; // zmoves
extern const u8 BattleScript_ZMoveActivateDamaging[];
extern const u8 BattleScript_ZMoveActivateStatus[];
extern const u8 BattleScript_ZEffectPrintString[];
extern const u8 BattleScript_RecoverHPZMove[];
extern const u8 BattleScript_StatUpZMove[];
extern const u8 BattleScript_EffectExtremeEvoboost[];
#endif // GUARD_BATTLE_SCRIPTS_H #endif // GUARD_BATTLE_SCRIPTS_H

View File

@ -19,5 +19,6 @@ bool32 IsZMoveTriggerSpriteActive(void);
void DestroyZMoveTriggerSprite(void); void DestroyZMoveTriggerSprite(void);
bool32 MoveSelectionDisplayZMove(u16 zmove); bool32 MoveSelectionDisplayZMove(u16 zmove);
const u8* GetZMoveName(u16 move); const u8* GetZMoveName(u16 move);
void SetZEffect(void);
#endif // GUARD_BATTLE_Z_MOVE_H #endif // GUARD_BATTLE_Z_MOVE_H

View File

@ -351,5 +351,7 @@
#define EFFECT_FAIRY_LOCK 345 #define EFFECT_FAIRY_LOCK 345
#define EFFECT_ALLY_SWITCH 346 #define EFFECT_ALLY_SWITCH 346
#define EFFECT_SLEEP_HIT 347 // Relic Song #define EFFECT_SLEEP_HIT 347 // Relic Song
#define EFFECT_EXTREME_EVOBOOST 348
#define EFFECT_DAMAGE_SET_TERRAIN 349 //genesis supernova
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H #endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H

View File

@ -553,7 +553,23 @@
#define STRINGID_FERVENTWISHREACHED 549 #define STRINGID_FERVENTWISHREACHED 549
#define STRINGID_ZPOWERSURROUNDS 550 #define STRINGID_ZPOWERSURROUNDS 550
#define STRINGID_ZMOVEUNLEASHED 551 #define STRINGID_ZMOVEUNLEASHED 551
#define STRINGID_ZMOVERESETSSTATS 552
#define STRINGID_ZMOVEALLSTATSUP 553
#define STRINGID_ZMOVEZBOOSTCRIT 554
#define STRINGID_ZMOVERESTOREHP 555
#define STRINGID_ZMOVESTATUP 556
#define STRINGID_ZMOVEHPTRAP 557
#define STRINGID_TERRAINREMOVED 558
#define BATTLESTRINGS_COUNT 552 #define BATTLESTRINGS_COUNT 558
// z effects
#define MULTISTRING_Z_RESET_STATS 0
#define MULTISTRING_Z_ALL_STATS_UP 1
#define MULTISTRING_Z_BOOST_CRITS 2
#define MULTISTRING_Z_FOLLOW_ME 3
#define MULTISTRING_Z_RECOVER_HP 4
#define MULTISTRING_Z_STAT_UP 5
#define MULTISTRING_Z_HP_TRAP 6
#endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H #endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H

View File

@ -564,6 +564,12 @@ static void HandleInputChooseMove(void)
if (gBattleStruct->zmove.viewing) if (gBattleStruct->zmove.viewing)
{ {
u16 chosenMove = moveInfo->moves[gMoveSelectionCursor[gActiveBattler]];
//gBattleStruct->zmove.toBeUsed[gActiveBattler] = gBattleStruct->zmove.currZMove;
gBattleStruct->zmove.baseMove = chosenMove;
gBattleStruct->zmove.split = GetBattleMoveSplit(chosenMove);
gBattleStruct->zmove.active = TRUE; gBattleStruct->zmove.active = TRUE;
gBattleStruct->zmove.viewing = FALSE; gBattleStruct->zmove.viewing = FALSE;
if (gBattleMoves[moveInfo->moves[gMoveSelectionCursor[gActiveBattler]]].split != SPLIT_STATUS) if (gBattleMoves[moveInfo->moves[gMoveSelectionCursor[gActiveBattler]]].split != SPLIT_STATUS)

View File

@ -680,9 +680,24 @@ static const u8 sText_CloakedInAFreezingLight[] = _("{B_ATK_NAME_WITH_PREFIX} be
static const u8 sText_StatWasNotLowered[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}\nwas not lowered!"); static const u8 sText_StatWasNotLowered[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}\nwas not lowered!");
static const u8 sText_ZPowerSurrounds[] = _("{B_ATK_NAME_WITH_PREFIX} surrounds\nitself with its Z-Power!"); static const u8 sText_ZPowerSurrounds[] = _("{B_ATK_NAME_WITH_PREFIX} surrounds\nitself with its Z-Power!");
static const u8 sText_ZPowerUnleashed[] = _("{B_ATK_NAME_WITH_PREFIX} unleashes\nits full-force Z-Move!"); static const u8 sText_ZPowerUnleashed[] = _("{B_ATK_NAME_WITH_PREFIX} unleashes\nits full-force Z-Move!");
static const u8 sText_ZMoveResetsStats[] = _("");
static const u8 sText_ZMoveAllStatsUp[] = _("");
static const u8 sText_ZMoveBoostCrit[] = _("");
static const u8 sText_ZMoveRestoreHp[] = _("");
static const u8 sText_ZMoveStatUp[] = _("");
static const u8 sText_ZMoveHpSwitchInTrap[] = _("");
static const u8 sText_TerrainReturnedToNormal[] = _("The terrain returned to\nnormal!");
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
{ {
[STRINGID_ZPOWERSURROUNDS - 12] = sText_ZPowerSurrounds,
[STRINGID_ZMOVEUNLEASHED - 12] = sText_ZPowerUnleashed,
[STRINGID_ZMOVERESETSSTATS - 12] = sText_ZMoveResetsStats,
[STRINGID_ZMOVEALLSTATSUP - 12] = sText_ZMoveAllStatsUp,
[STRINGID_ZMOVEZBOOSTCRIT - 12] = sText_ZMoveBoostCrit,
[STRINGID_ZMOVERESTOREHP - 12] = sText_ZMoveRestoreHp,
[STRINGID_ZMOVESTATUP - 12] = sText_ZMoveStatUp,
[STRINGID_ZMOVEHPTRAP - 12] = sText_ZMoveHpSwitchInTrap,
[STRINGID_STATWASNOTLOWERED - 12] = sText_StatWasNotLowered, [STRINGID_STATWASNOTLOWERED - 12] = sText_StatWasNotLowered,
[STRINGID_CLOAKEDINAFREEZINGLIGHT - 12] = sText_CloakedInAFreezingLight, [STRINGID_CLOAKEDINAFREEZINGLIGHT - 12] = sText_CloakedInAFreezingLight,
[STRINGID_DESTINYKNOTACTIVATES - 12] = sText_DestinyKnotActivates, [STRINGID_DESTINYKNOTACTIVATES - 12] = sText_DestinyKnotActivates,
@ -1221,13 +1236,23 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
[STRINGID_GRASSYTERRAINHEALS - 12] = sText_GrassyTerrainHeals, [STRINGID_GRASSYTERRAINHEALS - 12] = sText_GrassyTerrainHeals,
[STRINGID_ELECTRICTERRAINPREVENTS - 12] = sText_ElectricTerrainPreventsSleep, [STRINGID_ELECTRICTERRAINPREVENTS - 12] = sText_ElectricTerrainPreventsSleep,
[STRINGID_PSYCHICTERRAINPREVENTS - 12] = sText_PsychicTerrainPreventsPriority, [STRINGID_PSYCHICTERRAINPREVENTS - 12] = sText_PsychicTerrainPreventsPriority,
[STRINGID_ZPOWERSURROUNDS - 12] = sText_ZPowerSurrounds, [STRINGID_TERRAINREMOVED - 12] = sText_TerrainReturnedToNormal,
[STRINGID_ZMOVEUNLEASHED - 12] = sText_ZPowerUnleashed, };
const u16 gZEffectStringIds[] =
{
[MULTISTRING_Z_RESET_STATS] = STRINGID_ZMOVERESETSSTATS,
[MULTISTRING_Z_ALL_STATS_UP]= STRINGID_ZMOVEALLSTATSUP,
[MULTISTRING_Z_BOOST_CRITS] = STRINGID_ZMOVEZBOOSTCRIT,
[MULTISTRING_Z_FOLLOW_ME] = STRINGID_PKMNCENTERATTENTION,
[MULTISTRING_Z_RECOVER_HP] = STRINGID_ZMOVERESTOREHP,
[MULTISTRING_Z_STAT_UP] = STRINGID_ZMOVESTATUP,
[MULTISTRING_Z_HP_TRAP] = STRINGID_ZMOVEHPTRAP,
}; };
const u16 gTerrainStringIds[] = const u16 gTerrainStringIds[] =
{ {
STRINGID_TERRAINBECOMESMISTY, STRINGID_TERRAINBECOMESGRASSY, STRINGID_TERRAINBECOMESELECTRIC, STRINGID_TERRAINBECOMESPSYCHIC STRINGID_TERRAINBECOMESMISTY, STRINGID_TERRAINBECOMESGRASSY, STRINGID_TERRAINBECOMESELECTRIC, STRINGID_TERRAINBECOMESPSYCHIC, STRINGID_TERRAINREMOVED,
}; };
const u16 gTerrainPreventsStringIds[] = const u16 gTerrainPreventsStringIds[] =

View File

@ -6,6 +6,7 @@
#include "battle_anim.h" #include "battle_anim.h"
#include "battle_ai_script_commands.h" #include "battle_ai_script_commands.h"
#include "battle_scripts.h" #include "battle_scripts.h"
#include "battle_z_move.h"
#include "constants/moves.h" #include "constants/moves.h"
#include "constants/abilities.h" #include "constants/abilities.h"
#include "item.h" #include "item.h"
@ -1469,6 +1470,12 @@ static bool32 AccuracyCalcHelper(u16 move)
RecordAbilityBattle(gBattlerTarget, ABILITY_NO_GUARD); RecordAbilityBattle(gBattlerTarget, ABILITY_NO_GUARD);
return TRUE; return TRUE;
} }
if (gBattleStruct->zmove.active && !(gStatuses3[gBattlerTarget] & STATUS3_SEMI_INVULNERABLE))
{
JumpIfMoveFailed(7, move);
return TRUE;
}
if ((gStatuses3[gBattlerTarget] & STATUS3_PHANTOM_FORCE) if ((gStatuses3[gBattlerTarget] & STATUS3_PHANTOM_FORCE)
|| (!(gBattleMoves[move].flags & FLAG_HIT_IN_AIR) && gStatuses3[gBattlerTarget] & STATUS3_ON_AIR) || (!(gBattleMoves[move].flags & FLAG_HIT_IN_AIR) && gStatuses3[gBattlerTarget] & STATUS3_ON_AIR)
@ -1628,13 +1635,6 @@ static void Cmd_ppreduce(void)
if (gBattleControllerExecFlags) if (gBattleControllerExecFlags)
return; return;
if (gBattleStruct->zmove.active)
{
gHitMarker &= ~(HITMARKER_NO_PPDEDUCT);
gBattlescriptCurrInstr++;
return;
}
if (!gSpecialStatuses[gBattlerAttacker].ppNotAffectedByPressure) if (!gSpecialStatuses[gBattlerAttacker].ppNotAffectedByPressure)
{ {
switch (gBattleMoves[gCurrentMove].target) switch (gBattleMoves[gCurrentMove].target)
@ -6929,12 +6929,12 @@ static bool32 HasAttackerFaintedTarget(void)
return FALSE; return FALSE;
} }
static void HandleTerrainMove(u32 moveEffect) static void HandleTerrainMove(u16 move)
{ {
u32 statusFlag = 0; u32 statusFlag = 0;
u8 *timer = NULL; u8 *timer = NULL;
switch (moveEffect) switch (gBattleMoves[move].effect)
{ {
case EFFECT_MISTY_TERRAIN: case EFFECT_MISTY_TERRAIN:
statusFlag = STATUS_FIELD_MISTY_TERRAIN, timer = &gFieldTimers.mistyTerrainTimer; statusFlag = STATUS_FIELD_MISTY_TERRAIN, timer = &gFieldTimers.mistyTerrainTimer;
@ -6952,6 +6952,31 @@ static void HandleTerrainMove(u32 moveEffect)
statusFlag = STATUS_FIELD_PSYCHIC_TERRAIN, timer = &gFieldTimers.psychicTerrainTimer; statusFlag = STATUS_FIELD_PSYCHIC_TERRAIN, timer = &gFieldTimers.psychicTerrainTimer;
gBattleCommunication[MULTISTRING_CHOOSER] = 3; gBattleCommunication[MULTISTRING_CHOOSER] = 3;
break; break;
case EFFECT_DAMAGE_SET_TERRAIN:
switch (gBattleMoves[move].argument)
{
case 0: //genesis supernova
statusFlag = STATUS_FIELD_PSYCHIC_TERRAIN, timer = &gFieldTimers.psychicTerrainTimer;
gBattleCommunication[MULTISTRING_CHOOSER] = 3;
break;
case 1: //splintered stormshards
if (!(gFieldStatuses & (STATUS_FIELD_MISTY_TERRAIN | STATUS_FIELD_GRASSY_TERRAIN | STATUS_FIELD_ELECTRIC_TERRAIN | STATUS_FIELD_PSYCHIC_TERRAIN)))
{
//no terrain to remove -> jump to battle script pointer
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
}
else
{
// remove all terrain
gFieldStatuses &= ~(STATUS_FIELD_MISTY_TERRAIN | STATUS_FIELD_GRASSY_TERRAIN | STATUS_FIELD_ELECTRIC_TERRAIN | STATUS_FIELD_PSYCHIC_TERRAIN);
gBattleCommunication[MULTISTRING_CHOOSER] = 4;
gBattlescriptCurrInstr += 7;
}
return;
default:
break;
}
break;
} }
if (gFieldStatuses & statusFlag || statusFlag == 0) if (gFieldStatuses & statusFlag || statusFlag == 0)
@ -7764,7 +7789,7 @@ static void Cmd_various(void)
} }
break; break;
case VARIOUS_SET_TERRAIN: case VARIOUS_SET_TERRAIN:
HandleTerrainMove(gBattleMoves[gCurrentMove].effect); HandleTerrainMove(gCurrentMove);
return; return;
case VARIOUS_TRY_ME_FIRST: case VARIOUS_TRY_ME_FIRST:
if (GetBattlerTurnOrderNum(gBattlerAttacker) > GetBattlerTurnOrderNum(gBattlerTarget)) if (GetBattlerTurnOrderNum(gBattlerAttacker) > GetBattlerTurnOrderNum(gBattlerTarget))
@ -8308,6 +8333,9 @@ static void Cmd_various(void)
gBattlescriptCurrInstr += 7; gBattlescriptCurrInstr += 7;
} }
return; return;
case VARIOUS_SET_Z_EFFECT:
SetZEffect(); //handles battle script jumping internally
return;
} }
gBattlescriptCurrInstr += 3; gBattlescriptCurrInstr += 3;
@ -8817,7 +8845,7 @@ static void Cmd_setdrainedhp(void)
gBattlescriptCurrInstr++; gBattlescriptCurrInstr++;
} }
static u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr) u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr)
{ {
bool32 certain = FALSE; bool32 certain = FALSE;
bool32 notProtectAffected = FALSE; bool32 notProtectAffected = FALSE;

View File

@ -3190,11 +3190,21 @@ u8 AtkCanceller_UnableToUseMove(void)
if (gBattleStruct->zmove.active == TRUE) if (gBattleStruct->zmove.active == TRUE)
{ {
RecordItemEffectBattle(gBattlerAttacker, HOLD_EFFECT_Z_CRYSTAL); RecordItemEffectBattle(gBattlerAttacker, HOLD_EFFECT_Z_CRYSTAL);
gBattleStruct->zmove.used[gBattlerAttacker] = TRUE; gBattleStruct->zmove.used[gBattlerAttacker] = TRUE;
//TODO - partner battles. //TODO - partner battles.
gBattleScripting.battler = gBattlerAttacker; gBattleScripting.battler = gBattlerAttacker;
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_ZMoveActivate; if (IS_MOVE_STATUS(gBattleStruct->zmove.baseMove))
{
gBattleStruct->zmove.effect = gBattleMoves[gBattleStruct->zmove.baseMove].zMoveEffect;
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_ZMoveActivateStatus;
}
else
{
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_ZMoveActivateDamaging;
}
effect = 1; effect = 1;
} }
gBattleStruct->atkCancellerTracker++; gBattleStruct->atkCancellerTracker++;
@ -6390,6 +6400,9 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef)
u32 i; u32 i;
u16 basePower = gBattleMoves[move].power; u16 basePower = gBattleMoves[move].power;
u32 weight, hpFraction, speed; u32 weight, hpFraction, speed;
if (gBattleStruct->zmove.active)
return gBattleMoves[gBattleStruct->zmove.baseMove].zMovePower;
switch (gBattleMoves[move].effect) switch (gBattleMoves[move].effect)
{ {
@ -7794,7 +7807,10 @@ bool8 ShouldGetStatBadgeBoost(u16 badgeFlag, u8 battlerId)
u8 GetBattleMoveSplit(u32 moveId) u8 GetBattleMoveSplit(u32 moveId)
{ {
if (IS_MOVE_STATUS(moveId) || B_PHYSICAL_SPECIAL_SPLIT >= GEN_4) //TODO - light that burns the sky, photon geyser
if (gBattleStruct->zmove.active && !IS_MOVE_STATUS(moveId))
return gBattleStruct->zmove.split;
else if (IS_MOVE_STATUS(moveId) || B_PHYSICAL_SPECIAL_SPLIT >= GEN_4)
return gBattleMoves[moveId].split; return gBattleMoves[moveId].split;
else if (gBattleMoves[moveId].type < TYPE_MYSTERY) else if (gBattleMoves[moveId].type < TYPE_MYSTERY)
return SPLIT_PHYSICAL; return SPLIT_PHYSICAL;

View File

@ -6,6 +6,7 @@
#include "battle_interface.h" #include "battle_interface.h"
#include "battle_message.h" #include "battle_message.h"
#include "battle_z_move.h" #include "battle_z_move.h"
#include "battle_scripts.h"
#include "graphics.h" #include "graphics.h"
#include "sprite.h" #include "sprite.h"
#include "window.h" #include "window.h"
@ -35,6 +36,8 @@
#include "constants/items.h" #include "constants/items.h"
#include "constants/species.h" #include "constants/species.h"
#include "constants/hold_effects.h" #include "constants/hold_effects.h"
#include "constants/battle_string_ids.h"
#include "constants/battle_move_effects.h"
// Function Declarations // Function Declarations
static void SpriteCB_ZMoveTrigger(struct Sprite *sprite); static void SpriteCB_ZMoveTrigger(struct Sprite *sprite);
@ -43,6 +46,7 @@ static u16 GetTypeBasedZMove(u16 move, u8 battler);
static void ZMoveSelectionDisplayPpNumber(void); static void ZMoveSelectionDisplayPpNumber(void);
static void ZMoveSelectionDisplayPower(u16 move, u16 zMove); static void ZMoveSelectionDisplayPower(u16 move, u16 zMove);
static void ShowZMoveTriggerSprite(void); static void ShowZMoveTriggerSprite(void);
static bool32 AreMainStatsMaxed(u8 battlerId);
// Const Data // Const Data
static const struct SignatureZMove sSignatureZMoves[] = static const struct SignatureZMove sSignatureZMoves[] =
@ -84,6 +88,7 @@ static const struct SignatureZMove sSignatureZMoves[] =
static const u8 sText_ResetStats[] = _("Reset Lowered Stats"); static const u8 sText_ResetStats[] = _("Reset Lowered Stats");
static const u8 sText_StatsPlus[] = _("+ All Stats"); static const u8 sText_StatsPlus[] = _("+ All Stats");
static const u8 sText_StatsPlus2[] = _("++ All Stats");
static const u8 sText_CritHitsPlus[] = _("+ Critical Hit Chance"); static const u8 sText_CritHitsPlus[] = _("+ Critical Hit Chance");
static const u8 sText_FollowMe[] = _("Follow Me"); static const u8 sText_FollowMe[] = _("Follow Me");
static const u8 sText_RecoverHP[] = _("Recover HP"); static const u8 sText_RecoverHP[] = _("Recover HP");
@ -387,19 +392,21 @@ bool32 MoveSelectionDisplayZMove(u16 zmove)
BattlePutTextOnWindow(gDisplayedStringBattle, i + 3); BattlePutTextOnWindow(gDisplayedStringBattle, i + 3);
} }
if (zmove == MOVE_Z_SIGNATURE) //if (zmove == MOVE_Z_SIGNATURE)
if (IS_MOVE_STATUS(move))
{ {
u8 zEffect = gBattleMoves[move].zMoveEffect; u8 zEffect = gBattleMoves[move].zMoveEffect;
gDisplayedStringBattle[0] = EOS;
if (zEffect == Z_EFFECT_CURSE) if (zEffect == Z_EFFECT_CURSE)
{ {
if (moveInfo->monType1 == TYPE_GHOST || moveInfo->monType2 == TYPE_GHOST || moveInfo->monType3 == TYPE_GHOST) if (moveInfo->monType1 == TYPE_GHOST || moveInfo->monType2 == TYPE_GHOST || moveInfo->monType3 == TYPE_GHOST)
zEffect = Z_EFFECT_RECOVER_HP; zEffect = Z_EFFECT_RECOVER_HP;
else else
zEffect = Z_EFFECT_ATK_UP_1; zEffect = Z_EFFECT_ATK_UP_1;
} }
gDisplayedStringBattle[0] = EOS;
switch (zEffect) switch (zEffect)
{ {
case Z_EFFECT_RESET_STATS: case Z_EFFECT_RESET_STATS:
@ -469,6 +476,13 @@ bool32 MoveSelectionDisplayZMove(u16 zmove)
gDisplayedStringBattle[1] = CHAR_HYPHEN; gDisplayedStringBattle[1] = CHAR_HYPHEN;
StringCopy(gDisplayedStringBattle + 2, gMoveNames[move]); StringCopy(gDisplayedStringBattle + 2, gMoveNames[move]);
} }
else if (zmove == MOVE_EXTREME_EVOBOOST)
{
//damaging move -> status z move
StringCopy(gDisplayedStringBattle, sText_StatsPlus2);
BattlePutTextOnWindow(gDisplayedStringBattle, 5); //Slot of Move 3
StringCopy(gDisplayedStringBattle, GetZMoveName(zmove));
}
else else
{ {
ZMoveSelectionDisplayPower(move, zmove); ZMoveSelectionDisplayPower(move, zmove);
@ -524,3 +538,138 @@ const u8* GetZMoveName(u16 move)
return gZMoveNames[0]; //failsafe return gZMoveNames[0]; //failsafe
} }
#define Z_EFFECT_BS_LENGTH 3
// This function kinda cheats by setting a return battle script to after the setzeffect various command
// and then jumping to a z effect script
void SetZEffect(void)
{
u32 i;
gBattleStruct->zmove.zStatusActive = TRUE;
if (gBattleStruct->zmove.effect == Z_EFFECT_CURSE)
{
if (IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_GHOST))
gBattleStruct->zmove.effect = Z_EFFECT_RECOVER_HP;
else
gBattleStruct->zmove.effect = Z_EFFECT_ATK_UP_1;
}
gBattleScripting.battler = gBattlerAttacker;
switch (gBattleStruct->zmove.effect)
{
case Z_EFFECT_RESET_STATS:
for (i = 0; i < NUM_BATTLE_STATS - 1; i++)
{
if (gBattleMons[gBattlerAttacker].statStages[i] < DEFAULT_STAT_STAGE)
gBattleMons[gBattlerAttacker].statStages[i] = DEFAULT_STAT_STAGE;
}
gBattleCommunication[MULTISTRING_CHOOSER] = MULTISTRING_Z_RESET_STATS;
BattleScriptPush(gBattlescriptCurrInstr + Z_EFFECT_BS_LENGTH);
gBattlescriptCurrInstr = BattleScript_ZEffectPrintString - Z_EFFECT_BS_LENGTH;
break;
case Z_EFFECT_ALL_STATS_UP_1:
if (!AreMainStatsMaxed(gBattlerAttacker))
{
for (i = 0; i < STAT_ACC - 1; i++) //Doesn't increase Acc or Evsn
{
if (gBattleMons[gBattlerAttacker].statStages[i] < 12)
++gBattleMons[gBattlerAttacker].statStages[i];
}
gBattleCommunication[MULTISTRING_CHOOSER] = MULTISTRING_Z_ALL_STATS_UP;
BattleScriptPush(gBattlescriptCurrInstr + Z_EFFECT_BS_LENGTH);
gBattlescriptCurrInstr = BattleScript_ZEffectPrintString - Z_EFFECT_BS_LENGTH;
}
break;
case Z_EFFECT_BOOST_CRITS:
if (!(gBattleMons[gBattlerAttacker].status2 & STATUS2_FOCUS_ENERGY))
{
gBattleMons[gBattlerAttacker].status2 |= STATUS2_FOCUS_ENERGY;
gBattleCommunication[MULTISTRING_CHOOSER] = MULTISTRING_Z_BOOST_CRITS;
BattleScriptPush(gBattlescriptCurrInstr + Z_EFFECT_BS_LENGTH);
gBattlescriptCurrInstr = BattleScript_ZEffectPrintString - Z_EFFECT_BS_LENGTH;
}
break;
case Z_EFFECT_FOLLOW_ME:
gSideTimers[GetBattlerSide(gBattlerAttacker)].followmeTimer = 1;
gSideTimers[GetBattlerSide(gBattlerAttacker)].followmeTarget = gBattlerAttacker;
gBattleCommunication[MULTISTRING_CHOOSER] = MULTISTRING_Z_FOLLOW_ME;
BattleScriptPush(gBattlescriptCurrInstr + Z_EFFECT_BS_LENGTH);
gBattlescriptCurrInstr = BattleScript_ZEffectPrintString - Z_EFFECT_BS_LENGTH;
break;
case Z_EFFECT_RECOVER_HP:
if (gBattleMons[gBattlerAttacker].hp != gBattleMons[gBattlerAttacker].maxHP)
{
gBattleMoveDamage = (-1) * gBattleMons[gBattlerAttacker].maxHP;
gBattleCommunication[MULTISTRING_CHOOSER] = MULTISTRING_Z_RECOVER_HP;
BattleScriptPush(gBattlescriptCurrInstr + Z_EFFECT_BS_LENGTH);
gBattlescriptCurrInstr = BattleScript_RecoverHPZMove - Z_EFFECT_BS_LENGTH;
}
break;
case Z_EFFECT_RESTORE_REPLACEMENT_HP:
gBattleStruct->zmove.healReplacement = TRUE;
BattleScriptPush(gBattlescriptCurrInstr + Z_EFFECT_BS_LENGTH);
gBattleCommunication[MULTISTRING_CHOOSER] = MULTISTRING_Z_HP_TRAP;
gBattlescriptCurrInstr = BattleScript_ZEffectPrintString - Z_EFFECT_BS_LENGTH;
break;
case Z_EFFECT_ATK_UP_1:
case Z_EFFECT_DEF_UP_1:
case Z_EFFECT_SPD_UP_1:
case Z_EFFECT_SPATK_UP_1:
case Z_EFFECT_SPDEF_UP_1:
case Z_EFFECT_ACC_UP_1:
case Z_EFFECT_EVSN_UP_1:
SET_STATCHANGER(gBattleStruct->zmove.effect - Z_EFFECT_ATK_UP_1 + 1, 1, FALSE);
gBattleScripting.animArg1 = 0xE + (gBattleStruct->zmove.effect - Z_EFFECT_ATK_UP_1 + 1);
gBattleScripting.animArg2 = 0;
gBattleCommunication[MULTISTRING_CHOOSER] = MULTISTRING_Z_STAT_UP;
BattleScriptPush(gBattlescriptCurrInstr + Z_EFFECT_BS_LENGTH);
gBattlescriptCurrInstr = BattleScript_StatUpZMove - Z_EFFECT_BS_LENGTH;
break;
case Z_EFFECT_ATK_UP_2:
case Z_EFFECT_DEF_UP_2:
case Z_EFFECT_SPD_UP_2:
case Z_EFFECT_SPATK_UP_2:
case Z_EFFECT_SPDEF_UP_2:
case Z_EFFECT_ACC_UP_2:
case Z_EFFECT_EVSN_UP_2:
SET_STATCHANGER(gBattleStruct->zmove.effect - Z_EFFECT_ATK_UP_2 + 1, 2, FALSE);
gBattleScripting.animArg1 = 0xE + (gBattleStruct->zmove.effect - Z_EFFECT_ATK_UP_2 + 1);
gBattleScripting.animArg2 = 0;
gBattleCommunication[MULTISTRING_CHOOSER] = MULTISTRING_Z_STAT_UP;
BattleScriptPush(gBattlescriptCurrInstr + Z_EFFECT_BS_LENGTH);
gBattlescriptCurrInstr = BattleScript_StatUpZMove - Z_EFFECT_BS_LENGTH;
break;
case Z_EFFECT_ATK_UP_3:
case Z_EFFECT_DEF_UP_3:
case Z_EFFECT_SPD_UP_3:
case Z_EFFECT_SPATK_UP_3:
case Z_EFFECT_SPDEF_UP_3:
case Z_EFFECT_ACC_UP_3:
case Z_EFFECT_EVSN_UP_3:
SET_STATCHANGER(gBattleStruct->zmove.effect - Z_EFFECT_ATK_UP_3 + 1, 3, FALSE);
gBattleScripting.animArg1 = 0xE + (gBattleStruct->zmove.effect - Z_EFFECT_ATK_UP_3 + 1);
gBattleScripting.animArg2 = 0;
gBattleCommunication[MULTISTRING_CHOOSER] = MULTISTRING_Z_STAT_UP;
BattleScriptPush(gBattlescriptCurrInstr + Z_EFFECT_BS_LENGTH);
gBattlescriptCurrInstr = BattleScript_StatUpZMove - Z_EFFECT_BS_LENGTH;
break;
default:
gBattlescriptCurrInstr += 3;
break;
}
gBattleStruct->zmove.zStatusActive = FALSE;
}
#define STAT_STAGE(battler, stat) (gBattleMons[battler].statStages[stat - 1])
static bool32 AreMainStatsMaxed(u8 battlerId)
{
u32 i;
for (i = STAT_ATK; i <= STAT_SPDEF; i++)
{
if (STAT_STAGE(battlerId, i) < MAX_STAT_STAGE)
return FALSE;
}
return TRUE;
}

View File

@ -11132,7 +11132,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
}, },
[MOVE_10000000_VOLT_THUNDERBOLT] = [MOVE_10000000_VOLT_THUNDERBOLT] =
{ {
.effect = EFFECT_HIT,//TODO: EFFECT_HIGH_CRITICAL, .effect = EFFECT_HIT,
.power = 195, .power = 195,
.type = TYPE_ELECTRIC, .type = TYPE_ELECTRIC,
.accuracy = 0, .accuracy = 0,
@ -11140,14 +11140,14 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.secondaryEffectChance = 0, .secondaryEffectChance = 0,
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.flags = 0, .flags = FLAG_HIGH_CRIT,
.zMovePower = 0, .zMovePower = 0,
.split = SPLIT_SPECIAL, .split = SPLIT_SPECIAL,
.zMoveEffect = 0 .zMoveEffect = 0
}, },
[MOVE_STOKED_SPARKSURFER] = [MOVE_STOKED_SPARKSURFER] =
{ {
.effect = EFFECT_HIT, //EFFECT_PARALYZE_HIT, .effect = EFFECT_PARALYZE_HIT,
.power = 175, .power = 175,
.type = TYPE_ELECTRIC, .type = TYPE_ELECTRIC,
.accuracy = 0, .accuracy = 0,
@ -11162,7 +11162,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
}, },
[MOVE_EXTREME_EVOBOOST] = [MOVE_EXTREME_EVOBOOST] =
{ {
.effect = EFFECT_HIT,//TODO: EFFECT_EXTREME_EVOBOOST, .effect = EFFECT_EXTREME_EVOBOOST,
.power = 0, .power = 0,
.type = TYPE_NORMAL, .type = TYPE_NORMAL,
.accuracy = 0, .accuracy = 0,
@ -11192,7 +11192,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
}, },
[MOVE_GENESIS_SUPERNOVA] = [MOVE_GENESIS_SUPERNOVA] =
{ {
.effect = EFFECT_HIT,//TODO: EFFECT_DAMAGE_SET_TERRAIN, .effect = EFFECT_DAMAGE_SET_TERRAIN,
.power = 185, .power = 185,
.type = TYPE_PSYCHIC, .type = TYPE_PSYCHIC,
.accuracy = 0, .accuracy = 0,
@ -11203,6 +11203,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.flags = 0, .flags = 0,
.zMovePower = 0, .zMovePower = 0,
.split = SPLIT_SPECIAL, .split = SPLIT_SPECIAL,
.argument = 0, //psychic terrain
.zMoveEffect = 0 .zMoveEffect = 0
}, },
[MOVE_SINISTER_ARROW_RAID] = [MOVE_SINISTER_ARROW_RAID] =
@ -11252,7 +11253,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
}, },
[MOVE_SPLINTERED_STORMSHARDS] = [MOVE_SPLINTERED_STORMSHARDS] =
{ {
.effect = EFFECT_HIT, //TODO removes terrain .effect = EFFECT_DAMAGE_SET_TERRAIN,
.power = 190, .power = 190,
.type = TYPE_ROCK, .type = TYPE_ROCK,
.accuracy = 0, .accuracy = 0,
@ -11263,6 +11264,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.flags = 0, .flags = 0,
.zMovePower = 0, .zMovePower = 0,
.split = SPLIT_PHYSICAL, .split = SPLIT_PHYSICAL,
.argument = 1, //remove terrain
.zMoveEffect = 0 .zMoveEffect = 0
}, },
[MOVE_LETS_SNUGGLE_FOREVER] = [MOVE_LETS_SNUGGLE_FOREVER] =
@ -11282,7 +11284,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
}, },
[MOVE_CLANGOROUS_SOULBLAZE] = [MOVE_CLANGOROUS_SOULBLAZE] =
{ {
.effect = EFFECT_HIT,//TODO: EFFECT_ALL_STATS_UP_HIT, .effect = EFFECT_ALL_STATS_UP_HIT,
.power = 185, .power = 185,
.type = TYPE_DRAGON, .type = TYPE_DRAGON,
.accuracy = 0, .accuracy = 0,
@ -11297,7 +11299,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
}, },
[MOVE_GUARDIAN_OF_ALOLA] = [MOVE_GUARDIAN_OF_ALOLA] =
{ {
.effect = EFFECT_HIT,//TODO: EFFECT_SUPER_FANG, .effect = EFFECT_SUPER_FANG,
.power = 1, .power = 1,
.type = TYPE_FAIRY, .type = TYPE_FAIRY,
.accuracy = 0, .accuracy = 0,

View File

@ -4885,18 +4885,548 @@ const struct Item gItems[] =
.secondaryId = 0, .secondaryId = 0,
}, },
//TEST [ITEM_NORMALIUM_Z] =
{
.name = _("Normalium Z"),
.itemId = ITEM_NORMALIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = TYPE_NORMAL
},
[ITEM_FIGHTINIUM_Z] =
{
.name = _("Fightinium Z"),
.itemId = ITEM_FIGHTINIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = TYPE_FIGHTING
},
[ITEM_FLYINIUM_Z] =
{
.name = _("Flyinium Z"),
.itemId = ITEM_FLYINIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = TYPE_FLYING
},
[ITEM_POISONIUM_Z] =
{
.name = _("Poisinium Z"),
.itemId = ITEM_POISONIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = TYPE_POISON
},
[ITEM_GROUNDIUM_Z] =
{
.name = _("Groundium Z"),
.itemId = ITEM_GROUNDIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = TYPE_GROUND
},
[ITEM_ROCKIUM_Z] =
{
.name = _("Rockium Z"),
.itemId = ITEM_ROCKIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = TYPE_ROCK
},
[ITEM_BUGINIUM_Z] =
{
.name = _("Buginium Z"),
.itemId = ITEM_BUGINIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = TYPE_BUG
},
[ITEM_GHOSTIUM_Z] =
{
.name = _("Ghostium Z"),
.itemId = ITEM_GHOSTIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = TYPE_GHOST
},
[ITEM_STEELIUM_Z] =
{
.name = _("Steelium Z"),
.itemId = ITEM_STEELIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = TYPE_STEEL
},
[ITEM_FIRIUM_Z] =
{
.name = _("Firium Z"),
.itemId = ITEM_FIRIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = TYPE_FIRE
},
[ITEM_WATERIUM_Z] =
{
.name = _("Waterium Z"),
.itemId = ITEM_WATERIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = TYPE_WATER
},
[ITEM_GRASSIUM_Z] =
{
.name = _("Grassium Z"),
.itemId = ITEM_GRASSIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = TYPE_GRASS
},
[ITEM_ELECTRIUM_Z] =
{
.name = _("Electrium Z"),
.itemId = ITEM_ELECTRIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = TYPE_ELECTRIC
},
[ITEM_PSYCHIUM_Z] =
{
.name = _("Psychium Z"),
.itemId = ITEM_PSYCHIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = TYPE_PSYCHIC
},
[ITEM_ICIUM_Z] =
{
.name = _("Icium Z"),
.itemId = ITEM_ICIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = TYPE_ICE
},
[ITEM_DRAGONIUM_Z] =
{
.name = _("Dragonium Z"),
.itemId = ITEM_DRAGONIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = TYPE_DRAGON
},
[ITEM_DARKINIUM_Z] = [ITEM_DARKINIUM_Z] =
{ {
.name = _("Darkinium Z"), .name = _("Darkinium Z"),
.itemId = ITEM_DARKINIUM_Z, .itemId = ITEM_DARKINIUM_Z,
.price = 0, .price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc, .description = sDummyDesc,
.importance = 1, .importance = 0,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_ITEMS,
.holdEffectParam = TYPE_DARK,
.type = 4, .type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = TYPE_DARK
},
[ITEM_FAIRIUM_Z] =
{
.name = _("Fairium Z"),
.itemId = ITEM_FAIRIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL, .holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = TYPE_FAIRY
},
[ITEM_ALORAICHIUM_Z] =
{
.name = _("Aloraichium Z"),
.itemId = ITEM_ALORAICHIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = 255 // signature z move
},
[ITEM_DECIDIUM_Z] =
{
.name = _("Decidium Z"),
.itemId = ITEM_DECIDIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = 255 // signature z move
},
[ITEM_EEVIUM_Z] =
{
.name = _("Eevium Z"),
.itemId = ITEM_EEVIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = 255 // signature z move
},
[ITEM_INCINIUM_Z] =
{
.name = _("Incinium Z"),
.itemId = ITEM_INCINIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = 255 // signature z move
},
[ITEM_KOMMONIUM_Z] =
{
.name = _("Kommonium Z"),
.itemId = ITEM_KOMMONIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = 255 // signature z move
},
[ITEM_LUNALIUM_Z] =
{
.name = _("Lunalium Z"),
.itemId = ITEM_LUNALIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = 255 // signature z move
},
[ITEM_LYCANIUM_Z] =
{
.name = _("Lycanium Z"),
.itemId = ITEM_LYCANIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = 255 // signature z move
},
[ITEM_MARSHADIUM_Z] =
{
.name = _("Marshadium Z"),
.itemId = ITEM_MARSHADIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = 255 // signature z move
},
[ITEM_MEWNIUM_Z] =
{
.name = _("Mewnium Z"),
.itemId = ITEM_MEWNIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = 255 // signature z move
},
[ITEM_MIMIKIUM_Z] =
{
.name = _("Mimikium Z"),
.itemId = ITEM_MIMIKIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = 255 // signature z move
},
[ITEM_PIKANIUM_Z] =
{
.name = _("Pikanium Z"),
.itemId = ITEM_PIKANIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = 255 // signature z move
},
[ITEM_PIKASHUNIUM_Z] =
{
.name = _("Pikashunium Z"),
.itemId = ITEM_PIKASHUNIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = 255 // signature z move
},
[ITEM_PRIMARIUM_Z] =
{
.name = _("Primarium Z"),
.itemId = ITEM_PRIMARIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = 255 // signature z move
},
[ITEM_SNORLIUM_Z] =
{
.name = _("Snorlium Z"),
.itemId = ITEM_SNORLIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = 255 // signature z move
},
[ITEM_SOLGANIUM_Z] =
{
.name = _("Solganium Z"),
.itemId = ITEM_SOLGANIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = 255 // signature z move
},
[ITEM_TAPUNIUM_Z] =
{
.name = _("Tapunium Z"),
.itemId = ITEM_TAPUNIUM_Z,
.price = 0,
.holdEffect = HOLD_EFFECT_Z_CRYSTAL,
.holdEffectParam = 0,
.description = sDummyDesc,
.importance = 0,
.pocket = POCKET_ITEMS,
.type = 4,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.battleUsage = 0,
.battleUseFunc = NULL,
.secondaryId = 255 //signature z move
}, },
}; };

View File

@ -440,7 +440,7 @@ static const struct LevelUpMove sPikachuLevelUpLearnset[] = {
LEVEL_UP_MOVE( 5, MOVE_GROWL), LEVEL_UP_MOVE( 5, MOVE_GROWL),
LEVEL_UP_MOVE( 7, MOVE_PLAY_NICE), LEVEL_UP_MOVE( 7, MOVE_PLAY_NICE),
LEVEL_UP_MOVE(10, MOVE_QUICK_ATTACK), LEVEL_UP_MOVE(10, MOVE_QUICK_ATTACK),
LEVEL_UP_MOVE(13, MOVE_ELECTRO_BALL), LEVEL_UP_MOVE(13, MOVE_VOLT_TACKLE),
LEVEL_UP_MOVE(18, MOVE_THUNDER_WAVE), LEVEL_UP_MOVE(18, MOVE_THUNDER_WAVE),
LEVEL_UP_MOVE(21, MOVE_FEINT), LEVEL_UP_MOVE(21, MOVE_FEINT),
LEVEL_UP_MOVE(23, MOVE_DOUBLE_TEAM), LEVEL_UP_MOVE(23, MOVE_DOUBLE_TEAM),