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:
@@ -122,6 +122,7 @@ const mapGeneralPayload = (payload: BattleSimJobPayload['attackerGeneral']): Gen
|
||||
meta: payload.inheritBuff ? { inheritBuff: JSON.stringify(payload.inheritBuff) } : {},
|
||||
},
|
||||
meta: {
|
||||
killturn: 24,
|
||||
explevel: payload.explevel,
|
||||
turnTime: payload.turntime,
|
||||
recentWar: payload.recent_war ?? '',
|
||||
|
||||
Reference in New Issue
Block a user