"Hold on —": cautions before easy-to-regret plays, and a house bot tier
An optional confirmation (on by default, one checkbox to silence) catches the classic table groans before they land: ending the turn with movement unspent, ending it with a hand too full to take the draw, and walking off — or ending on — your own home with a deliverable treasure still in your arms. Preferences also learn a default automaton skill, remembered from either the prefs panel or the lobby's tier picker. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
bde68aa85c
commit
6e1ccb0195
@@ -14,12 +14,19 @@ export interface Prefs {
|
||||
wizardName: string;
|
||||
/** Preferred wizard color (0-5), claimed in lobbies when free. */
|
||||
color: number | null;
|
||||
/** "Are you sure?" prompts before easy-to-regret plays. */
|
||||
cautions: boolean;
|
||||
/** Default skill for automatons seated from the lobby. */
|
||||
botTier: "apprentice" | "adept" | "archmage";
|
||||
}
|
||||
|
||||
const KEY = "wizwar-prefs";
|
||||
|
||||
function load(): Prefs {
|
||||
const fallback: Prefs = { art: "photo", autoGrab: false, flourishes: true, wizardName: "", color: null };
|
||||
const fallback: Prefs = {
|
||||
art: "photo", autoGrab: false, flourishes: true, wizardName: "", color: null,
|
||||
cautions: true, botTier: "adept",
|
||||
};
|
||||
try {
|
||||
const raw = localStorage.getItem(KEY);
|
||||
if (!raw) return fallback;
|
||||
@@ -30,6 +37,8 @@ function load(): Prefs {
|
||||
flourishes: p.flourishes !== false,
|
||||
wizardName: typeof p.wizardName === "string" ? p.wizardName.slice(0, 20) : "",
|
||||
color: typeof p.color === "number" && p.color >= 0 && p.color <= 5 ? p.color : null,
|
||||
cautions: p.cautions !== false,
|
||||
botTier: p.botTier === "apprentice" || p.botTier === "archmage" ? p.botTier : "adept",
|
||||
};
|
||||
} catch {
|
||||
return fallback;
|
||||
|
||||
Reference in New Issue
Block a user