-- Combat balance defaults (hero scaling, pace, enemy damage, level-up cadence) + burn DoT magnitude.
-- Merges into existing JSON so other keys are preserved.

UPDATE runtime_config
SET
    payload = payload || '{
        "combatDamageScale": 0.432,
        "combatDamageRollMin": 0.60,
        "combatDamageRollMax": 1.10,
        "enemyCombatDamageScale": 1.34,
        "enemyCombatDamageRollMin": 0.82,
        "enemyCombatDamageRollMax": 1.0,
        "enemyDodgeChance": 0.14,
        "combatPaceMultiplier": 9,
        "minAttackIntervalMs": 250,
        "levelUpHpEvery": 4,
        "levelUpHpBase": 10,
        "levelUpAtkEvery": 4,
        "levelUpDefEvery": 5,
        "levelUpStrEvery": 12,
        "levelUpConEvery": 14,
        "levelUpAgiEvery": 20,
        "levelUpLuckEvery": 100,
        "enemyScaleBandHp": 0.062,
        "enemyScaleOvercapHp": 0.031,
        "enemyScaleBandAtk": 0.044,
        "enemyScaleOvercapAtk": 0.024,
        "enemyScaleBandDef": 0.038,
        "enemyScaleOvercapDef": 0.020
    }'::jsonb,
    updated_at = now()
WHERE id = TRUE;

UPDATE buff_debuff_config
SET
    payload = jsonb_set(
        payload::jsonb,
        '{debuffs,burn,magnitude}',
        '0.018'::jsonb,
        true
    ),
    updated_at = now()
WHERE id = TRUE;
