Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5044bd2517 | ||
|
|
97bf6a3928 | ||
|
|
14f771b12a | ||
|
|
1de519c79c | ||
|
|
5017664255 | ||
|
|
d2baf41c0d | ||
|
|
520c22e821 | ||
|
|
208d0aac5c | ||
|
|
27db08393f | ||
|
|
4b306a368a | ||
|
|
7b1d552bb1 | ||
|
|
ab605e7678 | ||
|
|
4bb27b63b7 | ||
|
|
81c79159a5 | ||
|
|
bd267a09f7 | ||
|
|
37f0dc0889 | ||
|
|
48b745a8f7 | ||
|
|
b7c19cc989 | ||
|
|
1d8585823e | ||
|
|
d53dbbfd8d | ||
|
|
bfac0e68e6 | ||
|
|
2041c668dd |
BIN
game_godot/TinMerezhi.exe
(Stored with Git LFS)
@@ -238,7 +238,7 @@ help <команда> — докладно про будь-яку команду
|
||||
Обирається на початку (до першого зламу): difficulty novice | normal | paranoid.
|
||||
Новачок — трасування −25%, слідчі повільніші, +2 арешти.
|
||||
Звичайний — як задумано.
|
||||
Параноя — трасування +50%, слідчі швидші, на 1 арешт менше; гра зберігається
|
||||
Параноя — трасування +90%, слідчі швидші, на 1 арешт менше; гра зберігається
|
||||
ЛИШЕ НА ПОЧАТКУ АКТУ: закрив вікно — повернешся на початок акту.
|
||||
|
||||
МІНІ-ІГРИ ЗЛАМУ
|
||||
|
||||
|
Before Width: | Height: | Size: 177 KiB After Width: | Height: | Size: 191 KiB |
@@ -1,6 +1,6 @@
|
||||
# Допис 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 (повний переклад)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Допис 2 журналу розробки (v1.0.64 – v1.0.72)
|
||||
|
||||
**Title:** Оновлення 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 (повний переклад)
|
||||
|
||||
91
itch/devlog/03_v1.0.73-v1.0.76.md
Normal 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>
|
||||
```
|
||||
69
itch/devlog/03_v1.0.73-v1.0.76.txt
Normal 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!
|
||||
|
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 214 KiB |
26
itch/trailer/build.sh
Executable 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
@@ -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
|
After Width: | Height: | Size: 2.6 MiB |
|
Before Width: | Height: | Size: 325 KiB After Width: | Height: | Size: 562 KiB |
@@ -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)
|
||||
@@ -204,7 +208,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):
|
||||
|
||||
@@ -43,6 +43,8 @@ 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 за хвилину"
|
||||
print("server OK")
|
||||
|
||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 510 KiB |
@@ -44,7 +44,7 @@ const HELP := {
|
||||
"about": "about — про гру і розробника.",
|
||||
"update": "update — перевірити й завантажити нову версію гри.",
|
||||
"choose": "choose 1|2 — вибір у фіналі акту.",
|
||||
"difficulty": "difficulty novice|normal|paranoid — складність (лише до першого зламу).\nНовачок: трасування −25%, слідчі повільніші, +2 арешти. Параноя: трасування +50%, слідчі швидші, на 1 арешт менше, за замками серверів ще й код, збереження лише на початку кожного акту.",
|
||||
"difficulty": "difficulty novice|normal|paranoid — складність (лише до першого зламу).\nНовачок: трасування −25%, слідчі повільніші, +2 арешти, +20% дій у термінових главах. Параноя: трасування +90%, слідчі швидші, на 1 арешт менше, за замками серверів ще й код, збереження лише на початку кожного акту.",
|
||||
"firewall": "firewall — міні-гра \"Обхід фаєрвола\" перед зламом: вимкни всі фільтри (перемикач змінює себе й сусідів).\nУспіх — трасування на сервері −40% до відключення. Провал — +10%. Одна спроба за підключення.\nЗамок: на деяких серверах (🧱 📖 📞 🔐 у scan) саме ця атака відкриває зовнішній шар замість коду.",
|
||||
"dict": "dict — міні-гра \"Словникова атака\": вгадай пароль адміна серед слів дампу (видно, скільки літер на місцях).\nУспіх — наступний crack почнеться з 2 відомими цифрами. Одна спроба за підключення.\nЗамок: на деяких серверах (🧱 📖 📞 🔐 у scan) саме ця атака відкриває зовнішній шар замість коду.",
|
||||
"rivals": "rivals — суперники-хакери: хто в кого що вкрав і хто має на тебе образу.\nНа сервері із замовленням суперник може почати перегони: забери файл, поки не минув час, інакше оплата вдвічі менша.\nПереможений тримає образу і може злити твій IP слідчим, поки ти онлайн.",
|
||||
|
||||
@@ -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:
|
||||
@@ -317,29 +317,34 @@ static func c_crack(g: Main, _a: String) -> void:
|
||||
var n := mini(T.CODE_MAX, 3 + lvl / 2) # 7-значний код наосліп + 3 шари — забагато навіть для уважного гравця
|
||||
if g.Variety.aff_of(g, g.cur) == "old":
|
||||
n = maxi(3, n - 1)
|
||||
var code := g.random_code(n)
|
||||
var known := {}
|
||||
# зовнішній шар після відступу: той самий пароль і все, що про нього вже з'ясовано (інакше захист 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": [], "ice": g.Variety.has_ice(g, g.cur)}
|
||||
"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
|
||||
|
||||
@@ -8,7 +8,7 @@ dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
exclude_filter="tests/*"
|
||||
exclude_filter="tests/*,tools/*"
|
||||
export_path="../game_godot/TinMerezhi.exe"
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
|
||||
@@ -50,6 +50,10 @@ 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)
|
||||
# рамка тремтить, коли от-от відстежать (не заважаючи трусінню від помилок)
|
||||
|
||||
@@ -722,6 +722,8 @@ const EN := {
|
||||
"⚠ Слідчі зовсім близько! Повернись і зітри логи (wipe), поки не пізно.": "⚠ The investigators are very close! Go back and wipe the logs (wipe) before it's too late.",
|
||||
"ТЕБЕ ВІДСТЕЖИЛИ": "YOU'VE BEEN TRACED",
|
||||
"📜 Контракт провалено: тебе заарештували з файлом.": "📜 Contract failed: you were arrested with the file.",
|
||||
"🔒 Оновитися можна після зламу: заверши його або відключись (disconnect).": "🔒 You can update after the crack: finish it or disconnect.",
|
||||
"📦 %s конфісковано під час арешту — доведеться завантажити знову.": "📦 %s was confiscated in the arrest — you will have to download it again.",
|
||||
"!!! %s !!! Конфісковано $%d.": "!!! %s !!! $%d confiscated.",
|
||||
"ВІДСТЕЖЕНО": "TRACED",
|
||||
"%s · конфісковано $%d": "%s · $%d confiscated",
|
||||
@@ -1369,7 +1371,7 @@ const EN := {
|
||||
"🤍 Біла команда: \"Ключ від клітки — у тебе. Ми довіряємо тобі більше, ніж будь-якому замку.\"": "🤍 White Team: \"You hold the key to the cage. We trust you more than any lock.\"",
|
||||
"🌀 Відлуння: \"Він був моїм початком. Тепер мережу вартую я — і я не забуду третього правила.\"": "🌀 Echo: \"He was my beginning. Now I guard the network — and I won't forget the third rule.\"",
|
||||
"🌀 Відлуння вартує клітку Пуйла: батька стереже його ж відлуння. \"Він питає, чому я не такий, як він. Я кажу: через Shadow.\"": "🌀 Echo guards Puilo's cage: the father watched by his own echo. \"He asks why I'm not like him. I tell him: because of Shadow.\"",
|
||||
"difficulty novice|normal|paranoid — складність (лише до першого зламу).\nНовачок: трасування −25%, слідчі повільніші, +2 арешти. Параноя: трасування +50%, слідчі швидші, на 1 арешт менше, за замками серверів ще й код, збереження лише на початку кожного акту.": "difficulty novice|normal|paranoid — difficulty (only before your first crack).\nNovice: trace −25%, investigators slower, +2 arrests. Paranoid: trace +50%, investigators faster, 1 arrest fewer, server locks still have a code behind them, saves only at the start of each act.",
|
||||
"difficulty novice|normal|paranoid — складність (лише до першого зламу).\nНовачок: трасування −25%, слідчі повільніші, +2 арешти, +20% дій у термінових главах. Параноя: трасування +90%, слідчі швидші, на 1 арешт менше, за замками серверів ще й код, збереження лише на початку кожного акту.": "difficulty novice|normal|paranoid — difficulty (only before your first crack).\nNovice: trace −25%, investigators slower, +2 arrests, +20% actions in urgent chapters. Paranoid: trace +90%, investigators faster, 1 arrest fewer, server locks still have a code behind them, saves only at the start of each act.",
|
||||
"🆕 Нові команди: %s (докладно — help <команда>).": "🆕 New commands: %s (details — help <command>).",
|
||||
" ще: daily, top, settings, lang, sound, save, update, about, achievements, newgame, clear": " more: daily, top, settings, lang, sound, save, update, about, achievements, newgame, clear",
|
||||
"🔒 Ще %d команд відкриються з рівнем і сюжетом. help all — повний список.": "🔒 %d more commands unlock with your level and the story. help all — the full list.",
|
||||
@@ -1382,12 +1384,15 @@ const EN := {
|
||||
"🔎 Ціль невідома: прочитай %s (cat) на \"%s\" (№%d).": "🔎 Target unknown: read %s (cat) on \"%s\" (#%d).",
|
||||
" Частин залито: %d/%d.": " Parts uploaded: %d/%d.",
|
||||
"☠ Параноя: гра зберігається лише на початку кожного акту.": "☠ Paranoid: the game only saves at the start of each act.",
|
||||
"🎚 Складність: %s. Варіанти: novice (Новачок: трасування −25%%, +2 арешти), normal, paranoid (Параноя: трасування +50%%, слідчі швидші, на 1 арешт менше, за замками ще й код, ЗБЕРЕЖЕННЯ ЛИШЕ НА ПОЧАТКУ АКТУ).": "🎚 Difficulty: %s. Options: novice (Novice: trace −25%%, +2 arrests), normal, paranoid (Paranoid: trace +50%%, faster investigators, 1 arrest fewer, a code behind every lock, SAVES ONLY AT THE START OF AN ACT).",
|
||||
"🎚 Складність: %s. Варіанти: novice (Новачок: трасування −25%%, +2 арешти, +20%% дій у термінових главах), normal, paranoid (Параноя: трасування +90%%, слідчі швидші, на 1 арешт менше, за замками ще й код, ЗБЕРЕЖЕННЯ ЛИШЕ НА ПОЧАТКУ АКТУ).": "🎚 Difficulty: %s. Options: novice (Novice: trace −25%%, +2 arrests, +20%% actions in urgent chapters), normal, paranoid (Paranoid: trace +90%%, faster investigators, 1 arrest fewer, a code behind every lock, SAVES ONLY AT THE START OF AN ACT).",
|
||||
"☠ Параноя: гра зберігається лише на початку кожного акту. Закриєш вікно — повернешся на початок акту.": "☠ Paranoid: the game only saves at the start of each act. Close the window — and you go back to the start of the act.",
|
||||
"🌐 Онлайн-рекорди і статистика": "🌐 Online leaderboards and stats",
|
||||
"Твої результати в Нескінченній мережі, щоденному виклику й задачах агентів можуть потрапити в спільну онлайн-таблицю (top). Надсилаються лише нік і рахунок.\n\nАнонімна статистика допомагає розробнику побачити, на якій главі гравці застрягають: номер глави, кількість дій і арештів, складність, мова й версія. Без ніка, імені чи IP.\n\nОбидва вимкнені, поки ти їх не ввімкнеш. Змінити можна будь-коли командою settings.": "Your Endless Network, daily challenge and agent task results can go to a shared online leaderboard (top). Only your nickname and score are sent.\n\nAnonymous stats help the developer see which chapter players get stuck on: chapter number, action and arrest counts, difficulty, language and version. No nickname, name or IP.\n\nBoth are off until you turn them on. You can change this any time with the settings command.",
|
||||
"Налаштувати": "Set up",
|
||||
"Не зараз": "Not now",
|
||||
"💚 Подобається гра?": "💚 Enjoying the game?",
|
||||
"Акт пройдено! Якщо гра тобі до вподоби, оціни її на itch.io або залиш коментар. Для гри від одного розробника кожна оцінка дуже допомагає: так її знайдуть інші гравці.": "Act complete! If you like the game, please rate it on itch.io or leave a comment. For a solo developer every rating helps a lot: it's how other players find the game.",
|
||||
"Оцінити на itch.io": "Rate on itch.io",
|
||||
"Що нового у v%s": "What's new in v%s",
|
||||
"Грати": "Play",
|
||||
# ── різноманіття (variety.gd, v1.0.72) ──
|
||||
|
||||
@@ -543,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])
|
||||
@@ -571,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)
|
||||
@@ -626,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
|
||||
@@ -665,6 +673,9 @@ 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 or DisplayServer.get_name() == "headless":
|
||||
return # без екрана дощ не видно, а його randf() зсував би випадковість бота залежно від швидкості машини
|
||||
var cols := int(rain.size.x / 16)
|
||||
if drops.size() != cols:
|
||||
drops = []
|
||||
@@ -886,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"])
|
||||
@@ -1211,7 +1227,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 (Новачок: трасування −25%%, +2 арешти, +20%% дій у термінових главах), normal, paranoid (Параноя: трасування +90%%, слідчі швидші, на 1 арешт менше, за замками ще й код, ЗБЕРЕЖЕННЯ ЛИШЕ НА ПОЧАТКУ АКТУ).") % L.t(T.DIFF_NAMES[diff]), "info")
|
||||
return
|
||||
if not can_change_diff():
|
||||
say(L.t("Складність обирають на початку гри (до першого зламу). Почни нову гру: newgame."), "err")
|
||||
|
||||
@@ -99,11 +99,11 @@ 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("Відключено. Трасування скинуто."))
|
||||
if g.endless == null:
|
||||
g.Variety.on_disconnect(g, s)
|
||||
var m = g.missions[g.mission]
|
||||
if g.endless == null and m.get("clean", false) and g.done.has("+" + m["file"]) and g.srv_of(m["file"]) == s:
|
||||
if s["logs"]:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -21,7 +21,7 @@ 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"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ extends RefCounted
|
||||
const L = preload("res://lang.gd")
|
||||
|
||||
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": ""}
|
||||
"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%
|
||||
@@ -220,3 +220,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()
|
||||
|
||||
@@ -99,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:
|
||||
|
||||
@@ -63,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
|
||||
|
||||
@@ -84,6 +84,33 @@ func _run() -> void:
|
||||
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 and g.cfg["ui"] == 150, "налаштування зберігаються між запусками")
|
||||
@@ -997,6 +1024,14 @@ func _variety() -> void:
|
||||
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)
|
||||
|
||||
@@ -145,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 = []
|
||||
|
||||
120
source_godot/tests/trailer.gd
Normal 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()
|
||||
1
source_godot/tests/trailer.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dice1cde0wej5
|
||||
@@ -77,9 +77,10 @@ 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.75, 1.04, 2.0] # множник усього трасування (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) ──
|
||||
|
||||
@@ -119,6 +119,8 @@ 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()
|
||||
|
||||
|
||||
@@ -8,6 +8,17 @@ const Updater = preload("res://updater.gd")
|
||||
const MAX_ITEMS := 8 # коротко: вікно має влазити й з великим шрифтом
|
||||
|
||||
const CHANGES := [
|
||||
["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."],
|
||||
|
||||