feat(currency_wars): complete systems, settlement Rank SS, damage report, camera and recovery fixes

This commit is contained in:
CAtlas0784 committed 2026-10-31 20:47:36 +07:00
1 parent c008243f11
commit 0995055296
78 files changed
+33840 -9525

No files matched your search

+5 -7
View File
@@ -53,15 +53,13 @@ func (p *CurrencyWarsCardPool) ReserveOwned(c *CurrencyWarsCatalog, id, star uin
copies := uint64(1)
for s := base.DefaultStar; s < star; s++ {
copies *= uint64(rules.Copies)
if copies > uint64(entry.Capacity) {
return fmt.Errorf("CW owned copies exceed pool capacity")
}
}
if copies > uint64(entry.Remaining) {
return fmt.Errorf("CW pool exhausted for %d", id)
if copies >= uint64(entry.Remaining) {
entry.Remaining = 0
} else {
entry.Remaining -= uint32(copies)
}
entry.Remaining -= uint32(copies)
entry.Disabled = entry.Disabled || star >= rules.OrdinaryMaxStar
entry.Disabled = entry.Disabled || star >= rules.OrdinaryMaxStar || entry.Remaining == 0
p.Roles[id] = entry
return nil
}