feat: add sortie contribution feedback
This commit is contained in:
@@ -45,6 +45,10 @@ export type BattleSaveUnitStats = {
|
||||
defeats: number;
|
||||
actions: number;
|
||||
support: number;
|
||||
sortieBonusDamage?: number;
|
||||
sortiePreventedDamage?: number;
|
||||
sortieBonusHealing?: number;
|
||||
sortieExtendedBondTriggers?: number;
|
||||
};
|
||||
|
||||
export type BattleSaveState = {
|
||||
@@ -512,10 +516,18 @@ function isOptionalStatsRecord(value: unknown, options: BattleSaveValidationOpti
|
||||
isBattleUnitStatValue(stats.damageTaken) &&
|
||||
isBattleUnitStatValue(stats.defeats) &&
|
||||
isBattleUnitStatValue(stats.actions) &&
|
||||
isBattleUnitStatValue(stats.support)
|
||||
isBattleUnitStatValue(stats.support) &&
|
||||
isOptionalBattleUnitStatValue(stats.sortieBonusDamage) &&
|
||||
isOptionalBattleUnitStatValue(stats.sortiePreventedDamage) &&
|
||||
isOptionalBattleUnitStatValue(stats.sortieBonusHealing) &&
|
||||
isOptionalBattleUnitStatValue(stats.sortieExtendedBondTriggers)
|
||||
);
|
||||
}
|
||||
|
||||
function isOptionalBattleUnitStatValue(value: unknown) {
|
||||
return value === undefined || isBattleUnitStatValue(value);
|
||||
}
|
||||
|
||||
function isOptionalEnemyUsableUseKeyArray(value: unknown, battleId: string, options: BattleSaveValidationOptions) {
|
||||
return (
|
||||
value === undefined ||
|
||||
|
||||
Reference in New Issue
Block a user