{"record":{"id":"57ceb9ff5a823884","repo":"babalae/better-genshin-impact","slug":"error-57ceb9","errorCode":null,"errorMessage":"战斗失败","messagePattern":"战斗失败","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"critical","filePath":"BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropTask.cs","lineNumber":989,"sourceCode":"                _logger.LogWarning(\"纠偏路径不存在，回退target路径: {Path}\", recoverPath);\n                recoverPath = targetPath;\n            }\n\n            _logger.LogDebug(\"未识别到战斗提示，执行纠偏路径: {Path}\", recoverPath);\n            await RunPathingFile(recoverPath);\n            return await ProcessLeyLineOutcrop(timeoutSeconds, targetPath, rerunPath, fromTeleportStart, retries + 1);\n        }\n\n        var fightResult = await AutoFight(timeoutSeconds);\n        if (!fightResult)\n        {\n            await EnsureExitRewardPage();\n            if (await ProcessResurrect())\n            {\n                return await ProcessLeyLineOutcrop(timeoutSeconds, targetPath, rerunPath, fromTeleportStart, retries + 1);\n            }\n\n            throw new Exception(\"战斗失败\");\n        }\n\n        await TryCollectDropsAfterFight();\n        await SwitchToFriendshipTeamIfNeeded();\n        await AutoNavigateToReward();\n        return true;\n    }\n\n    private async Task TryCollectDropsAfterFight()\n    {\n        if (!_taskParam.FightConfig.KazuhaPickupEnabled)\n        {\n            return;\n        }\n\n        try\n        {\n            var combatScenes = await RunnerContext.Instance.GetCombatScenes(_ct);","sourceCodeStart":971,"sourceCodeEnd":1007,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropTask.cs#L971-L1007","documentation":"Thrown when AutoFight(timeoutSeconds) returned false (the combat was lost) AND ProcessResurrect() also returned false (no revive was possible/executed). The task cannot continue without a living team.","triggerScenarios":"In ProcessLeyLineOutcrop, fightResult is false; EnsureExitRewardPage runs; ProcessResurrect() is awaited and returns false; the exception is then thrown.","commonSituations":"Team too weak for the blossom enemies; no revive items/characters available; the fight strategy file is mismatched for the current team; HP depleted before the strategy could act.","solutions":["Use a stronger team / a combat strategy that matches the current party composition.","Ensure revive capability (food/characters) is available so ProcessResurrect can succeed.","Lower the blossom difficulty by picking an appropriate region/type, or farm with a geared team.","Verify the fight strategy isn't stuck (e.g., wrong element rotation)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await ProcessLeyLineOutcrop(...); }\ncatch (Exception ex) when (ex.Message == \"战斗失败\")\n{\n    _logger.LogError(\"地脉战斗失败且无法复活，请检查队伍配置与复活手段\");\n    await EnsureExitRewardPage();\n    throw;\n}","preventionTips":["Use a team whose combat strategy matches the blossom enemies.","Ensure revive items/characters are available so ProcessResurrect can recover.","Test the fight strategy standalone before running the full ley-line task."],"tags":["combat","ley-line","retry"],"backgroundTag":null,"analyzedSha":"a7cb36712dcb409be610257d877fcea3597e9d6b","analyzedAt":"2026-08-13T16:44:57.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}