Mirror pokeemerald PR#1329 & PR#1335 to pokefirered
The `giftRibbons` field in `SaveBlock1` has been split out into proper subfields. The new ExternalEvent structs deal with interconnectivity between external games/peripherals and FRLG. US & JP Colosseum Bonus Discs', Colosseum and XD's, Pokémon Channel's, and PokémonBox: Ruby & Sapphire's interactions with these fields has been documented. The `giftRibbon#` fields in `PokemonSubstruct3` have also been renamed to their appropriate ribbons, and commented with distribution info if applicable. The previous `fatefulEncounter` field was actually filler, and relabeled as such, while the `obedient` bit was renamed `eventLegal`. All relevant constants and functions dealing with the Pokémon data structure were renamed with these changes in mind. I still maintain that `eventLegal` is a misnomer and it should be called `fatefulEncounter` in all three repos.
This commit is contained in:
+6
-6
@@ -2230,21 +2230,21 @@ bool8 ScrCmd_normalmsg(struct ScriptContext * ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// This command will force the Pokémon to be obedient, you don't get to make it disobedient.
|
||||
bool8 ScrCmd_setmonobedient(struct ScriptContext * ctx)
|
||||
// This command will set a Pokémon's eventLegal bit; there is no similar command to clear it.
|
||||
bool8 ScrCmd_setmoneventlegal(struct ScriptContext * ctx)
|
||||
{
|
||||
bool8 obedient = TRUE;
|
||||
bool8 isEventLegal = TRUE;
|
||||
u16 partyIndex = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
SetMonData(&gPlayerParty[partyIndex], MON_DATA_OBEDIENCE, &obedient);
|
||||
SetMonData(&gPlayerParty[partyIndex], MON_DATA_EVENT_LEGAL, &isEventLegal);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_checkmonobedience(struct ScriptContext * ctx)
|
||||
bool8 ScrCmd_checkmoneventlegal(struct ScriptContext * ctx)
|
||||
{
|
||||
u16 partyIndex = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gSpecialVar_Result = GetMonData(&gPlayerParty[partyIndex], MON_DATA_OBEDIENCE, NULL);
|
||||
gSpecialVar_Result = GetMonData(&gPlayerParty[partyIndex], MON_DATA_EVENT_LEGAL, NULL);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user