Add tank stage 4 with water and supply crates

Stages so far only varied the walls. Give stage 4 rules of its own.

Water blocks tanks but not shells, so the centre of the map is crossed
only at the fords while both sides can still shoot across it. It is one
predicate - rectBlocked is used for tank movement alone, so adding WATER
there leaves bullets untouched.

Supply crates appear on a timer and grant a 3s enemy freeze or 10s of
steel around the base; the shovel effect puts brick back when it lapses,
so broken walls are repaired. Active effects show a countdown badge.

Stages carry a specials line: shown on the start overlay and in the HUD
on entry, and previewed on the preceding stage's clear screen.

Checked headlessly: over 247k sampled tank positions none sat on water
while 7591 bullet frames did, crates were taken 8 times in 8 runs, and
stage 4 leaves the base standing in 7 of 10 idle runs with 98 cells the
player can reach without firing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-11 16:54:33 +09:00
co-authored by Claude Opus 5
parent f208619ac4
commit 440af0df2a
3 changed files with 233 additions and 31 deletions
+19 -3
View File
@@ -28,13 +28,29 @@
| 탱크게임 | `/tank.html` | 1단계 요새 | 4대 (동시 3) | 벽돌 밀도 25%, 넓은 기동 공간 |
| ↳ | `/tank.html#2` | 2단계 미로 | 6대 (동시 4) | 밀도 43%, 1칸 폭 통로가 얽힌 미로 |
| ↳ | `/tank.html#3` | 3단계 강철 회랑 | 8대 (동시 4) | 강철 31칸, 기지 외곽 2중 + 좁은 진입로 |
| ↳ | `/tank.html#4` | 4단계 참호 | 10대 (동시 4) | **물길** + **보급 상자**(시간 정지 / 기지 강화) |
방향키 이동, 스페이스 발사. 한 단계를 돌파하면 다음 단계로 이어지고, 점수와 남은 탱크를
그대로 가져간다. **단계를 거치지 않고 바로 들어가는 방법**은 셋이다.
- 왼쪽 탭의 `휴게실 > 탱크게임` 아래 단계 칩 (셸 주소로는 `/#tank2`, `/#tank3`)
- 게임 화면 오른쪽 아래의 단계 버튼, 또는 `1` ~ `3` 키
- 주소 직접 입력 — `/tank.html#3`, `/tank.html?stage=3` (범위를 벗어난 값은 1단계)
- 왼쪽 탭의 `휴게실 > 탱크게임` 아래 단계 칩 (셸 주소로는 `/#tank2` … `/#tank4`)
- 게임 화면 오른쪽 아래의 단계 버튼, 또는 `1` ~ `4` 키
- 주소 직접 입력 — `/tank.html#4`, `/tank.html?stage=4` (범위를 벗어난 값은 1단계)
## 특수 요소
3단계까지는 지형만 달라지지만 4단계부터는 규칙이 하나씩 붙는다. 단계에 들어갈 때
시작 화면 세 번째 줄과 오른쪽 `특수 요소` 칸에 그 단계에 걸린 규칙이 나오고, 앞
단계를 돌파한 화면에서는 다음 단계의 규칙을 미리 알려 준다.
| 요소 | 동작 | 쓰인 단계 |
|---|---|---|
| 물길 `W` | 탱크는 건널 수 없고 포탄은 넘어간다. 건너려면 도선(ford)으로 돌아야 한다 | 4 |
| 보급 상자 | 일정 주기로 빈 칸에 하나 놓인다. 밟으면 효과 + 50점 | 4 |
| ↳ 시간 정지 | 적 전원이 3초간 멈춘다 (포탄은 계속 난다) | 4 |
| ↳ 기지 강화 | 기지 외곽 5칸이 10초간 강철이 된다. 끝나면 벽돌로 돌아오며 부서졌던 칸도 메워진다 | 4 |
효과가 걸린 동안에는 화면 왼쪽 위에 남은 시간이 배지로 표시된다.
낱말풀이와 공유하는 자산이 없는 단독 페이지다. 캔버스와 WebAudio 만 쓰므로 자산 해시
스탬프(아래 캐시 항목)의 영향도 받지 않는다. iframe 안에서는 **화면을 한 번 클릭해