From 57312f176d8bcd8a3d9e4cfe3782b3493a254219 Mon Sep 17 00:00:00 2001 From: Denis Ranneft Date: Sun, 5 Apr 2026 20:02:06 +0300 Subject: [PATCH] reduce mosnter chance, reduce DoT --- backend/internal/tuning/runtime.go | 2 +- frontend/src/game/engine.ts | 27 +++------------------------ frontend/src/game/renderer.ts | 10 +++++----- 3 files changed, 9 insertions(+), 30 deletions(-) diff --git a/backend/internal/tuning/runtime.go b/backend/internal/tuning/runtime.go index c5d7c3c..6397e7f 100644 --- a/backend/internal/tuning/runtime.go +++ b/backend/internal/tuning/runtime.go @@ -323,7 +323,7 @@ func DefaultValues() Values { MerchantCostBase: 900, MerchantCostPerLevel: 5, MerchantTownAutoSellShare: 0.30, - MonsterEncounterWeightBase: 0.62, + MonsterEncounterWeightBase: 0.15, MonsterEncounterWeightWildBonus: 0.18, MerchantEncounterWeightBase: 0.02, MerchantEncounterWeightRoadBonus: 0.05, diff --git a/frontend/src/game/engine.ts b/frontend/src/game/engine.ts index 5f7070c..6a9a33b 100644 --- a/frontend/src/game/engine.ts +++ b/frontend/src/game/engine.ts @@ -770,17 +770,6 @@ export class GameEngine { this._notifyStateChange(); } - /** Replace debuffs from server snapshot. */ - patchHeroDebuffs(debuffs: HeroState['debuffs']): void { - const hero = this._gameState.hero; - if (!hero) return; - this._gameState = { - ...this._gameState, - hero: { ...hero, debuffs }, - }; - this._notifyStateChange(); - } - /** Apply or refresh a single debuff from WS. */ applyDebuffApplied(type: DebuffType, durationMs: number, expiresAtMs?: number): void { const hero = this._gameState.hero; @@ -813,16 +802,6 @@ export class GameEngine { this._notifyStateChange(); } - /** Apply a full server state override (used for backward compat). */ - applyServerState(state: GameState): void { - this._gameState = { - ...state, - lastVictoryLoot: - state.lastVictoryLoot ?? this._gameState.lastVictoryLoot, - }; - this._notifyStateChange(); - } - // ---- Lifecycle ---- /** Initialize the engine and attach to the DOM */ @@ -1094,10 +1073,10 @@ export class GameEngine { this.renderer.drawEnemy( state.enemy.position.x, state.enemy.position.y, - state.enemy.hp, - state.enemy.maxHp, + // state.enemy.hp, + // state.enemy.maxHp, state.enemy.enemySlug, - state.enemy.enemyArchetype, + // state.enemy.enemyArchetype, now, ); } else { diff --git a/frontend/src/game/renderer.ts b/frontend/src/game/renderer.ts index f0f7a5b..d6387f9 100644 --- a/frontend/src/game/renderer.ts +++ b/frontend/src/game/renderer.ts @@ -3,7 +3,7 @@ import { TILE_WIDTH, TILE_HEIGHT, MAP_ZOOM } from '../shared/constants'; import { getViewport } from '../shared/telegram'; import type { Camera } from './camera'; import type { TownData, NPCData, BuildingData, TownObjectData } from './types'; -import { drawEnemyHpBarOnly } from './enemyVisuals'; +// import { drawEnemyHpBarOnly } from './enemyVisuals'; import { GameSpriteRegistry } from './assets/gameSpriteRegistry'; import { buildingTypeToTextureKey, @@ -880,10 +880,10 @@ export class GameRenderer { drawEnemy( wx: number, wy: number, - hp: number, - maxHp: number, + // hp: number, + // maxHp: number, enemySlug: string, - enemyArchetype: string | undefined, + // enemyArchetype: string | undefined, now: number, ): void { const gfx = this._enemyGfx; @@ -913,7 +913,7 @@ export class GameRenderer { entry.sprite.scale.set(targetH / th); entry.sprite.zIndex = cy + 90; entry.sprite.visible = true; - drawEnemyHpBarOnly(gfx, enemySlug, enemyArchetype, cx, cy, hp, maxHp); + // drawEnemyHpBarOnly(gfx, enemySlug, enemyArchetype, cx, cy, hp, maxHp); return; }