Review changes
This commit is contained in:
@@ -1933,9 +1933,9 @@
|
||||
.endm
|
||||
|
||||
@ Creates a Pokémon with the modernFatefulEncounter bit set for an encounter
|
||||
.macro setmodernfatefulencountermon species:req, level:req, item=ITEM_NONE
|
||||
.macro seteventmon species:req, level:req, item=ITEM_NONE
|
||||
setvar VAR_0x8004, \species
|
||||
setvar VAR_0x8005, \level
|
||||
setvar VAR_0x8006, \item
|
||||
special CreateModernFatefulEncounterEnemyMon
|
||||
special CreateEnemyEventMon
|
||||
.endm
|
||||
|
||||
@@ -85,7 +85,7 @@ BirthIsland_Exterior_EventScript_Deoxys::
|
||||
delay 40
|
||||
waitmoncry
|
||||
setvar VAR_LAST_TALKED, LOCALID_DEOXYS
|
||||
setmodernfatefulencountermon SPECIES_DEOXYS, 30
|
||||
seteventmon SPECIES_DEOXYS, 30
|
||||
setflag FLAG_SYS_CTRL_OBJ_DELETE
|
||||
special BattleSetup_StartLegendaryBattle
|
||||
waitstate
|
||||
|
||||
@@ -129,7 +129,7 @@ FarawayIsland_Interior_EventScript_Mew::
|
||||
special DestroyMewEmergingGrassSprite
|
||||
delay 40
|
||||
waitmoncry
|
||||
setmodernfatefulencountermon SPECIES_MEW, 30
|
||||
seteventmon SPECIES_MEW, 30
|
||||
setflag FLAG_SYS_CTRL_OBJ_DELETE
|
||||
special BattleSetup_StartLegendaryBattle
|
||||
waitstate
|
||||
|
||||
@@ -53,7 +53,7 @@ NavelRock_Bottom_EventScript_Lugia::
|
||||
playmoncry SPECIES_LUGIA, CRY_MODE_ENCOUNTER
|
||||
waitmoncry
|
||||
delay 20
|
||||
setmodernfatefulencountermon SPECIES_LUGIA, 70
|
||||
seteventmon SPECIES_LUGIA, 70
|
||||
setflag FLAG_SYS_CTRL_OBJ_DELETE
|
||||
special BattleSetup_StartLegendaryBattle
|
||||
waitstate
|
||||
|
||||
@@ -57,7 +57,7 @@ NavelRock_Top_EventScript_HoOh::
|
||||
applymovement LOCALID_HO_OH, NavelRock_Top_Movement_HoOhApproach
|
||||
waitmovement 0
|
||||
special RemoveCameraObject
|
||||
setmodernfatefulencountermon SPECIES_HO_OH, 70
|
||||
seteventmon SPECIES_HO_OH, 70
|
||||
setflag FLAG_SYS_CTRL_OBJ_DELETE
|
||||
special BattleSetup_StartLegendaryBattle
|
||||
waitstate
|
||||
|
||||
@@ -105,11 +105,11 @@ SouthernIsland_Interior_EventScript_Sign::
|
||||
end
|
||||
|
||||
SouthernIsland_Interior_EventScript_SetLatiosBattleVars::
|
||||
setmodernfatefulencountermon SPECIES_LATIOS, 50, ITEM_SOUL_DEW
|
||||
seteventmon SPECIES_LATIOS, 50, ITEM_SOUL_DEW
|
||||
return
|
||||
|
||||
SouthernIsland_Interior_EventScript_SetLatiasBattleVars::
|
||||
setmodernfatefulencountermon SPECIES_LATIAS, 50, ITEM_SOUL_DEW
|
||||
seteventmon SPECIES_LATIAS, 50, ITEM_SOUL_DEW
|
||||
return
|
||||
|
||||
SouthernIsland_Interior_Movement_CameraPanUp:
|
||||
|
||||
+1
-1
@@ -490,7 +490,7 @@ gSpecials::
|
||||
def_special ScrollableMultichoice_ClosePersistentMenu
|
||||
def_special DoDeoxysRockInteraction
|
||||
def_special SetDeoxysRockPalette
|
||||
def_special CreateModernFatefulEncounterEnemyMon
|
||||
def_special CreateEnemyEventMon
|
||||
def_special StartMirageTowerDisintegration
|
||||
def_special StartMirageTowerShake
|
||||
def_special StartMirageTowerFossilFallAndSink
|
||||
|
||||
+2
-3
@@ -85,7 +85,7 @@ enum {
|
||||
MON_DATA_EARTH_RIBBON,
|
||||
MON_DATA_WORLD_RIBBON,
|
||||
MON_DATA_UNUSED_RIBBONS,
|
||||
MON_DATA_FATEFUL_ENCOUNTER,
|
||||
MON_DATA_MODERN_FATEFUL_ENCOUNTER,
|
||||
MON_DATA_KNOWN_MOVES,
|
||||
MON_DATA_RIBBON_COUNT,
|
||||
MON_DATA_RIBBONS,
|
||||
@@ -408,12 +408,11 @@ void CreateBattleTowerMon_HandleLevel(struct Pokemon *mon, struct BattleTowerPok
|
||||
void CreateApprenticeMon(struct Pokemon *mon, const struct Apprentice *src, u8 monId);
|
||||
void CreateMonWithEVSpreadNatureOTID(struct Pokemon *mon, u16 species, u8 level, u8 nature, u8 fixedIV, u8 evSpread, u32 otId);
|
||||
void ConvertPokemonToBattleTowerPokemon(struct Pokemon *mon, struct BattleTowerPokemon *dest);
|
||||
void CreateModernFatefulEncounterMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId);
|
||||
bool8 ShouldIgnoreDeoxysForm(u8 caseId, u8 battlerId);
|
||||
void SetDeoxysStats(void);
|
||||
u16 GetUnionRoomTrainerPic(void);
|
||||
u16 GetUnionRoomTrainerClass(void);
|
||||
void CreateModernFatefulEncounterEnemyMon(void);
|
||||
void CreateEnemyEventMon(void);
|
||||
void CalculateMonStats(struct Pokemon *mon);
|
||||
void BoxMonToMon(const struct BoxPokemon *src, struct Pokemon *dest);
|
||||
u8 GetLevelFromMonExp(struct Pokemon *mon);
|
||||
|
||||
+1
-1
@@ -3892,7 +3892,7 @@ static bool32 IsBattlerModernFatefulEncounter(u8 battlerId)
|
||||
if (GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES, NULL) != SPECIES_DEOXYS
|
||||
&& GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES, NULL) != SPECIES_MEW)
|
||||
return TRUE;
|
||||
return GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_FATEFUL_ENCOUNTER, NULL);
|
||||
return GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_MODERN_FATEFUL_ENCOUNTER, NULL);
|
||||
}
|
||||
|
||||
u8 IsMonDisobedient(void)
|
||||
|
||||
+2
-2
@@ -332,7 +332,7 @@ static void CreateHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
|
||||
gameMet = GetMonData(egg, MON_DATA_MET_GAME);
|
||||
markings = GetMonData(egg, MON_DATA_MARKINGS);
|
||||
pokerus = GetMonData(egg, MON_DATA_POKERUS);
|
||||
isModernFatefulEncounter = GetMonData(egg, MON_DATA_FATEFUL_ENCOUNTER);
|
||||
isModernFatefulEncounter = GetMonData(egg, MON_DATA_MODERN_FATEFUL_ENCOUNTER);
|
||||
|
||||
CreateMon(temp, species, EGG_HATCH_LEVEL, USE_RANDOM_IVS, TRUE, personality, OT_ID_PLAYER_ID, 0);
|
||||
|
||||
@@ -350,7 +350,7 @@ static void CreateHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
|
||||
friendship = 120;
|
||||
SetMonData(temp, MON_DATA_FRIENDSHIP, &friendship);
|
||||
SetMonData(temp, MON_DATA_POKERUS, &pokerus);
|
||||
SetMonData(temp, MON_DATA_FATEFUL_ENCOUNTER, &isModernFatefulEncounter);
|
||||
SetMonData(temp, MON_DATA_MODERN_FATEFUL_ENCOUNTER, &isModernFatefulEncounter);
|
||||
|
||||
*egg = *temp;
|
||||
}
|
||||
|
||||
+2
-2
@@ -3591,7 +3591,7 @@ static void CursorCb_Register(u8 taskId)
|
||||
{
|
||||
u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES2);
|
||||
u16 species = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES);
|
||||
u8 isModernFatefulEncounter = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_FATEFUL_ENCOUNTER);
|
||||
u8 isModernFatefulEncounter = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MODERN_FATEFUL_ENCOUNTER);
|
||||
|
||||
switch (CanRegisterMonForTradingBoard(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), species2, species, isModernFatefulEncounter))
|
||||
{
|
||||
@@ -3618,7 +3618,7 @@ static void CursorCb_Trade1(u8 taskId)
|
||||
{
|
||||
u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES2);
|
||||
u16 species = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES);
|
||||
u8 isModernFatefulEncounter = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_FATEFUL_ENCOUNTER);
|
||||
u8 isModernFatefulEncounter = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MODERN_FATEFUL_ENCOUNTER);
|
||||
u32 stringId = GetUnionRoomTradeMessageId(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), gRfuPartnerCompatibilityData, species2, gUnionRoomOfferedSpecies, gUnionRoomRequestedMonType, species, isModernFatefulEncounter);
|
||||
|
||||
if (stringId != UR_TRADE_MSG_NONE)
|
||||
|
||||
+6
-6
@@ -2623,12 +2623,12 @@ void ConvertPokemonToBattleTowerPokemon(struct Pokemon *mon, struct BattleTowerP
|
||||
GetMonData(mon, MON_DATA_NICKNAME, dest->nickname);
|
||||
}
|
||||
|
||||
void CreateModernFatefulEncounterMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId)
|
||||
static void CreateEventMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId)
|
||||
{
|
||||
bool32 isModernFatefulEncounter = TRUE;
|
||||
|
||||
CreateMon(mon, species, level, fixedIV, hasFixedPersonality, fixedPersonality, otIdType, fixedOtId);
|
||||
SetMonData(mon, MON_DATA_FATEFUL_ENCOUNTER, &isModernFatefulEncounter);
|
||||
SetMonData(mon, MON_DATA_MODERN_FATEFUL_ENCOUNTER, &isModernFatefulEncounter);
|
||||
}
|
||||
|
||||
// If FALSE, should load this game's Deoxys form. If TRUE, should load normal Deoxys form
|
||||
@@ -2763,14 +2763,14 @@ u16 GetUnionRoomTrainerClass(void)
|
||||
return gFacilityClassToTrainerClass[gUnionRoomFacilityClasses[arrId]];
|
||||
}
|
||||
|
||||
void CreateModernFatefulEncounterEnemyMon(void)
|
||||
void CreateEnemyEventMon(void)
|
||||
{
|
||||
s32 species = gSpecialVar_0x8004;
|
||||
s32 level = gSpecialVar_0x8005;
|
||||
s32 itemId = gSpecialVar_0x8006;
|
||||
|
||||
ZeroEnemyPartyMons();
|
||||
CreateModernFatefulEncounterMon(&gEnemyParty[0], species, level, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0);
|
||||
CreateEventMon(&gEnemyParty[0], species, level, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0);
|
||||
if (itemId)
|
||||
{
|
||||
u8 heldItem[2];
|
||||
@@ -3957,7 +3957,7 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data)
|
||||
case MON_DATA_UNUSED_RIBBONS:
|
||||
retVal = substruct3->unusedRibbons;
|
||||
break;
|
||||
case MON_DATA_FATEFUL_ENCOUNTER:
|
||||
case MON_DATA_MODERN_FATEFUL_ENCOUNTER:
|
||||
retVal = substruct3->modernFatefulEncounter;
|
||||
break;
|
||||
case MON_DATA_SPECIES2:
|
||||
@@ -4341,7 +4341,7 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg)
|
||||
case MON_DATA_UNUSED_RIBBONS:
|
||||
SET8(substruct3->unusedRibbons);
|
||||
break;
|
||||
case MON_DATA_FATEFUL_ENCOUNTER:
|
||||
case MON_DATA_MODERN_FATEFUL_ENCOUNTER:
|
||||
SET8(substruct3->modernFatefulEncounter);
|
||||
break;
|
||||
case MON_DATA_IVS:
|
||||
|
||||
+2
-2
@@ -2212,7 +2212,7 @@ bool8 ScrCmd_setmonmodernfatefulencounter(struct ScriptContext *ctx)
|
||||
bool8 isModernFatefulEncounter = TRUE;
|
||||
u16 partyIndex = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
SetMonData(&gPlayerParty[partyIndex], MON_DATA_FATEFUL_ENCOUNTER, &isModernFatefulEncounter);
|
||||
SetMonData(&gPlayerParty[partyIndex], MON_DATA_MODERN_FATEFUL_ENCOUNTER, &isModernFatefulEncounter);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2220,7 +2220,7 @@ bool8 ScrCmd_checkmonmodernfatefulencounter(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 partyIndex = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gSpecialVar_Result = GetMonData(&gPlayerParty[partyIndex], MON_DATA_FATEFUL_ENCOUNTER, NULL);
|
||||
gSpecialVar_Result = GetMonData(&gPlayerParty[partyIndex], MON_DATA_MODERN_FATEFUL_ENCOUNTER, NULL);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1577,7 +1577,7 @@ static u8 CheckValidityOfTradeMons(u8 *aliveMons, u8 playerPartyCount, u8 player
|
||||
// Partner cant trade illegitimate Deoxys or Mew
|
||||
if (partnerSpecies == SPECIES_DEOXYS || partnerSpecies == SPECIES_MEW)
|
||||
{
|
||||
if (!GetMonData(&gEnemyParty[partnerMonIdx], MON_DATA_FATEFUL_ENCOUNTER))
|
||||
if (!GetMonData(&gEnemyParty[partnerMonIdx], MON_DATA_MODERN_FATEFUL_ENCOUNTER))
|
||||
return PARTNER_MON_INVALID;
|
||||
}
|
||||
|
||||
@@ -2426,7 +2426,7 @@ static u32 CanTradeSelectedMon(struct Pokemon *playerParty, int partyCount, int
|
||||
|
||||
if (species[monIdx] == SPECIES_DEOXYS || species[monIdx] == SPECIES_MEW)
|
||||
{
|
||||
if (!GetMonData(&playerParty[monIdx], MON_DATA_FATEFUL_ENCOUNTER))
|
||||
if (!GetMonData(&playerParty[monIdx], MON_DATA_MODERN_FATEFUL_ENCOUNTER))
|
||||
return CANT_TRADE_INVALID_MON;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user