Weather changes on time; repeat rolls lengthen the spell

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-10-19 18:33:50 +01:00
parent 5bcf26f379
commit 0b7e4a722f
3 changed files with 41 additions and 8 deletions

View file

@ -681,15 +681,14 @@ function siteBanner() {
// "Rain: farming 10% faster. Clear skies in 3h 20m."
function weatherTip(w) {
const next = w.next === w.kind ? `Staying ${w.name.toLowerCase()}` : w.next_name;
return `${w.name}: ${w.text.charAt(0).toLowerCase()}${w.text.slice(1)}. ${next} in ${dur(w.until - serverNow())}.`;
return `${w.name}: ${w.text.charAt(0).toLowerCase()}${w.text.slice(1)}. ${w.next_name} in ${dur(w.until - serverNow())}.`;
}
function weatherCard() {
const h = S.happenings, w = h.weather;
return `<div class="stat" title="${esc(`${weatherTip(w)} Weather changes every few hours; each season lasts a week.`)}"><div class="k">${h.season.icon} ${h.season.name}, day ${h.season.day}</div>
<div class="v">${w.icon} <small>${esc(w.name)}</small></div>
<div class="note">${w.next === w.kind ? `Staying ${esc(w.name.toLowerCase())}` : `${w.next_icon} ${esc(w.next_name)}`} in ${countdown(w.until)}</div></div>`;
<div class="note">${w.next_icon} ${esc(w.next_name)} in ${countdown(w.until)}</div></div>`;
}
// Everything going on in the city right now, and what anyone can do about it.