feat: add killturn to general meta and update related tests

- Introduced a new meta property `killturn` to the GeneralMeta interface.
- Implemented a function `readMetaNumber` to handle the retrieval of numeric values from meta.
- Updated the `mapGeneralRow` function to ensure `killturn` is required and properly handled.
- Modified various tests to include the `killturn` property in the general's meta data.
- Adjusted related action files to utilize the new GeneralMeta type for better type safety.
- Ensured backward compatibility by updating existing test cases across multiple scenarios.
This commit is contained in:
2026-01-25 05:48:56 +00:00
parent 340cadb8ce
commit 5d5ed9ee2a
39 changed files with 164 additions and 99 deletions
@@ -85,7 +85,7 @@ const buildGeneral = (id: number, nationId: number, cityId: number, name = 'Test
modifiers: {},
meta: {},
},
meta: {},
meta: { killturn: 24 },
});
const buildCity = (id: number, nationId: number): City => ({
@@ -50,7 +50,7 @@ const buildGeneral = (id: number, nationId: number, cityId: number, name = 'Test
modifiers: {},
meta: {},
},
meta: {},
meta: { killturn: 24 },
});
const buildCity = (id: number, nationId: number): City => ({
@@ -105,7 +105,7 @@ const buildGeneral = (id: number, nationId: number, cityId: number, name = 'Test
modifiers: {},
meta: {},
},
meta: {},
meta: { killturn: 24 },
});
const buildCity = (id: number, nationId: number, name = `City${id}`): City => ({