tidy up z move code

This commit is contained in:
Evan 2020-12-01 16:36:44 -05:00
parent 2bfc7ea9b1
commit 25abdeacc5
12 changed files with 2142 additions and 862 deletions

View file

@ -429,21 +429,21 @@ struct Illusion
struct ZMoveData
{
/*0x00*/ u8 viable:1; // current move can become a z move
u8 viewing:1; // if player is viewing the z move name instead of regular moves
u8 active:1; // is z move being used this turn
u8 zStatusActive:1;
u8 healReplacement:1;
u8 activeSplit:2; // active z move split
u8 zUnused:1;
/*0x01*/ u8 triggerSpriteId;
/*0x02*/ u8 possibleZMoves[MAX_BATTLERS_COUNT];
/*0x02*/ u16 chosenZMove; // z move of move cursor is on
u8 effect;
u8 used[MAX_BATTLERS_COUNT]; //one per bank for multi-battles
u16 toBeUsed[MAX_BATTLERS_COUNT]; // z moves per battler to be used
u16 baseMoves[MAX_BATTLERS_COUNT];
u8 splits[MAX_BATTLERS_COUNT];
u8 viable:1; // current move can become a z move
u8 viewing:1; // if player is viewing the z move name instead of regular moves
u8 active:1; // is z move being used this turn
u8 zStatusActive:1;
u8 healReplacement:1;
u8 activeSplit:2; // active z move split
u8 zUnused:1;
u8 triggerSpriteId;
u8 possibleZMoves[MAX_BATTLERS_COUNT];
u16 chosenZMove; // z move of move cursor is on
u8 effect;
u8 used[MAX_BATTLERS_COUNT]; //one per bank for multi-battles
u16 toBeUsed[MAX_BATTLERS_COUNT]; // z moves per battler to be used
u16 baseMoves[MAX_BATTLERS_COUNT];
u8 splits[MAX_BATTLERS_COUNT];
};
struct BattleStruct
@ -745,7 +745,7 @@ extern u16 gBattle_WIN1V;
extern u8 gDisplayedStringBattle[400];
extern u8 gBattleTextBuff1[TEXT_BUFF_ARRAY_COUNT];
extern u8 gBattleTextBuff2[TEXT_BUFF_ARRAY_COUNT];
extern u8 gBattleTextBuff3[TEXT_BUFF_ARRAY_COUNT];
extern u8 gBattleTextBuff3[30]; //to handle stupidly large z move names
extern u32 gBattleTypeFlags;
extern u8 gBattleTerrain;
extern u32 gUnknown_02022FF4;

View file

@ -23,6 +23,5 @@ void RecordAbilityBattle(u8 battlerId, u16 abilityId);
void ClearBattlerAbilityHistory(u8 battlerId);
void RecordItemEffectBattle(u8 battlerId, u8 itemEffect);
void ClearBattlerItemEffectHistory(u8 battlerId);
bool32 HasMoveWithSplit(u32 battler, u32 split);
#endif // GUARD_BATTLE_AI_SCRIPT_COMMANDS_H

View file

@ -1,7 +1,7 @@
#ifndef GUARD_BATTLE_MESSAGE_H
#define GUARD_BATTLE_MESSAGE_H
#define TEXT_BUFF_ARRAY_COUNT 20 //expanded for z move names
#define TEXT_BUFF_ARRAY_COUNT 16
// for 0xFD
#define B_TXT_BUFF1 0x0

View file

@ -464,47 +464,7 @@
#define ITEM_MAGMA_EMBLEM 375
#define ITEM_OLD_SEA_MAP 376
#define ITEM_NORMALIUM_Z 568
#define ITEM_FIGHTINIUM_Z 569
#define ITEM_FLYINIUM_Z 570
#define ITEM_POISONIUM_Z 571
#define ITEM_GROUNDIUM_Z 572
#define ITEM_ROCKIUM_Z 573
#define ITEM_BUGINIUM_Z 574
#define ITEM_GHOSTIUM_Z 575
#define ITEM_STEELIUM_Z 576
#define ITEM_FIRIUM_Z 577
#define ITEM_WATERIUM_Z 578
#define ITEM_GRASSIUM_Z 579
#define ITEM_ELECTRIUM_Z 580
#define ITEM_PSYCHIUM_Z 581
#define ITEM_ICIUM_Z 582
#define ITEM_DRAGONIUM_Z 583
#define ITEM_DARKINIUM_Z 584
#define ITEM_FAIRIUM_Z 585
#define ITEM_ALORAICHIUM_Z 586
#define ITEM_DECIDIUM_Z 587
#define ITEM_EEVIUM_Z 588
#define ITEM_INCINIUM_Z 589
#define ITEM_KOMMONIUM_Z 590
#define ITEM_LUNALIUM_Z 591
#define ITEM_LYCANIUM_Z 592
#define ITEM_MARSHADIUM_Z 593
#define ITEM_MEWNIUM_Z 594
#define ITEM_MIMIKIUM_Z 595
#define ITEM_PIKANIUM_Z 596
#define ITEM_PIKASHUNIUM_Z 597
#define ITEM_PRIMARIUM_Z 598
#define ITEM_SNORLIUM_Z 599
#define ITEM_SOLGANIUM_Z 600
#define ITEM_TAPUNIUM_Z 601
#define ITEMS_COUNT 602
#define ITEMS_COUNT 377
#define ITEM_FIELD_ARROW ITEMS_COUNT
#define FIRST_BERRY_INDEX ITEM_CHERI_BERRY

