Compare commits

...

55 Commits

Author SHA1 Message Date
Claude
900c4764d1 Веб-версія для itch.io: експорт Web у CI, канал html, шрифти й звук у браузері, CORS онлайн-рекордів
All checks were successful
build / build (push) Successful in 2m45s
- export_presets: пресет Web (однопотоковий, без SharedArrayBuffer), game_web/index.html
- CI: офіційний web_nothreads шаблон через fetch_template.py, butler push game_web → канал html
- у браузері: вбудований DejaVu Sans Mono (+₿ з JetBrains Mono), без катакани в дощі, звук у режимі Stream,
  масштаб від розміру сторінки (до 60%), без міграції старої папки збережень
- online/server.py: Access-Control-Allow-Origin * і OPTIONS для веб-версії

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxyf7v7Lxdgh8dF5Y1
2026-12-01 13:52:57 +00:00
Claude
aa4f23ef1c itch/devlog: допис 4 журналу розробки (v1.0.77–v1.0.91)
All checks were successful
build / build (push) Successful in 47s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZz8CMmvTHjGLy1S6ac
2026-12-01 13:36:16 +00:00
Gitea Actions
d9d982145a game_godot: TinMerezhi.exe v1.0.91 2026-12-01 13:24:47 +00:00
Claude
6ec98bc9bb Сторінка гри: «Що нового» укр/англ з whatsnew.gd (ci/news.py → news.json на дзеркалі)
All checks were successful
ci-image / image (push) Successful in 14s
build / build (push) Successful in 2m30s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxa3KBighPXSxK7efY
2026-12-01 13:21:08 +00:00
Gitea Actions
024c766998 game_godot: TinMerezhi.exe v1.0.90 2026-12-01 13:14:42 +00:00
Claude
b50296086b Шифр-замок і гаманці українською: українські слова й абетка
All checks were successful
build / build (push) Successful in 2m30s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZwrSWfUSorSkAiXphZ
2026-12-01 13:11:18 +00:00
Gitea Actions
39bd9545b9 game_godot: TinMerezhi.exe v1.0.89 2026-12-01 13:03:02 +00:00
Claude
ca53082bf7 Новачок трохи легший: трасування −30% замість −25%
All checks were successful
build / build (push) Successful in 2m34s
DIFF_TRACE[0] 0.75 -> 0.7. Бот балансу, Новачок, сіди 1-40: 40/40 до і після,
середньо дій 1245 -> 1239.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZvMfd7QKpZn8YVeNpa
2026-12-01 12:59:35 +00:00
Gitea Actions
cbf9b9a3c6 game_godot: TinMerezhi.exe v1.0.88 2026-12-01 12:47:15 +00:00
Claude
4fe63f302a Merge branch 'main' of https://serv.tail9357bc.ts.net/junior/TinMerezhi
All checks were successful
build / build (push) Successful in 2m28s
2026-12-01 12:43:55 +00:00
Claude
54b93f7f28 CI: version.txt на дзеркалі читабельний для Caddy (був 600 через umask)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxa3KBighPXSxK7efY
2026-12-01 12:43:54 +00:00
Gitea Actions
5773d2a2d7 game_godot: TinMerezhi.exe v1.0.87 2026-12-01 12:39:29 +00:00
Claude
c0a8a64ad8 Merge branch 'main' of https://serv.tail9357bc.ts.net/junior/TinMerezhi
All checks were successful
build / build (push) Successful in 49s
2026-12-01 12:36:33 +00:00
Claude
cc3ff26523 Сторінка гри з рекордами (укр/англ) на tinmerezhi.duckdns.org: site/index.html, CI кладе її, картинки, version.txt і посилання на останній exe
All checks were successful
build / build (push) Successful in 3m4s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxa3KBighPXSxK7efY
2026-12-01 12:36:16 +00:00
Gitea Actions
9a672b073c game_godot: TinMerezhi.exe v1.0.86 2026-12-01 12:32:19 +00:00
Claude
cdd1c0b670 CI: ключ хоста дроплета для дзеркала exe
All checks were successful
ci-image / image (push) Successful in 14s
build / build (push) Successful in 2m27s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxa3KBighPXSxK7efY
2026-12-01 12:27:50 +00:00
Gitea Actions
572c02199b game_godot: TinMerezhi.exe v1.0.85 2026-12-01 12:25:08 +00:00
Claude
77ff2f62b4 Дзеркало exe: tinmerezhi.duckdns.org замість sslip.io
All checks were successful
build / build (push) Successful in 2m23s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxa3KBighPXSxK7efY
2026-12-01 12:21:53 +00:00
Gitea Actions
4484ca1089 game_godot: TinMerezhi.exe v1.0.84 2026-12-01 12:20:39 +00:00
Claude
b86ce56ef5 update качає exe з дзеркала на дроплеті (46-101-222-25.sslip.io), при збої — з Gitea; CI кладе exe на дзеркало через sftp (секрет MIRROR_SSH_KEY)
All checks were successful
build / build (push) Successful in 2m22s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxa3KBighPXSxK7efY
2026-12-01 12:17:23 +00:00
Gitea Actions
dd0fc8aaa7 game_godot: TinMerezhi.exe v1.0.83 2026-11-30 10:27:51 +00:00
Claude
5890f3607c Прикраси (дощ, стрічка, глітчі) на власному генераторі Gfx.rng: randf() гри не залежить від кадрів і таймерів, бот під Wine грає як у CI
All checks were successful
build / build (push) Successful in 2m22s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxdPyXJXoks2gzFtd2
2026-11-30 10:24:36 +00:00
Claude
5044bd2517 Дощ символів не крутить randf() без екрана: бот не залежить від швидкості машини (CI v1.0.81 впав на сіді 8:1:111)
Some checks failed
build / build (push) Failing after 2m12s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxdPyXJXoks2gzFtd2
2026-11-30 10:16:57 +00:00
Claude
97bf6a3928 Залишки аудиту: зовнішній шар пам'ятається після відступу (Параноя ×2.0), calm, кольори журналу, сервер
Some checks failed
build / build (push) Failing after 2m10s
- crack.gd: пароль і знання про зовнішній шар живуть на сервері між візитами, як і внутрішні шари; обладнання підказує раз на пароль. Причина довгого хвоста Параної: на захисті 7–8 кожен відступ давав новий пароль.
- Параноя: DIFF_TRACE 1.5 → 2.0, щоб медіана лишилась ~2200 дій (бот 80 сідів: 79/80, макс 2534, було до 3291).
- «Менше анімацій» зупиняє стрічку новин і дощ символів.
- Перебудова довгого журналу перемальовує емблеми, фішки й листи з кольорами.
- server.py: тайм-аут з'єднання 15 с, /stats кешується на 60 с.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxdPyXJXoks2gzFtd2
2026-11-30 10:13:00 +00:00
Gitea Actions
14f771b12a game_godot: TinMerezhi.exe v1.0.80 2026-11-30 06:14:45 +00:00
Claude
1de519c79c Новачок: +20% дій у термінових главах (T.DIFF_LIMIT)
All checks were successful
build / build (push) Successful in 2m21s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxdPyXJXoks2gzFtd2
2026-11-30 06:11:30 +00:00
Gitea Actions
5017664255 game_godot: TinMerezhi.exe v1.0.79 2026-11-30 06:07:21 +00:00
Claude
d2baf41c0d Аудит v1.0.78: арешт конфіскує файл «піти без логів», перегони на таких замовленнях, update посеред зламу
All checks were successful
build / build (push) Successful in 2m22s
- арешт на сервері з файлом «піти без логів» стирає його (+f): раніше connect + disconnect після арешту зараховували главу чи замовлення без повторного зламу (тест у features.gd)
- disconnect зараховує замовлення «піти без логів» ще онлайн: перегони за нього виграються, а не зникають мовчки
- update посеред зламу не перезапускає гру (+25% трасування після старту), як і зміна мови
- таймер вікна «Подобається гра?» не чіпає звільнену сцену (newgame/lang у перші 5 с)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxdPyXJXoks2gzFtd2
2026-11-30 06:04:05 +00:00
Gitea Actions
520c22e821 game_godot: TinMerezhi.exe v1.0.78 2026-11-29 10:34:48 +00:00
Claude
208d0aac5c Оптимізація: CRT-шар вимикається на нулі, tools/ не потрапляє в exe
All checks were successful
build / build (push) Successful in 2m22s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZwmRt6eUYiekz66wM8
2026-11-29 10:31:33 +00:00
Gitea Actions
27db08393f game_godot: TinMerezhi.exe v1.0.77 2026-11-29 10:18:08 +00:00
Claude
4b306a368a Нова заставка при запуску (капюшон з оком мережі + нічний Київ)
All checks were successful
build / build (push) Successful in 2m23s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZuUKCAkyg45yitgPGt
2026-11-29 10:14:52 +00:00
Claude
7b1d552bb1 itch: нова обкладинка (капюшон з оком мережі + нічний Київ)
All checks were successful
build / build (push) Successful in 48s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZuUKCAkyg45yitgPGt
2026-11-29 10:13:41 +00:00
Claude
ab605e7678 itch/devlog: назви дописів 1 і 2 двома мовами
All checks were successful
build / build (push) Successful in 46s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZz8CMmvTHjGLy1S6ac
2026-11-29 10:01:50 +00:00
Claude
4bb27b63b7 itch/devlog: назва допису 3 двома мовами
All checks were successful
build / build (push) Successful in 47s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZz8CMmvTHjGLy1S6ac
2026-11-29 10:00:58 +00:00
Claude
81c79159a5 itch/devlog: українське посилання на трейлер в українській частині допису 3
All checks were successful
build / build (push) Successful in 48s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZz8CMmvTHjGLy1S6ac
2026-11-29 09:59:22 +00:00
Claude
bd267a09f7 itch/devlog: посилання на трейлери в дописі 3
Some checks failed
build / build (push) Has been cancelled
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZz8CMmvTHjGLy1S6ac
2026-11-29 09:59:09 +00:00
Claude
37f0dc0889 itch/devlog: допис 3 журналу розробки (v1.0.73–v1.0.76)
All checks were successful
build / build (push) Successful in 47s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZz8CMmvTHjGLy1S6ac
2026-11-29 09:53:11 +00:00
Claude
48b745a8f7 itch/trailer: скрипти монтажу трейлера і GIF для сторінки
Some checks failed
build / build (push) Has been cancelled
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxdn3GSjky6KSDLdNV
2026-11-29 09:52:47 +00:00
Claude
b7c19cc989 itch: англійська назва на широкій обкладинці й картинці для соцмереж
All checks were successful
build / build (push) Successful in 47s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxdn3GSjky6KSDLdNV
2026-11-29 09:47:18 +00:00
Claude
1d8585823e tests/trailer.gd: запис ігроладу для трейлера (Godot movie writer)
All checks were successful
build / build (push) Successful in 47s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxdn3GSjky6KSDLdNV
2026-11-29 08:59:24 +00:00
Gitea Actions
d53dbbfd8d game_godot: TinMerezhi.exe v1.0.76 2026-11-29 08:43:23 +00:00
Claude
bfac0e68e6 Прохання оцінити гру на itch.io після акту; англійська назва на обкладинці
All checks were successful
build / build (push) Successful in 2m23s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxdn3GSjky6KSDLdNV
2026-11-29 08:40:05 +00:00
Gitea Actions
2041c668dd game_godot: TinMerezhi.exe v1.0.75 2026-11-29 08:18:14 +00:00
Claude
22727581b6 Аудит v1.0.74: Параноя знову важка (замок + код), лід повертає відеокарту, чесні повідомлення замків
All checks were successful
build / build (push) Successful in 2m21s
- Параноя: замок сервера — окрема перешкода, за ним усі шари коду (T.LOCK_EXTRA).
  Бот 40 сідів: 1834 → 2158 дій (v1.0.71 було 2118), 40/40; Новачок і Звичайний без змін.
- Чорний лід, розтоплений посеред зламу, повертає безкоштовні спроби відеокарти й підказки ШІ.
- call/dict, що відкрили замок, не обіцяють «відомих цифр» пароля (бонус і так губився).
- abort шифр-замка більше не каже про гаманець.
- Описи складності згадують замки Параної; рядки «Що нового».

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZvZmNxPHEtVzdKDn4D
2026-11-29 08:15:03 +00:00
Claude
87c64bbb59 itch/devlog: повний англійський переклад дописів 1 і 2
All checks were successful
build / build (push) Successful in 50s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZvNcfPQ1TLwYW9no6y
2026-11-28 14:46:41 +00:00
Gitea Actions
6ec25200b3 game_godot: TinMerezhi.exe v1.0.74 2026-11-28 13:58:02 +00:00
Claude
33a6bbcc8f Масштаб інтерфейсу: не більший, ніж влазить у вікно; перерахунок при зміні розміру вікна
All checks were successful
build / build (push) Successful in 2m21s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZyRHyWby5EKN7ePWjv
2026-11-28 13:54:45 +00:00
Gitea Actions
e49c13053f game_godot: TinMerezhi.exe v1.0.73 2026-11-28 13:37:23 +00:00
Claude
0cd3039438 Прибрати випадковий .uid тимчасового скрипта
All checks were successful
build / build (push) Successful in 48s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZyRHyWby5EKN7ePWjv
2026-11-28 13:34:20 +00:00
Claude
a05daaa703 Масштаб інтерфейсу: авто за DPI екрана + вибір 100–200% у налаштуваннях
All checks were successful
build / build (push) Successful in 2m59s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZyRHyWby5EKN7ePWjv
2026-11-28 13:34:04 +00:00
Claude
22c937f600 itch/devlog: допис 2 журналу розробки (v1.0.64–v1.0.72)
All checks were successful
build / build (push) Successful in 49s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZvNcfPQ1TLwYW9no6y
2026-11-28 13:28:49 +00:00
Gitea Actions
7b17b5451a game_godot: TinMerezhi.exe v1.0.72 2026-11-28 11:11:54 +00:00
Claude
26587f1724 Різноманіття: замки серверів, чорний лід, властивості, цілі замовлень
All checks were successful
build / build (push) Successful in 2m30s
- variety.gd: зовнішній замок частини серверів відкриває firewall/dict/decrypt/call
  замість коду; чорний лід (захист 5+) — помилки ×2, розтоплює exploit ice або
  нова програма icebreaker; випадкові властивості серверів на гру (адмін,
  застаріла система, без логів, приманка); цілі замовлень: download, rm,
  upload фальшивки, без логів, знайти сервер.
- Бот балансу грає замки, гаманці, лід і цілі; bm_rng сідується сідом бота.
- Тести старих механік ставлять g.variety = false; нові перевірки в features.gd.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZvNcfPQ1TLwYW9no6y
2026-11-28 11:08:36 +00:00
Gitea Actions
31cc4322d9 game_godot: TinMerezhi.exe v1.0.71 2026-11-28 08:12:25 +00:00
70 changed files with 2515 additions and 155 deletions

View File

@@ -85,19 +85,67 @@ jobs:
cp icon.ico tools/
# go-winres (from the CI image) puts the icon into the exe
(cd tools && go-winres patch --in winres.json --no-backup template.exe)
sed -i "s|^custom_template/release=.*|custom_template/release=\"$PWD/tools/template.exe\"|" export_presets.cfg
# only the first preset (Windows Desktop): the Web preset keeps the official web template
sed -i "0,/^custom_template\/release=.*/s||custom_template/release=\"$PWD/tools/template.exe\"|" export_presets.cfg
# version for the in-game updater: tag v1.0.4 -> 1.0.4
sed -i "s|^config/version=.*|config/version=\"${GITHUB_REF_NAME#v}\"|" project.godot
mkdir -p ../game_godot
godot --headless --path . --export-release "Windows Desktop" ../game_godot/TinMerezhi.exe
ls -l ../game_godot/TinMerezhi.exe
- name: Export Web build (itch.io channel html, played in the browser)
if: startsWith(github.ref, 'refs/tags/')
# the exe release must not depend on the web build: without game_web/ the itch step just skips the html channel
continue-on-error: true
working-directory: source_godot
run: |
# official single-threaded web template (~10 MB taken from the 1 GB tpz by HTTP Range): no SharedArrayBuffer needed on itch
python3 tools/fetch_template.py web_nothreads_release.zip
mkdir -p ../game_web
godot --headless --path . --export-release "Web" ../game_web/index.html
test -s ../game_web/index.wasm && ls -l ../game_web
- name: Windows exe under Wine (the game, tests and screenshots on the real template)
if: startsWith(github.ref, 'refs/tags/')
working-directory: source_godot
run: |
TEMPLATE=tools/template.exe sh ../ci/wine_check.sh ../game_godot/TinMerezhi.exe /tmp/shots
- name: Mirror on the droplet (fast download for the updater, game page site/index.html)
if: startsWith(github.ref, 'refs/tags/')
env:
# repo secret MIRROR_SSH_KEY: private key of the sftp-only user "mirror" on the droplet; without it this step is skipped
KEY: ${{ secrets.MIRROR_SSH_KEY }}
TAG: ${{ github.ref_name }}
run: |
if [ -z "$KEY" ] || [ ! -s ci/mirror_known_hosts ]; then echo "mirror: no MIRROR_SSH_KEY or ci/mirror_known_hosts, skipped (the updater falls back to Gitea)"; exit 0; fi
python3 ci/news.py source_godot/whatsnew.gd /tmp/news.json
echo "$TAG" > /tmp/version.txt # before umask 077: sftp put keeps the mode, Caddy must be able to read it
umask 077; printf '%s\n' "$KEY" > /tmp/mirror_key
# before the Release: once the game sees the new tag, the mirror already has its exe (the updater checks the size)
sftp -b - -i /tmp/mirror_key -o UserKnownHostsFile=ci/mirror_known_hosts -o StrictHostKeyChecking=yes mirror@46.101.222.25 <<EOF \
|| echo "::warning::mirror upload failed: the updater will download from Gitea"
-mkdir /srv/tm/$TAG
put game_godot/TinMerezhi.exe /srv/tm/$TAG/TinMerezhi.exe.tmp
-rm /srv/tm/$TAG/TinMerezhi.exe
rename /srv/tm/$TAG/TinMerezhi.exe.tmp /srv/tm/$TAG/TinMerezhi.exe
-rm /srv/tm/TinMerezhi.exe
symlink /srv/tm/$TAG/TinMerezhi.exe /srv/tm/TinMerezhi.exe
put /tmp/version.txt /srv/tm/version.txt
put /tmp/news.json /srv/tm/news.json
-mkdir /srv/tm/img
put itch/wide_cover_2520x1080.png /srv/tm/img/
put itch/social_1200x630.png /srv/tm/img/
put itch/favicon_512.png /srv/tm/img/
put itch/screenshots/1_start.png /srv/tm/img/
put itch/screenshots/2_crack.png /srv/tm/img/
put itch/screenshots/6_act5.png /srv/tm/img/
put itch/screenshots/11_endless_en.png /srv/tm/img/
put site/index.html /srv/tm/index.html
EOF
rm -f /tmp/mirror_key
echo "mirror: https://tinmerezhi.duckdns.org/$TAG/TinMerezhi.exe"
- name: Upload to Release
if: startsWith(github.ref, 'refs/tags/')
env:
@@ -135,6 +183,7 @@ jobs:
run: |
if [ -z "$BUTLER_API_KEY" ] || [ -z "$ITCH_TARGET" ]; then echo "itch.io: no BUTLER_API_KEY / ITCH_TARGET, skipped"; exit 0; fi
butler push game_godot "$ITCH_TARGET:windows" --userversion "${TAG#v}"
if [ -s game_web/index.html ]; then butler push game_web "$ITCH_TARGET:html" --userversion "${TAG#v}"; else echo "::warning::no web build, html channel not updated"; fi
- name: Latest exe into game_godot/ on main (Git LFS, replaces the previous one)
if: startsWith(github.ref, 'refs/tags/')

1
.gitignore vendored
View File

@@ -19,3 +19,4 @@ Thumbs.db
desktop.ini
ci/template.exe
__pycache__/
game_web/

View File

@@ -13,7 +13,9 @@
- **Дивні прохання** незнайомців: 8 рідкісних одноразових квестів з унікальною нагородою
- **Соціальна інженерія**: подзвони працівнику сервера (`call`) і вивідай частину пароля — секретарка, сисадмін, охоронець і стажистка відповідають на різні хитрощі
- **Криптоголоволомки**: зашифровані гаманці на зламаних серверах (`decrypt`) — Цезар, письмо задом наперед, Атбаш
- **Чорний ринок** (`market`): експлойти лише за крипту з гаманців — розбирач шарів, фальшива наводка суперникам, хабар слідчому, цифрове алібі
- **Чорний ринок** (`market`): експлойти лише за крипту з гаманців — розбирач шарів, фальшива наводка суперникам, хабар слідчому, цифрове алібі, розтоплювач льоду
- **Замки й властивості серверів**: частину серверів відкриває не код, а фаєрвол, пароль-слово, шифр чи дзвінок; чорний лід на сильних серверах; випадкові властивості на кожну гру (адмін, застаріла система, без логів, приманка)
- **Цілі замовлень**: вкрасти, стерти (`rm`), підмінити фальшивкою (`upload`), піти без логів, знайти сервер самому
- **Нескінченна мережа** після фіналу: замовлення Брокера, зростаюча глибина і таблиця рекордів
- **Щоденний виклик** (`daily`): та сама мережа й ті самі 10 замовлень для всіх гравців сьогодні, онлайн-таблиця дня
- **New Game+** після фіналу (`ngplus`): сюжет спочатку з навичками й модулями, а Пуйло пам'ятає тебе — сильніше трасування й нові репліки

1
ci/mirror_known_hosts Normal file
View File

@@ -0,0 +1 @@
46.101.222.25 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDWagZdsEc7Ljc7qO0TudlpbCMtZZ4hlGbfvSwqxiJNc

18
ci/news.py Normal file
View File

@@ -0,0 +1,18 @@
# Game news for the page on the mirror: whatsnew.gd CHANGES (game-only, uk/en) -> news.json [{"v", "uk": [...], "en": [...]}], newest first.
import json, re, sys
src, out = sys.argv[1], sys.argv[2]
body = open(src, encoding="utf-8").read().split("const CHANGES := [", 1)[1].split("\n]", 1)[0]
news = []
for line in body.splitlines():
line = line.strip().rstrip(",")
if not line.startswith("["):
continue
v, uk, en = json.loads(line)
if not news or news[-1]["v"] != v:
news.append({"v": v, "uk": [], "en": []})
news[-1]["uk"].append(uk)
news[-1]["en"].append(en)
assert news and all(len(n["uk"]) == len(n["en"]) for n in news), "no CHANGES parsed"
json.dump(news, open(out, "w", encoding="utf-8"), ensure_ascii=False)
print(f"news.json: {len(news)} versions")

BIN
game_godot/TinMerezhi.exe (Stored with Git LFS)

Binary file not shown.

View File

@@ -238,7 +238,7 @@ help <команда> — докладно про будь-яку команду
Обирається на початку (до першого зламу): difficulty novice | normal | paranoid.
Новачок — трасування −25%, слідчі повільніші, +2 арешти.
Звичайний — як задумано.
Параноя — трасування +50%, слідчі швидші, на 1 арешт менше; гра зберігається
Параноя — трасування +90%, слідчі швидші, на 1 арешт менше; гра зберігається
ЛИШЕ НА ПОЧАТКУ АКТУ: закрив вікно — повернешся на початок акту.
МІНІ-ІГРИ ЗЛАМУ
@@ -286,9 +286,36 @@ decrypt: ключ — англійське слово, відома його п
layer Розбирач шарів 6 🪙 під час зламу відкриває поточний шар
jam Фальшива наводка 4 🪙 суперник іде з перегонів, замовлення твоє
bribe Хабар слідчому 8 🪙 закриває всі розслідування
ice Розтоплювач льоду 2 🪙 розтоплює чорний лід на сервері (до 5 шт.)
alibi Цифрове алібі 12 🪙 само скасовує наступний арешт (лише одне)
Застосувати: exploit <id>. Гроші за крипту не купиш і навпаки, тож баланс
сюжету не змінюється.
Застосувати: exploit <id>. Гроші за крипту не купиш і навпаки.
ЗАМКИ, ЧОРНИЙ ЛІД І ВЛАСТИВОСТІ СЕРВЕРІВ
=======================================
Зовнішній замок частини серверів (захист 2+) відкриває не код, а інша атака.
scan показує значок, connect пише, що робити:
🧱 фаєрвол — firewall 📖 пароль-слово — dict
🔐 шифр — decrypt 📞 двофакторка — call
Успіх пробиває зовнішній шар (на простих серверах — це вже доступ), далі
внутрішні шари — як завжди, crack. Провал — трасування, повтор лише після
перепідключення. Замки однакові в усіх гравців і в щоденному виклику.
🧊 Чорний лід (частина серверів захисту 5+): помилки зламу дають удвічі більше
трасування, відеокарта й ШІ-асистент не допомагають. Розтопити: exploit ice
(крипта з гаманців) або use icebreaker (програма Криголам, write icebreaker).
Лід наростає знову, коли сервер закривають.
Кожна нова гра роздає серверам випадкові властивості (лише сюжет):
👤 пильний адмін — коли онлайн, помилки +50% трасування (можна зайти пізніше)
🕸 застаріла система — код зовнішнього шару на 1 цифру коротший
📼 зламане логування — тут не лишається слідів
🍯 приманка — admin_passwords.txt у ls; download — тривога і +25% трасування
ЦІЛІ ЗАМОВЛЕНЬ
==============
jobs показує ціль кожного замовлення:
вкрасти — download; стерти — rm <файл>; підмінити фальшивкою — upload <файл>;
вкрасти й піти без логів — download, wipe, disconnect (наслідив — спробуй знову);
знайти — сервер не названо, лише його захист: шукай файл сам (ls).
Складніші цілі платять більше (до +30%).
НЕСКІНЧЕННА МЕРЕЖА
==================

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 KiB

After

Width:  |  Height:  |  Size: 191 KiB

View File

