9148c358d0
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를 Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류. - 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로 자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거, 동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거. - 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming, Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business, Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로, 나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는 title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백). 원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지. - 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서. - 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는 지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지. - Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경. - 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
208 lines
5.9 KiB
Markdown
208 lines
5.9 KiB
Markdown
---
|
|
id: wiki-2026-0508-defense-buildings
|
|
title: Defense Buildings
|
|
category: 10_Wiki/Topics
|
|
status: verified
|
|
canonical_id: self
|
|
aliases: [defense-buildings, turrets, base-defense, towers]
|
|
duplicate_of: none
|
|
source_trust_level: A
|
|
confidence_score: 0.88
|
|
verification_status: applied
|
|
tags: [game-design, base-defense, war-commander, td, layout]
|
|
raw_sources: []
|
|
last_reinforced: 2026-05-10
|
|
github_commit: pending
|
|
tech_stack:
|
|
language: design-doc
|
|
framework: base-defense-system
|
|
---
|
|
|
|
# Defense Buildings
|
|
|
|
## 매 한 줄
|
|
> **"매 enemy unit 의 attack path 를 차단 / damage 하는 매 stationary structure"**. 매 War Commander / Boom Beach / Clash of Clans 등 매 PvP-base genre 의 핵심. 매 range, DPS, targeting priority, 매 splash 의 매 4 dimension 으로 매 design space 의 정의.
|
|
|
|
## 매 핵심
|
|
|
|
### 매 분류
|
|
- **Single-target**: 매 high-DPS, anti-elite.
|
|
- **Splash**: 매 area damage, anti-swarm.
|
|
- **Anti-air**: 매 ground 무력, air specialized.
|
|
- **Slowing/EMP**: 매 control, debuff.
|
|
- **Long-range arty**: 매 sniper, low fire-rate.
|
|
|
|
### 매 design dimension
|
|
- **Range**: 매 4-12 tiles.
|
|
- **DPS**: 매 normalized to HP per second of typical attacker.
|
|
- **Reload**: 매 fire-rate gating splash power.
|
|
- **Cost / build-time**: 매 economic gating.
|
|
|
|
### 매 응용
|
|
1. 매 base layout design.
|
|
2. 매 kill-zone funneling.
|
|
3. 매 PvP attack-meta counter.
|
|
|
|
## 💻 패턴
|
|
|
|
### Defense building targeting
|
|
```typescript
|
|
type TargetPriority = "closest" | "lowest_hp" | "highest_dps" | "first_in_range";
|
|
|
|
class DefenseTower {
|
|
pos: Vec2;
|
|
range: number;
|
|
dps: number;
|
|
reload_ms: number;
|
|
last_fire = 0;
|
|
priority: TargetPriority = "closest";
|
|
splash_radius = 0;
|
|
anti_air = false;
|
|
|
|
selectTarget(units: Unit[]): Unit | null {
|
|
const inRange = units.filter(u => {
|
|
if (u.is_air && !this.anti_air) return false;
|
|
return distance(this.pos, u.pos) <= this.range;
|
|
});
|
|
if (!inRange.length) return null;
|
|
|
|
switch (this.priority) {
|
|
case "closest":
|
|
return minBy(inRange, u => distance(this.pos, u.pos));
|
|
case "lowest_hp":
|
|
return minBy(inRange, u => u.hp);
|
|
case "highest_dps":
|
|
return maxBy(inRange, u => u.dps);
|
|
case "first_in_range":
|
|
return inRange[0];
|
|
}
|
|
}
|
|
|
|
tryFire(now: number, targets: Unit[]) {
|
|
if (now - this.last_fire < this.reload_ms) return;
|
|
const target = this.selectTarget(targets);
|
|
if (!target) return;
|
|
this.last_fire = now;
|
|
if (this.splash_radius > 0) {
|
|
this.applySplash(target.pos, targets);
|
|
} else {
|
|
target.hp -= this.dps * (this.reload_ms / 1000);
|
|
}
|
|
}
|
|
|
|
applySplash(center: Vec2, units: Unit[]) {
|
|
for (const u of units) {
|
|
if (distance(center, u.pos) <= this.splash_radius) {
|
|
u.hp -= this.dps * (this.reload_ms / 1000);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Layout coverage analysis
|
|
```typescript
|
|
function coverageMap(towers: DefenseTower[], grid_size: number): number[][] {
|
|
const map = Array.from({ length: grid_size }, () => Array(grid_size).fill(0));
|
|
for (let y = 0; y < grid_size; y++) {
|
|
for (let x = 0; x < grid_size; x++) {
|
|
for (const t of towers) {
|
|
if (distance(t.pos, { x, y }) <= t.range) {
|
|
map[y][x]++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return map;
|
|
}
|
|
|
|
function uncoveredCells(map: number[][]): number {
|
|
return map.flat().filter(v => v === 0).length;
|
|
}
|
|
```
|
|
|
|
### Funnel / kill-zone scorer
|
|
```typescript
|
|
function killZoneScore(layout: Layout, attacker_paths: Path[]): number {
|
|
let score = 0;
|
|
for (const path of attacker_paths) {
|
|
const exposure = path.cells.map(c => layout.coverage_at(c)).reduce((a, b) => a + b, 0);
|
|
score += exposure / path.cells.length;
|
|
}
|
|
return score / attacker_paths.length;
|
|
}
|
|
```
|
|
|
|
### Build-cost optimizer
|
|
```typescript
|
|
function maximizeDefense(
|
|
budget: number,
|
|
available: DefenseTower[],
|
|
slot_count: number
|
|
): DefenseTower[] {
|
|
// Greedy by DPS-per-cost
|
|
const sorted = [...available].sort((a, b) => (b.dps / b.cost) - (a.dps / a.cost));
|
|
const picks: DefenseTower[] = [];
|
|
let remaining = budget;
|
|
for (const t of sorted) {
|
|
if (picks.length >= slot_count) break;
|
|
if (t.cost <= remaining) {
|
|
picks.push(t);
|
|
remaining -= t.cost;
|
|
}
|
|
}
|
|
return picks;
|
|
}
|
|
```
|
|
|
|
### Defensive synergy buff
|
|
```typescript
|
|
function applySynergyBuffs(towers: DefenseTower[]) {
|
|
for (const t of towers) {
|
|
const nearby = towers.filter(o => o !== t && distance(t.pos, o.pos) <= 3);
|
|
if (nearby.some(o => o.type === "command_post")) {
|
|
t.dps *= 1.15; // +15% DPS near command post
|
|
}
|
|
if (nearby.length >= 2) {
|
|
t.range *= 1.10; // +10% range when clustered
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
## 매 결정 기준
|
|
| 상황 | Approach |
|
|
|---|---|
|
|
| 매 swarm meta | Splash 우선, anti-air balanced |
|
|
| 매 elite-stack meta | Single-target high-DPS |
|
|
| 매 air meta | Anti-air dominant + long-range |
|
|
| 매 mixed | Layered ring (long-range outer, splash inner) |
|
|
|
|
**기본값**: 매 layered defense + 매 funnel kill-zone + 매 anti-air coverage 70%+.
|
|
|
|
## 🔗 Graph
|
|
- 부모: [[Base-Layouts-and-Kill-Zones]] · [[Tower-Defense]]
|
|
- 변형: [[Anti-Air-and-Anti-Ground-Combat]] · [[Damage-Resistance-Platforms]]
|
|
- 응용: [[Combat_Balance_Buff]] · [[Evolution-of-the-War-Commander-Combat-Ecosystem]]
|
|
- Adjacent: [[Jailing]]
|
|
|
|
## 🤖 LLM 활용
|
|
**언제**: 매 base layout design, defense balance, kill-zone analysis.
|
|
**언제 X**: 매 PvE-only — 매 design tension 부족.
|
|
|
|
## ❌ 안티패턴
|
|
- **Single-type spam**: 매 splash-only → 매 elite stomp.
|
|
- **No anti-air**: 매 air comp 의 free win.
|
|
- **Edge-only**: 매 funnel 무시 → 매 trivial path.
|
|
- **Range overlap 의 부족**: 매 isolated tower → 매 single-target focus 의 free kill.
|
|
|
|
## 🧪 검증 / 중복
|
|
- Verified (Clash of Clans / Boom Beach / War Commander community meta 2024-2025).
|
|
- 신뢰도 A.
|
|
|
|
## 🕓 Changelog
|
|
| 날짜 | 변경 |
|
|
|---|---|
|
|
| 2026-05-08 | Phase 1 |
|
|
| 2026-05-10 | Manual cleanup — defense buildings targeting + layout + synergy patterns. |
|