mirror of https://github.com/pret/pokeemerald.git
Added flag
parent
418e997193
commit
1c7d69530a
|
@ -36,6 +36,16 @@ There are about 100 locations where Pokemon can reasonably be caught in the game
|
||||||
|
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
|
-------------------------- include/constants/flags.h --------------------------
|
||||||
|
#define FLAG_ITEM_MAGMA_HIDEOUT_4F_MAX_REVIVE 0x490
|
||||||
|
#define FLAG_ITEM_SAFARI_ZONE_NORTH_EAST_NUGGET 0x491
|
||||||
|
#define FLAG_ITEM_SAFARI_ZONE_SOUTH_EAST_BIG_PEARL 0x492
|
||||||
|
|
||||||
|
-#define FLAG_UNUSED_0x493 0x493 // Unused Flag
|
||||||
|
+#define FLAG_NUZLOCKE 0x493
|
||||||
|
#define FLAG_UNUSED_0x494 0x494 // Unused Flag
|
||||||
|
#define FLAG_UNUSED_0x495 0x495 // Unused Flag
|
||||||
|
|
||||||
------------------------------- src/main_menu.c -------------------------------
|
------------------------------- src/main_menu.c -------------------------------
|
||||||
index f99703622..75520e337 100644
|
index f99703622..75520e337 100644
|
||||||
@@ -36,8 +36,9 @@
|
@@ -36,8 +36,9 @@
|
||||||
|
@ -628,7 +638,6 @@ index 5a1d5bab3..9126aeeb4 100644
|
||||||
u16 CountBattledRematchTeams(u16 trainerId);
|
u16 CountBattledRematchTeams(u16 trainerId);
|
||||||
+u8 HasWildPokmnOnThisRouteBeenSeen(u8 currLocation, bool8 setVarForThisEnc);
|
+u8 HasWildPokmnOnThisRouteBeenSeen(u8 currLocation, bool8 setVarForThisEnc);
|
||||||
+u8 currLocConvertForNuzlocke(u8 currLocation);
|
+u8 currLocConvertForNuzlocke(u8 currLocation);
|
||||||
+
|
|
||||||
|
|
||||||
void DoStandardWildBattle_Debug(void);
|
void DoStandardWildBattle_Debug(void);
|
||||||
void BattleSetup_StartTrainerBattle_Debug(void);
|
void BattleSetup_StartTrainerBattle_Debug(void);
|
||||||
|
@ -1285,7 +1294,7 @@ index 6e6f5886e..c5f9baa57 100644
|
||||||
+ u8 levelCap = 0;
|
+ u8 levelCap = 0;
|
||||||
+ u16 nextLeader, i;
|
+ u16 nextLeader, i;
|
||||||
+ const struct TrainerMonItemCustomMoves *partyData;
|
+ const struct TrainerMonItemCustomMoves *partyData;
|
||||||
+ if (!FlagGet(FLAG_NUZLOCKE) || !FlagGet(FLAG_NUZLOCKE_LEVEL_CAP) || FlagGet(FLAG_IS_CHAMPION))
|
+ if (!FlagGet(FLAG_NUZLOCKE) || FlagGet(FLAG_IS_CHAMPION))
|
||||||
+ return 100;
|
+ return 100;
|
||||||
+ if (!FlagGet(FLAG_BADGE01_GET))
|
+ if (!FlagGet(FLAG_BADGE01_GET))
|
||||||
+ nextLeader = TRAINER_ROXANNE_1;
|
+ nextLeader = TRAINER_ROXANNE_1;
|
||||||
|
@ -1316,7 +1325,7 @@ index 6e6f5886e..c5f9baa57 100644
|
||||||
+
|
+
|
||||||
+bool8 levelCappedNuzlocke(u8 level){
|
+bool8 levelCappedNuzlocke(u8 level){
|
||||||
+ u8 levelCap = getLevelCap();
|
+ u8 levelCap = getLevelCap();
|
||||||
+ if (!FlagGet(FLAG_NUZLOCKE) || !FlagGet(FLAG_NUZLOCKE_LEVEL_CAP) || FlagGet(FLAG_IS_CHAMPION))
|
+ if (!FlagGet(FLAG_NUZLOCKE) || FlagGet(FLAG_IS_CHAMPION))
|
||||||
+ return FALSE; //Redundant since getLevelCap would already return 100 for these, but better to be explicit
|
+ return FALSE; //Redundant since getLevelCap would already return 100 for these, but better to be explicit
|
||||||
+ if (level >= levelCap)
|
+ if (level >= levelCap)
|
||||||
+ return TRUE;
|
+ return TRUE;
|
||||||
|
@ -1532,7 +1541,6 @@ index 546385218..978b9eeec 100644
|
||||||
EventScript_PkmnCenterNurse_ReturnPkmn::
|
EventScript_PkmnCenterNurse_ReturnPkmn::
|
||||||
goto_if_eq VAR_0x8004, 1, EventScript_PkmnCenterNurse_ReturnPkmn2
|
goto_if_eq VAR_0x8004, 1, EventScript_PkmnCenterNurse_ReturnPkmn2
|
||||||
+ goto_if_unset FLAG_NUZLOCKE, EventScript_PkmnCenterNurse_ReturnPkmnDefault
|
+ goto_if_unset FLAG_NUZLOCKE, EventScript_PkmnCenterNurse_ReturnPkmnDefault
|
||||||
+ goto_if_unset FLAG_NUZLOCKE_LEVEL_CAP, EventScript_PkmnCenterNurse_ReturnPkmnDefault
|
|
||||||
+ special LevelCapToString
|
+ special LevelCapToString
|
||||||
+ message gText_WeHopeToSeeYouAgain4
|
+ message gText_WeHopeToSeeYouAgain4
|
||||||
+ return
|
+ return
|
||||||
|
|
Loading…
Reference in New Issue