Compare commits

...

4 Commits

Author SHA1 Message Date
Claude
77e08485b1 Баланс: протидія wipe ×1.25 замість ×1.5; бот грає дуель і золотий пакет
Some checks failed
build / build (push) Failing after 2m35s
- Звіт загрози майже завжди обирав wipe (його роблять на кожному сервері):
  ×1.5 просаджувало Звичайний 37 → 33 з 40 (глава 41). З ×1.25 бот 40/37/40,
  дій 1251/1381/2261 (як у v1.0.97).
- balance.gd: BAL_DUEL=smart|rand, BAL_GOLD=1; лічильники банів вартового й протидії.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxxGHMCYtmGjsmgR5j
2026-12-03 08:25:23 +00:00
Gitea Actions
61cd5bce27 template.sha256: rebuilt template-4.7.2
Some checks failed
build / build (push) Failing after 3m11s
2026-12-03 08:02:39 +00:00
Claude
79d32d1f9b Шаблон exe: модуль RegEx (словничок у v1.0.99 не компілювався в exe)
All checks were successful
build / build (push) Successful in 51s
template / template (push) Successful in 4m19s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZyttQhF2yFfM9FMzGw
2026-12-03 07:58:51 +00:00
Claude
e148525041 Тести: v1.1.0 новіша за v1.0.99 (перехід на v1.1.x)
All checks were successful
build / build (push) Successful in 53s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZyttQhF2yFfM9FMzGw
2026-12-03 07:56:33 +00:00
9 changed files with 41 additions and 7 deletions

View File

@@ -28,7 +28,7 @@ static func mult(g: Main, k: String) -> float:
static func counter_text(k: String) -> String:
match k:
"hint": return L.t("підказка коштує ×%.1f трасування") % T.HABIT_HINT
"wipe": return L.t("wipe гучніший: ×%.1f трасування") % T.HABIT_WIPE
"wipe": return L.t("wipe гучніший: ×%.2f трасування") % T.HABIT_WIPE
"brute": return L.t("кожна помилка коду: ×%.2f трасування") % T.HABIT_BRUTE
"mini": return L.t("старт міні-гри: +%d%% трасування") % T.HABIT_MINI
return ""

View File

