Private
Public Access
1
0

feat(gameplay): Adding % bonus for planet type

This commit is contained in:
gauvainboiche
2026-03-30 15:43:43 +02:00
parent c0f66d8cc0
commit 3b229755f8
10 changed files with 548 additions and 81 deletions

View File

@@ -65,3 +65,31 @@ export async function apiTickEconScores(seed, blue, red) {
if (!res.ok) throw new Error("econ_tick_failed");
return res.json();
}
export async function apiFetchElementBonus() {
const res = await fetch("/api/element-bonus");
if (!res.ok) throw new Error("element_bonus_fetch_failed");
return res.json();
}
export async function apiTickElementBonus(seed, blue, red) {
const res = await fetch("/api/element-bonus/tick", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ seed, blue, red }),
});
if (!res.ok) throw new Error("element_bonus_tick_failed");
return res.json();
}
export async function apiFetchDbInfo() {
const res = await fetch("/api/db-info");
if (!res.ok) throw new Error("db_info_fetch_failed");
return res.json();
}
export async function apiFetchVictoryPoints() {
const res = await fetch("/api/victory-points");
if (!res.ok) throw new Error("vp_fetch_failed");
return res.json();
}