+ Subj. setShowingExplanation({ role: "king", item: "subject" })}>{roleIcon.king}
+ {(rendered && rendered.whatsAdjustable !== "servant") &&
+ adjustVps({ type: "toggle king remove" })} className="mx-2 clickable">
+ {!VPS?.form.removeKing ? "🚫" : "🙈"}
+
+ }
+
:
- Subject
+ Subj.
{` `}
setShowingExplanation({ role: "servant", item: "subject" })}>{roleIcon.servant}
{` `}
@@ -117,6 +124,7 @@ function VPPicker({ opts, vps, onChange, entryFeeder }: {
onChange={handleSubjectChange}
opts={opts}
isShrunk={(servantIsShrunk && roles.servant === "subject")}
+ isRemoved={roles.king === "subject" && VPS?.form.removeKing}
/>
: (vps.verb && block?.type === "objectSelection" && block.selection !== "none")
?
@@ -130,9 +138,16 @@ function VPPicker({ opts, vps, onChange, entryFeeder }: {
: setShowingExplanation({ role: "king", item: "object" })}>Object {roleIcon.king}
+ ?
+ Obj. setShowingExplanation({ role: "king", item: "object" })}>{roleIcon.king}
+ {(rendered && rendered.whatsAdjustable !== "servant") &&
+ adjustVps({ type: "toggle king remove" })} className="mx-2 clickable">
+ {!VPS?.form.removeKing ? "🚫" : "🙈"}
+
+ }
+
:
- Object
+ Obj.
{` `}
setShowingExplanation({ role: "servant", item: "object" })}>{roleIcon.servant}
{` `}
@@ -141,6 +156,11 @@ function VPPicker({ opts, vps, onChange, entryFeeder }: {
{!servantIsShrunk ? "🪄" : "👶"}
}
+ {(rendered && rendered.whatsAdjustable !== "servant") &&
+ adjustVps({ type: "toggle king remove" })} className="mx-2 clickable">
+ {!VPS?.form.removeKing ? "🚫" : "🙈"}
+
+ }
}
entryFeeder={entryFeeder}
role="object"
@@ -149,6 +169,7 @@ function VPPicker({ opts, vps, onChange, entryFeeder }: {
onChange={handleObjectChange}
opts={opts}
isShrunk={(servantIsShrunk && roles.servant === "object")}
+ isRemoved={roles.king === "object" && VPS?.form.removeKing}
/>}
: null}
diff --git a/src/components/vp-explorer/vps-reducer.ts b/src/components/vp-explorer/vps-reducer.ts
index 26347e0..8c38759 100644
--- a/src/components/vp-explorer/vps-reducer.ts
+++ b/src/components/vp-explorer/vps-reducer.ts
@@ -53,6 +53,8 @@ export type VpsReducerAction = {
} | {
type: "toggle servant shrink",
} | {
+ type: "toggle king remove",
+} |{
type: "set verb",
payload: T.VerbEntry,
} | {
@@ -251,6 +253,15 @@ export function vpsReducer(vps: T.VPSelectionState, action: VpsReducerAction, se
},
};
}
+ if (action.type === "toggle king remove") {
+ return {
+ ...vps,
+ form: {
+ ...vps.form,
+ removeKing: !vps.form.removeKing,
+ },
+ };
+ }
if (action.type === "set verb") {
return makeVPSelectionState(action.payload, vps);
}
diff --git a/src/lib/misc-helpers.ts b/src/lib/misc-helpers.ts
index 0d62e6d..b7f3177 100644
--- a/src/lib/misc-helpers.ts
+++ b/src/lib/misc-helpers.ts
@@ -163,6 +163,15 @@ export function getEnglishPersonInfo(person: T.Person, version?: "short" | "long
return `${p} ${n}. ${g}.`;
}
+export function getEnglishParticipleInflection(person: T.Person, version?: "short" | "long"): string {
+ const number = personIsPlural(person) ? "plural" : "singular";
+ const n = version === "short"
+ ? (number === "plural" ? "plur." : "sing.") : number;
+ const gender = personGender(person);
+ const g = gender;
+ return `${g}. ${n}`;
+}
+
export function randomNumber(minInclusive: number, maxExclusive: number): number {
return Math.floor(Math.random() * (maxExclusive - minInclusive) + minInclusive);
}