feat(gameplay): Adding % bonus for planet type
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user