Updated term to modernFatefulEncounter
This commit is contained in:
@@ -3885,7 +3885,7 @@ u8 GetMoveTarget(u16 move, u8 setTarget)
|
||||
return targetBattler;
|
||||
}
|
||||
|
||||
static bool32 IsBattlerFatefulEncounter(u8 battlerId)
|
||||
static bool32 IsBattlerModernFatefulEncounter(u8 battlerId)
|
||||
{
|
||||
if (GetBattlerSide(battlerId) == B_SIDE_OPPONENT)
|
||||
return TRUE;
|
||||
@@ -3906,7 +3906,7 @@ u8 IsMonDisobedient(void)
|
||||
if (GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT)
|
||||
return 0;
|
||||
|
||||
if (IsBattlerFatefulEncounter(gBattlerAttacker)) // only false if illegal Mew or Deoxys
|
||||
if (IsBattlerModernFatefulEncounter(gBattlerAttacker)) // only false if illegal Mew or Deoxys
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && GetBattlerPosition(gBattlerAttacker) == 2)
|
||||
return 0;
|
||||
|
||||
@@ -313,7 +313,7 @@ static void CreateHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
|
||||
{
|
||||
u16 species;
|
||||
u32 personality, pokerus;
|
||||
u8 i, friendship, language, gameMet, markings, isFatefulEncounter;
|
||||
u8 i, friendship, language, gameMet, markings, isModernFatefulEncounter;
|
||||
u16 moves[MAX_MON_MOVES];
|
||||
u32 ivs[NUM_STATS];
|
||||
|
||||
@@ -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);
|
||||
isFatefulEncounter = GetMonData(egg, MON_DATA_FATEFUL_ENCOUNTER);
|
||||
isModernFatefulEncounter = GetMonData(egg, MON_DATA_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, &isFatefulEncounter);
|
||||
SetMonData(temp, MON_DATA_FATEFUL_ENCOUNTER, &isModernFatefulEncounter);
|
||||
|
||||
*egg = *temp;
|
||||
}
|
||||
|
||||
@@ -3591,9 +3591,9 @@ 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 isFatefulEncounter = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_FATEFUL_ENCOUNTER);
|
||||
u8 isModernFatefulEncounter = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_FATEFUL_ENCOUNTER);
|
||||
|
||||
switch (CanRegisterMonForTradingBoard(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), species2, species, isFatefulEncounter))
|
||||
switch (CanRegisterMonForTradingBoard(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), species2, species, isModernFatefulEncounter))
|
||||
{
|
||||
case CANT_REGISTER_MON:
|
||||
StringExpandPlaceholders(gStringVar4, gText_PkmnCantBeTradedNow);
|
||||
@@ -3618,8 +3618,8 @@ 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 isFatefulEncounter = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_FATEFUL_ENCOUNTER);
|
||||
u32 stringId = GetUnionRoomTradeMessageId(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), gRfuPartnerCompatibilityData, species2, gUnionRoomOfferedSpecies, gUnionRoomRequestedMonType, species, isFatefulEncounter);
|
||||
u8 isModernFatefulEncounter = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_FATEFUL_ENCOUNTER);
|
||||
u32 stringId = GetUnionRoomTradeMessageId(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), gRfuPartnerCompatibilityData, species2, gUnionRoomOfferedSpecies, gUnionRoomRequestedMonType, species, isModernFatefulEncounter);
|
||||
|
||||
if (stringId != UR_TRADE_MSG_NONE)
|
||||
{
|
||||
|
||||
@@ -2623,12 +2623,12 @@ void ConvertPokemonToBattleTowerPokemon(struct Pokemon *mon, struct BattleTowerP
|
||||
GetMonData(mon, MON_DATA_NICKNAME, dest->nickname);
|
||||
}
|
||||
|
||||
void CreateFatefulEncounterMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId)
|
||||
void CreateModernFatefulEncounterMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId)
|
||||
{
|
||||
bool32 isFatefulEncounter = TRUE;
|
||||
bool32 isModernFatefulEncounter = TRUE;
|
||||
|
||||
CreateMon(mon, species, level, fixedIV, hasFixedPersonality, fixedPersonality, otIdType, fixedOtId);
|
||||
SetMonData(mon, MON_DATA_FATEFUL_ENCOUNTER, &isFatefulEncounter);
|
||||
SetMonData(mon, MON_DATA_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 CreateFatefulEncounterEnemyMon(void)
|
||||
void CreateModernFatefulEncounterEnemyMon(void)
|
||||
{
|
||||
s32 species = gSpecialVar_0x8004;
|
||||
s32 level = gSpecialVar_0x8005;
|
||||
s32 itemId = gSpecialVar_0x8006;
|
||||
|
||||
ZeroEnemyPartyMons();
|
||||
CreateFatefulEncounterMon(&gEnemyParty[0], species, level, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0);
|
||||
CreateModernFatefulEncounterMon(&gEnemyParty[0], species, level, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0);
|
||||
if (itemId)
|
||||
{
|
||||
u8 heldItem[2];
|
||||
@@ -3958,7 +3958,7 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data)
|
||||
retVal = substruct3->unusedRibbons;
|
||||
break;
|
||||
case MON_DATA_FATEFUL_ENCOUNTER:
|
||||
retVal = substruct3->fatefulEncounter;
|
||||
retVal = substruct3->modernFatefulEncounter;
|
||||
break;
|
||||
case MON_DATA_SPECIES2:
|
||||
retVal = substruct0->species;
|
||||
@@ -4342,7 +4342,7 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg)
|
||||
SET8(substruct3->unusedRibbons);
|
||||
break;
|
||||
case MON_DATA_FATEFUL_ENCOUNTER:
|
||||
SET8(substruct3->fatefulEncounter);
|
||||
SET8(substruct3->modernFatefulEncounter);
|
||||
break;
|
||||
case MON_DATA_IVS:
|
||||
{
|
||||
|
||||
10
src/scrcmd.c
10
src/scrcmd.c
@@ -2206,17 +2206,17 @@ bool8 ScrCmd_lockfortrainer(struct ScriptContext *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
// This command will set a Pokémon's fatefulEncounter bit; there is no similar command to clear it.
|
||||
bool8 ScrCmd_setmonfatefulencounter(struct ScriptContext *ctx)
|
||||
// This command will set a Pokémon's modernFatefulEncounter bit; there is no similar command to clear it.
|
||||
bool8 ScrCmd_setmonmodernfatefulencounter(struct ScriptContext *ctx)
|
||||
{
|
||||
bool8 isFatefulEncounter = TRUE;
|
||||
bool8 isModernFatefulEncounter = TRUE;
|
||||
u16 partyIndex = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
SetMonData(&gPlayerParty[partyIndex], MON_DATA_FATEFUL_ENCOUNTER, &isFatefulEncounter);
|
||||
SetMonData(&gPlayerParty[partyIndex], MON_DATA_FATEFUL_ENCOUNTER, &isModernFatefulEncounter);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_checkmonfatefulencounter(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_checkmonmodernfatefulencounter(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 partyIndex = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
|
||||
12
src/trade.c
12
src/trade.c
@@ -2491,17 +2491,17 @@ s32 GetGameProgressForLinkTrade(void)
|
||||
return TRADE_BOTH_PLAYERS_READY;
|
||||
}
|
||||
|
||||
static bool32 IsDeoxysOrMewUntradable(u16 species, bool8 isFatefulEncounter)
|
||||
static bool32 IsDeoxysOrMewUntradable(u16 species, bool8 isModernFatefulEncounter)
|
||||
{
|
||||
if (species == SPECIES_DEOXYS || species == SPECIES_MEW)
|
||||
{
|
||||
if (!isFatefulEncounter)
|
||||
if (!isModernFatefulEncounter)
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isFatefulEncounter)
|
||||
int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isModernFatefulEncounter)
|
||||
{
|
||||
bool8 playerHasNationalDex = player.hasNationalDex;
|
||||
bool8 playerCanLinkNationally = player.canLinkNationally;
|
||||
@@ -2520,7 +2520,7 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf
|
||||
}
|
||||
|
||||
// Cannot trade illegitimate Deoxys/Mew
|
||||
if (IsDeoxysOrMewUntradable(playerSpecies, isFatefulEncounter))
|
||||
if (IsDeoxysOrMewUntradable(playerSpecies, isModernFatefulEncounter))
|
||||
return UR_TRADE_MSG_MON_CANT_BE_TRADED_2;
|
||||
|
||||
if (partnerSpecies == SPECIES_EGG)
|
||||
@@ -2563,11 +2563,11 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf
|
||||
return UR_TRADE_MSG_NONE;
|
||||
}
|
||||
|
||||
int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isFatefulEncounter)
|
||||
int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isModernFatefulEncounter)
|
||||
{
|
||||
bool8 hasNationalDex = player.hasNationalDex;
|
||||
|
||||
if (IsDeoxysOrMewUntradable(species, isFatefulEncounter))
|
||||
if (IsDeoxysOrMewUntradable(species, isModernFatefulEncounter))
|
||||
return CANT_REGISTER_MON;
|
||||
|
||||
if (hasNationalDex)
|
||||
|
||||
Reference in New Issue
Block a user