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:
@@ -30,7 +30,7 @@ const createNpcGeneral = (
|
||||
specialWar: null,
|
||||
},
|
||||
triggerState: { flags: {}, counters: {}, modifiers: {}, meta: {} },
|
||||
meta: {},
|
||||
meta: { killturn: 800 },
|
||||
officerLevel,
|
||||
experience: 0,
|
||||
dedication: 0,
|
||||
|
||||
@@ -40,7 +40,7 @@ const createNpcGeneral = (
|
||||
specialWar: null,
|
||||
},
|
||||
triggerState: { flags: {}, counters: {}, modifiers: {}, meta: {} },
|
||||
meta: {},
|
||||
meta: { killturn: 800 },
|
||||
officerLevel: 1,
|
||||
experience: 0,
|
||||
dedication: 0,
|
||||
|
||||
@@ -30,7 +30,7 @@ const createNpcGeneral = (
|
||||
specialWar: null,
|
||||
},
|
||||
triggerState: { flags: {}, counters: {}, modifiers: {}, meta: {} },
|
||||
meta: {},
|
||||
meta: { killturn: 800 },
|
||||
officerLevel,
|
||||
experience: 0,
|
||||
dedication: 0,
|
||||
|
||||
@@ -27,7 +27,7 @@ const createNpcGeneral = (
|
||||
specialWar: null,
|
||||
},
|
||||
triggerState: { flags: {}, counters: {}, modifiers: {}, meta: {} },
|
||||
meta: {},
|
||||
meta: { killturn: 800 },
|
||||
officerLevel: 1,
|
||||
experience: 0,
|
||||
dedication: 0,
|
||||
|
||||
@@ -29,7 +29,7 @@ const createNpcGeneral = (
|
||||
specialWar: null,
|
||||
},
|
||||
triggerState: { flags: {}, counters: {}, modifiers: {}, meta: {} },
|
||||
meta: {},
|
||||
meta: { killturn: 800 },
|
||||
officerLevel,
|
||||
experience: 0,
|
||||
dedication: 0,
|
||||
|
||||
@@ -28,7 +28,7 @@ const createNpcGeneral = (
|
||||
specialWar: null,
|
||||
},
|
||||
triggerState: { flags: {}, counters: {}, modifiers: {}, meta: {} },
|
||||
meta: {},
|
||||
meta: { killturn: 800 },
|
||||
officerLevel,
|
||||
experience: 0,
|
||||
dedication: 0,
|
||||
|
||||
@@ -93,7 +93,7 @@ describe('Reserved Turn Execution Integration', () => {
|
||||
specialWar: null,
|
||||
},
|
||||
triggerState: { flags: {}, counters: {}, modifiers: {}, meta: {} },
|
||||
meta: {},
|
||||
meta: { killturn: 800 },
|
||||
officerLevel: 5,
|
||||
experience: 0,
|
||||
dedication: 0,
|
||||
@@ -122,7 +122,7 @@ describe('Reserved Turn Execution Integration', () => {
|
||||
specialWar: null,
|
||||
},
|
||||
triggerState: { flags: {}, counters: {}, modifiers: {}, meta: {} },
|
||||
meta: {},
|
||||
meta: { killturn: 800 },
|
||||
officerLevel: 5,
|
||||
experience: 0,
|
||||
dedication: 0,
|
||||
@@ -340,7 +340,7 @@ describe('Reserved Turn Execution Integration', () => {
|
||||
specialWar: null,
|
||||
},
|
||||
triggerState: { flags: {}, counters: {}, modifiers: {}, meta: {} },
|
||||
meta: {},
|
||||
meta: { killturn: 800 },
|
||||
officerLevel: 5,
|
||||
experience: 0,
|
||||
dedication: 0,
|
||||
@@ -480,7 +480,7 @@ describe('Reserved Turn Execution Integration', () => {
|
||||
specialWar: null,
|
||||
},
|
||||
triggerState: { flags: {}, counters: {}, modifiers: {}, meta: {} },
|
||||
meta: {},
|
||||
meta: { killturn: 800 },
|
||||
officerLevel: 5,
|
||||
experience: 0,
|
||||
dedication: 0,
|
||||
@@ -646,7 +646,7 @@ describe('Reserved Turn Execution Integration', () => {
|
||||
specialWar: null,
|
||||
},
|
||||
triggerState: { flags: {}, counters: {}, modifiers: {}, meta: {} },
|
||||
meta: {},
|
||||
meta: { killturn: 24 },
|
||||
officerLevel: 5,
|
||||
experience: 0,
|
||||
dedication: 0,
|
||||
@@ -675,7 +675,7 @@ describe('Reserved Turn Execution Integration', () => {
|
||||
specialWar: null,
|
||||
},
|
||||
triggerState: { flags: {}, counters: {}, modifiers: {}, meta: {} },
|
||||
meta: {},
|
||||
meta: { killturn: 24 },
|
||||
officerLevel: 5,
|
||||
experience: 0,
|
||||
dedication: 0,
|
||||
@@ -947,7 +947,7 @@ describe('Reserved Turn Execution Integration', () => {
|
||||
specialWar: null,
|
||||
},
|
||||
triggerState: { flags: {}, counters: {}, modifiers: {}, meta: {} },
|
||||
meta: {},
|
||||
meta: { killturn: 24 },
|
||||
officerLevel: 5,
|
||||
experience: 0,
|
||||
dedication: 0,
|
||||
@@ -976,7 +976,7 @@ describe('Reserved Turn Execution Integration', () => {
|
||||
specialWar: null,
|
||||
},
|
||||
triggerState: { flags: {}, counters: {}, modifiers: {}, meta: {} },
|
||||
meta: {},
|
||||
meta: { killturn: 24 },
|
||||
officerLevel: 5,
|
||||
experience: 0,
|
||||
dedication: 0,
|
||||
|
||||
@@ -21,7 +21,7 @@ const buildGeneral = (id: number, turnTime: Date): TurnGeneral => ({
|
||||
specialWar: null,
|
||||
},
|
||||
triggerState: { flags: {}, counters: {}, modifiers: {}, meta: {} },
|
||||
meta: {},
|
||||
meta: { killturn: 24 },
|
||||
officerLevel: 5,
|
||||
experience: 0,
|
||||
dedication: 0,
|
||||
|
||||
Reference in New Issue
Block a user