@@ -1,9 +1,9 @@
# Допис 1 журналу розробки (v1.0.56 – v1.0.63)
**Title:** Оновлення v1.0.56–v1.0.63: щоденний виклик, живий сюжет і складніша гра
**Title:** Оновлення v1.0.56–v1.0.63: щоденний виклик, живий сюжет і складніша гра / Update v1.0.56–v1.0.63: daily challenge, a living story and a harder game
**Post type:** General Update
**Tags:** update, gameplay, balance, story
**Languages:** Українська, English
**Languages:** Українська, English (повний переклад)
**Cover image:** itch/screenshots/2_crack.png (або без обкладинки, itch візьме з проєкту)
## Content
@@ -64,14 +64,54 @@
<hr>
<h2>English</h2>
<h2>What's new in recent versions</h2>
<h3>Daily challenge</h3>
<ul>
<li><b>Daily challenge</b> (<code>daily</code>): 10 contracts, the same for everyone, with a fixed loadout and a daily online leaderboard. Every saved action is worth +50 points.</li>
<li><b>Branching story</b>: your choices in Acts IV and V now reshape the following acts, and Act VI has four endings depending on your Act IV choice. New mission types: multi-part uploads, recon targets hidden until you find a clue, and clean escapes that only count if you leave no logs.</li>
<li><b>Living network map</b>: investigators visibly follow your trail home, and rivals race toward the target.</li>
<li><b>Port utilities level 1–3</b>: run <code>make</code> again at home to upgrade. Level 3 opens ports with no trace and no net.log entry.</li>
<li><b>Gradual help</b>: commands unlock as you level up and progress the story (<code>help all</code> still lists everything).</li>
<li><b>Balance</b>: about 10–15% harder overall, skills are capped by player level, Paranoia saves only at the start of each act.</li>
<li>New startup splash with the game logo.</li>
<li>New <code>daily</code> command: 10 contracts of the day, the same for every player.</li>
<li>Everyone starts with the same loadout (level, hardware, skills) on Normal difficulty.</li>
<li>Every action you save is worth +50 points, and the daily online leaderboard shows who did best. Unlimited attempts.</li>
</ul>
<p>Get the update in game with <code>update</code>. Thanks for playing!</p>
<h3>A story that answers your choices</h3>
<ul>
<li>Decisions at the end of Acts IV and V now change the following acts: who tells the story, which doors are open and which are shut.</li>
<li>The Act VI finale has four variants depending on your choice in Act IV.</li>
<li>Before the decisive choices, an ally sends you advice.</li>
<li>New mission types: a patch you have to upload in parts; recon, where the target stays unknown until you find a clue; a clean escape that only counts if you disconnect without a single log entry.</li>
</ul>
<h3>A living network map</h3>
<ul>
<li>The map shows investigators following your trail from the server with your logs to your home.</li>
<li>In races, your rival also moves toward the target, so you can see who's ahead.</li>
<li>Nodes the tracker has already passed glow red.</li>
</ul>
<h3>Port utilities: levels 1–3</h3>
<ul>
<li>Running <code>make</code> on a utility again at home upgrades it.</li>
<li>Level 2 halves the trace, level 3 opens the port with no trace and no net.log entry.</li>
</ul>
<h3>Gradual learning</h3>
<ul>
<li>At the start, <code>help</code> shows only the basic commands; the rest unlock with your level and the story. After each new level, the game tells you what became available.</li>
<li><code>help all</code> still shows everything.</li>
</ul>
<h3>Balance</h3>
<ul>
<li>The game is about 10–15% longer and tenser: more experience per level, lower job pay, faster trace on Novice and Normal.</li>
<li>Skills are now capped by player level (up to 8 at level 29), so progression is smoother.</li>
<li>Paranoia: the game saves only at the start of each act.</li>
</ul>
<h3>Small things</h3>
<ul>
<li>The game now starts with a splash screen showing the Shadow Network logo.</li>
</ul>
<p>Get the update in game with the <code>update</code> command. Thanks for playing!</p>
```

View File

@@ -45,12 +45,45 @@
English
• Daily challenge (daily): 10 contracts, the same for everyone, with a fixed loadout and a daily online leaderboard. Every saved action is worth +50 points.
• Branching story: your choices in Acts IV and V now reshape the following acts, and Act VI has four endings depending on your Act IV choice. New mission types: multi-part uploads, recon targets hidden until you find a clue, and clean escapes that only count if you leave no logs.
• Living network map: investigators visibly follow your trail home, and rivals race toward the target.
• Port utilities level 1–3: run make again at home to upgrade. Level 3 opens ports with no trace and no net.log entry.
• Gradual help: commands unlock as you level up and progress the story (help all still lists everything).
• Balance: about 10–15% harder overall, skills are capped by player level, Paranoia saves only at the start of each act.
• New startup splash with the game logo.
What's new in recent versions
Get the update in game with update. Thanks for playing!
Daily challenge
• New daily command: 10 contracts of the day, the same for every player.
• Everyone starts with the same loadout (level, hardware, skills) on Normal difficulty.
• Every action you save is worth +50 points, and the daily online leaderboard shows who did best. Unlimited attempts.
A story that answers your choices
• Decisions at the end of Acts IV and V now change the following acts: who tells the story, which doors are open and which are shut.
• The Act VI finale has four variants depending on your choice in Act IV.
• Before the decisive choices, an ally sends you advice.
• New mission types: a patch you have to upload in parts; recon, where the target stays unknown until you find a clue; a clean escape that only counts if you disconnect without a single log entry.
A living network map
• The map shows investigators following your trail from the server with your logs to your home.
• In races, your rival also moves toward the target, so you can see who's ahead.
• Nodes the tracker has already passed glow red.
Port utilities: levels 1–3
• Running make on a utility again at home upgrades it.
• Level 2 halves the trace, level 3 opens the port with no trace and no net.log entry.
Gradual learning
• At the start, help shows only the basic commands; the rest unlock with your level and the story. After each new level, the game tells you what became available.
• help all still shows everything.
Balance
• The game is about 10–15% longer and tenser: more experience per level, lower job pay, faster trace on Novice and Normal.
• Skills are now capped by player level (up to 8 at level 29), so progression is smoother.
• Paranoia: the game saves only at the start of each act.
Small things
• The game now starts with a splash screen showing the Shadow Network logo.
Get the update in game with the update command. Thanks for playing!

View File

@@ -0,0 +1,105 @@
# Допис 2 журналу розробки (v1.0.64 – v1.0.72)
**Title:** Оновлення v1.0.72: замки, чорний лід і замовлення з різними цілями / Update v1.0.72: locks, black ice and jobs with different goals
**Post type:** General Update
**Tags:** update, gameplay, new features
**Languages:** Українська, English (повний переклад)
**Cover image:** itch/screenshots/2_crack.png (або без обкладинки, itch візьме з проєкту)
## Content
Найпростіше вставити через кнопку `<>` (джерело HTML) у редакторі itch, тоді списки й заголовки збережуться. Перед збереженням вийди з режиму `<>`, інакше itch пише "body: expected text".
```html
<h2>Що нового в останніх версіях</h2>
<p>Головне в цьому оновленні: злам і замовлення більше не однакові. Кожен сервер тепер може вимагати свого підходу.</p>
<h3>Різні замки на серверах</h3>
<ul>
<li>Частину серверів відкриває не код, а інша атака: обхід фаєрвола (<code>firewall</code>), пароль-слово з дампу (<code>dict</code>), шифр (<code>decrypt</code>) або дзвінок працівнику, якому приходить код двофакторки (<code>call</code>).</li>
<li>Тип замка видно значком у <code>scan</code>: 🧱 📖 🔐 📞.</li>
<li>На простих серверах замок одразу дає доступ, на сильних відкриває зовнішній шар, а далі як завжди <code>crack</code>.</li>
<li>Замки однакові в усіх гравців і в щоденному виклику.</li>
</ul>
<h3>Чорний лід</h3>
<ul>
<li>Деякі сильні сервери вкриті чорним льодом 🧊: помилки під час зламу дають удвічі більше трасування, а відеокарта й ШІ-асистент не допомагають.</li>
<li>Розтопити лід можна криптою з гаманців (<code>exploit ice</code> на чорному ринку) або новою програмою Криголам (<code>write icebreaker</code>, <code>use icebreaker</code>).</li>
<li>Тепер крипта, чорний ринок і власні програми справді потрібні.</li>
</ul>
<h3>Сервери з характером</h3>
<p>Кожна нова гра роздає серверам випадкові властивості, тож проходження відрізняються:</p>
<ul>
<li>👤 Пильний адмін: коли він онлайн, помилки дорожчі. Можна відключитися й зайти пізніше.</li>
<li>🕸 Застаріла система: код коротший на одну цифру.</li>
<li>📼 Зламане логування: тут не лишається слідів.</li>
<li>🍯 Приманка: файл із паролями адміна, який краще не чіпати.</li>
</ul>
<h3>Замовлення з різними цілями</h3>
<ul>
<li>Не лише «вкрасти»: тепер замовник може попросити стерти файл (нова команда <code>rm</code>), підмінити його фальшивкою (<code>upload</code>), вкрасти й піти без жодного логу або знайти сервер самому, бо його назву не кажуть.</li>
<li>Складніші цілі платять до +30%.</li>
</ul>
<h3>Дрібніші зміни</h3>
<ul>
<li>Після оновлення гра показує вікно «Що нового».</li>
<li>Щоденний виклик чесний для всіх: програми, вільні очки навичок і образи суперників з минулої гри туди не переходять.</li>
<li>«Менше анімацій» тепер вимикає й трусіння екрана від помилок та глітч при арешті.</li>
<li>Список замовлень показує оплату з урахуванням звання.</li>
</ul>
<p>Оновлення підтягується в грі командою <code>update</code>. Дякую, що граєте!</p>
<hr>
<h2>English</h2>
<h2>What's new in recent versions</h2>
<p>The main point of this update: hacks and jobs are no longer all the same. Every server can now call for its own approach.</p>
<h3>Different locks on servers</h3>
<ul>
<li>Some servers are opened not by a code but by another attack: a firewall bypass (<code>firewall</code>), a password word from a memory dump (<code>dict</code>), a cipher (<code>decrypt</code>) or a phone call to an employee who receives the two-factor code (<code>call</code>).</li>
<li>The lock type shows as an icon in <code>scan</code>: 🧱 📖 🔐 📞.</li>
<li>On simple servers the lock gives you access right away; on strong ones it opens the outer layer, and then it's <code>crack</code> as usual.</li>
<li>Locks are the same for every player and in the daily challenge.</li>
</ul>
<h3>Black ice</h3>
<ul>
<li>Some strong servers are covered in black ice 🧊: mistakes during a crack give double trace, and the GPU and AI assistant don't help.</li>
<li>You can melt the ice with crypto from wallets (<code>exploit ice</code> on the black market) or with the new Icebreaker program (<code>write icebreaker</code>, <code>use icebreaker</code>).</li>
<li>Crypto, the black market and your own programs are now genuinely needed.</li>
</ul>
<h3>Servers with character</h3>
<p>Every new game gives servers random traits, so playthroughs differ:</p>
<ul>
<li>👤 A watchful admin: while they're online, mistakes cost more. You can disconnect and come back later.</li>
<li>🕸 An outdated system: the code is one digit shorter.</li>
<li>📼 Broken logging: you leave no traces here.</li>
<li>🍯 Bait: a file with the admin's passwords that you'd better not touch.</li>
</ul>
<h3>Jobs with different goals</h3>
<ul>
<li>Not just "steal": a client may now ask you to erase a file (new <code>rm</code> command), swap it for a fake (<code>upload</code>), steal it and leave without a single log, or find the server yourself because its name isn't given.</li>
<li>Harder goals pay up to +30%.</li>
</ul>
<h3>Smaller changes</h3>
<ul>
<li>After an update, the game shows a "What's new" window.</li>
<li>The daily challenge is fair for everyone: programs, unspent skill points and rivals' grudges from your last game no longer carry over.</li>
<li>"Reduce motion" now also turns off the screen shake on mistakes and the glitch on arrest.</li>
<li>The job list shows pay including your rank bonus.</li>
</ul>
<p>Get the update in game with the <code>update</code> command. Thanks for playing!</p>
```

View File

@@ -0,0 +1,83 @@
Що нового в останніх версіях
Головне в цьому оновленні: злам і замовлення більше не однакові. Кожен сервер тепер може вимагати свого підходу.
Різні замки на серверах
• Частину серверів відкриває не код, а інша атака: обхід фаєрвола (firewall), пароль-слово з дампу (dict), шифр (decrypt) або дзвінок працівнику, якому приходить код двофакторки (call).
• Тип замка видно значком у scan: 🧱 📖 🔐 📞.
• На простих серверах замок одразу дає доступ, на сильних відкриває зовнішній шар, а далі як завжди crack.
• Замки однакові в усіх гравців і в щоденному виклику.
Чорний лід
• Деякі сильні сервери вкриті чорним льодом 🧊: помилки під час зламу дають удвічі більше трасування, а відеокарта й ШІ-асистент не допомагають.
• Розтопити лід можна криптою з гаманців (exploit ice на чорному ринку) або новою програмою Криголам (write icebreaker, use icebreaker).
• Тепер крипта, чорний ринок і власні програми справді потрібні.
Сервери з характером
Кожна нова гра роздає серверам випадкові властивості, тож проходження відрізняються:
• 👤 Пильний адмін: коли він онлайн, помилки дорожчі. Можна відключитися й зайти пізніше.
• 🕸 Застаріла система: код коротший на одну цифру.
• 📼 Зламане логування: тут не лишається слідів.
• 🍯 Приманка: файл із паролями адміна, який краще не чіпати.
Замовлення з різними цілями
• Не лише «вкрасти»: тепер замовник може попросити стерти файл (нова команда rm), підмінити його фальшивкою (upload), вкрасти й піти без жодного логу або знайти сервер самому, бо його назву не кажуть.
• Складніші цілі платять до +30%.
Дрібніші зміни
• Після оновлення гра показує вікно «Що нового».
• Щоденний виклик чесний для всіх: програми, вільні очки навичок і образи суперників з минулої гри туди не переходять.
• «Менше анімацій» тепер вимикає й трусіння екрана від помилок та глітч при арешті.
• Список замовлень показує оплату з урахуванням звання.
Оновлення підтягується в грі командою update. Дякую, що граєте!
———
English
What's new in recent versions
The main point of this update: hacks and jobs are no longer all the same. Every server can now call for its own approach.
Different locks on servers
• Some servers are opened not by a code but by another attack: a firewall bypass (firewall), a password word from a memory dump (dict), a cipher (decrypt) or a phone call to an employee who receives the two-factor code (call).
• The lock type shows as an icon in scan: 🧱 📖 🔐 📞.
• On simple servers the lock gives you access right away; on strong ones it opens the outer layer, and then it's crack as usual.
• Locks are the same for every player and in the daily challenge.
Black ice
• Some strong servers are covered in black ice 🧊: mistakes during a crack give double trace, and the GPU and AI assistant don't help.
• You can melt the ice with crypto from wallets (exploit ice on the black market) or with the new Icebreaker program (write icebreaker, use icebreaker).
• Crypto, the black market and your own programs are now genuinely needed.
Servers with character
Every new game gives servers random traits, so playthroughs differ:
• 👤 A watchful admin: while they're online, mistakes cost more. You can disconnect and come back later.
• 🕸 An outdated system: the code is one digit shorter.
• 📼 Broken logging: you leave no traces here.
• 🍯 Bait: a file with the admin's passwords that you'd better not touch.
Jobs with different goals
• Not just "steal": a client may now ask you to erase a file (new rm command), swap it for a fake (upload), steal it and leave without a single log, or find the server yourself because its name isn't given.
• Harder goals pay up to +30%.
Smaller changes
• After an update, the game shows a "What's new" window.
• The daily challenge is fair for everyone: programs, unspent skill points and rivals' grudges from your last game no longer carry over.
• "Reduce motion" now also turns off the screen shake on mistakes and the glitch on arrest.
• The job list shows pay including your rank bonus.
Get the update in game with the update command. Thanks for playing!

View File

@@ -0,0 +1,91 @@
# Допис 3 журналу розробки (v1.0.73 – v1.0.76)
**Title:** Оновлення v1.0.76: трейлер, масштаб інтерфейсу і важка Параноя / Update v1.0.76: trailer, interface scale and a harder Paranoid
**Post type:** General Update
**Tags:** update, trailer, gameplay
**Languages:** Українська, English (повний переклад)
**Cover image:** кадр із трейлера або itch/wide_cover_2520x1080.png
## Content
Найпростіше вставити через кнопку `<>` (джерело HTML) у редакторі itch, тоді списки й заголовки збережуться. Перед збереженням вийди з режиму `<>`, інакше itch пише "body: expected text".
**Трейлер:** посилання вже вставлені (українське відео в українській частині, англійське в англійській). Щоб відео було вбудованим плеєром, а не лише посиланням, після вставки HTML постав курсор на окремий рядок під «Трейлер» і встав посилання через кнопку вбудовування (Embed) в редакторі itch.
```html
<h2>Що нового в останніх версіях</h2>
<p>У гри з'явився трейлер і англійська назва: <strong>Shadow Net · Тінь Мережі</strong>. А в самій грі стало зручніше грати на ноутбуках, і Параноя знову по-справжньому важка.</p>
<h3>Трейлер</h3>
<p>Півтори хвилини справжнього ігроладу: сканування мережі, злам кодів, мапа серверів і трасування, що наздоганяє. Дивитися: <a href="https://www.youtube.com/watch?v=4ovaVhqCdK8">https://www.youtube.com/watch?v=4ovaVhqCdK8</a></p>
<h3>Масштаб інтерфейсу</h3>
<ul>
<li>У налаштуваннях з'явився масштаб інтерфейсу від 100% до 200%.</li>
<li>За замовчуванням він береться з масштабу Windows, тож на ноутбуках з високою роздільністю текст і кнопки більші й не дрібні.</li>
<li>Масштаб більше не виштовхує кнопки за край екрана: він зменшується до того, що влазить у вікно, і перераховується, коли змінюєш розмір вікна.</li>
</ul>
<h3>Параноя знову важка</h3>
<ul>
<li>Після появи замків на серверах найвища складність стала помітно коротшою: замок часто відкривав сервер одразу.</li>
<li>Тепер на Параної замок лише перша перешкода. За ним ще треба зламати код з усіма шарами.</li>
<li>Складності Новачок і Звичайний не змінилися.</li>
</ul>
<h3>Виправлення</h3>
<ul>
<li>Чорний лід, розтоплений посеред зламу, тепер повертає допомогу відеокарти й ШІ-асистента.</li>
<li>Замок, відкритий дзвінком чи словом з дампу, більше не обіцяє «відомих цифр» пароля, яких потім не буде.</li>
<li>Перерваний злам шифр-замка більше не пише зайвого про гаманець.</li>
</ul>
<h3>Дрібніші зміни</h3>
<ul>
<li>Після першого акту гра один раз запитає, чи не хочеш ти оцінити її на itch.io. Більше не набридатиме.</li>
<li>Англійська версія гри тепер називається Shadow Net.</li>
</ul>
<p>Оновлення підтягується в грі командою <code>update</code>. Якщо гра подобається, оцінка на itch.io дуже допомагає. Дякую, що граєте!</p>
<hr>
<h2>English</h2>
<h2>What's new in recent versions</h2>
<p>The game now has a trailer and an English name: <strong>Shadow Net · Тінь Мережі</strong>. In the game itself, playing on laptops is more comfortable, and Paranoid is properly hard again.</p>
<h3>Trailer</h3>
<p>A minute and a half of real gameplay: scanning the network, cracking codes, the server map and a trace that keeps catching up. Watch it: <a href="https://www.youtube.com/watch?v=KeN4H3WhOXI">https://www.youtube.com/watch?v=KeN4H3WhOXI</a></p>
<h3>Interface scale</h3>
<ul>
<li>Settings now have an interface scale from 100% to 200%.</li>
<li>By default it follows the Windows scale, so on high-resolution laptops text and buttons are bigger instead of tiny.</li>
<li>The scale no longer pushes buttons off the screen: it shrinks to what fits the window and is recalculated when you resize the window.</li>
</ul>
<h3>Paranoid is hard again</h3>
<ul>
<li>After server locks arrived, the highest difficulty became noticeably shorter: a lock often opened the server right away.</li>
<li>Now on Paranoid a lock is only the first obstacle. Behind it you still have to crack the code with all its layers.</li>
<li>Novice and Normal difficulties are unchanged.</li>
</ul>
<h3>Fixes</h3>
<ul>
<li>Black ice melted in the middle of a crack now brings back the help of your GPU and AI assistant.</li>
<li>A lock opened by a phone call or a word from a dump no longer promises password digits that never come.</li>
<li>An aborted cipher-lock crack no longer says something irrelevant about a wallet.</li>
</ul>
<h3>Smaller changes</h3>
<ul>
<li>After the first act the game asks once whether you would like to rate it on itch.io. It won't bother you again.</li>
<li>The English version of the game is now called Shadow Net.</li>
</ul>
<p>Get the update in game with the <code>update</code> command. If you enjoy the game, a rating on itch.io helps a lot. Thanks for playing!</p>
```

View File

@@ -0,0 +1,69 @@
Що нового в останніх версіях
У гри з'явився трейлер і англійська назва: Shadow Net · Тінь Мережі. А в самій грі стало зручніше грати на ноутбуках, і Параноя знову по-справжньому важка.
Трейлер
Півтори хвилини справжнього ігроладу: сканування мережі, злам кодів, мапа серверів і трасування, що наздоганяє. Дивитися: https://www.youtube.com/watch?v=4ovaVhqCdK8
Масштаб інтерфейсу
• У налаштуваннях з'явився масштаб інтерфейсу від 100% до 200%.
• За замовчуванням він береться з масштабу Windows, тож на ноутбуках з високою роздільністю текст і кнопки більші й не дрібні.
• Масштаб більше не виштовхує кнопки за край екрана: він зменшується до того, що влазить у вікно, і перераховується, коли змінюєш розмір вікна.
Параноя знову важка
• Після появи замків на серверах найвища складність стала помітно коротшою: замок часто відкривав сервер одразу.
• Тепер на Параної замок лише перша перешкода. За ним ще треба зламати код з усіма шарами.
• Складності Новачок і Звичайний не змінилися.
Виправлення
• Чорний лід, розтоплений посеред зламу, тепер повертає допомогу відеокарти й ШІ-асистента.
• Замок, відкритий дзвінком чи словом з дампу, більше не обіцяє «відомих цифр» пароля, яких потім не буде.
• Перерваний злам шифр-замка більше не пише зайвого про гаманець.
Дрібніші зміни
• Після першого акту гра один раз запитає, чи не хочеш ти оцінити її на itch.io. Більше не набридатиме.
• Англійська версія гри тепер називається Shadow Net.
Оновлення підтягується в грі командою update. Якщо гра подобається, оцінка на itch.io дуже допомагає. Дякую, що граєте!
──────────
English
What's new in recent versions
The game now has a trailer and an English name: Shadow Net · Тінь Мережі. In the game itself, playing on laptops is more comfortable, and Paranoid is properly hard again.
Trailer
A minute and a half of real gameplay: scanning the network, cracking codes, the server map and a trace that keeps catching up. Watch it: https://www.youtube.com/watch?v=KeN4H3WhOXI
Interface scale
• Settings now have an interface scale from 100% to 200%.
• By default it follows the Windows scale, so on high-resolution laptops text and buttons are bigger instead of tiny.
• The scale no longer pushes buttons off the screen: it shrinks to what fits the window and is recalculated when you resize the window.
Paranoid is hard again
• After server locks arrived, the highest difficulty became noticeably shorter: a lock often opened the server right away.
• Now on Paranoid a lock is only the first obstacle. Behind it you still have to crack the code with all its layers.
• Novice and Normal difficulties are unchanged.
Fixes
• Black ice melted in the middle of a crack now brings back the help of your GPU and AI assistant.
• A lock opened by a phone call or a word from a dump no longer promises password digits that never come.
• An aborted cipher-lock crack no longer says something irrelevant about a wallet.
Smaller changes
• After the first act the game asks once whether you would like to rate it on itch.io. It won't bother you again.
• The English version of the game is now called Shadow Net.
Get the update in game with the update command. If you enjoy the game, a rating on itch.io helps a lot. Thanks for playing!

View File

@@ -0,0 +1,99 @@
# Допис 4 журналу розробки (v1.0.77 – v1.0.91)
**Title:** Оновлення v1.0.91: нова заставка, чесніший злам і українські шифри / Update v1.0.91: new splash, fairer cracking and Ukrainian ciphers
**Post type:** General Update
**Tags:** update, gameplay, balance
**Languages:** Українська, English (повний переклад)
**Cover image:** нова обкладинка itch/cover_630x500.png (капюшон з оком мережі)
## Content
Найпростіше вставити через кнопку `<>` (джерело HTML) у редакторі itch, тоді списки й заголовки збережуться. Перед збереженням вийди з режиму `<>`, інакше itch пише "body: expected text".
```html
<h2>Що нового в останніх версіях</h2>
<p>Тінь Мережі отримала нове обличчя: тінь у капюшоні з оком мережі над нічним Києвом. А всередині злам став чеснішим, складності точніше налаштовані, а шифри в українській версії тепер справді українські.</p>
<h3>Нова заставка й обкладинка</h3>
<ul>
<li>При запуску гра показує нову заставку: тінь у капюшоні з оком мережі над нічним Києвом.</li>
<li>Та сама картинка тепер на обкладинці гри.</li>
</ul>
<h3>Шифри українською</h3>
<ul>
<li>У шифр-замку й крипто-гаманцях української версії ключ тепер українське слово, а шифр іде по українській абетці з 33 літер.</li>
<li>В англійській версії все як раніше.</li>
</ul>
<h3>Злам і складність</h3>
<ul>
<li>Пароль зовнішнього шару більше не змінюється, коли відступаєш: усе, що ти про нього з'ясував, лишається до наступного візиту.</li>
<li>Параноя: трасування вище (+90% замість +50%), щоб вона лишилася такою ж важкою, але без безкінечних повторних зламів.</li>
<li>Новачок легший: трасування −30% замість −25%, а в термінових главах на 20% більше дій.</li>
</ul>
<h3>Чесні правила</h3>
<ul>
<li>Арешт, коли в тебе файл із замовлення «піти без логів», конфіскує цей файл. Главу чи замовлення більше не зарахувати простим <code>connect</code> і <code>disconnect</code> після арешту.</li>
<li>Перегони із суперником за замовлення «піти без логів» тепер зараховуються як виграні, коли ти чисто відключився.</li>
<li><code>update</code> посеред зламу більше не перезапускає гру (це було б як висмикнути кабель): спершу заверши злам.</li>
</ul>
<h3>Дрібніші зміни</h3>
<ul>
<li>Ефект CRT на нулі тепер справді вимкнений, тож на слабких ноутбуках гра менше навантажує відеокарту.</li>
<li>«Менше анімацій» зупиняє ще й стрічку новин і дощ символів.</li>
<li>Дуже довгий журнал більше не втрачає кольорів емблем, листів і підказок зламу.</li>
<li>Команда <code>update</code> качає нові версії зі швидшого сервера, а якщо він недоступний, то як раніше.</li>
<li>У гри з'явилася власна сторінка з таблицею рекордів українською й англійською: <a href="https://tinmerezhi.duckdns.org">tinmerezhi.duckdns.org</a></li>
</ul>
<p>Оновлення підтягується в грі командою <code>update</code>. Якщо гра подобається, оцінка на itch.io дуже допомагає. Дякую, що граєте!</p>
<hr>
<h2>English</h2>
<h2>What's new in recent versions</h2>
<p>Shadow Net has a new face: a hooded shadow with a network eye over night Kyiv. Inside, cracking is fairer, the difficulties are tuned more precisely, and the ciphers in the Ukrainian version are now truly Ukrainian.</p>
<h3>New splash and cover</h3>
<ul>
<li>On launch the game shows a new splash screen: a hooded shadow with a network eye over night Kyiv.</li>
<li>The same picture is now the game's cover.</li>
</ul>
<h3>Ciphers in Ukrainian</h3>
<ul>
<li>In the Ukrainian version the cipher lock and crypto wallets now use a Ukrainian word as the key, and the cipher runs over the 33-letter Ukrainian alphabet.</li>
<li>The English version stays as before.</li>
</ul>
<h3>Cracking and difficulty</h3>
<ul>
<li>The outer layer password no longer changes when you retreat: everything you learned about it stays until your next visit.</li>
<li>Paranoid: higher trace (+90% instead of +50%) so it stays just as hard, without endless repeated cracks.</li>
<li>Novice is easier: trace −30% instead of −25%, and 20% more actions in urgent chapters.</li>
</ul>
<h3>Fair rules</h3>
<ul>
<li>An arrest while you hold a file from a "leave no logs" job confiscates that file. A chapter or job can no longer be completed with a plain <code>connect</code> and <code>disconnect</code> after the arrest.</li>
<li>A rival race for a "leave no logs" job now counts as won when you disconnect cleanly.</li>
<li><code>update</code> in the middle of a crack no longer restarts the game (that would be like pulling the cable): finish the crack first.</li>
</ul>
<h3>Smaller changes</h3>
<ul>
<li>The CRT effect at zero is now truly off, so the game puts less load on the GPU of weak laptops.</li>
<li>"Fewer animations" now also stops the news ticker and the symbol rain.</li>
<li>A very long log no longer loses the colours of emblems, mails and crack hints.</li>
<li>The <code>update</code> command downloads new versions from a faster server, and falls back to the old one if it is unavailable.</li>
<li>The game now has its own page with a leaderboard in Ukrainian and English: <a href="https://tinmerezhi.duckdns.org">tinmerezhi.duckdns.org</a></li>
</ul>
<p>Get the update in game with the <code>update</code> command. If you enjoy the game, a rating on itch.io helps a lot. Thanks for playing!</p>
```

View File

@@ -0,0 +1,75 @@
Що нового в останніх версіях
Тінь Мережі отримала нове обличчя: тінь у капюшоні з оком мережі над нічним Києвом. А всередині злам став чеснішим, складності точніше налаштовані, а шифри в українській версії тепер справді українські.
Нова заставка й обкладинка
• При запуску гра показує нову заставку: тінь у капюшоні з оком мережі над нічним Києвом.
• Та сама картинка тепер на обкладинці гри.
Шифри українською
• У шифр-замку й крипто-гаманцях української версії ключ тепер українське слово, а шифр іде по українській абетці з 33 літер.
• В англійській версії все як раніше.
Злам і складність
• Пароль зовнішнього шару більше не змінюється, коли відступаєш: усе, що ти про нього з'ясував, лишається до наступного візиту.
• Параноя: трасування вище (+90% замість +50%), щоб вона лишилася такою ж важкою, але без безкінечних повторних зламів.
• Новачок легший: трасування −30% замість −25%, а в термінових главах на 20% більше дій.
Чесні правила
• Арешт, коли в тебе файл із замовлення «піти без логів», конфіскує цей файл. Главу чи замовлення більше не зарахувати простим connect і disconnect після арешту.
• Перегони із суперником за замовлення «піти без логів» тепер зараховуються як виграні, коли ти чисто відключився.
• update посеред зламу більше не перезапускає гру (це було б як висмикнути кабель): спершу заверши злам.
Дрібніші зміни
• Ефект CRT на нулі тепер справді вимкнений, тож на слабких ноутбуках гра менше навантажує відеокарту.
• «Менше анімацій» зупиняє ще й стрічку новин і дощ символів.
• Дуже довгий журнал більше не втрачає кольорів емблем, листів і підказок зламу.
• Команда update качає нові версії зі швидшого сервера, а якщо він недоступний, то як раніше.
• У гри з'явилася власна сторінка з таблицею рекордів українською й англійською: https://tinmerezhi.duckdns.org
Оновлення підтягується в грі командою update. Якщо гра подобається, оцінка на itch.io дуже допомагає. Дякую, що граєте!
──────────
English
What's new in recent versions
Shadow Net has a new face: a hooded shadow with a network eye over night Kyiv. Inside, cracking is fairer, the difficulties are tuned more precisely, and the ciphers in the Ukrainian version are now truly Ukrainian.
New splash and cover
• On launch the game shows a new splash screen: a hooded shadow with a network eye over night Kyiv.
• The same picture is now the game's cover.
Ciphers in Ukrainian
• In the Ukrainian version the cipher lock and crypto wallets now use a Ukrainian word as the key, and the cipher runs over the 33-letter Ukrainian alphabet.
• The English version stays as before.
Cracking and difficulty
• The outer layer password no longer changes when you retreat: everything you learned about it stays until your next visit.
• Paranoid: higher trace (+90% instead of +50%) so it stays just as hard, without endless repeated cracks.
• Novice is easier: trace −30% instead of −25%, and 20% more actions in urgent chapters.
Fair rules
• An arrest while you hold a file from a "leave no logs" job confiscates that file. A chapter or job can no longer be completed with a plain connect and disconnect after the arrest.
• A rival race for a "leave no logs" job now counts as won when you disconnect cleanly.
• update in the middle of a crack no longer restarts the game (that would be like pulling the cable): finish the crack first.
Smaller changes
• The CRT effect at zero is now truly off, so the game puts less load on the GPU of weak laptops.
• "Fewer animations" now also stops the news ticker and the symbol rain.
• A very long log no longer loses the colours of emblems, mails and crack hints.
• The update command downloads new versions from a faster server, and falls back to the old one if it is unavailable.
• The game now has its own page with a leaderboard in Ukrainian and English: https://tinmerezhi.duckdns.org
Get the update in game with the update command. If you enjoy the game, a rating on itch.io helps a lot. Thanks for playing!

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 214 KiB

26
itch/trailer/build.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
# Трейлер: 1) godot --fixed-fps 30 --write-movie raw_<lang>.avi -s tests/trailer.gd -- <lang> (див. tests/trailer.gd)
# 2) python3 itch/trailer/cards.py 3) itch/trailer/build.sh en|uk — усе в одній робочій папці з raw_*.avi
# build.sh en|uk — збирає trailer_<lang>.mp4
set -e
L=$1
FONT=/usr/share/fonts/truetype/jetbrains-mono/JetBrainsMono-Bold.ttf
if [ $L = en ]; then C=("Crack codes. Steal files. Wipe your logs." "Every mistake raises the trace. At 100%, you're caught." "Firewall puzzles" "Dictionary attacks" "Rival hackers race you for jobs" "6 acts · 48 chapters · multiple endings")
else C=("Підбирай коди. Крадь файли. Стирай логи." "Кожна помилка підіймає трасування. На 100% тебе спіймано." "Головоломки фаєрвола" "Словникові атаки" "Суперники-хакери полюють на ті ж замовлення" "6 актів · 48 глав · кілька кінцівок"); fi
T=(7.3 31.0 49.1 59.8 68.8 72.5 77.0)
DT=""
for i in 0 1 2 3 4 5; do
printf '%s' "${C[$i]}" > cap_${L}_$i.txt
DT="$DT,drawtext=fontfile=$FONT:textfile=cap_${L}_$i.txt:expansion=none:fontsize=50:fontcolor=0xE8FFF0:box=1:boxcolor=0x000803@0.85:boxborderw=24:x=(w-tw)/2:y=h-150:enable='between(t,${T[$i]},${T[$((i+1))]}-0.3)'"
done
ffmpeg -v error -y \
-loop 1 -t 3.5 -i intro_$L.png -i raw_$L.avi -loop 1 -t 6 -i outro_$L.png \
-f lavfi -t 3.5 -i anullsrc=r=44100:cl=stereo -f lavfi -t 6 -i anullsrc=r=44100:cl=stereo \
-filter_complex "\
[0:v]format=yuv420p,fps=30,setsar=1,fade=in:0:20,fade=out:st=3:d=0.5[v0];\
[1:v]scale=-2:1080:flags=lanczos,pad=1920:1080:(ow-iw)/2:0:color=0x000803,setsar=1,fps=30,format=yuv420p${DT},trim=0:77,setpts=PTS-STARTPTS,fade=in:0:10,fade=out:st=76.4:d=0.6[v1];\
[2:v]format=yuv420p,fps=30,setsar=1,fade=in:0:15,fade=out:st=5.2:d=0.8[v2];\
[1:a]aresample=44100,aformat=channel_layouts=stereo,atrim=0:77,asetpts=PTS-STARTPTS,afade=t=in:d=0.5,afade=t=out:st=75.5:d=1.5[a1];\
[3:a]aformat=channel_layouts=stereo[a0];[4:a]aformat=channel_layouts=stereo[a2];\
[v0][a0][v1][a1][v2][a2]concat=n=3:v=1:a=1[v][a]" \
-map "[v]" -map "[a]" -c:v libx264 -preset slow -crf 18 -pix_fmt yuv420p -c:a aac -b:a 192k -movflags +faststart trailer_$L.mp4

18
itch/trailer/cards.py Normal file
View File

@@ -0,0 +1,18 @@
from PIL import Image, ImageDraw, ImageFont, ImageFilter, ImageChops
F='/usr/share/fonts/truetype/jetbrains-mono/JetBrainsMono-ExtraBold.ttf'
R='/usr/share/fonts/truetype/jetbrains-mono/JetBrainsMono-Regular.ttf'
G=(61,255,122)
bg=Image.open(__import__('os').path.join(__import__('os').path.dirname(__file__),'..','background_1920.png')).convert('RGB').crop((0,110,1920,1190))
def card(lines,out):
img=bg.copy(); W,H=img.size
for y,s,font,fill,glow in lines:
d=ImageDraw.Draw(img); w=d.textlength(s,font=font); x=(W-w)/2
if glow:
g=Image.new('RGB',(W,H)); ImageDraw.Draw(g).text((x,y),s,font=font,fill=(20,130,60))
img=ImageChops.add(img,g.filter(ImageFilter.GaussianBlur(18)))
ImageDraw.Draw(img).text((x,y),s,font=font,fill=fill)
img.save(out)
big=ImageFont.truetype(F,190); mid=ImageFont.truetype(F,64); sm=ImageFont.truetype(R,44); xs=ImageFont.truetype(R,36)
for L,sub,free,plat in [('en','a hacking game played in a terminal','Free on itch.io','Windows · English / Ukrainian'),('uk','хакерська гра в терміналі','Безкоштовно на itch.io','Windows · українська / English')]:
card([(330,'SHADOW NET',big,G,True),(560,'ТІНЬ МЕРЕЖІ',mid,(160,230,180),True),(690,sub,sm,(200,245,210),False)],f'intro_{L}.png')
card([(230,'SHADOW NET',big,G,True),(460,'ТІНЬ МЕРЕЖІ',mid,(160,230,180),True),(620,free,mid,(235,255,240),False),(730,'tuberon.itch.io/tinmerezhi',sm,G,False),(830,plat,xs,(160,200,170),False)],f'outro_{L}.png')

BIN
itch/trailer/shadow_net.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 325 KiB

After

Width:  |  Height:  |  Size: 562 KiB

View File

@@ -29,6 +29,9 @@ EVENTS = {"start", "ch", "bust", "over"}
lock = threading.Lock()
hits = {}
STATS_TTL = 60 # /stats рахує всю таблицю подій — частіше ніж раз на хвилину не треба
_stats = [0.0, None]
_stats_lock = threading.Lock()
def db():
@@ -165,6 +168,7 @@ def stats():
class H(BaseHTTPRequestHandler):
server_version = "tm-online/1"
timeout = 15 # повільний чи завислий клієнт не тримає потік вічно
def path_q(self):
u = urlparse(self.path)
@@ -180,9 +184,18 @@ class H(BaseHTTPRequestHandler):
self.send_response(code)
self.send_header("Content-Type", "application/json; charset=utf-8")
self.send_header("Content-Length", str(len(b)))
self.send_header("Access-Control-Allow-Origin", "*") # веб-версія гри на itch.io (інший домен); без кук, тож * безпечно
self.end_headers()
self.wfile.write(b)
def do_OPTIONS(self): # preflight браузера перед POST з Content-Type: application/json
self.send_response(204)
self.send_header("Access-Control-Allow-Origin", "*")
self.send_header("Access-Control-Allow-Methods", "GET, POST")
self.send_header("Access-Control-Allow-Headers", "Content-Type")
self.send_header("Access-Control-Max-Age", "86400")
self.end_headers()
def do_GET(self):
p, q = self.path_q()
if p == "/":
@@ -204,7 +217,11 @@ class H(BaseHTTPRequestHandler):
return self.send(400, {"error": "board"})
return self.send(200, {"top": top(board)})
if p == "/stats":
return self.send(*stats())
with _stats_lock:
if time.time() - _stats[0] > STATS_TTL:
_stats[:] = [time.time(), stats()]
r = _stats[1]
return self.send(*r)
self.send(404, {"error": "not_found"})
def do_POST(self):

View File

@@ -43,6 +43,12 @@ assert req("/event", {"sid": S, "ev": "hack", "ch": 1})[0] == 400
st = req("/stats")[1]
assert st["players"] == 1 and st["chapters"][0] == {"ch": 1, "reached": 1, "passed": 1, "median_acts": 12, "busts": 0, "game_over": 0, "quit_here": 0}, st
assert st["chapters"][1]["busts"] == 1 and st["chapters"][1]["game_over"] == 1
assert req("/event", {"sid": S, "ev": "start", "ch": 5})[0] == 200 and req("/stats")[1] == st, "/stats кешується"
assert server.H.timeout > 0, "тайм-аут з'єднання"
codes = [req("/event", {"sid": S, "ev": "start", "ch": 0}, ip="9.9.9.9")[0] for _ in range(35)]
assert codes.count(429) == 5, "ліміт 30 за хвилину"
with urllib.request.urlopen(urllib.request.Request(URL + "/score", method="OPTIONS")) as f:
assert f.status == 204 and f.headers["Access-Control-Allow-Origin"] == "*" and "Content-Type" in f.headers["Access-Control-Allow-Headers"], "CORS preflight"
with urllib.request.urlopen(URL + "/health") as f:
assert f.headers["Access-Control-Allow-Origin"] == "*", "CORS у відповіді"
print("server OK")

185
site/index.html Normal file
View File

@@ -0,0 +1,185 @@
<!doctype html>
<html lang="uk">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ТінМережі · Shadow Net</title>
<meta name="description" content="Хакерська гра в терміналі українською та англійською · A hacking game played in a terminal, in Ukrainian and English">
<meta property="og:title" content="ТінМережі · Shadow Net">
<meta property="og:image" content="https://tinmerezhi.duckdns.org/img/social_1200x630.png">
<link rel="icon" href="img/favicon_512.png">
<!-- Сторінка гри на дзеркалі (CI кладе site/ та itch/ картинки в /srv/tm). Рекорди: /api/* → Caddy → сервер онлайн-рекордів (/tm-api). -->
<style>
:root { --bg: #0b0f0c; --panel: #111814; --line: #1f2e24; --fg: #c8f5d4; --dim: #6f9a7c; --acc: #39ff7a; --warn: #ffcc4d; --bad: #ff5c6c; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 ui-monospace, "Cascadia Mono", Consolas, monospace; }
main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 48px; }
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
h1 { color: var(--acc); font-size: 34px; margin: 0; text-shadow: 0 0 14px rgba(57,255,122,.45); }
h2 { color: var(--acc); font-size: 20px; margin: 36px 0 12px; }
h3 { color: var(--acc); font-size: 16px; margin: 0 0 10px; }
a { color: var(--acc); }
.lang button { background: var(--panel); color: var(--dim); border: 1px solid var(--line); padding: 4px 10px; font: inherit; cursor: pointer; border-radius: 6px; }
.lang button.on { color: var(--acc); border-color: var(--acc); }
.tag { color: var(--dim); margin: 6px 0 20px; }
.hero { width: 100%; border: 1px solid var(--line); border-radius: 8px; display: block; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0; }
.btn { display: inline-block; background: var(--acc); color: #04140a; font-weight: bold; padding: 12px 20px; border-radius: 8px; text-decoration: none; }
.btn.alt { background: var(--panel); color: var(--acc); border: 1px solid var(--line); font-weight: normal; }
.small { color: var(--dim); font-size: 14px; }
ul.feat { padding-left: 20px; }
ul.feat li { margin: 4px 0; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 12px; }
.shots img { width: 100%; border: 1px solid var(--line); border-radius: 6px; display: block; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
section.b { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--dim); font-weight: normal; font-size: 13px; }
.n { text-align: right; font-variant-numeric: tabular-nums; }
tr.first td { color: var(--warn); }
.empty { color: var(--dim); }
.bad { color: var(--bad); }
.nv { color: var(--warn); margin: 14px 0 2px; }
#news ul { margin: 0; padding-left: 20px; }
#more { background: var(--panel); color: var(--acc); border: 1px solid var(--line); padding: 6px 12px; font: inherit; cursor: pointer; border-radius: 6px; margin-top: 10px; }
footer { color: var(--dim); font-size: 13px; margin-top: 36px; }
</style>
</head>
<body>
<main>
<header>
<h1 data-t="title">▓ ТІНЬ МЕРЕЖІ</h1>
<div class="lang"><button data-l="uk">УКР</button> <button data-l="en">ENG</button></div>
</header>
<p class="tag" data-t="tag"></p>
<img class="hero" src="img/wide_cover_2520x1080.png" alt="ТінМережі / Shadow Net">
<div class="cta">
<a class="btn" href="TinMerezhi.exe" data-t="dl"></a>
<a class="btn alt" href="https://tuberon.itch.io/tinmerezhi">🎮 itch.io</a>
<a class="btn alt" href="#records" data-t="recs"></a>
<span class="small"><span data-t="ver"></span> <span id="ver">…</span> · Windows 10/11 · <span data-t="noinst"></span></span>
</div>
<p data-t="story"></p>
<ul class="feat" id="feat"></ul>
<h2 id="news-h" data-t="news"></h2>
<div id="news"></div>
<button id="more" class="lang" style="display:none"></button>
<h2 data-t="shots"></h2>
<div class="shots">
<img src="img/1_start.png" alt="" loading="lazy">
<img src="img/2_crack.png" alt="" loading="lazy">
<img src="img/6_act5.png" alt="" loading="lazy">
<img src="img/11_endless_en.png" alt="" loading="lazy">
</div>
<h2 id="records" data-t="recs"></h2>
<p class="small" data-t="recnote"></p>
<div class="grid" id="boards"></div>
<footer data-t="foot"></footer>
</main>
<script>
const T = {
uk: {
title: "▓ ТІНЬ МЕРЕЖІ", tag: "Хакерська гра, де все робиш у терміналі.",
dl: "⬇ Завантажити для Windows", recs: "🏆 Рекорди", ver: "Версія", noinst: "без встановлення",
story: "Ти — Shadow, хакер-одинак. Таємничий Оракул дає завдання: від Wi-Fi кав'ярні до Нульового вузла, де ховається серце Пуйла. Скануй мережу, підбирай коди, відкривай порти, будуй маршрут через зламані сервери й стирай логи, бо трасування росте з кожною помилкою.",
feat: ["6 актів, 48 глав і кілька кінцівок, що залежать від твоїх виборів",
"45 серверів на анімованій мапі мережі: шари шифрування, закриті порти, активне трасування",
"Міні-ігри зламу: обхід фаєрвола і словникова атака",
"Суперники-хакери Cobra, Mantis і Nyx: перегони за замовлення, крадіжки й помста",
"Соціальна інженерія, криптоголоволомки, чорний ринок експлойтів і рідкісні побічні квести",
"Після фіналу: Нескінченна мережа з рекордами, щоденний виклик і New Game+",
"Три складності: Новачок, Звичайний і Параноя (без збережень)",
"Адаптивна синтвейв-музика, українська та англійська мови, автооновлення"],
shots: "📸 Скриншоти", news: "📰 Що нового", more: "Показати старіші",
recnote: "Онлайн-рекорди надсилаються з гри лише за згодою (налаштування → онлайн-рекорди). Таблиці оновлюються щохвилини.",
foot: "Розробник: JunioR. Гра і код — під ліцензією MIT. Рушій Godot.",
boards: ["♾ Нескінченна мережа", "📅 Виклик дня", "🤖 1 · Кур'єр", "🤖 2 · Прибиральник", "🤖 3 · Збирач", "🤖 4 · Нічний рейс"],
nick: "Нік", score: "Рахунок", depth: "Глибина", diff: "Складність", jobs: "Замовлень", lines: "Рядків", steps: "Кроків",
diffs: ["Новачок", "Звичайний", "Параноя"], empty: "Поки порожньо. Стань першим!", down: "Сервер рекордів недоступний"
},
en: {
title: "▓ SHADOW NET", tag: "A hacking game played entirely in a terminal.",
dl: "⬇ Download for Windows", recs: "🏆 Leaderboards", ver: "Version", noinst: "no install",
story: "You are Shadow, a lone hacker. The mysterious Oracle sends you jobs, from a café's Wi-Fi all the way to the Zero Node where Puilo's heart hides. Scan the network, crack codes, open ports, route through hacked servers and wipe your logs, because every mistake raises the trace.",
feat: ["6 acts, 48 chapters and several endings shaped by your choices",
"45 servers on an animated network map: encryption layers, closed ports, active tracing",
"Hacking mini-games: firewall bypass and dictionary attack",
"Rival hackers Cobra, Mantis and Nyx race you for jobs, steal from you and take revenge",
"Social engineering, crypto puzzles, a black market of exploits and rare side quests",
"After the finale: the Endless Network with leaderboards, a daily challenge and New Game+",
"Three difficulties: Novice, Normal and Paranoid (no saves)",
"Adaptive synthwave music, English and Ukrainian, auto-update"],
shots: "📸 Screenshots", news: "📰 What's new", more: "Show older",
recnote: "Scores are sent from the game only if you opt in (settings → online leaderboards). Tables refresh every minute.",
foot: "Developer: JunioR. The game and its code are MIT-licensed. Godot engine.",
boards: ["♾ Endless Network", "📅 Daily", "🤖 1 · Courier", "🤖 2 · Janitor", "🤖 3 · Collector", "🤖 4 · Night Flight"],
nick: "Nick", score: "Score", depth: "Depth", diff: "Difficulty", jobs: "Jobs", lines: "Lines", steps: "Steps",
diffs: ["Novice", "Normal", "Paranoid"], empty: "Empty so far. Be the first!", down: "Leaderboard server unavailable"
}
};
const DAY = "d" + new Date().toISOString().slice(0, 10).replaceAll("-", ""); // виклик дня — за UTC, як у грі
const IDS = ["endless", DAY, "agent0", "agent1", "agent2", "agent3"];
let lang = "uk";
try { lang = localStorage.getItem("lang") || (navigator.language.startsWith("uk") ? "uk" : "en"); } catch (e) {}
if (new URLSearchParams(location.search).get("lang") in T) lang = new URLSearchParams(location.search).get("lang");
let tops = {};
let news = [], newsAll = false; // news.json: ігрові зміни з whatsnew.gd (CI, ci/news.py) // кеш таблиць, щоб перемикання мови не ходило в мережу
function el(tag, text, cls) { const e = document.createElement(tag); if (text !== undefined) e.textContent = text; if (cls) e.className = cls; return e; }
function render() {
const t = T[lang];
document.documentElement.lang = lang;
for (const e of document.querySelectorAll("[data-t]")) e.textContent = t[e.dataset.t];
for (const b of document.querySelectorAll("[data-l]")) b.classList.toggle("on", b.dataset.l === lang);
document.getElementById("feat").replaceChildren(...t.feat.map(f => el("li", f)));
const shown = newsAll ? news : news.slice(0, 5);
document.getElementById("news").replaceChildren(...shown.flatMap(n => [el("div", "v" + n.v, "nv"), (() => { const u = el("ul"); u.append(...n[lang].map(x => el("li", x))); return u; })()]));
const more = document.getElementById("more");
more.style.display = !newsAll && news.length > 5 ? "" : "none";
more.textContent = t.more;
document.getElementById("news-h").style.display = news.length ? "" : "none";
document.getElementById("boards").replaceChildren(...IDS.map((id, k) => {
const s = el("section", undefined, "b"), tb = el("table"), head = el("tr");
s.append(el("h3", t.boards[k]));
const cols = k === 0 ? ["#", t.nick, t.score, t.depth, t.diff] : k === 1 ? ["#", t.nick, t.score, t.jobs] : ["#", t.nick, t.lines, t.steps];
cols.forEach((c, i) => head.append(el("th", c, i > 1 && c !== t.diff ? "n" : "")));
tb.append(head); s.append(tb);
const top = tops[id];
if (top === undefined) s.append(el("p", "…", "empty"));
else if (top === null) s.append(el("p", t.down, "bad"));
else if (!top.length) s.append(el("p", t.empty, "empty"));
else top.forEach((r, i) => {
const tr = el("tr");
tr.append(el("td", i + 1), el("td", r.nick), el("td", r.a.toLocaleString(lang), "n"), el("td", r.b, "n"));
if (k === 0) tr.append(el("td", t.diffs[r.diff] ?? ""));
if (i === 0) tr.className = "first";
tb.append(tr);
});
return s;
}));
}
async function load() {
await Promise.all(IDS.map(async id => {
try { const r = await fetch("api/top?board=" + id, {cache: "no-store"}); tops[id] = r.ok ? (await r.json()).top : null; }
catch (e) { tops[id] = null; }
}));
render();
}
for (const b of document.querySelectorAll("[data-l]")) b.onclick = () => {
lang = b.dataset.l;
try { localStorage.setItem("lang", lang); } catch (e) {}
render();
};
document.getElementById("more").onclick = () => { newsAll = true; render(); };
fetch("news.json", {cache: "no-store"}).then(r => r.ok ? r.json() : []).then(d => { news = d; render(); }).catch(() => {});
fetch("version.txt", {cache: "no-store"}).then(r => r.ok ? r.text() : "–").then(v => document.getElementById("ver").textContent = v.trim()).catch(() => {});
render();
load();
setInterval(load, 60000);
</script>
</body>
</html>

View File

@@ -33,6 +33,7 @@
| `rivals.gd` | суперники-хакери: перегони за замовлення, крадіжки, помста (`rivals`) |
| `sidequests.gd` | дивні прохання: рідкісні одноразові побічні квести з унікальною нагородою (`quests`) |
| `social.gd` | соціальна інженерія: телефонна розмова з працівником сервера перед зламом (`call`), 4 персонажі × 3 репліки |
| `variety.gd` | різноманіття: зовнішні замки серверів (firewall/dict/decrypt/call замість коду), чорний лід (`exploit ice`, `use icebreaker`), випадкові властивості серверів на гру (`g.aff`), цілі замовлень (download/rm/upload/без логів/знайти); тести старих механік ставлять `g.variety = false` |
| `market.gd` | крипто-гаманці на зламаних серверах (`decrypt`, шифри Цезаря/Атбаш), чорний ринок експлойтів за крипту (`market`, `exploit`), 3 досягнення; випадковість — на `bm_rng`, бот балансу грає так само |
| `modes.gd` | New Game+ (`ngplus`, спадок у `user://legacy.json`: навички, модулі, утиліти, програмування й агенти; `NG_*` — наскільки Пуйло сильніший за коло), Нескінченна мережа після фіналу (`endless`), щоденний виклик (`daily`: замовлення з генератора, засіяного датою UTC), таблиця рекордів (`records`, `user://records.json`), досягнення нових режимів |
| `online.gd` | онлайн-рекорди (`top`: Нескінченна мережа, виклик дня й агенти) та анонімна статистика глав через власний сервер `online/server.py`. Обидва вимкнені, поки гравець не ввімкне в налаштуваннях; ключі `tok`/`sid` — випадкові рядки в `settings.json`. Тести в мережу не ходять |

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 510 KiB

