generated from nhcarrigan/template
feat: sync and patch all content stats on existing saves (#130)
## Summary - Sync New Content now **injects** missing entries AND **patches canonical fields** on all existing entries to match current defaults - Adventurers: stats (baseCost, combatPower, goldPerSecond, essencePerSecond, name, class, level) - Quests: duration, prerequisites, combat requirement, rewards - Bosses: HP, damage, rewards, prestige requirement, upgrade rewards - Zones: unlock conditions (boss/quest required) - Upgrades: multiplier, costs - Equipment: bonus, cost, set membership - Achievements: condition, reward - Crafting: multipliers recomputed from `craftedRecipeIds` so recipe balance changes apply retroactively Closes #126 ## Test plan - [ ] On an existing save, click Sync New Content and verify the notification reports patched counts for all content types - [ ] Verify that rebalanced adventurer/boss/upgrade stats are reflected in the UI after syncing - [ ] Verify that player-owned state (counts, unlock status, boss HP, quest status) is preserved after syncing - [ ] Verify crafting multipliers are correct after syncing if any recipes were previously crafted ✨ This issue was created with help from Hikari~ 🌸 Reviewed-on: #130 Co-authored-by: Hikari <hikari@nhcarrigan.com> Co-committed-by: Hikari <hikari@nhcarrigan.com>
This commit was merged in pull request #130.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
* @license Naomi's Public License
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
/* eslint-disable max-lines -- API types file grows with each new endpoint */
|
||||
import type {
|
||||
EquipmentBonus,
|
||||
EquipmentRarity,
|
||||
@@ -468,6 +469,11 @@ interface SyncNewContentResponse {
|
||||
*/
|
||||
adventurersAdded: number;
|
||||
|
||||
/**
|
||||
* Number of existing adventurer entries whose stats were patched to match current defaults.
|
||||
*/
|
||||
adventurerStatsPatched: number;
|
||||
|
||||
/**
|
||||
* Number of upgrades added to the save.
|
||||
*/
|
||||
@@ -513,6 +519,41 @@ interface SyncNewContentResponse {
|
||||
*/
|
||||
explorationAreasAdded: number;
|
||||
|
||||
/**
|
||||
* Number of achievements whose stats were updated to match current defaults.
|
||||
*/
|
||||
achievementsPatched: number;
|
||||
|
||||
/**
|
||||
* Number of bosses whose stats were updated to match current defaults.
|
||||
*/
|
||||
bossesPatched: number;
|
||||
|
||||
/**
|
||||
* Number of crafted recipes whose multiplier contribution was reapplied during recompute.
|
||||
*/
|
||||
craftingRecipesReapplied: number;
|
||||
|
||||
/**
|
||||
* Number of equipment items whose stats were updated to match current defaults.
|
||||
*/
|
||||
equipmentPatched: number;
|
||||
|
||||
/**
|
||||
* Number of quests whose stats were updated to match current defaults.
|
||||
*/
|
||||
questsPatched: number;
|
||||
|
||||
/**
|
||||
* Number of upgrades whose stats were updated to match current defaults.
|
||||
*/
|
||||
upgradesPatched: number;
|
||||
|
||||
/**
|
||||
* Number of zones whose stats were updated to match current defaults.
|
||||
*/
|
||||
zonesPatched: number;
|
||||
|
||||
/**
|
||||
* HMAC-SHA256 signature of the updated state for anti-cheat chain continuity.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user