@@ -1497,7 +1497,7 @@ const EN := {
"перебір кодів навмання": "guessing codes at random",
"міні-ігри перед зламом": "pre-crack mini-games",
"підказка коштує ×%.1f трасування": "a hint costs ×%.1f trace",
"wipe гучніший: ×%.1f трасування": "wipe is louder: ×%.1f trace",
"wipe гучніший: ×%.2f трасування": "wipe is louder: ×%.2f trace",
"кожна помилка коду: ×%.2f трасування": "every wrong code: ×%.2f trace",
"старт міні-гри: +%d%% трасування": "starting a mini-game: +%d%% trace",
"📊 ЗВІТ ЗАГРОЗИ · %s: «Твій почерк ще не читається. Поки що.»": "📊 THREAT REPORT · %s: \"Your handwriting can't be read yet. Yet.\"",

View File

@@ -5,6 +5,7 @@ extends SceneTree
## Змінні середовища: BAL_DIFF=0|1|2 (Новачок/Звичайний/Параноя), BAL_CHOICE=121 (вибір у фіналах Актів IV, V і VI),
## BAL_ENDLESS=1 (після фіналу ще й Нескінченна мережа: тест вимагає глибини ENDLESS_MIN), BAL_COMPLETE=1 (усі замовлення),
## BAL_NG=1 (після фіналу ще й New Game+: пороги перевіряються для другого кола).
## BAL_DUEL=smart|rand (дуель з ядром на захисті ≥ 3: проти читання ядра або навмання), BAL_GOLD=1 (ловить кожен золотий пакет).
var g
var TICKS := int(OS.get_environment("BAL_TICKS")) if OS.get_environment("BAL_TICKS") != "" else 8
@@ -56,6 +57,7 @@ func _run() -> void:
root.add_child(g)
g.typing = false
g.bm_rng.seed = int(args[0]) if args.size() > 0 else 1 # call/decrypt/адмін тепер грає й бот — хай сід визначає все
gold_rng.seed = int(args[0]) if args.size() > 0 else 1
if DIFF != 1:
g.run("difficulty " + g.T.DIFF_IDS[DIFF])
var m_prev := -1
@@ -141,6 +143,10 @@ func act(cmd: String) -> void:
var n0: int = g.log_lines.size()
var dl0: int = g.deadline
g.run(cmd)
if GOLD and cmd != "grab" and g.gold < 0 and not g.over and gold_rng.randf() < g.T.GOLD_CHANCE:
g.gold = g.time + g.T.GOLD_SECS
bump("пакет")
act("grab")
if CMDS and g.missions[g.mission].has("limit"): # BAL_CMDS=1 — кожна дія термінових глав
print(" > %-22s термін %d→%d трасування %.0f захист %d" % [cmd, dl0, g.deadline, g.trace, lv])
for l in g.log_lines.slice(mini(n0, g.log_lines.size())):
@@ -151,6 +157,8 @@ func act(cmd: String) -> void:
if "Злам перервано" in t and lv: lvl_guess[lv][2] += 1
if "змінив" in t and "пароль" in t: bump("зміна пароля")
if "ПОДІЯ" in t: bump("подій")
if "ВАРТОВИЙ:" in t: bump("бан")
if "Протидія до кінця акту: " in t: bump("протидія " + t.split("Протидія до кінця акту: ")[1].split(" ")[0])
if t.begins_with("!!!"): print(" 🚨 %s (глава %d, команда %s, захист %d)" % [t, g.mission + 1, cmd, lv])
func step() -> void:
@@ -199,6 +207,25 @@ func step() -> void:
var CMDS := OS.get_environment("BAL_CMDS") != ""
var MINI := OS.get_environment("BAL_MINI") != ""
var DUEL := OS.get_environment("BAL_DUEL") # smart — грає проти читання ядра, rand — навмання
var GOLD := OS.get_environment("BAL_GOLD") != "" # ловить кожен золотий пакет (верхня межа його вигоди)
var gold_rng := RandomNumberGenerator.new()
func duel() -> void:
act("duel")
while g.mg != null and g.mg["kind"] == "duel" and g.cur != null:
var mv: String = ["a", "s", "d"][gold_rng.randi() % 3]
if DUEL == "smart": # ядро б'є мій улюблений хід — я б'ю його відповідь
var fav := ""
for k in ["a", "s", "d"]:
if g.habits.get("d_" + k, 0) >= 2 and (fav == "" or g.habits.get("d_" + k, 0) > g.habits.get("d_" + fav, 0)):
fav = k
if fav != "":
var B: Dictionary = g.Minigames.BEATS
var c: String = B.keys().filter(func(x): return B[x] == fav)[0]
mv = B.keys().filter(func(x): return B[x] == c)[0]
act(mv)
bump("дуель " + ("так" if g.cur != null and g.cur.get("dict_bonus", 0) > 0 else "ні"))
# міні-ігри перед зламом: фаєрвол перебором (≤ 7 перемикачів), словник — лише слова, сумісні з відповідями
func minigames() -> void:
@@ -386,6 +413,10 @@ func visit(s, files: Array, upload := false) -> void:
minigames()
if g.cur == null:
return
if DUEL != "" and s["lvl"] >= g.T.DUEL_FROM and g.Variety.gate(g) == "" and g.Minigames.can_play(g, "duel"):
duel()
if g.cur == null:
return
if g.Variety.has_ice(g, s):
if g.bm["ex"].get("ice", 0):
act("exploit ice")

View File

@@ -783,7 +783,7 @@ func _run() -> void:
var W = load("res://whatsnew.gd")
ok(W.pending("1.0.61", "1.0.62").map(func(c): return c[0]) == ["1.0.62"], "що нового: лише версії після побаченої")
ok(W.pending("1.0.62", "1.0.62").is_empty() and W.pending("1.0.200", "1.0.300").is_empty(), "що нового: нічого нового — без вікна")
ok(W.pending("1.0.9", "1.0.10").is_empty() and W.pending("1.0.58", "1.0.59").size() == 4, "що нового: версії порівнюються числами")
ok(W.pending("1.0.9", "1.0.10").is_empty() and W.pending("1.0.58", "1.0.59").size() == 4 and W._v("1.1.0") > W._v("1.0.99"), "що нового: версії порівнюються числами")
ok(W.pending("", "9.0.0").size() == mini(W.MAX_ITEMS, W.CHANGES.size()), "що нового: без позначки — останні пункти")
var wsorted := true
for i in W.CHANGES.size():

View File

@@ -14,7 +14,8 @@ func _initialize() -> void:
func _run() -> void:
var bad := 0
for c in [["v1.0.4", "1.0.3", true], ["v1.0.10", "1.0.9", true], ["v1.0.3", "1.0.3", false],
["v1.0.2", "1.0.3", false], ["v2.0", "1.9.9", true], ["v1.0.3.1", "1.0.3", true]]:
["v1.0.2", "1.0.3", false], ["v2.0", "1.9.9", true], ["v1.0.3.1", "1.0.3", true],
["v1.1.0", "1.0.99", true], ["v1.0.100", "1.0.99", true], ["v1.0.99", "1.1.0", false]]:
if U.newer(c[0], c[1]) != c[2]:
print("FAIL newer", c)
bad += 1

