fix(BT12-Dev): A04 번개 충격 적 유무 무관 자동 발동 (PD 지시 2026-05-13)

원인: LightningStrikeSpawner.Trigger 영역 candidates.Count == 0 시 즉시 return → 적 0명 영역 발동 X.
fix: candidates 0 시 Player 위치 영역 fallback (primaryPos = inventory.transform.position) → 일정 쿨타임 자동 발동.

A05 MeleeAreaSpawner·A_Laser LaserSpawner = Player 위치 기준 발동·적 무관 영역 이미 정합.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
깃 관리자 2026-05-13 20:28:19 +09:00
parent 26b0666912
commit ebedf6d9ee
1 changed files with 12 additions and 6 deletions

View File

@ -43,13 +43,19 @@ namespace EerieVillage.Skills.Effectors
if (p.x < xMin || p.x > xMax || p.y < yMin || p.y > yMax) continue; if (p.x < xMin || p.x > xMax || p.y < yMin || p.y > yMax) continue;
candidates.Add(e); candidates.Add(e);
} }
if (candidates.Count == 0) return; // PD 지시 2026-05-13 — 적 유무 관계 없이 일정 쿨타임 자동 발동. candidates 영역 0 시 Player 위치 영역 fallback.
Vector2 primaryPos;
// 2. 임의 1기 선택 (Primary target) if (candidates.Count > 0)
var primary = candidates[Random.Range(0, candidates.Count)]; {
primaryPos = candidates[Random.Range(0, candidates.Count)].transform.position;
}
else
{
primaryPos = (Vector2)inventory.transform.position;
}
// PD 정합 2026-05-13 — OffsetDistance = (X, Y) 절대 오프셋·OffsetXY = 이펙트만 // PD 정합 2026-05-13 — OffsetDistance = (X, Y) 절대 오프셋·OffsetXY = 이펙트만
Vector2 hitboxPos = (Vector2)primary.transform.position + data.OffsetDistance; Vector2 hitboxPos = primaryPos + data.OffsetDistance;
Vector2 fxPos = (Vector2)primary.transform.position + data.OffsetXY; Vector2 fxPos = primaryPos + data.OffsetXY;
// 3. 이펙트 spawn (data.OnHitFxPrefab — FX_Thunder) + 총 lifetime 측정 // 3. 이펙트 spawn (data.OnHitFxPrefab — FX_Thunder) + 총 lifetime 측정
float fxTotalLifetime = 1f; float fxTotalLifetime = 1f;