{
  "version": "game-calculations-v1",
  "kind": "game_design_assumption",
  "note": "試作単位。史実の個人被害・価格・通貨換算・税率の実測値ではありません。",
  "economy": {
    "id": "trial-economy-v3",
    "kind": "game_design_assumption",
    "unit": "試作単位",
    "workDays": 240,
    "workBlockDays": 20,
    "wage": {
      "田畑の仕事": 3,
      "商いと家業": 4,
      "奉公と家の務め": 3,
      "漁と季節の仕事": 4,
      "手仕事と注文": 4,
      "大工": 5
    },
    "workCost": 1,
    "travelFare": 3,
    "travelLodging": 2,
    "childSetup": 3
  },
  "disasterProfiles": {
    "trade-disruption": {
      "healthLoss": 0,
      "happinessLoss": 2,
      "maxCashCost": 1,
      "assetLossRate": 0,
      "workPenalty": 1,
      "durationYears": 0.5
    },
    "migration-pressure": {
      "healthLoss": 0,
      "happinessLoss": 2,
      "maxCashCost": 2,
      "assetLossRate": 0,
      "workPenalty": 0,
      "durationYears": 1
    },
    "food-price": {
      "healthLoss": 0,
      "happinessLoss": 3,
      "maxCashCost": 1,
      "assetLossRate": 0,
      "workPenalty": 0,
      "durationYears": 0.5
    },
    "quake": {
      "healthLoss": 8,
      "happinessLoss": 10,
      "maxCashCost": 3,
      "assetLossRate": 0.2,
      "workPenalty": 1,
      "durationYears": 0.5
    },
    "famine": {
      "healthLoss": 6,
      "happinessLoss": 6,
      "maxCashCost": 2,
      "assetLossRate": 0,
      "workPenalty": 1,
      "durationYears": 1
    }
  },
  "responseProfiles": {
    "care": {
      "cost": 2,
      "health": 4,
      "bond": 0,
      "happiness": 0
    },
    "together": {
      "cost": 0,
      "health": 0,
      "bond": 3,
      "happiness": 2
    }
  },
  "equipmentCatalog": [
    {
      "id": "bedding",
      "starter": true,
      "name": "寝具と日々の身支度",
      "category": "家財・農具・道具",
      "price": 5,
      "repair": 1,
      "annualWear": 7,
      "role": "comfort",
      "from": 1542,
      "to": 1930,
      "description": "傷むと休養しにくくなる。直すと休養の効果が戻る。"
    },
    {
      "id": "farm-tools",
      "starter": true,
      "name": "鍬・鎌などの農具",
      "category": "家財・農具・道具",
      "price": 8,
      "repair": 2,
      "annualWear": 10,
      "role": "work",
      "jobs": [
        "田畑の仕事"
      ],
      "from": 1542,
      "to": 1930,
      "description": "手入れされた農具は仕事の収入＋1。壊れると収入−1。"
    },
    {
      "id": "trade-tools",
      "starter": true,
      "name": "商いの道具と帳面",
      "category": "家財・農具・道具",
      "price": 8,
      "repair": 2,
      "annualWear": 9,
      "role": "work",
      "jobs": [
        "商いと家業"
      ],
      "from": 1542,
      "to": 1930,
      "description": "良い状態なら仕事の収入＋1。使えなくなると収入−1。"
    },
    {
      "id": "fishing-tools",
      "starter": true,
      "name": "網・釣具などの漁具",
      "category": "家財・農具・道具",
      "price": 8,
      "repair": 2,
      "annualWear": 12,
      "role": "work",
      "jobs": [
        "漁と季節の仕事"
      ],
      "from": 1542,
      "to": 1930,
      "description": "使うたびに消耗する。良好なら仕事の収入＋1、破損で−1。"
    },
    {
      "id": "carpentry-tools",
      "starter": true,
      "name": "鋸・鉋などの大工道具",
      "category": "家財・農具・道具",
      "price": 9,
      "repair": 2,
      "annualWear": 10,
      "role": "work",
      "jobs": [
        "大工"
      ],
      "from": 1542,
      "to": 1930,
      "description": "良好なら仕事の収入＋1。壊れたままでは収入−1。"
    },
    {
      "id": "craft-tools",
      "starter": true,
      "name": "生業の道具と仕事着",
      "category": "家財・農具・道具",
      "price": 7,
      "repair": 2,
      "annualWear": 9,
      "role": "work",
      "jobs": [
        "手仕事と注文",
        "奉公と家の務め",
        "勤めと家計"
      ],
      "from": 1542,
      "to": 1930,
      "description": "生業に使う道具の簡略モデル。良好で収入＋1、破損で−1。"
    },
    {
      "id": "andon",
      "name": "行灯などの灯り道具",
      "category": "家財",
      "price": 6,
      "repair": 1,
      "annualWear": 7,
      "role": "comfort",
      "from": 1603,
      "to": 1930,
      "description": "家の灯りを得る耐久品。価格・消耗はゲーム用モデル。",
      "source": {
        "label": "国立歴史民俗博物館監修「住まいの道具と衣類」",
        "url": "https://www.kinnohoshi.co.jp/search/info.php?isbn=9784323057170",
        "claim": "あんどん等の住まいの道具を扱う。価格や購入率の根拠ではない。"
      }
    },
    {
      "id": "abacus",
      "name": "算盤・帳面",
      "category": "学び・商いの道具",
      "price": 7,
      "repair": 1,
      "annualWear": 6,
      "role": "learning",
      "from": 1643,
      "to": 1930,
      "description": "帳面付けや算用の練習道具。学びの選択で知識＋1（モデル）。",
      "source": {
        "label": "国立歴史民俗博物館 khirin・算盤（二ツ玉）",
        "url": "https://khirin.rekihaku.ac.jp/pid/nmjh_collection/H-686-65-23.html",
        "claim": "1643年の算盤資料。普及率・価格は示さない。"
      }
    },
    {
      "id": "bicycle",
      "name": "自転車",
      "category": "移動・大きな所有物",
      "price": 18,
      "repair": 4,
      "annualWear": 8,
      "role": "travel",
      "from": 1887,
      "to": 1930,
      "description": "状態が保たれている間、移動を選ぶ旅費を軽減する（モデル）。",
      "source": {
        "label": "博物館明治村・明治の年表",
        "url": "https://www.meijimura.com/about/history/",
        "claim": "1887年に大型二輪車（自転車）が流行した記載。所有率・価格は示さない。"
      }
    },
    {
      "id": "radio",
      "name": "ラジオ受信機",
      "category": "家財・娯楽",
      "price": 35,
      "repair": 7,
      "annualWear": 7,
      "role": "leisure",
      "from": 1925,
      "to": 1930,
      "description": "休養・家族との時間で幸福＋1（モデル）。放送地域や普及率は未反映。",
      "source": {
        "label": "NHK放送100年プロジェクト",
        "url": "https://note.com/nhk_pr/n/ndadf747898da",
        "claim": "日本のラジオ放送は1925年に開始。受信機の価格・所有率とは別の情報。"
      }
    }
  ],
  "equipmentRules": {
    "kind": "game_design_assumption",
    "saleRate": 0.6,
    "repairConditionGain": 45,
    "goodConditionThreshold": 60,
    "workBonus": 1,
    "brokenPenalty": 1,
    "perWorkWear": 3,
    "decisionFrequency": "1回/年。最初の年は年内18%、以降25%で提示。選択待ちで停止。"
  },
  "contracts": [
    {
      "id": "cash-v1",
      "operation": "cash",
      "inputs": [
        "balance:試作単位>=0",
        "income:試作単位>=0",
        "cost:試作単位>=0",
        "capCost:boolean"
      ],
      "formula": "after = balance + income - paid; paid = capCost ? min(balance + income, cost) : cost",
      "invariant": "after-before = income-paid; allowed = after>=0",
      "example": {
        "args": [
          10,
          3,
          2
        ],
        "expected": {
          "after": 11,
          "net": 1
        }
      }
    },
    {
      "id": "stat-v1",
      "operation": "stat",
      "inputs": [
        "value:0..100",
        "delta:points"
      ],
      "formula": "after = min(100,max(0,value+delta)); actualDelta = after-value",
      "invariant": "効果表示と台帳にはactualDeltaを使う",
      "example": {
        "args": [
          99,
          4
        ],
        "expected": {
          "after": 100,
          "delta": 1
        }
      }
    },
    {
      "id": "impairment-v1",
      "operation": "impairment",
      "inputs": [
        "value:試作資産単位>=0",
        "rate:0..1"
      ],
      "formula": "loss = min(value,ceil(value*rate)); after = value-loss",
      "invariant": "評価額の損失は現金支出・債務返済と混同しない",
      "example": {
        "args": [
          11,
          0.2
        ],
        "expected": {
          "after": 8,
          "loss": 3
        }
      }
    },
    {
      "id": "work-income-v1",
      "operation": "workIncome",
      "inputs": [
        "base:試作単位>=0",
        "penalties:非負の配列"
      ],
      "formula": "penalty = min(base,max(0,...penalties)); income = base-penalty",
      "invariant": "重複は最大値。無給の手伝いは無給のまま",
      "example": {
        "args": [
          5,
          [
            1,
            1
          ]
        ],
        "expected": {
          "income": 4,
          "penalty": 1
        }
      }
    },
    {
      "id": "asset-totals-v1",
      "operation": "totals",
      "inputs": [
        "balance:試作単位>=0",
        "assets:[{value}]",
        "debts:[{balance}]"
      ],
      "formula": "gross = balance + sum(asset.value); net = gross - sum(debt.balance)",
      "invariant": "純資産は負になり得る。資産移転で世帯現金を作らない",
      "example": {
        "args": [
          10,
          [
            {
              "value": 20
            }
          ],
          [
            {
              "balance": 40
            }
          ]
        ],
        "expected": {
          "gross": 30,
          "net": -10
        }
      }
    }
  ]
}