View File

@@ -1 +1 @@
62edba5640db26c21132ea522dcb417c1a9cae6506eb57082efe1e1cd8393ecb
2af54dd23e6242de9ce1ada61d9ea13c4cf58dc4b9daf5d936e18dbb245aecdd

View File

@@ -26,9 +26,10 @@ minizip = "no"
brotli = "no"
graphite = "no"
# engine classes the game never uses (2D nodes, animation, extra GUI and audio): template.gdbuild, passed in build_template.sh
# GDScript, fonts (FreeType + HarfBuzz shaping), SVG for the default theme icons, mbedTLS for HTTPS in the updater
# GDScript, fonts (FreeType + HarfBuzz shaping), SVG for the default theme icons, mbedTLS for HTTPS in the updater, RegEx for the glossary
module_gdscript_enabled = "yes"
module_freetype_enabled = "yes"
module_text_server_adv_enabled = "yes"
module_svg_enabled = "yes"
module_mbedtls_enabled = "yes"
module_regex_enabled = "yes"

View File

@@ -109,7 +109,7 @@ const WATCH_FAILS := 3 # помилок на шарі за один
const WATCH_BAN := 6 # дій бану (інший маршрут — і вартовий тебе не впізнає)
const HABIT_MIN := 3 # звичка менша за це — у звіті загрози "ще не розгадав"
const HABIT_HINT := 1.5 # протидія звичці: підказка дорожча
const HABIT_WIPE := 1.5 # wipe гучніший
const HABIT_WIPE := 1.25 # wipe гучніший (v1.1.1: 1.5 → 1.25 — wipe роблять на кожному сервері, тож протидія майже завжди б'є по ньому; ×1.5 просаджувало Звичайний 37 → 33 з 40, глава 41)
const HABIT_BRUTE := 1.15 # помилка коду дорожча
const HABIT_MINI := 5 # +% трасування на старті міні-гри
const GOLD_CHANCE := 0.03 # шанс золотого пакета після дії

View File

@@ -8,6 +8,7 @@ const Updater = preload("res://updater.gd")
const MAX_ITEMS := 8 # коротко: вікно має влазити й з великим шрифтом
const CHANGES := [
["1.1.1", "Баланс: протидія ручному wipe м'якша (×1.25 трасування замість ×1.5).", "Balance: the counter to manual wipe is softer (×1.25 trace instead of ×1.5)."],
["1.0.99", "Словничок: терміни в терміналі (порт, лог, бекдор, експлойт…) підкреслено — наведи мишу, щоб прочитати пояснення. Увесь список — glossary.", "Glossary: terms in the terminal (port, log, backdoor, exploit…) are underlined — hover to read the explanation. The full list — glossary."],
["1.0.99", "Польові нотатки: після кожної з перших 16 глав — коротко, як це влаштовано в реальному світі і як від цього захищаються.", "Field notes: after each of the first 16 chapters, a short note on how it works in the real world and how people defend against it."],
["1.0.98", "Вартовий на серверах із захистом 3–6: забагато хибних кодів за раз — бан IP на кілька дій. Зачекай або зайди іншим маршрутом.", "A watchdog on defence 3–6 servers: too many wrong codes in one go bans your IP for a few actions. Wait it out or come in by another route."],