feat: Cards writings and balancing (M8)

This commit is contained in:
gauvainboiche
2026-10-25 18:30:43 +01:00
parent 04193e2013
commit c2103c32e7
43 changed files with 25930 additions and 397 deletions
+3
View File
@@ -19,6 +19,8 @@ export function computeFiscal(state, bal) {
const e = state.economy;
let revenue = e.otherRevenue;
for (const id of TAX_IDS) revenue += taxRevenue(id, e.taxes[id], bal);
// Receipts follow the cycle: a slump costs revenue, a boom adds some.
revenue += (bal.fiscal?.growthSens ?? 0) * (e.growth - state.ref.vars.growth);
const debtRatio = (e.debt / e.gdp) * 100;
const rate = interestRate(debtRatio, bal);
@@ -85,4 +87,5 @@ export function setBudget(state, bal, { alloc = {}, taxes = {} } = {}) {
export function confirmBudget(state) {
state.pending.review = false;
state.risk.emergency = false;
}