Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Halloween Pret merge #3468

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
5beec06
Document Task_MapNamePopUpWindow
GriffinRichards Aug 19, 2023
6792028
Document title screen task data
GriffinRichards Aug 20, 2023
56ff4ce
Add defines for field effect sprite data, misc task data
GriffinRichards Aug 20, 2023
a8d0a0d
Replaced decomp list with pret.github.io link
AnonymousRandomPerson Aug 30, 2023
3a8a82d
Fixed out-of-bounds access in GetFactoryMonFixedIV when generating pl…
KABoissonneault Oct 4, 2023
0a183c2
Changed sFixedIVTable access from hardcoded index limits to ARRAY_COUNT
KABoissonneault Oct 5, 2023
dec4b58
Merge pull request #1930 from KABoissonneault/fix/factory_oob
GriffinRichards Oct 5, 2023
6f71fbe
Add some missing trainer hill constant usage
GriffinRichards Sep 17, 2023
054d0f9
Remove fakematch in NewGameInitPCItems
ketsuban Oct 7, 2023
0e84c7d
corrected comment, tough to smart
marlux895 Oct 7, 2023
f01a6af
Merge branch 'master' into misc-tasks
GriffinRichards Oct 7, 2023
104e81b
Merge pull request #1915 from GriffinRichards/misc-tasks
GriffinRichards Oct 8, 2023
ad0c28d
Merge pull request #1919 from AnonymousRandomPerson/master
GriffinRichards Oct 17, 2023
333523e
Remove all leading whitespace
kittenchilly Oct 23, 2023
25d6f8b
Fix mini_printf encoded string -Werror=pointer-sign warning
AsparagusEduardo Oct 26, 2023
3a8df46
Merge pull request #1938 from AsparagusEduardo/pret/pr2/ndebugModern
GriffinRichards Oct 26, 2023
c169b85
Merge pull request #1937 from kittenchilly/removewhitespace
GriffinRichards Oct 26, 2023
f69291a
Merge branch 'master' of https://github.com/pret/pokeemerald into pre…
Bassoonian Oct 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ Note that in msys2, Copy is Ctrl+Insert and Paste is Shift+Insert.
<details>
<summary><i>Notes...</i></summary>

> Note 1: While not shown, msys uses forward slashes `/` instead of backwards slashes `\` as the directory separator.
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "Downloads/My Downloads"`.
> Note 3: Windows path names are case-insensitive so adhering to capitalization isn’t needed.
> Note 1: While not shown, msys uses forward slashes `/` instead of backwards slashes `\` as the directory separator.
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "Downloads/My Downloads"`.
> Note 3: Windows path names are case-insensitive so adhering to capitalization isn’t needed.
> Note 4: If libpng was saved elsewhere, you will need to specify the full path to where libpng was downloaded, e.g. `cd c:/devkitpro/msys2` if it was saved there.
</details>

Expand Down
11 changes: 9 additions & 2 deletions src/battle_factory.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,15 @@ u8 GetFactoryMonFixedIV(u8 challengeNum, bool8 isLastBattle)
u8 ivSet;
bool8 useHigherIV = isLastBattle ? TRUE : FALSE;

if (challengeNum > 8)
ivSet = 7;
// The Factory has an out-of-bounds access when generating the rental draft for round 9 (challengeNum==8),
// or the "elevated" rentals from round 8 (challengeNum+1==8)
// This happens to land on a number higher than 31, which is interpreted as "random IVs"
#ifdef BUGFIX
if (challengeNum >= ARRAY_COUNT(sFixedIVTable))
#else
if (challengeNum > ARRAY_COUNT(sFixedIVTable))
#endif
ivSet = ARRAY_COUNT(sFixedIVTable) - 1;
else
ivSet = challengeNum;

Expand Down
4 changes: 2 additions & 2 deletions src/event_object_movement.c
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,7 @@ u8 Unref_TryInitLocalObjectEvent(u8 localId)
if (InBattlePyramid())
objectEventCount = GetNumBattlePyramidObjectEvents();
else if (InTrainerHill())
objectEventCount = 2;
objectEventCount = HILL_TRAINERS_PER_FLOOR;
else
objectEventCount = gMapHeader.events->objectEventCount;

Expand Down Expand Up @@ -1641,7 +1641,7 @@ void TrySpawnObjectEvents(s16 cameraX, s16 cameraY)
if (InBattlePyramid())
objectCount = GetNumBattlePyramidObjectEvents();
else if (InTrainerHill())
objectCount = 2;
objectCount = HILL_TRAINERS_PER_FLOOR;
else
objectCount = gMapHeader.events->objectEventCount;

Expand Down
Loading
Loading