View File

@@ -59,8 +59,8 @@ static func buttons(g: Main) -> Array:
for id in g.Data.PROGRAMS:
if g.inv.get(id, 0) > 0 and g.can_use(id):
usable.append(["use " + id, "▶ %s (%d)" % [g.Data.PROGRAMS[id]["name"], g.inv[id]]])
for id in ["layer", "jam", "bribe"]: # експлойти чорного ринку, коли вони щось дадуть
if g.bm["ex"].get(id, 0) and (g.crack != null if id == "layer" else g.race != null if id == "jam" else not g.heat.is_empty() and g.crack == null):
for id in ["layer", "jam", "bribe", "ice"]: # експлойти чорного ринку, коли вони щось дадуть
if g.bm["ex"].get(id, 0) and (g.crack != null if id == "layer" else g.race != null if id == "jam" else (g.cur != null and not g.cur["open"] and g.Variety.has_ice(g, g.cur)) if id == "ice" else not g.heat.is_empty() and g.crack == null):
usable.append(["exploit " + id, "🕶 %s (%d)" % [Market.defs()[id][0], g.bm["ex"][id]]])
if g.choosing:
var ch: Array = g.choice_act().CHOICES
@@ -97,8 +97,12 @@ static func buttons(g: Main) -> Array:
for p in g.closed_ports(g.cur):
if g.utils.has(g.util_for(p)):
act.append(["open " + p, L.t("🔌 Відкрити %s %s") % [p, g.Extra.PORTS[p]]])
var gk: String = g.Variety.gate(g)
if g.closed_ports(g.cur).is_empty() and gk == "cipher" and not g.cur.get("cipher_used", false):
act.append(["decrypt", L.t("🔐 Розгадати шифр-замок")])
if g.closed_ports(g.cur).is_empty():
act.append(["crack", L.t("🔓 Зламати")])
if gk == "":
act.append(["crack", L.t("🔓 Зламати")])
if Minigames.can_play(g, "firewall"):
act.append(["firewall", L.t("🧱 Обхід фаєрвола")])
if Minigames.can_play(g, "dict"):
@@ -114,7 +118,16 @@ static func buttons(g: Main) -> Array:
act.append(["upload", L.t("⬆ Залити ") + um["file"]])
for f in g.cur["files"]:
act.append(["cat " + f, "👁 " + f])
act.append(["download " + f, "⬇ " + f])
var jk: String = g.Variety.kind_of(g, f) if g.job_of(f) != null and not g.done.has(f) else ""
if jk == "erase":
act.append(["rm " + f, "🗑 " + f])
elif jk == "plant":
act.append(["upload " + f, "⬆ " + f])
else:
act.append(["download " + f, "⬇ " + f])
if g.Variety.has_bait(g):
act.append(["cat " + g.Variety.BAIT, "👁 " + g.Variety.BAIT])
act.append(["download " + g.Variety.BAIT, "⬇ " + g.Variety.BAIT])
if Market.has_wallet(g, g.cur):
act.append(["decrypt", L.t("🔐 Розшифрувати гаманець")])
act.append(["disconnect", L.t("⏏ Відключитися")])
@@ -177,7 +190,11 @@ static func tip_for(g: Main, cmd: String) -> String:
"about":
return L.t("Про гру: розробник %s, ліцензія MIT") % g.DEV
"upload":
if a != "" and g.job_of(a) != null:
return L.t("Підмінити файл фальшивкою — замовлення: ") + g.job_of(a)["t"]
return L.t("Залити латку на сервер — це сюжетне завдання!")
"rm":
return L.t("Стерти файл — замовлення: ") + g.job_of(a)["t"] if g.job_of(a) != null else L.t("Стерти файл")
"choose":
return g.choice_act().CHOICES[clampi(int(a) - 1, 0, 1)][1]
"cat":
@@ -195,6 +212,8 @@ static func tip_for(g: Main, cmd: String) -> String:
"call":
return L.t("Подзвонити працівнику й вивідати частину пароля: успіх — +%d відомі цифри, провал — трасування") % Social.BONUS
"decrypt":
if g.Variety.gate(g) == "cipher":
return L.t("Розгадай шифр — це відкриє зовнішній замок сервера")
return L.t("Криптоголоволомка: розшифруй ключ гаманця — отримаєш крипту для чорного ринку")
"market":
return L.t("Чорний ринок: експлойти за крипту з гаманців")

