Skip to content

Commit c02f1f1

Browse files
authored
Merge pull request #62 from wheremyfoodat/merlinus_pls
2 parents 95dbd51 + a484c19 commit c02f1f1

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

data/chapters/chapter22/eventscript.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ u8 CONST_DATA gUnk_08672458[] =
200200
EventScr CONST_DATA EventScr_Unk_08672464[] =
201201
{
202202
EvtFadeBgmOut(1)
203-
EvtGotoIfNotFunc(7, func_fe6_0806D150)
203+
EvtGotoIfNotFunc(7, HaveAllLegendaryWeapons)
204204

205205
EvtFadeToBlack(16)
206206
EvtExitMap

include/eventfunctions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ bool func_fe6_0806D028(void);
187187
void func_fe6_0806D064(void);
188188
void func_fe6_0806D0E4(void);
189189
// func_fe6_0806D0FC
190-
bool func_fe6_0806D150(void);
190+
bool HaveAllLegendaryWeapons(void);
191191
void func_fe6_0806D17C(void);
192192
void func_fe6_0806D194(void);
193193
void func_fe6_0806D1AC(void);

src/eventfunctions.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1534,8 +1534,15 @@ bool func_fe6_0806D0FC(int iid)
15341534

15351535
FOR_UNITS_FACTION(FACTION_BLUE, unit,
15361536
{
1537+
#if BUGFIX
1538+
// BUG: If Merlinus is holding an item and he retreats, the game counts the item as not being owned, despite him not
1539+
// permanently dying. If he's holding a legendary weapon in chapter 22 and retreats, we're locked out of the true ending.
1540+
if ((unit->flags & UNIT_FLAG_DEAD) != 0 && UNIT_PID(unit) != PID_MERLINUS)
1541+
continue;
1542+
#else
15371543
if ((unit->flags & UNIT_FLAG_DEAD) != 0)
15381544
continue;
1545+
#endif
15391546

15401547
for (i = 0; i < ITEMSLOT_INV_COUNT; i++)
15411548
{
@@ -1547,7 +1554,7 @@ bool func_fe6_0806D0FC(int iid)
15471554
return FALSE;
15481555
}
15491556

1550-
bool func_fe6_0806D150(void)
1557+
bool HaveAllLegendaryWeapons(void)
15511558
{
15521559
u8 const * it;
15531560

0 commit comments

Comments
 (0)