From 6744cc112c90e582fccb8173271ad6f3e0064b45 Mon Sep 17 00:00:00 2001 From: Wickedness Date: Sat, 4 Jul 2026 13:57:18 +0900 Subject: [PATCH] Polish early sortie flow guidance --- src/game/data/battles.ts | 8 ++++---- src/game/scenes/CampScene.ts | 36 ++++++++++++++++++++++++++++++++---- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/game/data/battles.ts b/src/game/data/battles.ts index 2a927c5..f4417ed 100644 --- a/src/game/data/battles.ts +++ b/src/game/data/battles.ts @@ -513,7 +513,7 @@ export const firstBattleScenario: BattleScenarioDefinition = { rewardGold: 210, terrain: 'village', targetTile: { x: 15, y: 5, radius: 4 }, - threatRadius: 1 + threatRadius: 0 }, { id: 'quick', @@ -620,8 +620,8 @@ export const secondBattleScenario: BattleScenarioDefinition = { label: '북쪽 마을 확보', rewardGold: 180, terrain: 'village', - targetTile: { x: 19, y: 5, radius: 2 }, - threatRadius: 1 + targetTile: { x: 19, y: 6, radius: 2 }, + threatRadius: 0 }, { id: 'quick', @@ -728,7 +728,7 @@ export const thirdBattleScenario: BattleScenarioDefinition = { rewardGold: 300, terrain: 'fort', targetTile: { x: 18, y: 1, radius: 3 }, - threatRadius: 1 + threatRadius: 0 }, { id: 'quick', diff --git a/src/game/scenes/CampScene.ts b/src/game/scenes/CampScene.ts index 907ac40..cff6234 100644 --- a/src/game/scenes/CampScene.ts +++ b/src/game/scenes/CampScene.ts @@ -12439,6 +12439,26 @@ export class CampScene extends Phaser.Scene { return score > 0 ? '주의' : '미정'; } + private sortieRecoveryTargets(thresholdRatio = 0.7) { + return this.currentUnits() + .filter((unit) => unit.faction === 'ally' && unit.hp > 0 && unit.maxHp > 0 && unit.hp / unit.maxHp < thresholdRatio) + .sort((a, b) => a.hp / a.maxHp - b.hp / b.maxHp || a.name.localeCompare(b.name)); + } + + private sortieRecoveryHint() { + const targets = this.sortieRecoveryTargets(); + if (targets.length === 0) { + return ''; + } + + const names = targets.slice(0, 2).map((unit) => `${unit.name} ${unit.hp}/${unit.maxHp}`).join(', '); + const extra = targets.length > 2 ? ` 외 ${targets.length - 2}명` : ''; + const supplyCount = campSupplies.reduce((total, supply) => total + this.inventoryAmount(supply.label), 0); + const assignedSupplyCount = campSupplies.reduce((total, supply) => total + this.totalAssignedSupplyCount(supply.usableId), 0); + const supplyText = supplyCount > 0 ? `보급 ${assignedSupplyCount}/${supplyCount}` : '보급 없음'; + return `정비: ${names}${extra} 회복 권장 · ${supplyText}`; + } + private renderSortieRewardHint(x: number, y: number, width: number, height: number, depth: number) { const bg = this.trackSortie(this.add.rectangle(x, y, width, height, 0x151f2a, 0.9)); bg.setOrigin(0); @@ -12458,18 +12478,20 @@ export class CampScene extends Phaser.Scene { const inventorySummary = `보급 ${assignedSupplyCount}/${supplyCount} · 장비 ${equipmentCount} · 기록 ${recordCount}`; const reward = this.currentSortieFlow().rewardHint; const sortieNote = this.nextSortieRule().note; + const recoveryHint = this.sortieRecoveryHint(); const readyLine = [ `대화 ${completedDialogues}/${availableDialogues.length}`, `방문 ${completedVisits}/${availableVisits.length}`, `출전 ${selectedSummary}`, `보유 ${inventorySummary}` ].join(' · '); + const rewardLine = recoveryHint ? `${reward} · ${recoveryHint}` : `${reward} · ${readyLine}`; this.trackSortie(this.add.text(x + 16, y + 9, this.compactText(`편성 메모: ${sortieNote}`, 42), this.textStyle(13, '#f2e3bf', true))).setDepth(depth + 1); this.trackSortie( this.add.text( x + 16, y + 30, - this.compactText(`${reward} · ${readyLine}`, 48), + this.compactText(rewardLine, 48), this.textStyle(12, '#d4dce6') ) ).setDepth(depth + 1); @@ -12562,7 +12584,13 @@ export class CampScene extends Phaser.Scene { const requiredDetail = requiredUnits.length > 0 ? requiredUnits.map((unit) => `${unit.name} ${unit.hp}/${unit.maxHp}`).join(', ') : '필수 무장 없음'; - const injured = units.filter((unit) => unit.hp < unit.maxHp); + const injured = units.filter((unit) => unit.hp > 0 && unit.hp < unit.maxHp); + const recoveryTargets = this.sortieRecoveryTargets(); + const recoveryDetail = recoveryTargets.length > 0 + ? `${recoveryTargets.map((unit) => `${unit.name} ${unit.hp}/${unit.maxHp}`).join(', ')} 회복 권장` + : injured.length > 0 + ? `${injured.length}명 경상 · 출전 가능` + : '전원 완전한 병력'; const supplyCount = campSupplies.reduce((total, supply) => total + this.inventoryAmount(supply.label), 0); const assignedSupplyCount = campSupplies.reduce((total, supply) => total + this.totalAssignedSupplyCount(supply.usableId), 0); const availableDialogues = this.availableCampDialogues(); @@ -12589,8 +12617,8 @@ export class CampScene extends Phaser.Scene { }, { label: '부상 장수 확인', - complete: injured.length === 0, - detail: injured.length === 0 ? '전원 완전한 병력' : `${injured.map((unit) => unit.name).join(', ')} 회복 권장`, + complete: recoveryTargets.length === 0, + detail: recoveryDetail, priority: 'recommended' }, {