fix: game balance — gold scaling, solo DEF, floor-scaled items, healer targeting, AI fallback

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-24 11:17:23 +09:00
parent ee9aec0b32
commit 01edb488f7
3 changed files with 65 additions and 12 deletions

View File

@@ -97,14 +97,17 @@ func MonsterAI(m *entity.Monster, players []*entity.Player, turnNumber int) (tar
}
if rand.Float64() < 0.3 {
minHP := int(^uint(0) >> 1)
minIdx := 0
minIdx := -1
for i, p := range players {
if !p.IsDead() && p.HP < minHP {
minHP = p.HP
minIdx = i
}
}
return minIdx, false
if minIdx >= 0 {
return minIdx, false
}
// Fall through to default targeting if no alive player found
}
for i, p := range players {
if !p.IsDead() {