View File

@@ -11,14 +11,15 @@ const HELP := {
"ls": "ls — файли на сервері, до якого маєш доступ.",
"cat": "cat <файл> — прочитати файл. Tab доповнює назву.",
"download": "download <файл> — завантажити файл (сюжет, замовлення, контракт). Додає трасування й лишає лог.",
"upload": "upload [файл] — залити латку на сервер (Акти IV–VI).",
"upload": "upload [файл] — залити латку на сервер (Акти IV–VI). Або підмінити файл замовлення фальшивкою: upload <файл>.",
"rm": "rm <файл> — стерти файл на зламаному сервері. Потрібно для замовлень із ціллю \"стерти\" (видно в jobs).",
"disconnect": "disconnect — відключитися. Трасування скидається, але лишені логи запускають розслідування.",
"wipe": "wipe [лог] — стерти всі свої логи або один (auth, xfer…). Коштує трохи трасування.",
"logs": "logs — твої сліди на цьому сервері.",
"route": "route [add №|auto|clear] — маршрут через зламані сервери: кожен вузол зменшує трасування. Довжина росте з рівнем: 1 вузол на старті, +1 кожні 4 рівні, до 5.",
"contract": "contract [drop] — контракти: вкради файл і втечи чисто (потрібне звання).",
"missions": "missions — поточна сюжетна глава.",
"jobs": "jobs — побічні замовлення: гроші й досвід.",
"jobs": "jobs — побічні замовлення: гроші й досвід.\nЦілі різні: вкрасти (download), стерти (rm), підмінити фальшивкою (upload), вкрасти й піти без логів, знайти сервер самому.",
"skills": "skills — навички та вільні очки.",
"learn": "learn <навичка> — вкласти очко навички. Стеля навички — рівень гравця / 4 (угору), максимум 8 з 29 рівня. Tab доповнює назву.",
"shop": "shop — модулі обладнання.",
@@ -43,14 +44,14 @@ const HELP := {
"about": "about — про гру і розробника.",
"update": "update — перевірити й завантажити нову версію гри.",
"choose": "choose 1|2 — вибір у фіналі акту.",
"difficulty": "difficulty novice|normal|paranoid — складність (лише до першого зламу).\nНовачок: трасування −25%, слідчі повільніші, +2 арешти. Параноя: трасування +50%, слідчі швидші, на 1 арешт менше, збереження лише на початку кожного акту.",
"firewall": "firewall — міні-гра \"Обхід фаєрвола\" перед зламом: вимкни всі фільтри (перемикач змінює себе й сусідів).\nУспіх — трасування на сервері −40% до відключення. Провал — +10%. Одна спроба за підключення.",
"dict": "dict — міні-гра \"Словникова атака\": вгадай пароль адміна серед слів дампу (видно, скільки літер на місцях).\nУспіх — наступний crack почнеться з 2 відомими цифрами. Одна спроба за підключення.",
"difficulty": "difficulty novice|normal|paranoid — складність (лише до першого зламу).\nНовачок: трасування −30%, слідчі повільніші, +2 арешти, +20% дій у термінових главах. Параноя: трасування +90%, слідчі швидші, на 1 арешт менше, за замками серверів ще й код, збереження лише на початку кожного акту.",
"firewall": "firewall — міні-гра \"Обхід фаєрвола\" перед зламом: вимкни всі фільтри (перемикач змінює себе й сусідів).\nУспіх — трасування на сервері −40% до відключення. Провал — +10%. Одна спроба за підключення.\nЗамок: на деяких серверах (🧱 📖 📞 🔐 у scan) саме ця атака відкриває зовнішній шар замість коду.",
"dict": "dict — міні-гра \"Словникова атака\": вгадай пароль адміна серед слів дампу (видно, скільки літер на місцях).\nУспіх — наступний crack почнеться з 2 відомими цифрами. Одна спроба за підключення.\nЗамок: на деяких серверах (🧱 📖 📞 🔐 у scan) саме ця атака відкриває зовнішній шар замість коду.",
"rivals": "rivals — суперники-хакери: хто в кого що вкрав і хто має на тебе образу.\nНа сервері із замовленням суперник може почати перегони: забери файл, поки не минув час, інакше оплата вдвічі менша.\nПереможений тримає образу і може злити твій IP слідчим, поки ти онлайн.",
"quests": "quests — дивні прохання незнайомців: рідкісні одноразові квести з унікальною нагородою.\nІнколи після зламу сервера пише незнайомець: забери (download) його файл з іншого сервера.\nНагороди — записи в журналі, відзнаки, ретро-запрошення або копія програми. Кожен квест — лише раз за гру.",
"call": "call — соціальна інженерія перед зламом: подзвони працівнику сервера і вивідай частину пароля.\nТри репліки, на кожну — відповідь 1–3: слухай, що за людина. Одна помилка дозволена (дві — з навичкою social 3+).\nУспіх — наступний crack почнеться з 2 відомими цифрами. Провал — трасування як за невдалу спробу. Одна спроба за підключення.",
"decrypt": "decrypt — криптоголоволомка: розшифруй гаманець wallet.dat на зламаному сервері (видно в ls).\nКлюч — англійське слово, відома його перша літера. Число 1–9 — пробний зсув назад (3 рази), слово — спроба (3 рази).\nУспіх — крипта 🪙 (стільки, який захист сервера). Провал — гаманець стирає себе, +5% трасування.",
"market": "market [id] — чорний ринок: список експлойтів або купити один. Платять лише криптою 🪙 з гаманців (decrypt).\nlayer — відкрити поточний шар шифрування, jam — прогнати суперника з перегонів,\nbribe — закрити всі розслідування, alibi — само скасовує наступний арешт.",
"call": "call — соціальна інженерія перед зламом: подзвони працівнику сервера і вивідай частину пароля.\nТри репліки, на кожну — відповідь 1–3: слухай, що за людина. Одна помилка дозволена (дві — з навичкою social 3+).\nУспіх — наступний crack почнеться з 2 відомими цифрами. Провал — трасування як за невдалу спробу. Одна спроба за підключення.\nЗамок: на деяких серверах (🧱 📖 📞 🔐 у scan) саме ця атака відкриває зовнішній шар замість коду.",
"decrypt": "decrypt — криптоголоволомка: розшифруй гаманець wallet.dat на зламаному сервері (видно в ls).\nКлюч — українське слово, відома його перша літера. Число 1–9 — пробний зсув назад (3 рази), слово — спроба (3 рази).\nУспіх — крипта 🪙 (стільки, який захист сервера). Провал — гаманець стирає себе, +5% трасування.\nЗамок: на деяких серверах (🧱 📖 📞 🔐 у scan) саме ця атака відкриває зовнішній шар замість коду.",
"market": "market [id] — чорний ринок: список експлойтів або купити один. Платять лише криптою 🪙 з гаманців (decrypt).\nlayer — відкрити поточний шар шифрування, jam — прогнати суперника з перегонів,\nbribe — закрити всі розслідування, alibi — само скасовує наступний арешт.\nice — розтопити чорний лід (🧊 у scan): помилки зламу знову звичайні.",
"exploit": "exploit <id> — застосувати експлойт із чорного ринку (layer — під час зламу). alibi діє само.",
"daily": "daily — щоденний виклик: 10 замовлень Брокера, однакових для всіх гравців сьогодні (за UTC), той самий набір\nі складність. Рахунок — оплата плюс бонус за швидкість. Онлайн-таблиця дня — top. З нової гри або після кінця гри.",
"endless": "endless — Нескінченна мережа (після фіналу): замовлення Брокера на випадкових серверах, глибина росте —\nсервери сильніші, трасування вище, оплата більша. 3 провали або арешти — кінець і запис у рекорди.",
@@ -69,7 +70,7 @@ static func args_for(g: Main, c: String) -> Array:
if g._visible(i):
r.append(g.servers[i]["ip"])
return r
"cat", "download":
"cat", "download", "rm":
return g.cur["files"] if g.cur != null and g.cur["open"] else []
"learn":
return g.skill_defs.keys()

View File

@@ -29,10 +29,10 @@ static func new_layer(g: Main, k, length := -1) -> void:
for d in ds.slice(0, int(g.eff(g.skills["crypto"]))): # Криптограф
k["absent"][d] = true
# стан внутрішнього шару живе на сервері між візитами
# стан шару (і зовнішнього теж) живе на сервері між візитами, доки сервер не відкрито чи не закрито знову (арешт, Відлуння)
# shortcut: між запусками гри зберігається лише номер шару, не його код — після перезапуску шар отримає новий пароль
static func keep_layer(g: Main) -> void:
if g.crack != null and g.crack["layer"] > 1:
if g.crack != null:
g.cur["layer_state"] = {"code": g.crack["code"], "known": g.crack["known"], "present": g.crack["present"], "absent": g.crack["absent"], "hist": g.crack["hist"]}
static func auto_enter(g: Main) -> void:
@@ -166,7 +166,7 @@ static func guess_inner(g: Main, gs: String) -> void:
if randf() < 0.1 * g.eff(g.skills["ghost"]):
g.say(L.t("👻 Привид: цю спробу ніхто не помітив."), "info")
return
g.add_trace(ceili(g.trace_step(g.cur["lvl"]) / 2.0) if k.get("ddos", false) else g.trace_step(g.cur["lvl"]))
g.add_trace((ceili(g.trace_step(g.cur["lvl"]) / 2.0) if k.get("ddos", false) else g.trace_step(g.cur["lvl"])) * g.Variety.fail_mult(g))
static func run_event(g: Main, i: int) -> void:
var k = g.crack
@@ -270,6 +270,8 @@ static func use_prog(g: Main, id: String) -> void:
g.say(L.t("Логи стерто без шуму. Трасування −40%."), "info")
"trojan", "zeroday":
grant_access(g)
"icebreaker":
g.Variety.melt(g)
"worm":
g.cur["infected"] = true
g.say(L.t("🦠 Сервер заражено. Ботнет: %d серв. — платить $25 за кожен сервер після кожного твого зламу.") % g.botnet_size(), "info")
@@ -306,32 +308,46 @@ static func c_crack(g: Main, _a: String) -> void:
if not shut.is_empty():
g.say(L.t("🔌 Пароль не перевірити: закриті порти %s. Відкрий їх (ports, open <порт>).") % ", ".join(PackedStringArray(shut)), "err")
return
var gk := g.Variety.gate(g)
if gk != "":
g.say(L.t(g.Variety.LOCK_TEXT[gk]) + L.t(" Код тут не допоможе, доки замок стоїть."), "err")
return
g.leave_logs()
var lvl: int = g.cur["lvl"]
var n := mini(T.CODE_MAX, 3 + lvl / 2) # 7-значний код наосліп + 3 шари — забагато навіть для уважного гравця
var code := g.random_code(n)
var known := {}
if g.Variety.aff_of(g, g.cur) == "old":
n = maxi(3, n - 1)
# зовнішній шар після відступу: той самий пароль і все, що про нього вже з'ясовано (інакше захист 7–8 на Параної — лотерея)
var outer = g.cur["layer_state"] if not g.cur["layer_done"] and g.cur["layer_state"] != null and g.cur["layer_state"]["code"].length() == n else null
var code: String = outer["code"] if outer != null else g.random_code(n)
var known: Dictionary = outer["known"].duplicate() if outer != null else {}
var pos := range(n)
pos.shuffle()
for i in pos.slice(0, mini(g.hw["cpu"] - 1, n - 2)): # хоч дві цифри гравець вгадує сам
known[i] = true
if outer == null: # обладнання підказує раз на пароль: перепідключення не відкриває нових цифр
for i in pos.slice(0, mini(g.hw["cpu"] - 1, n - 2)): # хоч дві цифри гравець вгадує сам
known[i] = true
var bonus: int = g.cur.get("dict_bonus", 0) # пароль адміна зі словникової атаки
g.cur.erase("dict_bonus")
for i in pos:
if bonus > 0 and not known.has(i) and known.size() < n - 1:
known[i] = true
bonus -= 1
var absent := {}
var absent: Dictionary = outer["absent"].duplicate() if outer != null else {}
var ds := g.DIGITS.filter(func(d): return not d in code)
ds.shuffle()
for d in ds.slice(0, int(T.RAM_ABSENT * g.eff(g.hw["ram"])) + int(g.eff(g.skills["social"]))):
for d in ds.slice(0, 0 if outer != null else int(T.RAM_ABSENT * g.eff(g.hw["ram"])) + int(g.eff(g.skills["social"]))):
absent[d] = true
var jam := maxi(0, lvl - T.JAM_FROM) # фаєрвол сильних серверів глушить відеокарту і ШІ-асистента
var layers := g.layers_of(lvl)
var rotate := T.ROTATE_AFTER if lvl >= T.ROTATE_FROM else 0 # зміна пароля шару після помилок поспіль
g.crack = {"code": code, "known": known, "absent": absent, "present": {}, "blind": g.is_blind(lvl),
g.crack = {"code": code, "known": known, "absent": absent, "present": outer["present"].duplicate() if outer != null else {}, "blind": g.is_blind(lvl),
"free": maxi(0, int(g.eff(g.hw["gpu"])) - jam), "free_hints": maxi(0, int(g.eff(g.hw["ai"])) - jam), "layer": 1, "layers": layers,
"rotate": rotate, "since": 0, "inner_len": maxi(3, n - 2), "hist": []}
"rotate": rotate, "since": 0, "inner_len": maxi(3, n - 2), "hist": outer["hist"] if outer != null else [], "ice": g.Variety.has_ice(g, g.cur)}
if not g.cur["layer_done"]:
keep_layer(g)
if g.crack["ice"]:
g.crack["free"] = 0
g.crack["free_hints"] = 0
g.say(L.t("Запуск брутфорсу... Код: %d РІЗНИХ цифр. Обладнання вже дещо знайшло:") % n, "info")
if g.cur["layer_done"]:
g.crack["layer"] = g.cur["layer_done"] + 1
@@ -343,6 +359,8 @@ static func c_crack(g: Main, _a: String) -> void:
g.say(L.t("🧅 Шари 1–%d уже пробиті раніше — продовжуєш із шару %d/%d.") % [g.cur["layer_done"], g.crack["layer"], layers], "info")
elif layers > 1:
g.say(L.t("🧅 Шарів шифрування: %d. Обладнання допомагає лише із зовнішнім шаром. Пробиті шари лишаються пробитими, якщо відступиш (але не після арешту).") % layers, "err")
if g.crack["ice"]:
g.say(L.t("🧊 Чорний лід: помилки — подвійне трасування, відеокарта й ШІ мовчать. exploit ice або use icebreaker — розтопити."), "err")
if rotate:
g.say(L.t("🔄 Після %d помилок поспіль на одному шарі сервер змінює його пароль.") % rotate, "err")
if jam:

View File

@@ -14,9 +14,9 @@ const HARDWARE = { "cpu": { "name": "Процесор — відкриває ц
const SKILLS = { "brute": "Брутфорс — менше трасування за невдалу спробу", "stealth": "Стелс — менше трасування при завантаженні", "trade": "Торгівля — +10% до грошових винагород", "study": "Навчання — +10% досвіду", "social": "Соц. інженерія — ще одна відсутня цифра на старті зламу", "analyst": "Аналітик — дешевші підказки", "ghost": "Привид — +10% шансу, що невдалу спробу не помітять", "lawyer": "Зв'язки — +1 дозволений арешт", "intuition": "Інтуїція — 10% шанс самому вгадати цифру після помилки" }
const PROGRAMS = { "portscan": { "name": "Сканер портів", "req": 1, "cost": 150, "xp": 40, "when": "crack", "desc": "знаходить 2 цифри, яких немає в коді" }, "keylogger": { "name": "Кейлогер", "req": 2, "cost": 300, "xp": 60, "when": "crack", "desc": "відкриває 1 цифру коду" }, "logwiper": { "name": "Чистильник логів", "req": 3, "cost": 500, "xp": 80, "when": "online", "desc": "трасування −40%" }, "sniffer": { "name": "Сніфер пакетів", "req": 3, "cost": 450, "xp": 80, "when": "crack", "desc": "знаходить 2 цифри, які є в коді" }, "worm": { "name": "Вірус-черв'як", "req": 4, "cost": 800, "xp": 120, "when": "open", "desc": "заражає зламаний сервер: ботнет платить за кожен твій злам" }, "rootkit": { "name": "Руткіт", "req": 5, "cost": 1200, "xp": 150, "when": "crack", "desc": "3 невдалі спроби без трасування" }, "trojan": { "name": "Троян", "req": 6, "cost": 2500, "xp": 200, "when": "locked", "desc": "миттєвий доступ до сервера із захистом до 5" }, "ddos": { "name": "DDoS-бот", "req": 7, "cost": 2000, "xp": 220, "when": "crack", "desc": "адміни відволіклися: помилки дають удвічі менше трасування" }, "aicracker": { "name": "ШІ-зломщик", "req": 8, "cost": 3500, "xp": 260, "when": "crack", "desc": "відкриває 2 цифри коду" }, "zeroday": { "name": "Експлойт нульового дня", "req": 10, "cost": 9000, "xp": 400, "when": "locked", "desc": "миттєвий доступ до будь-якого сервера" } }
const PROGRAMS = { "portscan": { "name": "Сканер портів", "req": 1, "cost": 150, "xp": 40, "when": "crack", "desc": "знаходить 2 цифри, яких немає в коді" }, "keylogger": { "name": "Кейлогер", "req": 2, "cost": 300, "xp": 60, "when": "crack", "desc": "відкриває 1 цифру коду" }, "logwiper": { "name": "Чистильник логів", "req": 3, "cost": 500, "xp": 80, "when": "online", "desc": "трасування −40%" }, "sniffer": { "name": "Сніфер пакетів", "req": 3, "cost": 450, "xp": 80, "when": "crack", "desc": "знаходить 2 цифри, які є в коді" }, "worm": { "name": "Вірус-черв'як", "req": 4, "cost": 800, "xp": 120, "when": "open", "desc": "заражає зламаний сервер: ботнет платить за кожен твій злам" }, "rootkit": { "name": "Руткіт", "req": 5, "cost": 1200, "xp": 150, "when": "crack", "desc": "3 невдалі спроби без трасування" }, "icebreaker": { "name": "Криголам", "req": 2, "cost": 600, "xp": 70, "when": "ice", "desc": "розтоплює чорний лід на сервері" }, "trojan": { "name": "Троян", "req": 6, "cost": 2500, "xp": 200, "when": "locked", "desc": "миттєвий доступ до сервера із захистом до 5" }, "ddos": { "name": "DDoS-бот", "req": 7, "cost": 2000, "xp": 220, "when": "crack", "desc": "адміни відволіклися: помилки дають удвічі менше трасування" }, "aicracker": { "name": "ШІ-зломщик", "req": 8, "cost": 3500, "xp": 260, "when": "crack", "desc": "відкриває 2 цифри коду" }, "zeroday": { "name": "Експлойт нульового дня", "req": 10, "cost": 9000, "xp": 400, "when": "locked", "desc": "миттєвий доступ до будь-якого сервера" } }
const WHEN_TEXT = { "crack": "запускається під час зламу", "online": "запускається на підключеному сервері", "locked": "запускається на ще не зламаному сервері, до команди crack", "open": "запускається на вже зламаному, ще не зараженому сервері" }
const WHEN_TEXT = { "crack": "запускається під час зламу", "online": "запускається на підключеному сервері", "locked": "запускається на ще не зламаному сервері, до команди crack", "open": "запускається на вже зламаному, ще не зараженому сервері", "ice": "запускається на сервері з чорним льодом, до зламу чи під час нього" }
const SNIPPETS = [ "for (port of range(1, 65535)) probe(port);", "payload = encrypt(shell, key=0xDEAD);", "while (!access) brute(next());", "hide(process.pid); wipe(logs);", "spread(self, targets=net.scan());", "if (admin.online) sleep(rand(60));", "hook(keyboard, on_key=log);", "tunnel = proxy_chain(7).open();" ]

View File

@@ -8,7 +8,7 @@ dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter="tests/*"
exclude_filter="tests/*,tools/*,fonts/DejaVu*,fonts/JetBrains*"
export_path="../game_godot/TinMerezhi.exe"
encryption_include_filters=""
encryption_exclude_filters=""
@@ -41,3 +41,36 @@ application/export_angle=0
application/export_d3d12=0
application/d3d12_agility_sdk_multiarch=true
ssh_remote_deploy/enabled=false
[preset.1]
name="Web"
platform="Web"
runnable=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter="tests/*,tools/*"
export_path="../game_web/index.html"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.1.options]
custom_template/debug=""
custom_template/release=""
variant/extensions_support=false
variant/thread_support=false
vram_texture_compression/for_desktop=true
vram_texture_compression/for_mobile=false
html/export_icon=true
html/custom_html_shell=""
html/head_include=""
html/canvas_resize_policy=2
html/focus_canvas_on_start=true
html/experimental_virtual_keyboard=false
progressive_web_app/enabled=false

Binary file not shown.

View File

@@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://vgruetf7qsxc"
path="res://.godot/imported/DejaVuSansMono-Bold.ttf-2869c267b6229069bac4acc3bc3ecdef.fontdata"
[deps]
source_file="res://fonts/DejaVuSansMono-Bold.ttf"
dest_files=["res://.godot/imported/DejaVuSansMono-Bold.ttf-2869c267b6229069bac4acc3bc3ecdef.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=3
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

Binary file not shown.

View File

@@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://couvuivyg1i75"
path="res://.godot/imported/DejaVuSansMono.ttf-8e135b2c7e25a27d178cdccaa11decf7.fontdata"
[deps]
source_file="res://fonts/DejaVuSansMono.ttf"
dest_files=["res://.godot/imported/DejaVuSansMono.ttf-8e135b2c7e25a27d178cdccaa11decf7.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=3
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

Binary file not shown.

View File

@@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://d1q4rrpph31h8"
path="res://.godot/imported/JetBrainsMonoNL-btc.ttf-97d151dc4c4d36b15c2b2dbc9728030c.fontdata"
[deps]
source_file="res://fonts/JetBrainsMonoNL-btc.ttf"
dest_files=["res://.godot/imported/JetBrainsMonoNL-btc.ttf-97d151dc4c4d36b15c2b2dbc9728030c.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=3
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

View File

@@ -0,0 +1,78 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: DejaVu fonts
Upstream-Author: Stepan Roh <src@users.sourceforge.net> (original author),
see /usr/share/doc/fonts-dejavu-core/AUTHORS for full list
Source: https://dejavu-fonts.github.io/
Files: *
Copyright: Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved.
Bitstream Vera is a trademark of Bitstream, Inc.
DejaVu changes are in public domain.
License: bitstream-vera
Permission is hereby granted, free of charge, to any person obtaining a copy
of the fonts accompanying this license ("Fonts") and associated
documentation files (the "Font Software"), to reproduce and distribute the
Font Software, including without limitation the rights to use, copy, merge,
publish, distribute, and/or sell copies of the Font Software, and to permit
persons to whom the Font Software is furnished to do so, subject to the
following conditions:
.
The above copyright and trademark notices and this permission notice shall
be included in all copies of one or more of the Font Software typefaces.
.
The Font Software may be modified, altered, or added to, and in particular
the designs of glyphs or characters in the Fonts may be modified and
additional glyphs or characters may be added to the Fonts, only if the fonts
are renamed to names not containing either the words "Bitstream" or the word
"Vera".
.
This License becomes null and void to the extent applicable to Fonts or Font
Software that has been modified and is distributed under the "Bitstream
Vera" names.
.
The Font Software may be sold as part of a larger software package but no
copy of one or more of the Font Software typefaces may be sold by itself.
.
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME
FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING
ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE
FONT SOFTWARE.
.
Except as contained in this notice, the names of Gnome, the Gnome
Foundation, and Bitstream Inc., shall not be used in advertising or
otherwise to promote the sale, use or other dealings in this Font Software
without prior written authorization from the Gnome Foundation or Bitstream
Inc., respectively. For further information, contact: fonts at gnome dot
org.
Files: debian/*
Copyright: (C) 2005-2006 Peter Cernak <pce@users.sourceforge.net>
(C) 2006-2011 Davide Viti <zinosat@tiscali.it>
(C) 2011-2013 Christian Perrier <bubulle@debian.org>
(C) 2013 Fabian Greffrath <fabian+debian@greffrath.com>
License: GPL-2+
This program is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later
version.
.
This program is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more
details.
.
You should have received a copy of the GNU General Public
License along with this package; if not, write to the Free
Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Boston, MA 02110-1301 USA
.
On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file
/usr/share/common-licenses/GPL-2'.

View File

@@ -0,0 +1,93 @@
Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@@ -21,6 +21,8 @@ const FACE := [
" ▀▀██▄▄▄▄▄▄▄▄██▀▀ ",
]
const NOISE := "█▓▒░#%@&01"
# своя випадковість для прикрас: кадри й таймери залежать від швидкості машини, а randf() гри — ні (бот у CI й під Wine грає однаково)
static var rng := RandomNumberGenerator.new()
static func calm(g: Main) -> bool:
return g.cfg.get("calm", false)
@@ -50,12 +52,16 @@ static func tick(g: Main, delta: float) -> void:
var m: ShaderMaterial = g.crt.material
m.set_shader_parameter("threat", g.threat_v)
m.set_shader_parameter("noise", clampf((g.threat_v - 0.35) / 0.65, 0.0, 1.0) * k)
# ефект на нулі й спокійно — шейдер повернув би картинку як є, тож не копіюємо екран щокадру
g.crt.visible = g.cfg["crt"] > 0 or g.flash.a > 0.0 or g.threat_v > 0.002 \
or (g.cur != null and g.trace > 60) \
or THEMES[clampi(int(g.cfg.get("theme", 0)), 0, THEMES.size() - 1)][1] >= 0.0
g.side_style.border_color = Color("#11aa55").lerp(Color("#ff3333"), g.threat_v)
g.side_style.shadow_color = Color(Color(0.2, 1, 0.4).lerp(Color(1, 0.2, 0.2), g.threat_v), 0.12 + 0.2 * g.threat_v)
# рамка тремтить, коли от-от відстежать (не заважаючи трусінню від помилок)
g.shake_t = maxf(0.0, g.shake_t - delta)
if g.shake_t <= 0.0:
g.ui.position = Vector2(randf_range(-2.5, 2.5), randf_range(-1.2, 1.2)) * k * g.threat_v if g.threat_v > 0.7 and randf() < 0.12 else Vector2.ZERO
g.ui.position = Vector2(rng.randf_range(-2.5, 2.5), rng.randf_range(-1.2, 1.2)) * k * g.threat_v if g.threat_v > 0.7 and rng.randf() < 0.12 else Vector2.ZERO
# візуалізація зламу: які цифри щойно знайдено
if g.crack != null:
if g.crack["code"] != g.cv_code:
@@ -74,19 +80,19 @@ static func tick(g: Main, delta: float) -> void:
var o = g.get_node_or_null(n)
if o:
o.queue_redraw()
if g.call_face != null and is_instance_valid(g.call_face) and not calm(g) and randf() < 0.35:
if g.call_face != null and is_instance_valid(g.call_face) and not calm(g) and rng.randf() < 0.35:
g.call_face.text = glitch_lines(FACE, 0.06)
g.call_face.position.x = randf_range(-3, 3) if randf() < 0.3 else 0.0
g.call_face.position.x = rng.randf_range(-3, 3) if rng.randf() < 0.3 else 0.0
static func glitch_lines(lines: Array, amount: float) -> String:
var res := PackedStringArray()
for ln in lines:
var s: String = ln
for i in s.length():
if s[i] != " " and randf() < amount:
s[i] = NOISE[randi() % NOISE.length()]
if randf() < amount * 2:
s = s.substr(1) + " " if randf() < 0.5 else " " + s.left(s.length() - 1)
if s[i] != " " and rng.randf() < amount:
s[i] = NOISE[rng.randi() % NOISE.length()]
if rng.randf() < amount * 2:
s = s.substr(1) + " " if rng.randf() < 0.5 else " " + s.left(s.length() - 1)
res.append(s)
return "\n".join(res)
@@ -222,13 +228,13 @@ static func map_node_fx(g: Main, c: Control) -> void:
var p: Vector2 = g._mp(g.map_pos[e[0]])
var r: float = 12.0 * g.map_scale
var a := 1.0 - f
var j := Vector2(randf_range(2, 6) * a, 0)
var j := Vector2(rng.randf_range(2, 6) * a, 0)
c.draw_circle(p - j, r, Color(1, 0, 0.35, 0.45 * a))
c.draw_circle(p + j, r, Color(0, 1, 1, 0.45 * a))
var sc := Color(1, 0.25, 0.25, 0.7 * a) if e[2] == "burn" else Color(0.8, 1, 0.85, 0.7 * a)
for s in 6:
c.draw_rect(Rect2(p + Vector2(randf_range(-r * 2.2, 0), randf_range(-r * 1.6, r * 1.6)), Vector2(randf_range(r, r * 3), randf_range(1, 3))), sc)
if randf() < 0.5 or f > 0.5:
c.draw_rect(Rect2(p + Vector2(rng.randf_range(-r * 2.2, 0), rng.randf_range(-r * 1.6, r * 1.6)), Vector2(rng.randf_range(r, r * 3), rng.randf_range(1, 3))), sc)
if rng.randf() < 0.5 or f > 0.5:
c.draw_circle(p, r * 1.05, Color(0, 0, 0, 0.75 * a))
# ── ASCII-емблема сервера: симетричний "логотип" 7×4 з хешу назви ──
@@ -368,7 +374,7 @@ static func _city(gr: Array, lit: float, flicker := false) -> void:
var win := xx % 2 == 1 and yy % 2 == 1 and xx < bw - 1 and yy < bh - 1
if win:
var on: bool = (abs(hash(gx * 31 + gy * 17)) % 1000) / 1000.0 < lit
if flicker and on and randf() < 0.05:
if flicker and on and rng.randf() < 0.05:
on = false
_put(gr, gx, gy, "█" if on else "·", Color("#ffdd66") if on else Color(0.3, 0.4, 0.35))
else:
@@ -391,7 +397,7 @@ static func _scene(id: String, t: float) -> Array:
"end_silence": # ботоферма замовкає, місто гасне
_city(gr, 1.0 - p)
for r in 6:
var on: bool = randf() < 0.6 and p < 0.55 + r * 0.05
var on: bool = rng.randf() < 0.6 and p < 0.55 + r * 0.05
_put(gr, W - 9, 2 + r * 2, "[" + ("■" if on else "□") + "■■]", Color("#ff5555") if on else Color(0.3, 0.3, 0.3))
if p >= 1.0:
_put(gr, 4, 3, "_" if int(t * 2) % 2 == 0 else " ", Color("#33ff66"))
@@ -445,7 +451,7 @@ static func _scene(id: String, t: float) -> Array:
var gone: bool = (abs(hash(xx * 11 + i * 7)) % 100) / 100.0 * 0.6 + (fig.size() - i) / float(fig.size()) * 0.4 < p
if s[xx] != " " and not gone:
_put(gr, (W - s.length()) / 2 + xx, fy + i, s[xx], Color(0.75, 0.85, 0.8))
elif s[xx] != " " and p < 1.0 and randf() < 0.3:
elif s[xx] != " " and p < 1.0 and rng.randf() < 0.3:
_put(gr, (W - s.length()) / 2 + xx, fy + i, "░", Color(0.4, 0.5, 0.45))
"end_zero": # обличчя глітчить, гасне, як старий телевізор, і вранці місто світиться
if t < 2.0:

View File

@@ -48,4 +48,4 @@ static func c_help(g: Main, a: String) -> void:
g.say("\n".join(shown), "info")
static func help_full(g: Main) -> String:
return L.t("Команди:\n scan — знайти сервери в мережі\n connect <ip|№> — підключитися (або клік на мапі)\n crack — зламати пароль (вгадай код)\n ls / cat <файл> — файли на сервері / прочитати файл\n download <файл> — завантажити файл\n upload [файл] — залити латку на сервер (Акти IV–VI)\n disconnect — відключитися (трасування скидається)\n wipe — стерти свої логи (+10%% трасування). Без цього — розслідування!\n route [add №|auto|clear] — маршрут через зламані сервери: −10%% трасування за вузол\n (1 вузол на старті, +1 кожні 4 рівні, до 5)\n contract [drop] — контракти (потрібне звання)\n missions / jobs — сюжет / побічні замовлення\n skills / learn <навичка> — %s\n shop / buy <модуль> — %s\n code / write / use <програма> — хакерське ПЗ\n news — новини, у яких є твій слід\n ports / open <порт> — закриті порти сервера / відкрити утилітою\n tools / make <утиліта> — утиліти для портів\n logs / wipe [лог] — твої сліди на сервері / стерти один або всі\n agent [№] — скриптові агенти\n hint / abort — відкрити цифру коду / перервати злам\n firewall / dict — міні-ігри перед зламом\n rivals — суперники-хакери\n quests — дивні прохання незнайомців (одноразові квести)\n call — соціальна інженерія: подзвонити працівнику перед зламом\n decrypt — розшифрувати крипто-гаманець на зламаному сервері\n market / exploit <id> — чорний ринок за крипту / застосувати експлойт\n choose 1|2 — вибір у фіналі акту\n endless / records — Нескінченна мережа після фіналу / рекорди\n daily — щоденний виклик: та сама мережа для всіх, таблиця дня\n top [№] — вікно онлайн-рекордів (Нескінченна мережа, агенти)\n difficulty <рівень> — novice | normal | paranoid (до першого зламу)\n lang uk|en — мова гри\n about — про гру і розробника\n achievements — досягнення (лишаються між проходженнями)\n status — рівень, гроші, звання, обладнання, розслідування\n save — зберегти гру (вона й так зберігається після кожної дії)\n sound — увімкнути або вимкнути звук і музику\n settings — налаштування: гучність, CRT, глітч, шрифт, F11, мова\n update — перевірити й завантажити нову версію гри\n newgame — почати спочатку (досягнення лишаться)\n ngplus — New Game+ після фіналу: навички й модулі лишаються, Пуйло сильніший\n clear — очистити екран\n help [команда] — цей список або докладно про одну команду\nhelp <команда> — докладно про команду. Tab — доповнити команду чи аргумент, ↑/↓ — історія команд.") % [", ".join(PackedStringArray(g.skill_defs.keys())), ", ".join(PackedStringArray(g.hw_defs.keys()))]
return L.t("Команди:\n scan — знайти сервери в мережі\n connect <ip|№> — підключитися (або клік на мапі)\n crack — зламати пароль (вгадай код)\n ls / cat <файл> — файли на сервері / прочитати файл\n download / rm <файл> — завантажити / стерти файл (rm — для замовлень)\n upload [файл] — залити латку на сервер (Акти IV–VI)\n disconnect — відключитися (трасування скидається)\n wipe — стерти свої логи (+10%% трасування). Без цього — розслідування!\n route [add №|auto|clear] — маршрут через зламані сервери: −10%% трасування за вузол\n (1 вузол на старті, +1 кожні 4 рівні, до 5)\n contract [drop] — контракти (потрібне звання)\n missions / jobs — сюжет / побічні замовлення\n skills / learn <навичка> — %s\n shop / buy <модуль> — %s\n code / write / use <програма> — хакерське ПЗ\n news — новини, у яких є твій слід\n ports / open <порт> — закриті порти сервера / відкрити утилітою\n tools / make <утиліта> — утиліти для портів\n logs / wipe [лог] — твої сліди на сервері / стерти один або всі\n agent [№] — скриптові агенти\n hint / abort — відкрити цифру коду / перервати злам\n firewall / dict — міні-ігри перед зламом\n rivals — суперники-хакери\n quests — дивні прохання незнайомців (одноразові квести)\n call — соціальна інженерія: подзвонити працівнику перед зламом\n decrypt — розшифрувати крипто-гаманець на зламаному сервері\n market / exploit <id> — чорний ринок за крипту / застосувати експлойт\n choose 1|2 — вибір у фіналі акту\n endless / records — Нескінченна мережа після фіналу / рекорди\n daily — щоденний виклик: та сама мережа для всіх, таблиця дня\n top [№] — вікно онлайн-рекордів (Нескінченна мережа, агенти)\n difficulty <рівень> — novice | normal | paranoid (до першого зламу)\n lang uk|en — мова гри\n about — про гру і розробника\n achievements — досягнення (лишаються між проходженнями)\n status — рівень, гроші, звання, обладнання, розслідування\n save — зберегти гру (вона й так зберігається після кожної дії)\n sound — увімкнути або вимкнути звук і музику\n settings — налаштування: гучність, CRT, глітч, шрифт, F11, мова\n update — перевірити й завантажити нову версію гри\n newgame — почати спочатку (досягнення лишаться)\n ngplus — New Game+ після фіналу: навички й модулі лишаються, Пуйло сильніший\n clear — очистити екран\n help [команда] — цей список або докладно про одну команду\nhelp <команда> — докладно про команду. Tab — доповнити команду чи аргумент, ↑/↓ — історія команд.") % [", ".join(PackedStringArray(g.skill_defs.keys())), ", ".join(PackedStringArray(g.hw_defs.keys()))]

File diff suppressed because one or more lines are too long

View File

@@ -36,6 +36,7 @@ const Hud = preload("res://hud.gd")
const Popups = preload("res://popups.gd")
const Buttons = preload("res://buttons.gd")
const Map = preload("res://map.gd")
const Variety = preload("res://variety.gd") # замки, чорний лід, властивості серверів, цілі замовлень
const MAX_LEVEL := 40
const DEV := "JunioR"
@@ -68,7 +69,7 @@ var note_wave := "sq"
var alarm_t := 0.0
const DIGITS := ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
const HOME := Vector2(150, 468)
var RAIN_CHARS := "01ТІНЬМЕРЕЖІ#$%&@アカサタナ" if L.current() == "uk" else "01SHADOWNET#$%&@アカサタナ"
var RAIN_CHARS := ("01ТІНЬМЕРЕЖІ#$%&@" if L.current() == "uk" else "01SHADOWNET#$%&@") + ("" if OS.has_feature("web") else "アカサタナ") # у браузері нема шрифту з катаканою
const COL := {
"": Color("#33ff66"), "info": Color("#66ccff"), "warn": Color("#ffdd33"), "err": Color("#ff5555"),
"big": Color.WHITE, "mail": Color("#ff99ff"),
@@ -101,6 +102,8 @@ var stolen := {} # файли замовлень, які вкрали с
var endless: Variant = null # режим "Нескінченна мережа" (modes.gd), або null
var mg: Variant = null # міні-гра зламу (minigames.gd, social.gd, market.gd), або null
var bm := {} # крипта, розшифровані гаманці й експлойти чорного ринку (market.gd)
var variety := true # замки, лід, властивості й цілі замовлень (тести старих механік вимикають)
var aff := {} # властивості серверів цієї гри: ip → "admin"|"old"|"nolog"|"bait" (variety.gd)
var bm_rng := RandomNumberGenerator.new() # окремий генератор для call/decrypt: randf() гри не зсувається
var mission := 0
var over := false
@@ -253,6 +256,7 @@ func _ready() -> void:
s["ports"] = Ports.ports_for(self, s)
s["ports_open"] = []
_compute_reqs()
Variety.roll(self)
for i in servers.size():
var h: int = abs(hash(servers[i]["ip"]))
map_pos.append(Vector2(32 + (i % 6) * 47 + (h & 15) - 8, 46 + (i / 6) * 54 + ((h >> 4) & 15) - 8)) # 8 рядів по 6, "дім" — під ними
@@ -262,12 +266,13 @@ func _ready() -> void:
"missions": func(a): Story.c_missions(self, a), "jobs": func(a): Story.c_jobs(self, a), "skills": func(a): Shop.c_skills(self, a), "learn": func(a): Shop.c_learn(self, a), "shop": func(a): Shop.c_shop(self, a), "buy": func(a): Shop.c_buy(self, a),
"code": func(a): Shop.c_code(self, a), "write": func(a): Shop.c_write(self, a), "use": func(a): Shop.c_use(self, a), "achievements": c_achievements, "status": c_status,
"news": c_news, "ports": func(a): Ports.c_ports(self, a), "open": func(a): Ports.c_open(self, a), "tools": func(a): Ports.c_tools(self, a), "make": func(a): Ports.c_make(self, a), "logs": func(a): Net.c_logs(self, a), "agent": c_agent, "about": c_about, "update": func(_a): updater.run(), "clear": c_clear, "save": c_save, "sound": c_sound, "settings": c_settings, "difficulty": c_difficulty, "rivals": func(_a): Rivals.show(self), "quests": func(_a): Side.show(self), "lang": c_lang, "endless": func(_a): Modes.start_endless(self), "daily": func(_a): Modes.start_daily(self), "records": func(_a): Modes.show_records(self), "top": func(a): online.show_top(a), "firewall": func(_a): Minigames.start(self, "firewall"), "dict": func(_a): Minigames.start(self, "dict"), "newgame": c_newgame, "ngplus": func(_a): Modes.start_ng(self), "upload": func(a): Story.c_upload(self, a), "choose": func(a): Story.c_choose(self, a),
"call": func(_a): Social.start(self), "decrypt": func(_a): Market.start(self), "market": func(a): Market.buy(self, a), "exploit": func(a): Market.use(self, a),
"call": func(_a): Social.start(self), "decrypt": func(_a): Market.start(self), "market": func(a): Market.buy(self, a), "exploit": func(a): Market.use(self, a), "rm": func(a): Variety.c_rm(self, a),
}
Save.protect_legacy([save_path, ach_path, records_path])
Settings.load_into(self)
UiBuild.build(self)
Settings.apply(self)
get_window().size_changed.connect(func(): Settings.apply_scale(self)) # масштаб залежить від розміру вікна
_load_ach()
var loaded := Save.load_into(self)
apply_branches()
@@ -538,25 +543,35 @@ func _emit(text: String, cls: String) -> void:
# Довгі сесії не гальмують: тримаємо останні MAX_LINES рядків.
# remove_paragraph у Godot 4.3 аварійно падає, тому зрідка (раз на 200 рядків) перемальовуємо вивід заново.
func _track(text: String, cls := "") -> void:
log_lines.append([text, cls])
# redraw — як перемалювати рядок із кольорами (емблема, фішки, лист); без нього — звичайний рядок кольору cls.
func _track(text: String, cls := "", redraw := Callable()) -> void:
log_lines.append([text, cls, redraw])
if log_lines.size() > MAX_LINES + 200:
log_lines = log_lines.slice(-MAX_LINES)
out.clear()
for l in log_lines:
_emit(l[0], l[1])
if l[2].is_valid():
l[2].call()
else:
_emit(l[0], l[1])
# рядок з ASCII-емблемою ліворуч (її колір — окремо)
func say_logo(art: String, art_col: Color, text: String, cls: String) -> void:
_emit_logo(art, art_col, text, cls)
_track(art + " " + text, cls, _emit_logo.bind(art, art_col, text, cls))
func _emit_logo(art: String, art_col: Color, text: String, cls: String) -> void:
out.push_color(art_col)
out.add_text(art + " ")
out.pop()
_emit(text, cls)
_track(art + " " + text, cls)
# рядок із кольоровими "фішками": [[текст, колір фону або null], ...]
func say_chips(parts: Array) -> void:
var plain := ""
_emit_chips(parts)
_track(" ".join(PackedStringArray(parts.map(func(p): return p[0]))).strip_edges(), "", _emit_chips.bind(parts))
func _emit_chips(parts: Array) -> void:
for p in parts:
if p[1] != null:
out.push_bgcolor(p[1])
@@ -566,9 +581,7 @@ func say_chips(parts: Array) -> void:
out.pop()
out.pop()
out.add_text(" ")
plain += p[0] + " "
out.newline()
_track(plain.strip_edges())
func mail(from: String, text: String) -> void:
Popups.mail(self, from, text)
@@ -621,7 +634,7 @@ func _process(delta: float) -> void:
btn_scroll.custom_minimum_size.y = minf(btns.get_combined_minimum_size().y, maxf(120.0, size.y * 0.34))
map_bg.queue_redraw() # пульси, з'єднання, слідопит — щокадру; статичний шар — лише в render()
map_fx.queue_redraw()
ticker.position.x -= 70.0 * delta
ticker.position.x = 0.0 if Gfx.calm(self) else ticker.position.x - 70.0 * delta # «Менше анімацій»: стрічка стоїть
if ticker.position.x < -ticker.size.x:
_fill_ticker()
ticker.position.x = ticker_bar.size.x
@@ -660,19 +673,22 @@ func _input(e: InputEvent) -> void:
get_viewport().set_input_as_handled()
func _tick_rain() -> void:
rain.visible = not Gfx.calm(self) # «Менше анімацій»: без дощу символів
if not rain.visible:
return
var cols := int(rain.size.x / 16)
if drops.size() != cols:
drops = []
for i in cols:
drops.append(randf() * rain.size.y / 16)
drops.append(Gfx.rng.randf() * rain.size.y / 16)
for i in cols:
drops[i] = 0.0 if drops[i] * 16 > rain.size.y and randf() > 0.975 else drops[i] + 1
drops[i] = 0.0 if drops[i] * 16 > rain.size.y and Gfx.rng.randf() > 0.975 else drops[i] + 1
rain.queue_redraw()
func _draw_rain() -> void:
for i in drops.size():
for t in 14:
var ch := RAIN_CHARS[randi() % RAIN_CHARS.length()]
var ch := RAIN_CHARS[Gfx.rng.randi() % RAIN_CHARS.length()]
rain.draw_char(font, Vector2(i * 16, (drops[i] - t) * 16), ch, 15, Color(0.2, 1, 0.4, 1.0 - t / 14.0)) # draw_char не шейпить текст — у рази швидше
func _on_submit(text: String) -> void:
@@ -757,6 +773,8 @@ func can_use(id: String) -> bool:
return cur != null
"locked":
return cur != null and not cur["open"] and crack == null
"ice":
return cur != null and not cur["open"] and Variety.has_ice(self, cur)
return cur != null and cur["open"] and not cur["infected"]
# модуль поточної міні-гри: input/buttons
@@ -822,7 +840,7 @@ func botnet_pay() -> void:
say(L.t("🕸 Ботнет (%d серв.): +$%d") % [n, m], "info")
func leave_logs(kind := "auth") -> void:
if cur != null and cur["lvl"] >= 2: # кав'ярня й школа логів не ведуть
if cur != null and cur["lvl"] >= 2 and Variety.aff_of(self, cur) != "nolog": # кав'ярня й школа логів не ведуть
_add_log(cur, kind)
func _add_log(s, kind: String) -> void:
@@ -879,6 +897,11 @@ func arrest(reason: String) -> void:
if cur != null:
Story._lock(cur)
cur["logs"] = false
for f in cur["files"]: # файл "піти без логів" конфісковано: інакше після арешту connect + disconnect зараховував главу
if done.has("+" + f) and not done.has(f):
done.erase("+" + f)
done["?" + f] = true # ціль розвідки вже відома
say(L.t("📦 %s конфісковано під час арешту — доведеться завантажити знову.") % f, "err")
var burnt := route_servers()
for s in burnt:
node_fx.append([servers.find(s), time, "burn"])
@@ -1133,7 +1156,11 @@ func add_news(h: String) -> void:
func _fill_ticker() -> void:
var items := news.slice(-3)
var w: Array = Extra.WORLD_NEWS.duplicate()
w.shuffle()
for i in range(w.size() - 1, 0, -1): # Фішер — Єйтс на Gfx.rng: стрічка крутиться в реальному часі й не має зсувати randf() гри
var j := Gfx.rng.randi_range(0, i)
var t = w[i]
w[i] = w[j]
w[j] = t
items.append_array(w.slice(0, 5 - items.size()))
ticker.text = "📰 " + " ◆ ".join(PackedStringArray(items))
ticker.reset_size()
@@ -1204,7 +1231,7 @@ func c_difficulty(a: String) -> void:
if a.is_valid_int() and int(a) >= 1 and int(a) <= 3:
i = int(a) - 1
if i < 0:
say(L.t("🎚 Складність: %s. Варіанти: novice (Новачок: трасування −25%%, +2 арешти), normal, paranoid (Параноя: трасування +50%%, слідчі швидші, на 1 арешт менше, ЗБЕРЕЖЕННЯ ЛИШЕ НА ПОЧАТКУ АКТУ).") % L.t(T.DIFF_NAMES[diff]), "info")
say(L.t("🎚 Складність: %s. Варіанти: novice (Новачок: трасування −30%%, +2 арешти, +20%% дій у термінових главах), normal, paranoid (Параноя: трасування +90%%, слідчі швидші, на 1 арешт менше, за замками ще й код, ЗБЕРЕЖЕННЯ ЛИШЕ НА ПОЧАТКУ АКТУ).") % L.t(T.DIFF_NAMES[diff]), "info")
return
if not can_change_diff():
say(L.t("Складність обирають на початку гри (до першого зламу). Почни нову гру: newgame."), "err")

View File

@@ -14,12 +14,18 @@ const FAIL_TRACE := 5
const MAX_SHIFT := 9
const WORDS := ["shadow", "kernel", "cipher", "crypto", "socket", "packet", "router", "binary", "signal", "mirror",
"falcon", "rocket", "hunter", "matrix", "secret", "legacy", "spirit", "planet", "dragon", "silver"]
# українською — свої слова й абетка (теж по 6 літер, щоб баланс не змінився)
const WORDS_UK := ["сервер", "пароль", "захист", "мережа", "сигнал", "модуль", "доступ", "дракон", "ракета", "секрет",
"привид", "кордон", "комета", "бункер", "ліхтар", "журнал", "запуск", "вектор", "сканер", "кіборг"]
const ABC_EN := "abcdefghijklmnopqrstuvwxyz"
const ABC_UK := "абвгґдеєжзиіїйклмнопрстуфхцчшщьюя"
# id → [назва, ціна в 🪙, опис, скільки можна мати]
const EXPLOITS := {
"layer": ["Розбирач шарів", 6, "під час зламу: поточний шар шифрування відкривається одразу", 3],
"jam": ["Фальшива наводка", 4, "суперник у перегонах іде за хибним слідом — замовлення лишається тобі", 3],
"bribe": ["Хабар слідчому", 8, "усі розслідування закрито, твої лишені логи зникають", 3],
"ice": ["Розтоплювач льоду", 2, "на сервері з чорним льодом: розтоплює його, помилки знову звичайні", 5],
"alibi": ["Цифрове алібі", 12, "діє само: наступний арешт не відбудеться — тебе викидає з мережі без втрат", 1],
}
@@ -43,22 +49,38 @@ static func ls_line(g: Main) -> void:
g.say(L.t(" 🔐 wallet.dat — зашифрований крипто-гаманець (decrypt)"), "warn")
# ── криптоголоволомка ──
# абетку видно з самого слова: латиниця чи кирилиця
static func abc(w: String) -> String:
return ABC_EN if w[0] in ABC_EN else ABC_UK
static func _caesar(w: String, k: int) -> String:
var a := abc(w)
var r := ""
for c in w:
r += String.chr(97 + posmod(c.unicode_at(0) - 97 + k, 26))
r += a[posmod(a.find(c) + k, a.length())]
return r
static func _atbash(w: String) -> String:
var a := abc(w)
var r := ""
for c in w:
r += String.chr(122 - (c.unicode_at(0) - 97))
r += a[a.length() - 1 - a.find(c)]
return r
static func encode(w: String, kind: int, k: int) -> String:
return _caesar(w.reverse() if kind == 1 else _atbash(w) if kind == 2 else w, k)
static func start(g: Main) -> void:
if g.Variety.gate(g) == "cipher":
if g.cur.get("cipher_used", false):
g.say(L.t("Замок уже заблокувався після спроби. Відключись і повернись пізніше."), "err")
return
if g.crack != null or g.mg != null or not g.Variety.ports_ready(g):
return
g.cur["cipher_used"] = true
g.leave_logs()
_begin(g, true)
return
if g.cur == null or not g.cur["open"]:
g.say(L.t("Немає доступу."), "err")
return
@@ -66,28 +88,33 @@ static func start(g: Main) -> void:
g.say(L.t("Тут немає зашифрованого гаманця."), "err")
return
g.bm["wallets"].append(g.cur["ip"]) # одна спроба: гаманець стирає себе після провалу чи відмови
_begin(g, false)
# lock — це зовнішній замок сервера (variety.gd), а не гаманець
static func _begin(g: Main, lock: bool) -> void:
var lvl: int = g.cur["lvl"]
var kind := 0 if lvl <= 3 else (1 if lvl <= 6 else 2)
var w: String = WORDS[g.bm_rng.randi() % WORDS.size()]
var ws: Array = WORDS if L.current() == "en" else WORDS_UK
var w: String = ws[g.bm_rng.randi() % ws.size()]
var k: int = 1 + g.bm_rng.randi() % MAX_SHIFT
g.mg = {"kind": "cipher", "word": w, "type": kind, "shift": k, "text": encode(w, kind, k), "tries": TRIES, "peeks": PEEKS}
g.mg = {"kind": "cipher", "word": w, "type": kind, "shift": k, "text": encode(w, kind, k), "tries": TRIES, "peeks": PEEKS, "lock": lock}
var how: String = [L.t("шифр Цезаря: кожну літеру зсунуто вперед на 1–%d"), L.t("шифр Цезаря (зсув 1–%d), а слово записано задом наперед"),
L.t("Атбаш (a↔z, b↔y, c↔x…), потім Цезар зі зсувом 1–%d")][kind] % MAX_SHIFT
g.say(L.t("🔐 КРИПТО-ГАМАНЕЦЬ. Ключ — англійське слово, %s.\nЗ метаданих видно: перша літера ключа — \"%s\".\nВведи слово-ключ, або число 1–%d — пробний зсув назад. abort — здатися.") % [how, w[0], MAX_SHIFT], "info")
L.t("Атбаш (а↔я, б↔ю, в↔ь…), потім Цезар зі зсувом 1–%d")][kind] % MAX_SHIFT
g.say((L.t("🔐 ШИФР-ЗАМОК. Ключ — українське слово, %s.\nЗ метаданих видно: перша літера ключа — \"%s\".\nВведи слово-ключ, або число 1–%d — пробний зсув назад. abort — здатися.") if lock else L.t("🔐 КРИПТО-ГАМАНЕЦЬ. Ключ — українське слово, %s.\nЗ метаданих видно: перша літера ключа — \"%s\".\nВведи слово-ключ, або число 1–%d — пробний зсув назад. abort — здатися.")) % [how, w[0], MAX_SHIFT], "info")
show(g)
static func show(g: Main) -> void:
var m = g.mg
g.say(L.t("🔐 %s спроб: %d, пробних зсувів: %d") % [m["text"].to_upper(), m["tries"], m["peeks"]], "warn")
if m["type"] == 2:
g.say(" abcdefghijklm\n zyxwvutsrqpon", "info")
g.say(" abcdefghijklm\n zyxwvutsrqpon" if abc(m["text"]) == ABC_EN else " абвгґдеєжзиіїйкл м\n яюьщшчцхфутсрпон м", "info")
static func input(g: Main, line: String) -> void:
var m = g.mg
var a := line.strip_edges().to_lower()
if a == "abort":
g.mg = null
g.say(L.t("Гаманець заблокувався і стер себе."), "warn")
g.say(L.t("Атаку перервано.") if m.get("lock", false) else L.t("Гаманець заблокувався і стер себе."), "warn")
return
if a.is_valid_int():
if int(a) < 1 or int(a) > MAX_SHIFT:
@@ -98,6 +125,12 @@ static func input(g: Main, line: String) -> void:
m["peeks"] -= 1
g.say(L.t(" зсув −%s: %s") % [a, _caesar(m["text"], -int(a)).to_upper()], "info")
return
if a == m["word"] and m.get("lock", false):
g.mg = null
g.say(L.t("🔓 Шифр розгадано: ключ \"%s\".") % a, "big")
g.fx("ok")
g.Variety.on_solved(g, "cipher")
return
if a == m["word"]:
g.mg = null
var c: int = g.cur["lvl"]
@@ -110,8 +143,8 @@ static func input(g: Main, line: String) -> void:
g.fx("bad")
if m["tries"] <= 0:
g.mg = null
g.say(L.t("🚨 Гаманець стер себе, а сервер записав спробу. Ключ був \"%s\".") % m["word"], "err")
g.add_trace(FAIL_TRACE)
g.say((L.t("🚨 Замок заблокувався, адмін отримав сповіщення. Ключ був \"%s\".") if m.get("lock", false) else L.t("🚨 Гаманець стер себе, а сервер записав спробу. Ключ був \"%s\".")) % m["word"], "err")
g.add_trace(g.trace_step(g.cur["lvl"]) if m.get("lock", false) else FAIL_TRACE)
return
g.say(L.t("✖ Ключ не підійшов."), "err")
show(g)
@@ -169,6 +202,10 @@ static func use(g: Main, id: String) -> void:
if g.race == null:
g.say(L.t("Зараз ніхто не женеться за твоїм замовленням."), "err")
return
"ice":
if g.cur == null or g.cur["open"] or not g.Variety.has_ice(g, g.cur):
g.say(L.t("Тут немає чорного льоду."), "err")
return
"bribe":
if g.heat.is_empty():
g.say(L.t("Розслідувань немає — нема кому давати хабар."), "err")
@@ -186,6 +223,8 @@ static func use(g: Main, id: String) -> void:
g.crack["known"][i] = true
g.crack_info()
g.auto_enter()
"ice":
g.Variety.melt(g)
"jam":
g.say(L.t("%s пішов за хибною наводкою. Замовлення твоє — без поспіху.") % g.race["who"], "info")
g.race = null

View File

@@ -6,6 +6,8 @@ const OLD_NAME := "Тінь Мережі"
const MARKER := ".migrated"
func _init() -> void:
if OS.has_feature("web"): # у браузері старої папки збережень нема (user:// там — IndexedDB)
return
var new_dir := OS.get_user_data_dir()
var n := run(new_dir.get_base_dir().path_join(OLD_NAME), new_dir)
if n > 0:

View File

@@ -32,6 +32,8 @@ static func start(g: Main, kind: String) -> void:
if g.cur.get(kind + "_used", false):
g.say(L.t("Цю атаку тут уже пробували. Відключись і повернись пізніше."), "err")
return
if not g.Variety.ports_ready(g):
return
g.cur[kind + "_used"] = true
g.leave_logs()
if kind == "firewall":
@@ -96,6 +98,7 @@ static func input(g: Main, line: String) -> void:
g.fx("ok")
g.stats["minigames"] = g.stats.get("minigames", 0) + 1
g.unlock("firewall")
g.Variety.on_solved(g, "fw")
return
if m["moves"] <= 0:
g.mg = null
@@ -110,11 +113,15 @@ static func input(g: Main, line: String) -> void:
return
if a == m["pass"]:
g.mg = null
g.cur["dict_bonus"] = g.cur.get("dict_bonus", 0) + DICT_BONUS # складається з call
g.say(L.t("📖 Пароль адміна — \"%s\"! З нього видно %d цифри коду: наступний crack почнеться з ними.") % [a, DICT_BONUS], "big")
g.fx("ok")
g.stats["minigames"] = g.stats.get("minigames", 0) + 1
g.unlock("wordlist")
if g.Variety.gate(g) == "word": # слово й було замком — цифр коду воно не дає
g.say(L.t("📖 Пароль адміна — \"%s\"!") % a, "big")
g.Variety.on_solved(g, "word")
return
g.cur["dict_bonus"] = g.cur.get("dict_bonus", 0) + DICT_BONUS # складається з call
g.say(L.t("📖 Пароль адміна — \"%s\"! З нього видно %d цифри коду: наступний crack почнеться з ними.") % [a, DICT_BONUS], "big")
return
var same := 0
for i in a.length():

View File

@@ -18,7 +18,8 @@ static func c_scan(g: Main, _a: String) -> void:
hidden += 1
continue
var tag := L.t(" [ЗАВЕРШЕНО]") if s["files"].all(func(f): return g.done.has(f)) else (L.t(" [ЗАКРИТО]") if g.level < s["req"] else (L.t(" [ВІДКРИТО]") if s["open"] else ""))
g.say(L.t(" %2d. %s %s %s захист %d/%d рів. %-2d%s") % [i + 1, s["icon"], s["ip"].rpad(15), s["name"].rpad(27), s["lvl"], maxi(8, s["lvl"]), s["req"], tag])
var lk: String = {"fw": " 🧱", "word": " 📖", "cipher": " 🔐", "2fa": " 📞"}.get(g.Variety.lock_of(g, s), "") + (" 🧊" if g.Variety.has_ice(g, s) else "")
g.say(L.t(" %2d. %s %s %s захист %d/%d рів. %-2d%s") % [i + 1, s["icon"], s["ip"].rpad(15), s["name"].rpad(27), s["lvl"], maxi(8, s["lvl"]), s["req"], tag + (lk if not s["open"] else "")])
if hidden:
g.say(L.t(" ...ще %d серверів поза зоною досяжності. Підвищуй рівень.") % hidden, "warn")
@@ -49,7 +50,8 @@ static func c_connect(g: Main, a: String) -> void:
g.say(L.t("⏱ Сервер веде активне трасування: +%.1f%% щосекунди, поки ти тут. Дій швидко!") % (g.live_rate() * g.route_factor()), "err")
if s["logs"]:
g.say(L.t("На сервері лишилися твої логи. Зітри їх: wipe."), "err")
g.say(L.t("Доступ уже є. Пиши ls.") if s["open"] else L.t("Сервер захищено паролем. Пиши crack."), "warn")
g.Variety.on_connect(g, s)
g.say(L.t("Доступ уже є. Пиши ls.") if s["open"] else (L.t("Сервер захищено паролем. Пиши crack.") if g.Variety.gate(g) == "" else L.t("Відкрий зовнішній замок: %s.") % g.Variety.LOCK_CMD[g.Variety.gate(g)]), "warn")
Rivals.on_connect(g, s)
static func c_ls(g: Main, _a: String) -> void:
@@ -60,12 +62,17 @@ static func c_ls(g: Main, _a: String) -> void:
else:
for f in g.cur["files"]:
g.say(" " + f + (L.t(" (вже здано)") if g.done.has(f) else ""))
if g.Variety.has_bait(g):
g.say(" " + g.Variety.BAIT)
Market.ls_line(g)
static func c_cat(g: Main, f: String) -> void:
if g.cur == null or not g.cur["open"]:
g.say(L.t("Немає доступу."), "err")
return
if f == g.Variety.BAIT and g.Variety.has_bait(g):
g.Variety.bait_cat(g)
return
if not f in g.cur["files"]:
g.say(L.t("Такого файлу немає. Перевір ls."), "err")
return
@@ -92,6 +99,8 @@ static func c_disconnect(g: Main, _a: String) -> void:
if s["logs"] and not g.heat.any(func(h): return h["ip"] == s["ip"]):
g.heat.append({"ip": s["ip"], "t": g.investigation_time(s)})
g.say(L.t("⚠ Ти лишив логи на \"%s\". Почалося розслідування: %d дій, щоб повернутися і стерти їх (wipe).") % [s["name"], g.investigation_time(s)], "err")
if g.endless == null:
g.Variety.on_disconnect(g, s) # ще онлайн: перегони за це замовлення зараховуються як виграні
g.cur = null
g.trace = 0.0
g.say(L.t("Відключено. Трасування скинуто."))

View File

@@ -7,6 +7,15 @@ const L = preload("res://lang.gd") # мова: L.t() у коді, L.wrap() —
# лист від персонажа: аватар, ім'я, текст друкується
static func mail(g: Main, from: String, text: String) -> void:
var before := g.out.get_total_character_count()
_emit_mail(g, from, text)
g._track(from + ": " + text, "mail", _emit_mail.bind(g, from, text))
g.out.visible_characters = before
g.typing = true
g.voice_hz = 150.0 + (abs(hash(from)) % 6) * 45.0 # кожен персонаж "говорить" своїм тоном
fx(g, "mail")
_show_call(g, from, text)
static func _emit_mail(g: Main, from: String, text: String) -> void:
g.out.push_color(g.COL["mail"])
g.out.push_font_size(26)
g.out.add_text(g.avatars.get(from, "📨"))
@@ -20,12 +29,6 @@ static func mail(g: Main, from: String, text: String) -> void:
g.out.pop()
g.out.pop()
g.out.newline()
g._track(from + ": " + text, "mail")
g.out.visible_characters = before
g.typing = true
g.voice_hz = 150.0 + (abs(hash(from)) % 6) * 45.0 # кожен персонаж "говорить" своїм тоном
fx(g, "mail")
_show_call(g, from, text)
# Картка "📡 вхідне повідомлення": аватар пульсує, еквалайзер "говорить", поки лист друкується
static func _show_call(g: Main, from: String, text := "") -> void:
@@ -105,10 +108,10 @@ static func _tick_call(g: Main, delta: float) -> void:
var bars := "▁▂▃▄▅▆▇"
var eq := ""
for i in 14:
eq += bars[randi() % bars.length()]
eq += bars[Gfx.rng.randi() % bars.length()]
g.call_eq.text = eq
if g.sound and g.notes.size() < 2 and randf() < 0.5: # "голос": синтезовані склади
g.notes.append([g.voice_hz * (1.0 + (randi() % 5) * 0.08), 0.04, "sine"])
if g.sound and g.notes.size() < 2 and Gfx.rng.randf() < 0.5: # "голос": синтезовані склади
g.notes.append([g.voice_hz * (1.0 + (Gfx.rng.randi() % 5) * 0.08), 0.04, "sine"])
return
g.call_eq.text = "▁".repeat(14)
g.call_left -= delta

View File

@@ -21,10 +21,14 @@ run/main_scene="res://main.tscn"
config/features=PackedStringArray("4.7", "GL Compatibility")
config/icon="res://icon.png"
config/windows_native_icon="res://icon.ico"
boot_splash/bg_color=Color(0.0196, 0.0392, 0.0275, 1)
boot_splash/bg_color=Color(0.0118, 0.0314, 0.102, 1)
boot_splash/show_image=true
boot_splash/image="res://boot_splash.png"
[audio]
general/default_playback_type.web=0
[autoload]
Migrate="*res://migrate.gd"

View File

@@ -90,6 +90,7 @@ static func save(g: Main, checkpoint := false) -> bool:
"open": g.servers.filter(func(s): return s["open"]).map(func(s): return s["ip"]),
"logs": g.servers.filter(func(s): return s["logs"]).map(func(s): return s["ip"]),
"infected": g.servers.filter(func(s): return s["infected"]).map(func(s): return s["ip"]),
"aff": g.aff, "ice_off": g.servers.filter(func(s): return s.get("ice_off", false)).map(func(s): return s["ip"]),
})
static func load_into(g: Main) -> bool:
@@ -109,6 +110,7 @@ static func load_into(g: Main) -> bool:
g.stolen = d.get("stolen", {})
g.Side.load_from(g, d.get("side", null))
g.Market.load_from(g, d.get("bm", null))
g.Variety.load_from(g, d.get("aff", null))
var en = d.get("endless", null)
if typeof(en) == TYPE_DICTIONARY and typeof(en.get("order")) == TYPE_DICTIONARY and g.srv_by_ip(str(en["order"].get("ip", ""))) != null:
for k in ["depth", "score", "fails", "n"]:
@@ -172,6 +174,7 @@ static func load_into(g: Main) -> bool:
s["open"] = s["ip"] in d.get("open", [])
s["logs"] = s["ip"] in d.get("logs", [])
s["infected"] = s["ip"] in d.get("infected", [])
s["ice_off"] = s["ip"] in d.get("ice_off", [])
s["layer_done"] = int(layers.get(s["ip"], 0))
# гру закрили, не відключившись: лишені логи все одно запускають розслідування
if s["logs"] and not g.heat.any(func(h): return h["ip"] == s["ip"]):

View File

@@ -1,13 +1,15 @@
# Налаштування гравця (user://settings.json — окремо від збереження, нова гра їх не стирає):
# гучність музики й ефектів, сила CRT і глітчу, розмір шрифту, повний екран, мова, тема терміналу, менше анімацій, історія команд,
# гучність музики й ефектів, сила CRT і глітчу, розмір шрифту, масштаб інтерфейсу (0 — авто за DPI), повний екран, мова, тема терміналу, менше анімацій, історія команд,
# онлайн-рекорди з ніком і анонімна статистика (обидва вимкнені, поки гравець не ввімкне; tok/sid — випадкові ключі для online.gd).
extends RefCounted
const L = preload("res://lang.gd")
const DEFAULTS := {"music": 50, "sfx": 80, "crt": 100, "glitch": 100, "font": 16, "full": false, "lang": "uk", "theme": 0, "calm": false, "hist": [],
"online": false, "nick": "", "tok": "", "stats": false, "sid": "", "asked": false, "seen": ""}
const DEFAULTS := {"music": 50, "sfx": 80, "crt": 100, "glitch": 100, "font": 16, "ui": 0, "full": false, "lang": "uk", "theme": 0, "calm": false, "hist": [],
"online": false, "nick": "", "tok": "", "stats": false, "sid": "", "asked": false, "seen": "", "rated": false}
const HIST_MAX := 100
const UI_SCALES := [0, 100, 125, 150, 175, 200] # відсотки; 0 — авто
const BASE := Vector2i(1366, 860) # розмір вікна з project.godot при масштабі 100%
static func load_into(g: Main) -> void:
var d = g.Save.read_json(g.settings_path, false)
@@ -19,6 +21,9 @@ static func load_into(g: Main) -> void:
for k in ["music", "sfx", "crt", "glitch"]:
g.cfg[k] = clampi(int(g.cfg[k]), 0, 100)
g.cfg["font"] = clampi(int(g.cfg["font"]), 12, 26)
if not int(g.cfg["ui"]) in UI_SCALES:
g.cfg["ui"] = 0
g.cfg["ui"] = int(g.cfg["ui"])
g.cfg["theme"] = clampi(int(g.cfg["theme"]), 0, g.Gfx.THEMES.size() - 1)
if not g.cfg["lang"] in ["uk", "en"]:
g.cfg["lang"] = "uk"
@@ -33,17 +38,48 @@ static func save(g: Main) -> void:
static func vol_db(v: int) -> float:
return linear_to_db(v / 100.0) if v > 0 else -80.0
# Авто: масштаб Windows для цього екрана (96 DPI = 100%), кроком 25%, від 100 до 200%
static func auto_scale() -> float:
return clampf(snappedf(DisplayServer.screen_get_dpi() / 96.0, 0.25), 1.0, 2.0)
static func ui_scale(g: Main) -> float:
return g.cfg["ui"] / 100.0 if g.cfg["ui"] > 0 else auto_scale()
static var _want := 0.0 # останній обраний масштаб: вікно підганяємо лише коли він змінився
# Інтерфейс розрахований на 1366x860 логічних пікселів: масштаб не більший, ніж влазить у вікно,
# інакше нижні кнопки й рядок вводу йдуть за край (1080p зі 150% дає лише 1280x688)
static func apply_scale(g: Main, resize := false) -> void:
var w := g.get_window()
var want := ui_scale(g)
if want != _want or resize:
_want = want
# у вікні (не розгорнутому) збільшуємо й саме вікно, не більше екрана
if DisplayServer.get_name() != "headless" and w.mode == Window.MODE_WINDOWED and not OS.has_feature("web"): # у браузері розмір задає сторінка
var area := DisplayServer.screen_get_usable_rect(w.current_screen)
w.size = Vector2i((Vector2(BASE) * want).min(Vector2(area.size) * 0.95))
w.position = area.position + (area.size - w.size) / 2
var fit := minf(float(w.size.x) / BASE.x, float(w.size.y) / BASE.y)
# у браузері вікно буває менше за 1366x860 і більшим не стане: тоді зменшуємо (не дрібніше 60%)
var s := maxf(0.6 if OS.has_feature("web") else 1.0, minf(want, floorf(fit * 100.0) / 100.0))
if not is_equal_approx(w.content_scale_factor, s):
w.content_scale_factor = s
g.ui.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT) # контейнер сам не стискається назад після більшого масштабу
static func apply(g: Main) -> void:
g.sfx_player.volume_db = vol_db(g.cfg["sfx"])
g.music_player.volume_db = vol_db(g.cfg["music"])
g.crt.material.set_shader_parameter("strength", g.cfg["crt"] / 100.0)
g.theme.default_font_size = g.cfg["font"]
g.Gfx.apply_theme(g)
var to_window := false # з повного екрана у вікно: вікно знову під масштаб
if DisplayServer.get_name() != "headless":
var full: bool = g.cfg["full"]
var now := DisplayServer.window_get_mode() == DisplayServer.WINDOW_MODE_FULLSCREEN
if full != now:
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN if full else DisplayServer.WINDOW_MODE_WINDOWED)
to_window = not full
apply_scale(g, to_window)
g.update_music()
static func set_value(g: Main, k: String, v) -> void:
@@ -72,6 +108,16 @@ static func build_dialog(g: Main) -> AcceptDialog:
s.value = g.cfg[row[0]]
s.value_changed.connect(func(v): set_value(g, row[0], int(v)))
grid.add_child(s)
var ul := Label.new()
ul.text = L.t("🔍 Масштаб інтерфейсу")
grid.add_child(ul)
var uo := OptionButton.new()
uo.name = "ui"
for v in UI_SCALES:
uo.add_item(L.t("Авто") + " (%d%%)" % roundi(auto_scale() * 100) if v == 0 else "%d%%" % v)
uo.selected = UI_SCALES.find(g.cfg["ui"])
uo.item_selected.connect(func(i): set_value(g, "ui", UI_SCALES[i]))
grid.add_child(uo)
var fl := Label.new()
fl.text = L.t("🖥 Повний екран (F11)")
grid.add_child(fl)
@@ -151,6 +197,7 @@ static func build_dialog(g: Main) -> AcceptDialog:
grid.get_node(k).set_value_no_signal(g.cfg[k])
fc.set_pressed_no_signal(g.cfg["full"])
to.select(g.cfg["theme"])
uo.select(UI_SCALES.find(g.cfg["ui"]))
cc.set_pressed_no_signal(g.cfg["calm"])
oc.set_pressed_no_signal(g.cfg["online"])
ne.text = g.cfg["nick"]
@@ -174,3 +221,23 @@ static func ask_online(g: Main) -> void:
d.visibility_changed.connect(func(): if not d.visible: d.queue_free())
g.add_child(d)
d.popup_centered()
const ITCH_URL := "https://tuberon.itch.io/tinmerezhi"
# Один раз за все життя гри (після 1-го акту) просить оцінити гру на itch.io: оцінки піднімають гру в каталозі.
static func ask_rate(g: Main) -> void:
if g.cfg["rated"] or g.settings_path != "user://settings.json": # тести мають свій файл налаштувань
return
g.cfg["rated"] = true
save(g)
var d := ConfirmationDialog.new()
d.title = L.t("💚 Подобається гра?")
d.dialog_text = L.t("Акт пройдено! Якщо гра тобі до вподоби, оціни її на itch.io або залиш коментар. Для гри від одного розробника кожна оцінка дуже допомагає: так її знайдуть інші гравці.")
d.get_label().autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
d.get_label().custom_minimum_size.x = 560
d.ok_button_text = L.t("Оцінити на itch.io")
d.cancel_button_text = L.t("Не зараз")
d.confirmed.connect(func(): OS.shell_open(ITCH_URL))
d.visibility_changed.connect(func(): if not d.visible: d.queue_free())
g.add_child(d)
d.popup_centered()

View File

@@ -66,6 +66,8 @@ static func start(g: Main) -> void:
if g.cur.get("call_used", false):
g.say(L.t("Сюди вже дзвонили — вдруге не повірять. Відключись і повернись пізніше."), "err")
return
if not g.Variety.ports_ready(g):
return
g.cur["call_used"] = true
var n: int = g.bm_rng.randi() % NPC.size()
g.mg = {"kind": "call", "npc": n, "round": 0, "wrong": 0, "order": []}
@@ -115,11 +117,14 @@ static func input(g: Main, line: String) -> void:
m["round"] += 1
if m["round"] >= d["rounds"].size():
g.mg = null
g.cur["dict_bonus"] = g.cur.get("dict_bonus", 0) + BONUS
g.say("%s %s: \"%s\"" % [d["ava"], d["who"], d["ok"]], "mail")
g.say(L.t("📞 Ти дізнався частину пароля: наступний crack почнеться з %d відомими цифрами.") % BONUS, "big")
g.fx("ok")
g.unlock("phreak")
if g.Variety.gate(g) == "2fa": # код із телефону відкриває замок, а не цифри пароля
g.Variety.on_solved(g, "2fa")
return
g.cur["dict_bonus"] = g.cur.get("dict_bonus", 0) + BONUS
g.say(L.t("📞 Ти дізнався частину пароля: наступний crack почнеться з %d відомими цифрами.") % BONUS, "big")
return
_ask(g)

View File

@@ -14,6 +14,9 @@ static func c_download(g: Main, f: String) -> void:
if g.cur == null or not g.cur["open"]:
g.say(L.t("Немає доступу."), "err")
return
if f == g.Variety.BAIT and g.Variety.has_bait(g):
g.Variety.bait_download(g)
return
if not f in g.cur["files"]:
g.say(L.t("Такого файлу немає. Перевір ls."), "err")
return
@@ -50,12 +53,7 @@ static func c_download(g: Main, f: String) -> void:
if g.over or g.choosing:
return
elif j != null and not g.done.has(f):
g.say(L.t("Замовлення виконано: ") + j["t"], "info")
var r := g.job_reward(g.cur["lvl"])
g.pay(int(round(r["pay"] * g.rank_mult() * Rivals.on_job(g, f))))
g.gain_xp(r["xp"])
g.gain_rep(T.JOB_REP * g.cur["lvl"])
g.done[f] = true
g.Variety.on_download(g, j, f)
elif Side.on_download(g, f):
pass
elif not g.done.has(f) and g.mission_index(f) >= 0:
@@ -101,12 +99,14 @@ static func _finish_mission(g: Main) -> void:
g.stats["ch_acts"] = 0
g.mission += 1
var nm = g.missions[g.mission]
g.deadline = int(round(nm["limit"] * Modes.ng_limit(g))) + int(round(T.REFLEX_ADD * g.eff(g.skills["reflex"]))) if nm.has("limit") else -1
g.deadline = int(round(nm["limit"] * Modes.ng_limit(g) * T.DIFF_LIMIT[g.diff])) + int(round(T.REFLEX_ADD * g.eff(g.skills["reflex"]))) if nm.has("limit") else -1
if nm.has("act") and not T.DIFF_SAVES[g.diff] and g.endless == null:
g.cp = g.mission # Параноя: контрольна точка на початку акту (пишеться в кінці глави, коли акт уже налаштовано)
if nm.has("act"):
Gfx.act_card(g, nm["act"], L.t("Нова частина історії"))
Modes.ng_mail(g, g.missions.slice(0, g.mission + 1).filter(func(x): return x.has("act")).size() - 1)
if g.endless == null:
g.get_tree().create_timer(5.0).timeout.connect(func(): if is_instance_valid(g): g.Settings.ask_rate(g)) # після заставки акту
if g.mission == g.Data.MISSIONS.size():
_relock_act4(g)
if g.mission == g.A5_START:
@@ -129,8 +129,10 @@ static func _finish_mission(g: Main) -> void:
# сервер знову закрито (арешт, Відлуння): пароль, порти й пробиті шари — з нуля
static func _lock(s) -> void:
s["open"] = false
s["ice_off"] = false # чорний лід наростає знову
s["ports_open"] = []
s["layer_done"] = 0
s.erase("lock_off") # замок Параної теж стає на місце
s["layer_state"] = null
# Відлуння змінює паролі на серверах, куди в Акті IV треба залити латки
@@ -173,6 +175,8 @@ static func c_upload(g: Main, f: String) -> void:
if g.cur == null or not g.cur["open"]:
g.say(L.t("Немає доступу. Підключись і зламай сервер."), "err")
return
if g.Variety.on_upload(g, f):
return
var m = g.missions[g.mission]
if not m.get("upload", false):
g.say(L.t("Заливати нічого: зараз ніхто не надіслав тобі латки."), "warn")
@@ -302,5 +306,5 @@ static func c_jobs(g: Main, _a: String) -> void:
elif g.level < s["req"]:
locked += 1
else:
g.say(L.t(" %s: %s на %s — $%d, %d XP") % [j["t"], j["file"], s["name"], int(round(r["pay"] * g.rank_mult())), r["xp"]])
g.say(g.Variety.job_line(g, j, s, r))
g.say(L.t("Виконано: %d/%d. Ще закрито (потрібен вищий рівень): %d.") % [dn, g.jobs.size(), locked], "info")

View File

@@ -55,6 +55,7 @@ func _run() -> void:
g.sound = false
root.add_child(g)
g.typing = false
g.bm_rng.seed = int(args[0]) if args.size() > 0 else 1 # call/decrypt/адмін тепер грає й бот — хай сід визначає все
if DIFF != 1:
g.run("difficulty " + g.T.DIFF_IDS[DIFF])
var m_prev := -1
@@ -62,7 +63,7 @@ func _run() -> void:
if g.mission != m_prev:
if m_prev >= 0 and g.missions[m_prev].has("limit"):
print(" ⏱ глава %d (ліміт %d): %d дій" % [m_prev + 1, g.missions[m_prev]["limit"], actions - m_start])
if actions - m_start > g.missions[m_prev]["limit"] * g.Modes.ng_limit(g):
if actions - m_start > g.missions[m_prev]["limit"] * g.Modes.ng_limit(g) * g.T.DIFF_LIMIT[g.diff]:
late.append(m_prev + 1)
m_start = actions
m_prev = g.mission
@@ -232,6 +233,77 @@ func minigames() -> void:
act(w)
bump("словник " + ("так" if g.cur != null and g.cur.get("dict_bonus", 0) > 0 else "ні"))
# зовнішній замок сервера (variety.gd): та сама атака, якою його відкривають
func gate(kind: String) -> void:
if kind == "fw":
act("firewall")
if g.mg != null and g.mg["kind"] == "firewall":
solve_fw()
elif kind == "word":
act("dict")
solve_dict()
elif kind == "2fa":
act("call")
while g.mg != null and g.mg["kind"] == "call": # уважний гравець чує характер співрозмовника
act(str(g.mg["order"].find(0) + 1))
elif kind == "cipher":
act("decrypt")
solve_cipher()
if g.cur != null and not g.cur["open"] and g.cur["layer_done"] == 0 and not g.cur.get("lock_off", false): # не вдалося — прибрати сліди й піти
if g.trace + real(g.T.WIPE_ALL_TRACE) < 98:
act("wipe")
act("disconnect")
func solve_fw() -> void:
var st: Array = g.mg["st"]
var n := st.size()
var best := []
for mask in 1 << n:
var t := st.duplicate()
var pr := []
for i in n:
if mask & (1 << i):
pr.append(i)
for j in [i - 1, i, i + 1]:
if j >= 0 and j < n:
t[j] = 1 - t[j]
if t.count(1) == 0 and (best.is_empty() or pr.size() < best.size()):
best = pr
for i in best:
act(str(i + 1))
func solve_dict() -> void:
var hist := []
while g.mg != null and g.mg["kind"] == "dict" and g.cur != null:
var c: Array = g.mg["words"].filter(func(w): return hist.all(func(h): return _same(w, h[0]) == h[1]))
var w: String = c[0] if not c.is_empty() else g.mg["words"][0]
hist.append([w, _same(w, g.mg["pass"])])
act(w)
# шифр розгадує людина: перша літера відома, тож зсув видно одразу
func solve_cipher() -> void:
if g.mg == null or g.mg["kind"] != "cipher":
return
var MK = g.Market
var t: String = g.mg["text"]
var first: String = g.mg["word"][0] # її гра показує гравцю
var a: String = MK.abc(t)
var d := func(x: String, y: String) -> int: return a.find(x) - a.find(y)
var w := ""
match int(g.mg["type"]):
0:
w = MK._caesar(t, -d.call(t[0], first))
1:
w = MK._caesar(t, -d.call(t[t.length() - 1], first)).reverse()
2:
w = MK._atbash(MK._caesar(t, -d.call(t[0], MK._atbash(first))))
act(w)
func decrypt() -> void:
act("decrypt")
solve_cipher()
bump("гаманців")
func _same(a: String, b: String) -> int:
var n := 0
for i in mini(a.length(), b.length()):
@@ -284,6 +356,10 @@ func shop() -> void:
for k in ["cpu", "ram", "proxy", "gpu", "ai", "cooler", "ssd", "crypt", "neuro", "jammer", "miner", "cluster"]:
if g.hw[k] < g.HW_MAX and g.money >= g.hw_price(k) * 1.3:
act("buy " + k)
if g.cur == null and g.bm["coins"] >= g.Market.EXPLOITS["ice"][1] and g.bm["ex"].get("ice", 0) < 2:
act("market ice")
if g.cur == null and g.inv.get("icebreaker", 0) < 1 and g.prog >= g.Data.PROGRAMS["icebreaker"]["req"] and g.money >= g.prog_cost("icebreaker") * 2 and g.level >= g.T.ICE_FROM:
act("write icebreaker")
for u in g.Extra.UTILS: # покращення утиліт — коли гроші є з запасом
if g.cur == null and g.utils.has(u) and g.util_lvl(u) < g.UTIL_MAX and g.money >= g.util_cost(u) * 1.5:
act("make " + u)
@@ -306,14 +382,27 @@ func visit(s, files: Array, upload := false) -> void:
if not s["open"]:
for p in g.closed_ports(s):
act("open " + p)
if MINI and s["lvl"] >= 5:
if MINI and s["lvl"] >= 5 and g.Variety.gate(g) == "":
minigames()
if g.cur == null:
return
act("crack")
if g.Variety.has_ice(g, s):
if g.bm["ex"].get("ice", 0):
act("exploit ice")
elif g.inv.get("icebreaker", 0):
act("use icebreaker")
bump("лід " + ("розтоплено" if not g.Variety.has_ice(g, s) else "ні"))
var gk: String = g.Variety.gate(g)
if gk != "":
gate(gk)
bump("замок %s %s" % [gk, "так" if g.cur != null and (s["open"] or s["layer_done"] > 0) else "ні"])
if g.cur == null:
return
if not s["open"] and g.Variety.gate(g) == "":
act("crack")
while g.crack != null and g.cur != null and not g.over:
# уважний гравець бачить трасування і лишає запас на wipe
if g.trace + real(g.trace_step(s["lvl"]) + g.live_rate() * TICKS + g.T.WIPE_ALL_TRACE) > 98:
if g.trace + real(g.trace_step(s["lvl"]) * g.Variety.fail_mult(g) + g.live_rate() * TICKS + g.T.WIPE_ALL_TRACE) > 98:
act("abort")
break
solve()
@@ -332,11 +421,16 @@ func visit(s, files: Array, upload := false) -> void:
var cm = g.missions[g.mission]
if not g.clue_read(cm) and cm["clue"] in s["files"]: # розвідка: прочитати підказку
act("cat " + cm["clue"])
if g.Market.has_wallet(g, s) and g.trace + real(g.Market.FAIL_TRACE + g.T.WIPE_ALL_TRACE) < 90:
decrypt()
for f in files:
if f in s["files"]:
if g.trace + real(g.T.DOWNLOAD_TRACE * s["lvl"] + g.T.WIPE_ALL_TRACE) > 98:
if g.trace + real(g.T.UPLOAD_TRACE * s["lvl"] + g.T.WIPE_ALL_TRACE) > 98:
break
act("download " + f)
var jk: String = g.Variety.kind_of(g, f) if g.job_of(f) != null and not g.done.has(f) else ""
act(("rm " if jk == "erase" else "upload " if jk == "plant" else "download ") + f)
if jk != "":
bump("замовлення " + jk)
if g.over or g.choosing or g.cur == null:
return
var um: int = g.mission

View File

@@ -21,6 +21,7 @@ func fresh(keep := false) -> Node:
if FileAccess.file_exists(p):
DirAccess.remove_absolute(ProjectSettings.globalize_path(p))
var g = load("res://main.tscn").instantiate()
g.variety = false # старі механіки; нові перевіряє features.gd (блок "Різноманіття")
g.save_path = SAVE
g.ach_path = ACH
g.legacy_path = "user://features_legacy.json"
@@ -74,13 +75,51 @@ func _run() -> void:
# ── налаштування ──
g.Settings.set_value(g, "crt", 40)
g.Settings.set_value(g, "font", 20)
g.get_window().size = Vector2i(1920, 1032)
g.Settings.set_value(g, "ui", 150)
ok(is_equal_approx(g.get_window().content_scale_factor, 1.2), "масштаб не більший, ніж влазить у вікно")
g.get_window().size = Vector2i(2732, 1720)
ok(is_equal_approx(g.get_window().content_scale_factor, 1.5), "масштаб інтерфейсу застосовано")
g._on_submit("status")
g._on_submit("scan")
ok(g.theme.default_font_size == 20, "розмір шрифту застосовано")
ok(is_equal_approx(g.crt.material.get_shader_parameter("strength"), 0.4), "сила CRT застосована до шейдера")
g.Gfx.tick(g, 0.016)
ok(g.crt.visible, "CRT-шар увімкнений, поки ефект не на нулі")
g.Settings.set_value(g, "crt", 0)
g.Gfx.tick(g, 0.016)
ok(not g.crt.visible or g.threat_v > 0.002, "CRT на нулі в спокої — шар вимкнено")
g.flash = Color(1, 0, 0, 0.5)
g.Gfx.tick(g, 0.016)
ok(g.crt.visible, "спалах показує CRT-шар і на нулі")
g.flash = Color(0, 0, 0, 0)
g.Settings.set_value(g, "crt", 40)
g.Settings.set_value(g, "calm", true)
g.ticker.position.x = 300.0
g._process(0.1)
g._tick_rain()
ok(g.ticker.position.x == 0.0 and not g.rain.visible, "менше анімацій: стрічка новин стоїть, дощу символів нема")
g.Settings.set_value(g, "calm", false)
g._tick_rain()
ok(g.rain.visible, "менше анімацій вимкнено — дощ повертається")
g.log_lines = []
for i in 300:
g.say("рядок %d" % i)
g.say_chips([["12", Color.RED], ["~1", null]])
g.mail("Оракул", "тест листа")
for i in g.MAX_LINES - 101: # разом 1201 рядок — журнал перебудовується, лишаючи останні MAX_LINES
g.say("рядок %d" % i)
var txt: String = g.out.get_parsed_text()
ok(g.log_lines.size() == g.MAX_LINES and "тест листа" in txt and not "Оракул: тест листа" in txt and "12 ~1" in txt, "після перебудови журналу лист і фішки малюються як були")
drop(g)
g = fresh(true)
ok(g.cfg["crt"] == 40 and g.cfg["font"] == 20, "налаштування зберігаються між запусками")
ok(g.cfg["crt"] == 40 and g.cfg["font"] == 20 and g.cfg["ui"] == 150, "налаштування зберігаються між запусками")
g.cfg["ui"] = 130
g.Settings.save(g)
g.Settings.load_into(g)
ok(g.cfg["ui"] == 0, "невідомий масштаб → авто")
g.Settings.set_value(g, "ui", 0)
g.get_window().size = g.Settings.BASE
ok(g.history.slice(-2) == ["status", "scan"], "історія команд зберігається між запусками")
g.history = []
g._on_submit("help")
@@ -265,6 +304,8 @@ func _run() -> void:
g.run("status")
ok(g.log_lines.slice(-6).any(func(l): return "Крипта: 7" in l[0]), "status показує крипту")
drop(g)
_variety()
# ── суперники ──
g = fresh()
g.level = 40
@@ -750,3 +791,254 @@ func _run() -> void:
rm.call()
print("\n" + ("%d з %d перевірок не пройшли" % [fails, total] if fails else "Усі %d перевірок пройшли" % total))
quit(1 if fails else 0)
func _variety() -> void:
# ── різноманіття: замки, чорний лід, властивості серверів, цілі замовлень (variety.gd) ──
var g = fresh()
g.variety = true
g.aff = {}
var V = g.Variety
g.level = 40
for s in g.servers:
s["req"] = 1
var kinds := {}
for s in g.servers:
kinds[V.lock_of(g, s)] = kinds.get(V.lock_of(g, s), 0) + 1
print(" замки: ", kinds, ", лід: ", g.servers.filter(func(s): return V.has_ice(g, s)).size())
ok(kinds.size() == 5 and g.servers.filter(func(s): return s["lvl"] < 2).all(func(s): return V.lock_of(g, s) == ""), "замки: усі 4 види є, прості сервери — лише код")
var pick := func(cond: Callable) -> int:
for i in g.servers.size():
if cond.call(g.servers[i]):
return i
return -1
var vi: int = pick.call(func(s): return V.lock_of(g, s) == "word" and g.layers_of(s["lvl"]) == 1 and not V.has_ice(g, s))
g.heat = [] # прибрати хвости розслідувань з попередніх перевірок
g.run("connect %d" % (vi + 1))
g.cur["ports_open"] = g.cur["ports"].duplicate()
g.run("crack")
ok(g.crack == null and "dict" in last(g), "замок-слово: crack не пускає, підказує dict")
g.run("dict")
g.trace = 0.0
g.run(g.mg["pass"])
ok(g.cur["open"] and g.trace == 0.0, "замок-слово: пароль вгадано — сервер відкрито без коду (на Звичайному без трасування)")
g.run("disconnect")
vi = pick.call(func(s): return V.lock_of(g, s) == "fw" and g.layers_of(s["lvl"]) > 1 and not V.has_ice(g, s))
g.heat = [] # прибрати хвости розслідувань з попередніх перевірок
g.run("connect %d" % (vi + 1))
g.cur["ports_open"] = g.cur["ports"].duplicate()
g.run("firewall")
var fst: Array = g.mg["st"].duplicate()
for mask in 1 << fst.size():
var t := fst.duplicate()
for i in fst.size():
if mask & (1 << i):
g.Minigames._flip(t, i)
if t.count(1) == 0:
for i in fst.size():
if mask & (1 << i):
g.run(str(i + 1))
break
ok(not g.cur["open"] and g.cur["layer_done"] == 1, "замок-фаєрвол: зовнішній шар пробито")
g.run("crack")
ok(g.crack != null and g.crack["layer"] == 2, "замок-фаєрвол: далі crack із другого шару")
g.run("abort")
g.run("disconnect")
vi = pick.call(func(s): return V.lock_of(g, s) == "2fa" and g.layers_of(s["lvl"]) == 1 and not V.has_ice(g, s))
g.heat = [] # прибрати хвости розслідувань з попередніх перевірок
g.run("connect %d" % (vi + 1))
g.cur["ports_open"] = g.cur["ports"].duplicate()
g.diff = 2 # Параноя: за замком ще й код
g.run("call")
for i in 3:
g.run(str(g.mg["order"].find(0) + 1))
ok(not g.cur["open"] and V.gate(g) == "", "Параноя: замок відкрито, але сервер ще закритий")
g.run("crack")
ok(g.crack != null and g.crack["layer"] == 1, "Параноя: за замком — звичайний crack")
g.run("abort")
g.cur.erase("lock_off")
g.diff = 1
g.run("disconnect")
g.run("connect %d" % (vi + 1))
g.cur["ports_open"] = g.cur["ports"].duplicate()
g.run("call")
for i in 3:
g.run(str(g.mg["order"].find(0) + 1))
ok(g.cur["open"] and not g.cur.has("dict_bonus"), "двофакторка: розмова вдалась — доступ є, зайвих цифр пароля нема")
g.run("disconnect")
vi = pick.call(func(s): return V.lock_of(g, s) == "cipher" and not V.has_ice(g, s))
g.heat = [] # прибрати хвости розслідувань з попередніх перевірок
g.run("connect %d" % (vi + 1))
g.cur["ports_open"] = g.cur["ports"].duplicate()
g.run("decrypt")
ok(g.mg != null and g.mg["lock"] and g.bm["coins"] == 0, "шифр-замок: головоломка почалась")
g.run(g.mg["word"])
ok((g.cur["open"] or g.cur["layer_done"] == 1) and g.bm["coins"] == 0, "шифр-замок: ключ вгадано — замок відкрито, крипти не дає")
g.run("disconnect")
vi = pick.call(func(s): return V.lock_of(g, s) == "cipher" and not s["open"] and s["layer_done"] == 0)
g.heat = [] # прибрати хвости розслідувань з попередніх перевірок
g.run("connect %d" % (vi + 1))
g.cur["ports_open"] = g.cur["ports"].duplicate()
g.trace = 0.0
g.run("decrypt")
for i in 3:
g.run("zzz")
g.run("decrypt")
ok(g.mg == null and g.trace > 0 and not g.cur["open"] and g.cur["layer_done"] == 0, "шифр-замок: провал — трасування, вдруге лише після перепідключення")
g.run("disconnect")
# чорний лід
vi = pick.call(func(s): return V.has_ice(g, s) and V.lock_of(g, s) == "")
g.hw["gpu"] = 3
g.bm["coins"] = 5
g.run("market ice")
g.heat = [] # прибрати хвости розслідувань з попередніх перевірок
g.run("connect %d" % (vi + 1))
g.cur["ports_open"] = g.cur["ports"].duplicate()
ok("ЧОРНИЙ ЛІД" in "\n".join(g.log_lines.slice(-12).map(func(l): return l[0])), "лід: попередження при підключенні")
g.run("crack")
g.crack["rotate"] = 0
ok(g.crack["ice"] and g.crack["free"] == 0, "лід: відеокарта не допомагає")
var kc: String = g.crack["code"]
var bad := ""
for d in "0123456789":
if not d in kc and bad.length() < kc.length():
bad += d
if bad.length() < kc.length():
bad = kc.substr(1) + kc[0]
g.trace = 0.0
g.run(bad)
var t_ice: float = g.trace
g.run("exploit ice")
ok(not g.crack["ice"] and g.cur["ice_off"] and g.bm["coins"] == 3, "лід: exploit ice за крипту розтоплює")
ok(g.crack["free"] > 0, "лід: розтоплено посеред зламу — відеокарта знову допомагає")
g.crack["free"] = 0
g.trace = 0.0
g.run(bad)
ok(t_ice > g.trace * 1.9, "лід: помилка на льоду — удвічі більше трасування (%.1f проти %.1f)" % [t_ice, g.trace])
g.run("abort")
g.run("disconnect")
var vi2: int = pick.call(func(s): return V.has_ice(g, s) and not s["open"])
g.heat = [] # прибрати хвости розслідувань з попередніх перевірок
g.run("connect %d" % (vi2 + 1))
g.run("use icebreaker")
ok(V.has_ice(g, g.cur), "лід: без програми криголам не запускається")
g.run("disconnect")
g.prog = 5
g.money = 5000
g.run("write icebreaker")
g.heat = [] # прибрати хвости розслідувань з попередніх перевірок
g.run("connect %d" % (vi2 + 1))
ok(g.can_use("icebreaker"), "лід: криголам доступний на сервері з льодом")
g.run("use icebreaker")
ok(not V.has_ice(g, g.cur), "лід: криголам розтоплює")
g.run("disconnect")
g.Story._lock(g.servers[vi2])
ok(V.has_ice(g, g.servers[vi2]), "лід: наростає знову, коли сервер закрито")
# властивості
var ai: int = pick.call(func(s): return s["lvl"] >= 3 and V.lock_of(g, s) == "" and not V.has_ice(g, s) and not s["open"])
var asrv = g.servers[ai]
g.aff[asrv["ip"]] = "nolog"
g.heat = [] # прибрати хвости розслідувань з попередніх перевірок
g.run("connect %d" % (ai + 1))
g.cur["ports_open"] = g.cur["ports"].duplicate()
g.run("crack")
ok(not g.cur["logs"], "без логів: злам не лишає слідів")
g.run("abort")
g.run("disconnect")
g.aff[asrv["ip"]] = "old"
g.heat = [] # прибрати хвости розслідувань з попередніх перевірок
g.run("connect %d" % (ai + 1))
g.cur["ports_open"] = g.cur["ports"].duplicate()
g.run("crack")
ok(g.crack["code"].length() == mini(g.T.CODE_MAX, 3 + asrv["lvl"] / 2) - 1, "застаріла система: код коротший на 1")
g.run("abort")
g.run("disconnect")
g.aff[asrv["ip"]] = "admin"
g.heat = [] # прибрати хвости розслідувань з попередніх перевірок
g.run("connect %d" % (ai + 1))
g.cur["ports_open"] = g.cur["ports"].duplicate()
g.cur["admin_on"] = true
g.run("crack")
ok(is_equal_approx(V.fail_mult(g), g.T.ADMIN_MULT), "адмін онлайн: помилки дорожчі")
g.crack = null
g.cur["open"] = true
g.aff[asrv["ip"]] = "bait"
g.run("ls")
ok(V.BAIT in last(g), "пастка: приманка видно в ls")
g.trace = 0.0
g.run("download " + V.BAIT)
ok(g.trace >= g.T.BAIT_TRACE * 0.7 and g.cur["logs"], "пастка: download приманки — тривога")
g.run("disconnect")
g.aff = {}
V.roll(g)
ok(g.aff.size() > 3 and g.aff.keys().all(func(ip): return g.srv_by_ip(ip)["lvl"] >= 2), "властивості: нова гра роздає їх серверам захисту 2+")
var aff0: Dictionary = g.aff.duplicate()
g.Save.save(g)
drop(g)
g = fresh(true)
g.variety = true
g.Save.load_into(g)
ok(g.aff == aff0, "властивості: зберігаються в save")
g.endless = {}
ok(g.Variety.aff_of(g, g.srv_by_ip(aff0.keys()[0])) == "", "властивості: у Нескінченній мережі їх немає")
g.endless = null
# цілі замовлень
V = g.Variety
g.level = 40
for s in g.servers:
s["req"] = 1
s["open"] = true
var jk := {}
for j in g.jobs:
jk[V.kind_of(g, j["file"])] = jk.get(V.kind_of(g, j["file"]), 0) + 1
print(" цілі замовлень: ", jk)
ok(jk.size() == 5, "замовлення: усі 5 цілей є")
var jf := func(kind: String) -> String:
for j in g.jobs:
if V.kind_of(g, j["file"]) == kind and not g.done.has(j["file"]):
return j["file"]
return ""
var f: String = jf.call("erase")
g.heat = [] # прибрати хвости розслідувань з попередніх перевірок
g.run("connect " + g.srv_of(f)["ip"])
var m0: int = g.money
g.run("download " + f)
ok(not g.done.has(f) and "rm" in last(g), "стерти: download не зараховує")
g.run("rm " + f)
ok(g.done.has(f) and g.money > m0, "стерти: rm виконує замовлення")
g.run("rm " + f)
ok("ніхто не просив" in last(g), "стерти: повторно — ні")
g.run("disconnect")
f = jf.call("plant")
g.heat = [] # прибрати хвости розслідувань з попередніх перевірок
g.run("connect " + g.srv_of(f)["ip"])
g.run("upload " + f)
ok(g.done.has(f), "підмінити: upload фальшивки виконує замовлення")
g.run("disconnect")
f = jf.call("clean")
var jcs = g.srv_of(f)
g.heat = [] # прибрати хвости розслідувань з попередніх перевірок
g.run("connect " + jcs["ip"])
g.run("download " + f)
ok(not g.done.has(f) and g.done.has("+" + f), "без логів: файл у тебе, оплата — після чистої втечі")
jcs["logs"] = true
g.run("disconnect")
ok(not g.done.has(f) and not g.done.has("+" + f), "без логів: наслідив — замовлення не зараховано")
g.heat = []
g.run("connect " + jcs["ip"])
g.run("download " + f)
g.arrest("тест")
g.busts = 0
jcs["open"] = true
g.run("connect " + jcs["ip"])
g.run("disconnect")
ok(not g.done.has(f) and not g.done.has("+" + f), "без логів: арешт конфіскує файл — connect + disconnect не зараховує")
g.heat = [] # прибрати хвости розслідувань з попередніх перевірок
g.run("connect " + jcs["ip"])
g.run("download " + f)
g.run("wipe")
g.run("disconnect")
ok(g.done.has(f), "без логів: чиста втеча — оплата")
f = jf.call("find")
g.run("jobs")
ok(g.log_lines.slice(-50).any(func(l): return f in l[0] and "невідомому" in l[0] and not g.srv_of(f)["name"] in l[0]), "знайти: jobs не каже, де файл")
drop(g)

View File

@@ -24,6 +24,7 @@ func _run() -> void:
if FileAccess.file_exists(p):
DirAccess.remove_absolute(ProjectSettings.globalize_path(p))
var g = load("res://main.tscn").instantiate()
g.variety = false # старі механіки; нові перевіряє features.gd (блок "Різноманіття")
g.save_path = "user://fx_save.json"
g.ach_path = "user://fx_ach.json"
g.legacy_path = "user://fx_legacy.json"

View File

@@ -22,6 +22,7 @@ func _run() -> void:
var en: Dictionary = load("res://lang_en.gd").EN
var lit := RegEx.create_from_string('"((?:[^"\\\\\\n]|\\\\.)*)"')
var cyr := RegEx.create_from_string(CYR)
var uk_key := RegEx.create_from_string("^[а-яіїєґ \\n]+$") # market.gd: українські ключі шифру й абетка — дані, англійською не показуються
var missing := []
for f in DirAccess.get_files_at("res://"):
if not f.ends_with(".gd") or f.begins_with("lang") or f == "whatsnew.gd": # whatsnew.gd тримає English поруч (перевіряє features.gd)
@@ -33,7 +34,7 @@ func _run() -> void:
code = line.substr(0, hash_at)
for m in lit.search_all(code):
var s: String = m.get_string(1).c_unescape()
if cyr.search(s) and not en.has(s) and not s in ["01ТІНЬМЕРЕЖІ#$%&@アカサタナ", "Українська", "🌐 Мова / Language"]:
if cyr.search(s) and not en.has(s) and not (f == "market.gd" and uk_key.search(s)) and not s in ["01ТІНЬМЕРЕЖІ#$%&@", "Українська", "🌐 Мова / Language"]:
missing.append("%s: %s" % [f, s.left(60)])
ok(missing.is_empty(), "усі українські рядки перекладено" + ("" if missing.is_empty() else ": %d без перекладу, напр. %s" % [missing.size(), missing.slice(0, 5)]))
# 2. перекладені рядки мають ті самі %-місця

View File

@@ -43,6 +43,7 @@ func _run() -> void:
if FileAccess.file_exists(p):
DirAccess.remove_absolute(ProjectSettings.globalize_path(p))
g = load("res://main.tscn").instantiate()
g.variety = false # старі механіки; нові перевіряє features.gd (блок "Різноманіття")
g.save_path = "user://perf_save.json"
g.ach_path = "user://perf_ach.json"
g.legacy_path = "user://perf_legacy.json"

View File

@@ -20,6 +20,7 @@ func fresh(keep_save := false) -> Node:
if FileAccess.file_exists(p):
DirAccess.remove_absolute(ProjectSettings.globalize_path(p))
var g = load("res://main.tscn").instantiate()
g.variety = false # старі механіки; нові перевіряє features.gd (блок "Різноманіття")
g.save_path = SAVE
g.ach_path = ACH
g.legacy_path = "user://smoke_legacy.json"
@@ -144,6 +145,28 @@ func _run() -> void:
g.trace = 0.0
ok(g.servers[13]["open"] and g.crack == null, "підказки відкрили всі цифри → автовведення → доступ")
g.run("disconnect")
g.run("connect 16")
crack(g)
var c1: String = g.crack["code"]
var kn1: Array = g.crack["known"].keys()
var wrong := c1
while wrong == c1:
wrong = g.random_code(c1.length())
g.trace = 0.0
g.run(wrong)
g.run("disconnect")
g.run("connect 16")
crack(g)
ok(g.crack["code"] == c1 and g.crack["hist"].size() == 1 and g.crack["known"].keys().size() >= kn1.size(), "відступ: зовнішній шар зберігає пароль і спроби")
g.run("abort")
g.run("disconnect")
g.servers[15]["open"] = true
g.Story._lock(g.servers[15])
g.run("connect 16")
crack(g)
ok(g.crack["hist"].is_empty(), "сервер закрито знову — зовнішній шар з нуля")
g.run("abort")
g.run("disconnect")
# 5. розслідування і закриття гри з логами
g.heat = []

View File

@@ -0,0 +1,120 @@
extends SceneTree
## Запис ігроладу для трейлера (відео + звук рушія):
## xvfb-run godot --path . --resolution 1920x1080 --fixed-fps 30 --write-movie /шлях/raw.avi -s tests/trailer.gd -- uk|en
var g
var lang := "en"
func _initialize() -> void:
var args := OS.get_cmdline_user_args()
if args.size() > 0:
lang = args[0]
_run.call_deferred()
# позначка часу розділу для підписів у ffmpeg (fixed-fps: кадри / 30)
func mark(name: String) -> void:
print("MARK %s %.2f" % [name, Engine.get_process_frames() / 30.0])
func wait(s: float) -> void:
await create_timer(s).timeout
# друк команди в поле вводу по літері (з клацанням клавіш), потім виконання
func type(cmd: String, after := 1.2) -> void:
g.inp.text = ""
for ch in cmd:
g.inp.text += ch
g.inp.caret_column = g.inp.text.length()
await wait(0.06)
await wait(0.25)
g.inp.text = ""
g.run(cmd)
await wait(after)
func wrong_code() -> String:
var c: String = g.crack["code"]
var w: String = g.random_code(c.length())
while w == c:
w = g.random_code(c.length())
return w
func crack_it(misses: int) -> void:
await type("crack", 1.5)
for i in misses:
await type(wrong_code(), 1.0)
while g.crack != null: # шари: кожен ламаємо правильним кодом
await type(g.crack["code"], 1.6)
func _run() -> void:
for p in ["user://tr_save.json", "user://tr_ach.json", "user://tr_rec.json", "user://tr_set.json"]:
if FileAccess.file_exists(p):
DirAccess.remove_absolute(ProjectSettings.globalize_path(p))
load("res://lang.gd").lang = lang
var f := FileAccess.open("user://tr_set.json", FileAccess.WRITE)
f.store_string(JSON.stringify({"lang": lang, "asked": true, "rated": true, "seen": "9.9.9", "music": 70, "sfx": 80}))
f.close()
g = load("res://main.tscn").instantiate()
g.save_path = "user://tr_save.json"
g.ach_path = "user://tr_ach.json"
g.legacy_path = "user://tr_legacy.json"
g.records_path = "user://tr_rec.json"
g.settings_path = "user://tr_set.json"
root.add_child(g)
g.variety = false
await wait(7.0) # заставка і перший лист Оракула
mark("hack")
# 1. перший злам: кав'ярня
await type("scan", 2.0)
await type("connect 10.0.0.7", 1.5)
await crack_it(2)
await type("ls", 1.0)
await type("download wifi_pass.txt", 2.5)
await type("wipe", 1.0)
await type("disconnect", 3.0)
mark("trace")
# 2. пізніше: маршрут, глибокий сервер, трасування росте до тривоги
g.run("clear")
g.level = 14
g.money = 9000
for i in 12:
g.servers[i]["open"] = true
g.render()
await type("route auto", 1.5)
await type("connect 20", 1.5)
g.cur["ports_open"] = g.cur["ports"].duplicate()
await type("crack", 1.2)
await type(wrong_code(), 0.8)
g.trace = 62.0
await type("hint", 1.0)
await type(wrong_code(), 0.8)
g.trace = 84.0
await type(wrong_code(), 3.0)
await type("abort", 0.5)
await type("disconnect", 1.5)
mark("firewall")
# 3. міні-гра фаєрвола
g.run("clear")
g.trace = 0.0
g.render()
await type("connect 14", 1.0)
await type("firewall", 1.5)
await type("2", 0.8)
await type("4", 2.0)
await type("abort", 0.5)
await type("disconnect", 0.8)
mark("dict")
# 4. словникова атака
g.run("clear")
await type("connect 16", 1.0)
await type("dict", 1.5)
await type(g.mg["words"][0] if g.mg["words"][0] != g.mg["pass"] else g.mg["words"][1], 1.2)
await type(g.mg["pass"], 2.5)
g.run("disconnect")
mark("rivals")
# 5. суперники й заставка акту
g.run("clear")
await type("rivals", 3.0)
mark("act")
g.Gfx.act_card(g, g.L.t("АКТ V — АРГУС"), g.L.t("Нова частина історії"))
await wait(5.0)
mark("end")
quit()

View File

@@ -0,0 +1 @@
uid://dice1cde0wej5

View File

@@ -37,6 +37,7 @@ func _run() -> void:
if FileAccess.file_exists(p):
DirAccess.remove_absolute(ProjectSettings.globalize_path(p))
var g = load("res://main.tscn").instantiate()
g.variety = false # старі механіки; нові перевіряє features.gd (блок "Різноманіття")
g.save_path = "user://upd_save.json"
g.ach_path = "user://upd_ach.json"
g.legacy_path = "user://update_legacy.json"
@@ -68,11 +69,15 @@ func _run() -> void:
var u = g.updater
u.install = false
u.dest = "user://upd_test.exe"
u.latest = {"tag": "v9.9.9", "url": "http://127.0.0.1:9/TinMerezhi.exe", "size": 1000}
# дзеркало недоступне → друга спроба з Gitea, теж недоступна → збій
u.latest = {"tag": "v9.9.9", "url": "http://127.0.0.1:9/TinMerezhi.exe", "size": 1000, "mirror": "http://127.0.0.1:9/m/TinMerezhi.exe"}
u.download()
while u.busy:
await process_frame
var last: String = g.log_lines[-1][0]
if not g.log_lines[-2][0].contains("Качаю з основного") or u.src != u.latest["url"]:
print("FAIL запасний сервер: ", g.log_lines[-2][0])
bad += 1
if not last.contains("немає з'єднання") or FileAccess.file_exists(u.dest):
print("FAIL обрив: ", last)
bad += 1

View File

@@ -2,7 +2,8 @@
import os, struct, subprocess, sys, zlib
URL = "https://github.com/godotengine/godot/releases/download/4.7.2-stable/Godot_v4.7.2-stable_export_templates.tpz"
WANT = ["templates/windows_release_x86_64.exe", "templates/version.txt"]
# names inside templates/ from argv (e.g. web_nothreads_release.zip), the Windows exe by default
WANT = ["templates/" + n for n in (sys.argv[1:] or ["windows_release_x86_64.exe"])] + ["templates/version.txt"]
DEST = os.path.expanduser("~/.local/share/godot/export_templates/4.7.2.stable")

View File

@@ -77,7 +77,16 @@ const REFLEX_ADD := 4 # Рефлекси: + дій до термі
# ── рівні складності: 0 — Новачок, 1 — Звичайний, 2 — Параноя ──
const DIFF_NAMES := ["Новачок", "Звичайний", "Параноя"]
const DIFF_IDS := ["novice", "normal", "paranoid"]
const DIFF_TRACE := [0.75, 1.04, 1.5] # множник усього трасування (v1.0.62: було 0.6/1.0; 1.08 на Звичайному — запізнення в главах 32–33)
const DIFF_TRACE := [0.7, 1.04, 2.0] # множник усього трасування (v1.0.89: Новачок 0.75 → 0.7; v1.0.62: було 0.6/1.0; 1.08 на Звичайному — запізнення в главах 32–33; v1.0.81 Параноя 1.5 → 2.0, бо зовнішній шар тепер пам'ятається після відступу)
const DIFF_INVEST := [1.4, 1.0, 0.7] # множник часу до арешту за лишені логи
const DIFF_BUSTS := [2, 0, -1] # + арештів до кінця гри
const DIFF_LIMIT := [1.2, 1.0, 1.0] # множник дій у термінових главах (v1.0.80: Новачок запізнювався так само часто, як Звичайний)
const DIFF_SAVES := [true, true, false] # Параноя: збереження лише на початку акту (контрольні точки, save.gd), між ними закрив гру — прогрес акту зник
# ── різноманіття (variety.gd) ──
const ICE_FROM := 5 # чорний лід — на серверах від цього захисту (третина з них)
const ICE_MULT := 2.0 # трасування за помилку на льоду
const ADMIN_MULT := 1.5 # трасування за помилку, коли адмін онлайн
const AFF_CHANCE := 0.35 # шанс властивості для сервера із захистом ≥ 2 (нова гра)
const BAIT_TRACE := 25 # % трасування за приманку
const LOCK_EXTRA := [false, false, true] # Параноя: замок — окрема перешкода, за ним ще всі шари коду (v1.0.75: інакше Параноя −13% дій; шум-трасування за обхід майже не діяв)

View File

@@ -7,14 +7,23 @@ const L = preload("res://lang.gd")
static func build(g: Main) -> void:
# кольорові емодзі вбудовані в гру (Noto Color Emoji, OFL) — однаково на будь-якій системі
var emoji: Font = load("res://fonts/NotoColorEmoji.ttf")
var sys := SystemFont.new()
sys.font_names = PackedStringArray(["Consolas", "Cascadia Mono", "DejaVu Sans Mono", "Liberation Mono", "monospace"])
sys.fallbacks = [emoji]
var sys: Font
var bold: Font
if OS.has_feature("web"): # у браузері системних шрифтів нема: моноширинний вбудований (у exe не входить)
var btc: Font = load("res://fonts/JetBrainsMonoNL-btc.ttf") # лише ₿, якого нема в DejaVu
sys = load("res://fonts/DejaVuSansMono.ttf")
bold = load("res://fonts/DejaVuSansMono-Bold.ttf")
sys.fallbacks = [btc, emoji]
bold.fallbacks = [btc, emoji]
else:
sys = SystemFont.new()
sys.font_names = PackedStringArray(["Consolas", "Cascadia Mono", "DejaVu Sans Mono", "Liberation Mono", "monospace"])
sys.fallbacks = [emoji]
bold = SystemFont.new()
bold.font_names = sys.font_names
bold.font_weight = 700
bold.fallbacks = [emoji]
g.font = sys
var bold := SystemFont.new()
bold.font_names = sys.font_names
bold.font_weight = 700
bold.fallbacks = [emoji]
var th := Theme.new()
th.default_font = sys
th.default_font_size = 16

View File

@@ -7,6 +7,8 @@ const L = preload("res://lang.gd")
const API := "https://serv.tail9357bc.ts.net/api/v1/repos/junior/TinMerezhi/releases/latest"
const ASSET := "TinMerezhi.exe"
# Дзеркало exe на дроплеті (CI кладе <тег>/TinMerezhi.exe): швидше за Funnel; якщо не вийшло — качаємо з Gitea.
const MIRROR := "https://tinmerezhi.duckdns.org/"
var g # main.gd
var http := HTTPRequest.new()
@@ -14,6 +16,7 @@ var latest := {} # {"tag", "url", "size"}, коли є новіша версі
var busy := false
var dest := "" # куди качаємо новий exe (тести підставляють свій шлях)
var install := true # false — лише завантажити й перевірити (тест завантаження)
var src := "" # звідки качаємо зараз: дзеркало або latest.url
var dl_t0 := 0 # мс початку завантаження; 0 — не качаємо
var dl_sample := [0, 0] # [мс, байти] останнього заміру швидкості
var dl_speed := 0.0 # байт/с, згладжена
@@ -97,7 +100,7 @@ func _on_checked(result: int, code: int, _h: PackedStringArray, body: PackedByte
var tag := str(d.get("tag_name", ""))
for a in d.get("assets", []):
if a.get("name") == ASSET and newer(tag, version()):
latest = {"tag": tag, "url": a["browser_download_url"], "size": int(a["size"])}
latest = {"tag": tag, "url": a["browser_download_url"], "size": int(a["size"]), "mirror": MIRROR + tag + "/" + ASSET}
set_badge(version_label() + L.t(" → ⬆ доступна %s: введи update") % tag, "#ffdd33")
g.say(L.t("⬆ Доступна нова версія %s (у тебе %s). Введи update, щоб оновитися.") % [tag, version_label()], "warn")
if start:
@@ -119,12 +122,18 @@ func run() -> void:
check(true)
elif g.paranoid_run():
g.say(L.t("☠ Параноя зберігається лише на початку акту: оновлення перезапустить гру й поверне туди. Онови після кінця забігу."), "err")
elif g.crack != null: # перезапуск посеред зламу = висмикнутий кабель (+25% трасування після старту), як і зі зміною мови
g.say(L.t("🔒 Оновитися можна після зламу: заверши його або відключись (disconnect)."), "err")
else:
download()
func download() -> void:
g.say(L.t("⬇ Завантажую %s (%d МБ)…") % [latest["tag"], latest["size"] >> 20], "info")
busy = true
_start(latest.get("mirror", latest["url"]))
func _start(url: String) -> void:
src = url
dl_t0 = Time.get_ticks_msec()
dl_sample = [dl_t0, 0]
dl_speed = 0.0
@@ -133,9 +142,19 @@ func download() -> void:
http.timeout = 0.0 # повільний інтернет качає скільки треба; обрив ловить _process
http.download_file = dest
http.request_completed.connect(_on_downloaded, CONNECT_ONE_SHOT)
if http.request(latest["url"]) != OK:
if http.request(url) != OK:
http.request_completed.disconnect(_on_downloaded)
_fail(L.t("запит не відправився"))
_retry(L.t("запит не відправився"))
# дзеркало підвело → ще раз з Gitea; Gitea підвела → збій
func _retry(reason: String) -> void:
if src == latest["url"]:
_fail(reason)
return
if FileAccess.file_exists(dest):
DirAccess.remove_absolute(dest)
g.say(L.t("⚠ Швидкий сервер не віддав файл (%s). Качаю з основного…") % reason, "warn")
_start(latest["url"])
# Рядок прогресу: [██████░░░░░░░░░░] 37% 42.1/114.4 МБ · 3.2 МБ/с · ~23 с
static func progress_line(done: int, total: int, speed: float) -> String:
@@ -164,7 +183,7 @@ func _process(_d: float) -> void:
if http.request_completed.is_connected(_on_downloaded):
http.request_completed.disconnect(_on_downloaded)
http.download_file = ""
_fail(L.t("з'єднання зависло на %.1f з %.1f МБ") % [got / 1048576.0, latest["size"] / 1048576.0])
_retry(L.t("з'єднання зависло на %.1f з %.1f МБ") % [got / 1048576.0, latest["size"] / 1048576.0])
return
if now - dl_sample[0] >= 1000: # швидкість: замір раз на секунду, згладжена, щоб час не скакав
var v: float = (got - dl_sample[1]) * 1000.0 / (now - dl_sample[0])
@@ -184,7 +203,7 @@ func _on_downloaded(result: int, code: int, _h: PackedStringArray, _b: PackedByt
var path := exe()
var got := FileAccess.get_size(dest) if FileAccess.file_exists(dest) else 0
if result != HTTPRequest.RESULT_SUCCESS or code != 200 or got != latest["size"]:
_fail(why(result, code, got, latest["size"]))
_retry(why(result, code, got, latest["size"]))
return
g.tip.text = ""
g.say(" " + progress_line(got, got, got / maxf(secs, 0.001)) + " · " + eta(secs), "info")

226
source_godot/variety.gd Normal file
View File

@@ -0,0 +1,226 @@
# Різноманіття зламу й замовлень (v1.0.72):
# • Замки: зовнішній шар частини серверів (захист ≥ 2) відкриває не код, а інша атака — firewall, dict, decrypt або call.
# Вибір за хешем IP: у всіх гравців і в щоденному виклику однаковий. Внутрішні шари — як завжди, crack.
# • Чорний лід (захист ≥ 5, за хешем IP): помилки зламу дають удвічі більше трасування, відеокарта й ШІ мовчать.
# Розтопити: exploit ice (крипта з гаманців) або use icebreaker (програма). Лід вертається, коли сервер знову закрито.
# • Властивості серверів: випадкові на кожну нову гру (лише сюжет): адмін онлайн, застаріла система, без логів, пастка.
# • Цілі замовлень: не лише вкрасти — стерти (rm), підкинути фальшивку (upload), піти без логів, знайти сервер самому.
extends RefCounted
const L = preload("res://lang.gd")
const T = preload("res://tuning.gd") # усі числа балансу
# ── замки ──
const LOCKS := ["", "", "fw", "word", "cipher", "2fa"]
const LOCK_CMD := {"fw": "firewall", "word": "dict", "cipher": "decrypt", "2fa": "call"}
const LOCK_TEXT := {
"fw": "🧱 Зовнішній замок — фаєрвол: замість коду обійди фільтри (firewall).",
"word": "📖 Зовнішній замок — пароль-слово: вгадай його у дампі (dict).",
"cipher": "🔐 Зовнішній замок — шифр: розгадай ключ (decrypt).",
"2fa": "📞 Зовнішній замок — двофакторка: код приходить на телефон працівника, вивідай його (call).",
}
static func lock_of(g: Main, s) -> String:
if s["lvl"] < 2 or not g.variety:
return ""
return LOCKS[abs(hash(s["ip"] + "#lock")) % LOCKS.size()]
# замок ще стоїть: сервер закритий і зовнішній шар не пробито
static func gate(g: Main) -> String:
if g.cur == null or g.cur["open"] or g.cur["layer_done"] > 0 or g.cur.get("lock_off", false):
return ""
return lock_of(g, g.cur)
# замок перевіряє пароль через ті самі порти, що й crack
static func ports_ready(g: Main) -> bool:
if gate(g) == "" or g.closed_ports(g.cur).is_empty():
return true
g.say(L.t("🔌 Спершу відкрий порти: %s.") % ", ".join(PackedStringArray(g.closed_ports(g.cur))), "err")
return false
# атака kind ("fw"/"word"/"cipher"/"2fa") удалась — зовнішній шар пробито
static func on_solved(g: Main, kind: String) -> void:
if gate(g) != kind:
return
if T.LOCK_EXTRA[g.diff]:
g.cur["lock_off"] = true
g.say(L.t("🔓 Замок відкрито! Але на Параної за ним ще й код: crack."), "big")
elif g.layers_of(g.cur["lvl"]) > 1:
g.cur["layer_done"] = 1
g.cur["layer_state"] = null
g.say(L.t("🔓 Зовнішній замок відкрито! Далі — внутрішні шари: crack."), "big")
else:
g.Crack.grant_access(g)
# ── чорний лід ──
static func has_ice(g: Main, s) -> bool:
return g.variety and s["lvl"] >= T.ICE_FROM and abs(hash(s["ip"] + "#ice")) % 3 == 0 and not s.get("ice_off", false)
static func melt(g: Main) -> void:
g.cur["ice_off"] = true
if g.crack != null and g.crack["ice"]:
g.crack["ice"] = false
var jam := maxi(0, g.cur["lvl"] - T.JAM_FROM) # лід глушив відеокарту й ШІ — вони вертаються, як на звичайному зламі
g.crack["free"] = maxi(0, int(g.eff(g.hw["gpu"])) - jam)
g.crack["free_hints"] = maxi(0, int(g.eff(g.hw["ai"])) - jam)
g.say(L.t("🧊 Чорний лід розтоплено: помилки знову звичайні."), "info")
# ── властивості серверів ──
const AFFIXES := ["admin", "old", "nolog", "bait"]
const AFF_TEXT := {
"admin": "👤 Тут працює пильний адмін: коли він онлайн, помилки дають +50% трасування.",
"old": "🕸 Застаріла система: код зовнішнього шару на 1 цифру коротший.",
"nolog": "📼 Логування зламане: тут не лишається слідів.",
"bait": "🍯 Щось тут надто легко… Хтось розклав приманку.",
}
const BAIT := "admin_passwords.txt"
# нова гра: кожен сервер із захистом ≥ 2 має шанс на одну властивість
static func roll(g: Main) -> void:
if not g.variety:
return # тести старих механік: без властивостей і без зсуву randi()
var r := RandomNumberGenerator.new()
r.seed = randi()
g.aff = {}
for s in g.servers:
if s["lvl"] >= 2 and r.randf() < T.AFF_CHANCE:
g.aff[s["ip"]] = AFFIXES[r.randi() % AFFIXES.size()]
static func aff_of(g: Main, s) -> String:
return "" if g.endless != null or s == null or not g.variety else g.aff.get(s["ip"], "")
static func load_from(g: Main, v) -> void:
if typeof(v) != TYPE_DICTIONARY:
return # старе збереження — лишаємо щойно випадкові
g.aff = {}
for ip in v:
if str(v[ip]) in AFFIXES and g.srv_by_ip(str(ip)) != null:
g.aff[str(ip)] = str(v[ip])
static func on_connect(g: Main, s) -> void:
for k in ["admin_on", "cipher_used"]:
s.erase(k)
var lk := lock_of(g, s)
if lk != "" and not s["open"] and s["layer_done"] == 0 and not s.get("lock_off", false):
g.say(L.t(LOCK_TEXT[lk]), "warn")
if has_ice(g, s) and not s["open"]:
g.say(L.t("🧊 ЧОРНИЙ ЛІД: помилки зламу — подвійне трасування, відеокарта й ШІ мовчать. Розтопи: exploit ice (крипта) або use icebreaker."), "err")
var a := aff_of(g, s)
if a == "":
return
g.say(L.t(AFF_TEXT[a]), "warn")
if a == "admin":
s["admin_on"] = g.bm_rng.randf() < 0.5
g.say(L.t("👤 Адмін зараз ОНЛАЙН. Можна відключитися й зайти пізніше.") if s["admin_on"] else L.t("👤 Адмін зараз офлайн — щастить."), "err" if s["admin_on"] else "info")
# множник трасування за невдалу спробу зламу
static func fail_mult(g: Main) -> float:
var m := 1.0
if g.crack != null and g.crack.get("ice", false):
m *= T.ICE_MULT
if g.cur != null and g.cur.get("admin_on", false):
m *= T.ADMIN_MULT
return m
# ── цілі замовлень ──
const KINDS := ["steal", "erase", "plant", "clean", "find"]
const KIND_PAY := {"steal": 1.0, "erase": 1.1, "plant": 1.2, "clean": 1.3, "find": 1.2}
const KIND_TEXT := {
"steal": "вкрасти (download)",
"erase": "стерти (rm)",
"plant": "підмінити фальшивкою (upload)",
"clean": "вкрасти й піти без логів",
"find": "вкрасти, але сервер невідомий — шукай (ls)",
}
static func kind_of(g: Main, f: String) -> String:
var s = g.srv_of(f)
if s == null or s["lvl"] < 2 or g.endless != null or not g.variety:
return "steal"
return KINDS[abs(hash(f + "#job")) % KINDS.size()]
static func job_line(g: Main, j, s, r: Dictionary) -> String:
var k := kind_of(g, j["file"])
var where: String = (L.t("на невідомому сервері (захист %d)") % s["lvl"]) if k == "find" else (L.t("на %s") % s["name"])
return L.t(" %s: %s %s · %s — $%d, %d XP") % [j["t"], j["file"], where, L.t(KIND_TEXT[k]), int(round(r["pay"] * KIND_PAY[k] * g.rank_mult())), r["xp"]]
# замовлення виконано: гроші, досвід, репутація
static func finish_job(g: Main, j, f: String, s) -> void:
g.say(L.t("Замовлення виконано: ") + j["t"], "info")
var r := g.job_reward(s["lvl"])
g.pay(int(round(r["pay"] * KIND_PAY[kind_of(g, f)] * g.rank_mult() * g.Rivals.on_job(g, f))))
g.gain_xp(r["xp"])
g.gain_rep(T.JOB_REP * s["lvl"])
g.done[f] = true
g.done.erase("+" + f)
# download файлу замовлення; true — подія оброблена
static func on_download(g: Main, j, f: String) -> bool:
match kind_of(g, f):
"erase":
g.say(L.t("Замовник просив стерти %s, а не красти: rm %s.") % [f, f], "warn")
"plant":
g.say(L.t("Замовник просив підмінити %s фальшивкою: upload %s.") % [f, f], "warn")
"clean":
g.done["+" + f] = true
g.say(L.t("📦 %s у тебе. Зітри логи (wipe) і відключись чисто — тоді замовник заплатить.") % f, "warn")
_:
finish_job(g, j, f, g.cur)
return true
static func c_rm(g: Main, f: String) -> void:
if g.cur == null or not g.cur["open"]:
g.say(L.t("Немає доступу."), "err")
return
if not f in g.cur["files"]:
g.say(L.t("Такого файлу немає. Перевір ls."), "err")
return
var j = g.job_of(f)
if j == null or g.done.has(f) or kind_of(g, f) != "erase" or g.endless != null:
g.say(L.t("Стирати %s ніхто не просив — хай лежить.") % f, "warn")
return
g.say(L.t("rm %s ... ████████████ знищено, сектори перезаписано.") % f)
g.fx("dl")
finish_job(g, j, f, g.cur)
g.leave_logs("xfer")
if not g.over and g.cur != null:
g.add_trace(g.xfer_trace(T.DOWNLOAD_TRACE))
# upload фальшивки; true — це було замовлення
static func on_upload(g: Main, f: String) -> bool:
var m = g.missions[g.mission]
if f == "" and m.get("upload", false) and g.cur["ip"] in m.get("targets", [g.upload_ip(m)]):
return false # тут чекають сюжетну латку
var fs: Array = g.cur["files"].filter(func(x): return g.job_of(x) != null and not g.done.has(x) and kind_of(g, x) == "plant" and (f == "" or f == x))
if fs.is_empty():
return false
g.say(L.t("Заливка фальшивого %s... ████████████ OK. Ніхто не помітить підміни.") % fs[0])
g.fx("dl")
finish_job(g, g.job_of(fs[0]), fs[0], g.cur)
g.leave_logs("xfer")
if not g.over and g.cur != null:
g.add_trace(g.xfer_trace(T.UPLOAD_TRACE))
return true
# disconnect: замовлення "піти без логів"
static func on_disconnect(g: Main, s) -> void:
for f in s["files"]:
if g.done.has("+" + f) and g.job_of(f) != null and not g.done.has(f):
if s["logs"]:
g.done.erase("+" + f)
g.say(L.t("🕵 Ти наслідив — замовник за %s не заплатить. Спробуй ще раз чисто.") % f, "err")
else:
finish_job(g, g.job_of(f), f, s)
# ── пастка ──
static func has_bait(g: Main) -> bool:
return g.cur != null and aff_of(g, g.cur) == "bait"
static func bait_cat(g: Main) -> void:
g.say(L.t("root: Pa$$w0rd! admin: admin123 backup: qwerty\n(створено вчора о 03:14 із невідомої адреси… надто вже зручно)"))
static func bait_download(g: Main) -> void:
g.say(L.t("🍯 ПАСТКА! Файл був приманкою — сервер підняв тривогу."), "err")
g.fx("bad")
g.leave_logs("xfer")
g.add_trace(T.BAIT_TRACE)

View File

@@ -0,0 +1 @@
uid://bl8ix226doqvu

View File

@@ -8,6 +8,30 @@ const Updater = preload("res://updater.gd")
const MAX_ITEMS := 8 # коротко: вікно має влазити й з великим шрифтом
const CHANGES := [
["1.0.92", "Гру можна запустити просто в браузері на сторінці itch.io. Збереження там окремі від exe.", "The game can now be played right in the browser on the itch.io page. Saves there are separate from the exe."],
["1.0.90", "Шифр-замок і крипто-гаманці українською: ключ — українське слово, шифр по українській абетці (33 літери).", "Cipher lock and crypto wallets in Ukrainian now use Ukrainian words; English stays as before."],
["1.0.89", "Новачок трохи легший: трасування −30% замість −25%.", "Novice is a bit easier: trace −30% instead of −25%."],
["1.0.84", "Команда update качає нові версії зі швидшого сервера, а якщо він недоступний — як раніше.", "The update command downloads new versions from a faster server, and falls back to the old one if it is unavailable."],
["1.0.81", "Пароль зовнішнього шару більше не змінюється, коли відступаєш: усе, що ти про нього з'ясував, лишається до наступного візиту.", "The outer layer password no longer changes when you retreat: everything you learned about it stays until your next visit."],
["1.0.81", "Параноя: трасування вище (+90% замість +50%), щоб вона лишилась такою ж важкою, але без безкінечних повторних зламів.", "Paranoid: higher trace (+90% instead of +50%) so it stays just as hard, without endless repeated cracks."],
["1.0.81", "«Менше анімацій» зупиняє стрічку новин і дощ символів.", "\"Fewer animations\" now stops the news ticker and the symbol rain."],
["1.0.81", "Дуже довгий журнал більше не втрачає кольорів емблем, листів і підказок зламу.", "A very long log no longer loses the colours of emblems, mails and crack hints."],
["1.0.80", "Новачок: у термінових главах на 20% більше дій.", "Novice: 20% more actions in urgent chapters."],
["1.0.79", "Арешт з файлом «піти без логів» конфіскує його: главу чи замовлення тепер не зарахувати простим connect і disconnect.", "An arrest while holding a \"leave no logs\" file confiscates it: the chapter or job no longer counts after a plain connect and disconnect."],
["1.0.79", "Перегони із суперником за замовлення «піти без логів» зараховуються як виграні, коли ти чисто відключився.", "A rival race for a \"leave no logs\" job now counts as won when you disconnect cleanly."],
["1.0.79", "update посеред зламу більше не перезапускає гру (це було б як висмикнути кабель): спершу заверши злам.", "update in the middle of a crack no longer restarts the game (that would be like pulling the cable): finish the crack first."],
["1.0.78", "Ефект CRT на нулі тепер справді вимкнений: на слабких ноутбуках гра менше навантажує відеокарту.", "CRT effect at zero is now truly off: the game puts less load on the GPU of weak laptops."],
["1.0.77", "Нова заставка при запуску: тінь у капюшоні з оком мережі над нічним Києвом.", "New startup splash: a hooded shadow with a network eye over night Kyiv."],
["1.0.76", "Після першого акту гра один раз запропонує оцінити її на itch.io.", "After the first act the game asks once whether you would rate it on itch.io."],
["1.0.75", "Параноя знову повноцінно важка: замок сервера там лише перша перешкода, за ним ще треба зламати код.", "Paranoid is properly hard again: a server lock is only the first obstacle there, the code behind it still has to be cracked."],
["1.0.75", "Чорний лід, розтоплений посеред зламу, повертає допомогу відеокарти й ШІ-асистента.", "Black ice melted in the middle of a crack brings back the help of your GPU and AI assistant."],
["1.0.75", "Відкритий дзвінком чи словом замок більше не обіцяє «відомих цифр» пароля, яких не буде.", "A lock opened by a call or a word no longer promises password digits that never come."],
["1.0.74", "Масштаб інтерфейсу більше не виштовхує кнопки за край: він зменшується до того, що влазить у вікно.", "Interface scale no longer pushes buttons off the screen: it shrinks to what fits the window."],
["1.0.73", "Масштаб інтерфейсу в налаштуваннях (100–200%). За замовчуванням береться з масштабу Windows, тож на ноутбуках з високою роздільністю все більше.", "Interface scale in settings (100–200%). By default it follows the Windows scale, so everything is bigger on high-resolution laptops."],
["1.0.72", "Нові замки серверів: на частині з них замість коду — фаєрвол, пароль-слово, шифр або дзвінок працівнику.", "New server locks: some servers need a firewall bypass, a password word, a cipher or a phone call instead of a code."],
["1.0.72", "Чорний лід на сильних серверах: помилки вдвічі дорожчі. Розтопи криптою (exploit ice) або новою програмою Криголам.", "Black ice on strong servers: mistakes cost double. Melt it with crypto (exploit ice) or the new Icebreaker program."],
["1.0.72", "Кожна гра роздає серверам властивості: пильний адмін, застаріла система, зламане логування, приманка.", "Every game gives servers traits: a watchful admin, an outdated system, broken logging, bait."],
["1.0.72", "Замовлення з різними цілями: стерти (rm), підмінити фальшивкою (upload), піти без логів, знайти сервер самому.", "Jobs with different goals: erase (rm), swap for a fake (upload), leave no logs, find the server yourself."],
["1.0.71", "Щоденний виклик чесний для всіх: програми, вільні очки навичок і образи суперників з минулої гри туди не переходять.", "The daily challenge is fair for everyone: programs, unspent skill points and rival grudges from your last game no longer carry over."],
["1.0.71", "«Менше анімацій» тепер вимикає й трусіння екрана від помилок та глітч при арешті.", "\"Reduce motion\" now also turns off the screen shake on mistakes and the glitch on arrest."],
["1.0.71", "Список замовлень (jobs) показує оплату з урахуванням звання.", "The jobs list shows pay including your rank bonus."],

View File

@@ -30,6 +30,7 @@
Суперники-хакери Cobra, Mantis і Nyx: перегони за замовлення й помста
Дивні прохання незнайомців (quests): 8 рідкісних одноразових квестів з унікальною нагородою
Соціальна інженерія (call), криптоголоволомки (decrypt), чорний ринок експлойтів (market)
Різні замки серверів, чорний лід, випадкові властивості серверів, 5 цілей замовлень
Нескінченна мережа після фіналу і таблиця рекордів
Щоденний виклик (daily): та сама мережа для всіх гравців сьогодні, онлайн-таблиця дня
New Game+ (ngplus): сюжет спочатку з навичками й модулями, Пуйло сильніший