Files
西风逍遥游andCursor Agent c0d9fe4a7d test(hex): 程序化六边形关卡套件(FOV / 光照 / 寻路 / 拾取 / 粒子) (#50)
* test(hex): add procedural hex dungeon levels for engine QA

Cross-module simulation levels exercise hex tilemap procgen, FOV,
2D lighting, spatial pickup + inventory, and particles. Includes a
playable examples/hex-levels demo with level select and a pipeline crawl.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* test(hex): expand levels 06–15 and fog-raid pipeline

Add Flow Field swarm, cell-cost detours, multi-revealer perception,
FoW mask/algorithms, camera pick, dual-grid, procgen variants,
QuadTree cull, multi-light, particle/stash transfer, and a fog-raid
pipeline. Update the playable hex-levels demo for levels 6–9.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* test(hex): add fixture JSON data and data-driven hex tests

Expand catalog/items/loot/seeds/perception fixtures, handcrafted maps,
and particle configs. Wire the hex-levels demo to load items and particle
JSON plus fixtures.nut loot tables. Register hex_level_data.cpp coverage.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* test(hex): fix data fixtures assertions for zeroerr and sparse gens

Avoid CHECK_EQ on bag->addItem (double-eval), and only enforce minWalkable
on dungeon.bsp in the seeds matrix smoke.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* feat(hex): boot each level from distinct catalog configs

Enrich catalog/fixtures with per-level FOV, light, cell-cost, and enable
flags. Wire examples/hex-levels to apply those boot settings on level
switch. Add hex.data.catalog.bootEachLevelDistinctConfig to verify each
catalog entry starts with its own applied configuration.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* docs(hex): note per-level boot configs in data README

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* test(hex): add levels 16–20 and extra data-driven coverage

Expand simulation with facing-cone FOV, flow+cell-cost, seed
reproducibility, corner peek, equipment equip, and torchEscort /
catalogRaid pipelines. Add fixture tests for perception gates, all loot
tables, enable-flag consistency, seed path samples, map markers,
defaults, equipment slots, and mist particles on dungeon.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* docs(hex): clarify expanded test coverage in README

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* test(hex): add levels 21–25 and broader fixture validation

Cover hex world↔tile roundtrip, FOV memory clear, findGroupPath,
multi-algo FOV smoke, blocked-cell sync, and costlyFogPickup pipeline.
Add data tests for loot/item referential integrity, feature tags,
particle schema, algorithm registration, ring-door path, categories,
detection margin, and door walkability.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* feat(hex): expand catalog to 31 levels (0–30) and playable cycle

Add levels 16–30 with distinct boot configs (facing cone, flow+cost,
maze/WFC/drunkard, mist particles, raid combo). Regenerate fixtures.nut
with LEVEL_IDS; main.nut cycles all catalog levels via N/B. Add
simulation cases 26–30 and catalog presence tests.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* fix(hex): harden level 02/17 against non-portable procgen paths

macOS CI failed hex.level.02.dynamicFov (empty path) and
hex.level.17.flowPlusCellCost (path length == 2) because spawn↔exit
layouts from DTL/std distributions differ across libstdc++ vs libc++.
Use handcrafted hex maps so FOV memory and flow+cost assertions are
platform-stable.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-08-13 11:54:41 +08:00

238 lines
3.9 KiB
JSON

[
{
"id": "hex.potion",
"displayName": "六角药水",
"maxStack": 10,
"weight": 0.2,
"volume": 0.1,
"category": "consumable",
"tags": [
"loot",
"potion",
"consumable"
],
"extra": {
"heal": "25",
"rarity": "common"
}
},
{
"id": "hex.key",
"displayName": "黄铜钥匙",
"maxStack": 1,
"weight": 0.1,
"volume": 0.05,
"category": "key",
"tags": [
"loot",
"key"
],
"extra": {
"rarity": "uncommon"
}
},
{
"id": "hex.gem",
"displayName": "地牢宝石",
"maxStack": 5,
"weight": 0.05,
"volume": 0.02,
"category": "treasure",
"tags": [
"loot",
"gem",
"treasure"
],
"extra": {
"value": "50",
"rarity": "rare"
}
},
{
"id": "hex.ore",
"displayName": "星铁矿",
"maxStack": 20,
"weight": 1.0,
"volume": 0.3,
"category": "material",
"tags": [
"loot",
"material",
"ore"
],
"extra": {
"rarity": "common"
}
},
{
"id": "hex.relic",
"displayName": "迷雾圣物",
"maxStack": 1,
"weight": 0.5,
"volume": 0.2,
"category": "quest",
"tags": [
"loot",
"quest",
"relic"
],
"extra": {
"stealth": "0.5",
"rarity": "legendary"
}
},
{
"id": "hex.torch",
"displayName": "树脂火把",
"maxStack": 5,
"weight": 0.4,
"volume": 0.15,
"category": "tool",
"tags": [
"loot",
"tool",
"light"
],
"extra": {
"lightRadius": "120",
"rarity": "common"
}
},
{
"id": "hex.map_fragment",
"displayName": "地图残页",
"maxStack": 9,
"weight": 0.05,
"volume": 0.01,
"category": "quest",
"tags": [
"loot",
"quest",
"map"
],
"extra": {
"rarity": "uncommon"
}
},
{
"id": "hex.ration",
"displayName": "干粮",
"maxStack": 15,
"weight": 0.3,
"volume": 0.2,
"category": "consumable",
"tags": [
"loot",
"food",
"consumable"
],
"extra": {
"stamina": "10",
"rarity": "common"
}
},
{
"id": "hex.crystal",
"displayName": "视野水晶",
"maxStack": 3,
"weight": 0.15,
"volume": 0.08,
"category": "tool",
"tags": [
"loot",
"tool",
"fov"
],
"extra": {
"fovBonus": "2",
"rarity": "rare"
}
},
{
"id": "hex.coin",
"displayName": "六角币",
"maxStack": 99,
"weight": 0.01,
"volume": 0.01,
"category": "currency",
"tags": [
"loot",
"currency"
],
"extra": {
"value": "1",
"rarity": "common"
}
},
{
"id": "hex.scroll",
"displayName": "迷雾卷轴",
"maxStack": 5,
"weight": 0.1,
"volume": 0.05,
"category": "consumable",
"tags": [
"loot",
"scroll",
"consumable"
],
"extra": {
"fovReveal": "3",
"rarity": "uncommon"
}
},
{
"id": "hex.boots",
"displayName": "疾行靴",
"maxStack": 1,
"weight": 0.8,
"volume": 0.4,
"category": "equip",
"equipSlot": "feet",
"tags": [
"loot",
"equip",
"boots"
],
"extra": {
"speed": "1.2",
"rarity": "rare"
}
},
{
"id": "hex.shield",
"displayName": "六角盾",
"maxStack": 1,
"weight": 2.0,
"volume": 0.8,
"category": "equip",
"equipSlot": "offhand",
"tags": [
"loot",
"equip",
"shield"
],
"extra": {
"block": "5",
"rarity": "uncommon"
}
},
{
"id": "hex.bomb",
"displayName": "爆破药包",
"maxStack": 3,
"weight": 0.6,
"volume": 0.25,
"category": "consumable",
"tags": [
"loot",
"bomb",
"consumable"
],
"extra": {
"damage": "40",
"rarity": "rare"
}
}
]