generated from nhcarrigan/template
fix: auto-quest continues after quest failure (#92)
## Summary Fixes #87. When a quest failed, the tick loop detected the failure and turned auto-quest off so the "player could reassess". This meant every quest failure required the player to manually re-enable the toggle. ## Root Cause The tick applies quest failure by resetting the quest to `status: "available"` with `lastFailedAt` set. Auto-quest picks up `available` quests automatically — so turning off auto-quest on failure was entirely unnecessary, it just broke the loop. ## Fix Remove the auto-quest-off-on-failure block entirely. The quest returns to `available` immediately after failure, so auto-quest naturally retries on the next tick. Players can still disable it manually if they want to stop. ✨ This PR was created with help from Hikari~ 🌸 Reviewed-on: #92 Co-authored-by: Hikari <hikari@nhcarrigan.com> Co-committed-by: Hikari <hikari@nhcarrigan.com>
This commit was merged in pull request #92.
This commit is contained in:
@@ -1144,14 +1144,6 @@ export const GameProvider = ({
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
// Quest failure — turn off auto-quest so the player can reassess
|
|
||||||
if (
|
|
||||||
newlyFailedQuestsReference.current.length > 0
|
|
||||||
&& next.autoQuest === true
|
|
||||||
) {
|
|
||||||
next = { ...next, autoQuest: false };
|
|
||||||
}
|
|
||||||
|
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user