Commit Graph

31 Commits

Author SHA1 Message Date
bridge
bf13cdf2d2 fix: incorrect relationship for new avatar 2026-01-19 21:14:20 +08:00
Zihao Xu
7edae9188b fix(misc): CSV column name mismatches in data loading (#32)
* fix: CSV column name mismatches in data loading

- sect.py: Fix headquarter_name/headquarter_desc -> name/desc when reading sect_region.csv
- sect.py: Move sid initialization before technique lookup to fix unbound variable bug
- technique.py: Change sect (name) to sect_id (int) to match technique.csv column
- elixir.py: Remove redundant get_int(row, "id") that reads non-existent column

These fixes ensure:
1. Sect headquarters display correct location names (e.g., "大千光极城" instead of "不夜城")
2. Sect techniques are correctly associated and displayed
3. Technique sect restrictions work properly

* fix: update main.py to use sect_id, add CSV loading tests

- main.py: Change technique.sect to technique.sect_id in API response
- Add tests/test_csv_loading.py to verify CSV column names match code

* test: add API test for /api/meta/game_data endpoint

Verify that techniques in API response use sect_id field (not sect)

* fix: add None check for hq_region in AvatarFactory

Remove redundant code that adds sect headquarters to known_regions.
This logic is already handled by Avatar._init_known_regions() which
uses sect_id matching (more reliable than name-based lookup).

The removed code was causing a flaky test (~1% failure rate) because
resolve_query returns None in test environments with simplified maps.
2026-01-18 15:31:15 +08:00
4thfever
63fc2f828e Feat/auction (#30)
Add gathering events, in which multiple avatars participate
Add auction event

Closes #24
2026-01-14 02:33:13 +08:00
Zihao Xu
37518342fc fix: prevent character age from exceeding realm lifespan on creation 2026-01-07 01:08:12 -08:00
bridge
fbb32adbf6 refactor normalize and resolution 2026-01-06 22:13:47 +08:00
bridge
f499f63c50 update 2026-01-03 22:05:45 +08:00
bridge
7197dd1acb refactor equip 2025-12-31 23:18:47 +08:00
bridge
39f158bbe8 update death 2025-12-01 02:05:11 +08:00
bridge
1aaa4d4094 add relationship in front 2025-12-01 01:16:02 +08:00
bridge
a5d2b192fe update relationship 2025-12-01 01:03:10 +08:00
bridge
6c941c2393 refactor new avatar 2025-11-25 01:12:06 +08:00
bridge
8f3f095c27 refactor new avatars 2025-11-25 01:06:56 +08:00
bridge
ebd4f8be18 add new avatar button and func 2025-11-25 00:17:12 +08:00
bridge
befd158c46 fix bug 2025-11-22 20:56:41 +08:00
bridge
efba680269 update more weapons 2025-11-14 12:54:35 +08:00
bridge
510b6f34cd update more effects 2025-11-14 12:18:59 +08:00
bridge
3d60df4dbf update treasure to weapon and auxiliary 2025-11-13 01:54:46 +08:00
bridge
125d7891e5 update treasure to weapon and auxiliary 2025-11-13 01:34:09 +08:00
bridge
e760ba107d update treasure to weapon and auxiliary 2025-11-13 01:16:26 +08:00
bridge
9949265748 merge persona and traits & add rarity 2025-11-11 23:07:36 +08:00
bridge
d8cb9389fb add sect ranks 2025-11-08 02:42:28 +08:00
bridge
d1c440bb5f add trait 2025-11-03 00:16:45 +08:00
bridge
c5c6c640b7 refactor name logic 2025-11-02 21:01:30 +08:00
bridge
8a7523caea update name logic 2025-10-25 21:26:36 +08:00
bridge
974366bafe update 2025-10-25 01:34:16 +08:00
bridge
e30a46d55c add define action func 2025-10-25 01:26:24 +08:00
bridge
30d5372608 refactor new avatar from mortal 2025-10-24 01:48:48 +08:00
bridge
7c63aba0c7 add detailed relation 2025-10-24 01:36:18 +08:00
bridge
c3f4f1c182 refactor relation strs 2025-10-24 01:31:45 +08:00
bridge
67180b3343 update resolve 2025-10-21 23:17:34 +08:00
bridge
a002d1bd70 add treasures 2025-10-19 01:33:22 +08:00