diff --git a/zenno/src/lib/data/convo.ts b/zenno/src/lib/data/convo.ts index 7df53cd..dd25494 100644 --- a/zenno/src/lib/data/convo.ts +++ b/zenno/src/lib/data/convo.ts @@ -32,7 +32,25 @@ export interface Conversation { /** * Some unknown number in the game's local database. */ - condition_type: 0 | 1 | 2 | 3 | 4; + condition_type: Required; +} + +export enum Required { + None = 0, + All = 1, + Chara1 = 2, + Chara2 = 3, + Chara3 = 4, +} + +export function requiredCharas(c: Conversation): number[] { + switch (c.condition_type) { + case Required.None: return [] + case Required.All: return [c.chara_1, c.chara_2, c.chara_3].filter((id) => id != null); + case Required.Chara1: return [c.chara_1]; + case Required.Chara2: return [c.chara_2!]; + case Required.Chara3: return [c.chara_3!]; + } } export async function conversation(): Promise { diff --git a/zenno/src/routes/chara/convo/+page.svelte b/zenno/src/routes/chara/convo/+page.svelte index d7bb9f8..a7a04cc 100644 --- a/zenno/src/routes/chara/convo/+page.svelte +++ b/zenno/src/routes/chara/convo/+page.svelte @@ -1,6 +1,6 @@

Lobby Conversations

@@ -53,37 +53,39 @@ -{#await suggested} -
Loading...
-{:then suggested} - {#if cur} -
-
- {cur1Name}{alone} - {#if cur2Name} - {cur2Name} - {/if} - {#if cur3Name} - {cur3Name} - {/if} +{#if cur} +
+
+ {cur1Name} + {#if cur2Name} + {cur2Name} + {/if} + {#if cur3Name} + {cur3Name} + {/if} +
+
+ at {curLoc?.name.en} +
+ {#if req.length > 0} +
+ + The conversation will not appear unless you own a trainee or support card of all characters with names in italics. +
-
- at {curLoc?.name.en} -
-
-
- Other characters who appear here most often: -
-
- {#each suggested as s (s.chara_id)} - {s.chara_name?.en}: {s.count}× - {/each} -
-
- - Set these characters to fixed positions (main, upgrades, story, races) to maximize the chance of getting this - conversation. - -
- {/if} -{/await} + {/if} +
+
+ Other characters who appear here most often: +
+
+ {#each suggested as s (s.chara_id)} + {s.chara_name?.en}: {s.count}× + {/each} +
+
+ + Set these characters to fixed positions (main, upgrades, story, races) to maximize the chance of getting this conversation. + +
+{/if}