(level)
| 1106 | |
| 1107 | /* ---- spec(level): every number the builder needs, derived from one knob ---- */ |
| 1108 | function spec(level){ |
| 1109 | const t=(level-1)/11; |
| 1110 | const radius=snapR(2.4+11.6*Math.pow(t,1.05)); // 2.7 → 14.4 on the ring grid |
| 1111 | return { |
| 1112 | level, radius, |
| 1113 | rings: Math.round(radius/RING_W), |
| 1114 | /* UNLOCK GATES, not counts. How many of a family exist is decided by how |
| 1115 | much of its lattice falls inside the coast and under the fill threshold — |
| 1116 | and both of those only ever open further. */ |
| 1117 | cottages: level<2?0:1, |
| 1118 | towers: level<6?0:Math.round((level-4)/2), // capped per realm in build() |
| 1119 | halls: level<6?0:level<10?1:2, |
| 1120 | trees: level<2?0:1, |
| 1121 | lamps: level<2?0:1, |
| 1122 | gardens: level<4?0:1, |
| 1123 | fill: clamp(0.58+level*0.038,0.58,1), |
| 1124 | pond: level>=5, |
| 1125 | falls: level>=7, |
| 1126 | expand: level>=9, |
| 1127 | undercroft: level<10?0:Math.round(radius*1.1), |
| 1128 | great: level>=11, |
| 1129 | arch: level>=3, |
| 1130 | signature: level>=3, |
| 1131 | banners: level>=3, |
| 1132 | life: level>=6?Math.min(3+level,14):0, |
| 1133 | motes: 3+level*3, |
| 1134 | }; |
| 1135 | } |
| 1136 | |
| 1137 | /* --------------------------------------------------------------- terraces */ |
| 1138 | /* One ring of land. Geometry depends only on j — never on the island's current |
no test coverage detected