Fix SummonToken tile-filter validation: reject bad picks before costs are paid
Three bugs fixed for abilities like Demonate Leviathan (SummonToken + TileFilter):
1. Server: AbilityUsesThisTurn was incremented (and costs paid) before effect-level
TileFilter validation ran. Added PreValidateClientTileTargets() called before the
use-count increment so an invalid tile pick wastes no uses and no sacrificed tokens.
2. Server: SummonToken silently break'd when TileFilter or token-affinity check failed,
giving the client no error. Changed both to throw GameException("INVALID_TILE").
3. Client: tile_passes_filters() only checked the target selector's filters, not the
effect-level TileFilter (e.g. SummonToken.tileFilter). Added _collect_effect_tile_filters()
and TileAffinityMatches handling so invalid tiles are never highlighted or accepted.
Also includes: Art2dUrl/ModelUrl deltas in GameStateDiffer/GameMessages/GameEngine,
unit_mesh_builder token-model URL fallback + shader/tint helpers, ModelCache v3 bump,
Game.gd unit delta merging for art2dUrl/modelUrl.
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -17,7 +17,7 @@ extends Node
|
||||
## stale .bin files from the old scheme are purged on first launch.
|
||||
|
||||
const _CACHE_DIR := "user://remote_model_cache"
|
||||
const _CACHE_VER := "v2" # bump this when the disk-key scheme changes
|
||||
const _CACHE_VER := "v3" # bump this when cached GLBs need to be re-fetched
|
||||
|
||||
# On web exports, direct CDN fetches are blocked by CORS (Ceph RadosGW doesn't send
|
||||
# Access-Control-Allow-Origin). Route through the game server proxy instead.
|
||||
|
||||
Reference in New Issue
Block a user