View file

@ -87,7 +87,7 @@ SECTIONS {
src/battle_bg.o(.text);
src/battle_main.o(.text);
src/battle_util.o(.text);
src/battle_z_move.o(.text);
src/battle_z_move.o(.text);
src/battle_script_commands.o(.text);
src/battle_util2.o(.text);
src/battle_controller_player.o(.text);
@ -475,7 +475,7 @@ SECTIONS {
src/battle_bg.o(.rodata);
src/battle_main.o(.rodata);
src/battle_util.o(.rodata);
src/battle_z_move.o(.rodata);
src/battle_z_move.o(.rodata);
src/battle_script_commands.o(.rodata);
src/battle_controller_player.o(.rodata);
src/battle_anim_smokescreen.o(.rodata);

View file

@ -2610,7 +2610,7 @@ static u16 *GetMovesArray(u32 battler)
return gBattleResources->battleHistory->usedMoves[battler];
}
bool32 HasMoveWithSplit(u32 battler, u32 split)
static bool32 HasMoveWithSplit(u32 battler, u32 split)
{
s32 i;
u16 *moves = GetMovesArray(battler);

View file

@ -134,7 +134,7 @@ EWRAM_DATA u16 gBattle_WIN1V = 0;
EWRAM_DATA u8 gDisplayedStringBattle[400] = {0};
EWRAM_DATA u8 gBattleTextBuff1[TEXT_BUFF_ARRAY_COUNT] = {0};
EWRAM_DATA u8 gBattleTextBuff2[TEXT_BUFF_ARRAY_COUNT] = {0};
EWRAM_DATA u8 gBattleTextBuff3[TEXT_BUFF_ARRAY_COUNT] = {0};
EWRAM_DATA u8 gBattleTextBuff3[30] = {0}; //expanded for stupidly long z move names
EWRAM_DATA u32 gBattleTypeFlags = 0;
EWRAM_DATA u8 gBattleTerrain = 0;
EWRAM_DATA u32 gUnknown_02022FF4 = 0;

View file

@ -160,17 +160,8 @@ bool32 IsViableZMove(u8 battlerId, u16 move)
if (gBattleStruct->zmove.used[battlerId])
return FALSE;
// Gets mon data
species = gBattleMons[battlerId].species;
item = gBattleMons[battlerId].item;
/*if (GetBattlerSide(battlerId) == B_SIDE_OPPONENT)
mon = &gEnemyParty[gBattlerPartyIndexes[battlerId]];
else
mon = &gPlayerParty[gBattlerPartyIndexes[battlerId]];
species = GetMonData(mon, MON_DATA_SPECIES);
item = GetMonData(mon, MON_DATA_HELD_ITEM);*/
if (gBattleTypeFlags & (BATTLE_TYPE_SAFARI | BATTLE_TYPE_WALLY_TUTORIAL | BATTLE_TYPE_FRONTIER))
return FALSE;

File diff suppressed because it is too large Load diff

View file

@ -4884,549 +4884,4 @@ const struct Item gItems[] =
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.secondaryId = 0,
},
[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] =
{
.name = _("Darkinium Z"),
.itemId = ITEM_DARKINIUM_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_DARK
},
[ITEM_FAIRIUM_Z] =
{
.name = _("Fairium Z"),
.itemId = ITEM_FAIRIUM_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_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

@ -429,18 +429,16 @@ static const struct TrainerMonNoItemCustomMoves sParty_Felix[] = {
}
};
static const struct TrainerMonItemDefaultMoves sParty_Violet[] = {
static const struct TrainerMonNoItemDefaultMoves sParty_Violet[] = {
{
.iv = 0,
.lvl = 45,
.lvl = 26,
.species = SPECIES_ROSELIA,
.heldItem = ITEM_GRASSIUM_Z,
},
{
.iv = 0,
.lvl = 40,
.lvl = 26,
.species = SPECIES_GLOOM,
.heldItem = 0,
}
};

View file

@ -547,7 +547,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_VIOLET] =
{
.partyFlags = F_TRAINER_PARTY_HELD_ITEM,
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_AROMA_LADY,
.encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE,
.trainerPic = TRAINER_PIC_AROMA_LADY,
@ -556,7 +556,7 @@ const struct Trainer gTrainers[] = {
.doubleBattle = FALSE,
.aiFlags = AI_SCRIPT_CHECK_BAD_MOVE,
.partySize = ARRAY_COUNT(sParty_Violet),
.party = {.ItemDefaultMoves = sParty_Violet},
.party = {.NoItemDefaultMoves = sParty_Violet},
},
[TRAINER_ROSE_2] =