Merge branch 'feature/requirement-skill-dropdown'
@@ -229,6 +229,7 @@
229
229
<h2>Select placeable</h2>
230
230
<button id="palette-close" type="button">Close</button>
231
231
</header>
232
<input id="palette-search" type="search" placeholder="Search by name…" autocomplete="off">
232
233
<div id="palette-tabs" class="settings-tabs" role="tablist"></div>
233
234
<div id="palette-panels"></div>
234
235
</div>
@@ -229,6 +229,7 @@229
<h2>Select placeable</h2>229
<h2>Select placeable</h2>230
<button id="palette-close" type="button">Close</button>230
<button id="palette-close" type="button">Close</button>231
</header>231
</header>232
<input id="palette-search" type="search" placeholder="Search by name…" autocomplete="off">232
<div id="palette-tabs" class="settings-tabs" role="tablist"></div>233
<div id="palette-tabs" class="settings-tabs" role="tablist"></div>233
<div id="palette-panels"></div>234
<div id="palette-panels"></div>234
</div>235
</div>@@ -1,6 +1,11 @@
1
1
import { ConditionKind, emptyConditionSet, normalizeConditionSet } from "/shared/quests/conditions.js";
2
2
import { itemDefinition, listAllItemPickerEntries } from "/shared/definitions/items.js";
3
3
import { listSpawnableMobTypes } from "/shared/definitions/mobs.js";
4
import {
5
isMetaSkillId,
6
listSkillRequirementOptions,
7
MetaSkillId
8
} from "/shared/definitions/skills.js";
4
9
import { createDimensionCombobox } from "./dimensionCombobox.js";
5
10
import { OVERWORLD_ID } from "/shared/world/dimensions.js";
6
11
@@ -226,15 +231,8 @@ export function renderConditionSet (when, onChange, ctx = {})
226
231
}
227
232
else if (cond.kind === ConditionKind.skillLevelAtLeast)
228
233
{
229
row.append(miniField("skillId", cond.skillId ?? "", (v) =>
234
row.append(skillRequirementFields(cond, () =>
230
235
{
231
cond.skillId = v;
232
set.all[index].condition = cond;
233
bump(false);
234
}));
235
row.append(miniField("level", cond.level ?? 1, (v) =>
236
{
237
cond.level = Math.max(1, Math.min(99, Number(v) || 1));
238
236
set.all[index].condition = cond;
239
237
bump(false);
240
238
}));
@@ -767,10 +765,76 @@ function defaultCondition (kind)
767
765
case ConditionKind.staminaPercentAtLeast:
768
766
return { kind, percent: 50 };
769
767
case ConditionKind.skillLevelAtLeast:
770
return { kind, skillId: "attack", level: 1 };
768
return { kind, skillId: MetaSkillId.combatLevel, level: 1 };
771
769
case ConditionKind.interactBlock:
772
770
return { kind, dimensionId: OVERWORLD_ID, tileX: 0, tileY: 0 };
773
771
default:
774
772
return { kind };
775
773
}
776
774
}
775
776
function skillRequirementFields (cond, onChange)
777
{
778
const wrap = document.createElement("span");
779
wrap.style.display = "inline-flex";
780
wrap.style.gap = "0.35rem";
781
wrap.style.alignItems = "center";
782
wrap.style.flexWrap = "wrap";
783
784
const skillLabel = document.createElement("label");
785
skillLabel.textContent = "skill ";
786
const select = document.createElement("select");
787
const options = listSkillRequirementOptions();
788
const current = String(cond.skillId ?? MetaSkillId.combatLevel);
789
let found = false;
790
for (const entry of options)
791
{
792
const opt = document.createElement("option");
793
opt.value = entry.skillId;
794
opt.textContent = entry.displayName;
795
if (entry.skillId === current)
796
{
797
opt.selected = true;
798
found = true;
799
}
800
select.append(opt);
801
}
802
if (!found && current)
803
{
804
const opt = document.createElement("option");
805
opt.value = current;
806
opt.textContent = current;
807
opt.selected = true;
808
select.append(opt);
809
}
810
select.addEventListener("change", () =>
811
{
812
cond.skillId = select.value;
813
const max = isMetaSkillId(cond.skillId) ? 99_999 : 99;
814
cond.level = Math.max(1, Math.min(max, Number(cond.level) || 1));
815
levelInput.max = String(max);
816
levelInput.value = String(cond.level);
817
onChange();
818
});
819
skillLabel.append(select);
820
821
const levelLabel = document.createElement("label");
822
levelLabel.textContent = "level ";
823
const levelInput = document.createElement("input");
824
levelInput.type = "number";
825
levelInput.min = "1";
826
const maxLevel = isMetaSkillId(cond.skillId) ? 99_999 : 99;
827
levelInput.max = String(maxLevel);
828
levelInput.value = String(cond.level ?? 1);
829
levelInput.style.width = "5rem";
830
levelInput.addEventListener("input", () =>
831
{
832
const max = isMetaSkillId(cond.skillId) ? 99_999 : 99;
833
cond.level = Math.max(1, Math.min(max, Number(levelInput.value) || 1));
834
onChange();
835
});
836
levelLabel.append(levelInput);
837
838
wrap.append(skillLabel, levelLabel);
839
return wrap;
840
}
@@ -1,6 +1,11 @@1
import { ConditionKind, emptyConditionSet, normalizeConditionSet } from "/shared/quests/conditions.js";1
import { ConditionKind, emptyConditionSet, normalizeConditionSet } from "/shared/quests/conditions.js";2
import { itemDefinition, listAllItemPickerEntries } from "/shared/definitions/items.js";2
import { itemDefinition, listAllItemPickerEntries } from "/shared/definitions/items.js";3
import { listSpawnableMobTypes } from "/shared/definitions/mobs.js";3
import { listSpawnableMobTypes } from "/shared/definitions/mobs.js";4
import {5
isMetaSkillId,6
listSkillRequirementOptions,7
MetaSkillId8
} from "/shared/definitions/skills.js";4
import { createDimensionCombobox } from "./dimensionCombobox.js";9
import { createDimensionCombobox } from "./dimensionCombobox.js";5
import { OVERWORLD_ID } from "/shared/world/dimensions.js";10
import { OVERWORLD_ID } from "/shared/world/dimensions.js";6
11
@@ -226,15 +231,8 @@ export function renderConditionSet (when, onChange, ctx = {})226
}231
}227
else if (cond.kind === ConditionKind.skillLevelAtLeast)232
else if (cond.kind === ConditionKind.skillLevelAtLeast)228
{233
{229
row.append(miniField("skillId", cond.skillId ?? "", (v) =>234
row.append(skillRequirementFields(cond, () =>230
{235
{231
cond.skillId = v;232
set.all[index].condition = cond;233
bump(false);234
}));235
row.append(miniField("level", cond.level ?? 1, (v) =>236
{237
cond.level = Math.max(1, Math.min(99, Number(v) || 1));238
set.all[index].condition = cond;236
set.all[index].condition = cond;239
bump(false);237
bump(false);240
}));238
}));@@ -767,10 +765,76 @@ function defaultCondition (kind)767
case ConditionKind.staminaPercentAtLeast:765
case ConditionKind.staminaPercentAtLeast:768
return { kind, percent: 50 };766
return { kind, percent: 50 };769
case ConditionKind.skillLevelAtLeast:767
case ConditionKind.skillLevelAtLeast:770
return { kind, skillId: "attack", level: 1 };768
return { kind, skillId: MetaSkillId.combatLevel, level: 1 };771
case ConditionKind.interactBlock:769
case ConditionKind.interactBlock:772
return { kind, dimensionId: OVERWORLD_ID, tileX: 0, tileY: 0 };770
return { kind, dimensionId: OVERWORLD_ID, tileX: 0, tileY: 0 };773
default:771
default:774
return { kind };772
return { kind };775
}773
}776
}774
}775
776
function skillRequirementFields (cond, onChange)777
{778
const wrap = document.createElement("span");779
wrap.style.display = "inline-flex";780
wrap.style.gap = "0.35rem";781
wrap.style.alignItems = "center";782
wrap.style.flexWrap = "wrap";783
784
const skillLabel = document.createElement("label");785
skillLabel.textContent = "skill ";786
const select = document.createElement("select");787
const options = listSkillRequirementOptions();788
const current = String(cond.skillId ?? MetaSkillId.combatLevel);789
let found = false;790
for (const entry of options)791
{792
const opt = document.createElement("option");793
opt.value = entry.skillId;794
opt.textContent = entry.displayName;795
if (entry.skillId === current)796
{797
opt.selected = true;798
found = true;799
}800
select.append(opt);801
}802
if (!found && current)803
{804
const opt = document.createElement("option");805
opt.value = current;806
opt.textContent = current;807
opt.selected = true;808
select.append(opt);809
}810
select.addEventListener("change", () =>811
{812
cond.skillId = select.value;813
const max = isMetaSkillId(cond.skillId) ? 99_999 : 99;814
cond.level = Math.max(1, Math.min(max, Number(cond.level) || 1));815
levelInput.max = String(max);816
levelInput.value = String(cond.level);817
onChange();818
});819
skillLabel.append(select);820
821
const levelLabel = document.createElement("label");822
levelLabel.textContent = "level ";823
const levelInput = document.createElement("input");824
levelInput.type = "number";825
levelInput.min = "1";826
const maxLevel = isMetaSkillId(cond.skillId) ? 99_999 : 99;827
levelInput.max = String(maxLevel);828
levelInput.value = String(cond.level ?? 1);829
levelInput.style.width = "5rem";830
levelInput.addEventListener("input", () =>831
{832
const max = isMetaSkillId(cond.skillId) ? 99_999 : 99;833
cond.level = Math.max(1, Math.min(max, Number(levelInput.value) || 1));834
onChange();835
});836
levelLabel.append(levelInput);837
838
wrap.append(skillLabel, levelLabel);839
return wrap;840
}@@ -11,8 +11,10 @@ export function initPaletteModal ({ onSelect, catalog, imageUrlFor })
11
11
const modal = document.getElementById("palette-modal");
12
12
const tabs = document.getElementById("palette-tabs");
13
13
const panels = document.getElementById("palette-panels");
14
const searchInput = document.getElementById("palette-search");
14
15
let open = false;
15
16
let activeTab = "grounds";
17
let searchQuery = "";
16
18
17
19
const tabsSpec = [
18
20
{ id: "grounds", label: "Ground tiles" },
@@ -26,7 +28,21 @@ export function initPaletteModal ({ onSelect, catalog, imageUrlFor })
26
28
backdrop.hidden = !visible;
27
29
modal.hidden = !visible;
28
30
if (visible)
29
{ render(); }
31
{
32
searchQuery = "";
33
if (searchInput)
34
{ searchInput.value = ""; }
35
render();
36
searchInput?.focus();
37
}
38
}
39
40
function matchesSearch (label)
41
{
42
const q = searchQuery.trim().toLowerCase();
43
if (!q)
44
{ return true; }
45
return String(label ?? "").toLowerCase().includes(q);
30
46
}
31
47
32
48
function render ()
@@ -49,10 +65,14 @@ export function initPaletteModal ({ onSelect, catalog, imageUrlFor })
49
65
panels.innerHTML = "";
50
66
const grid = document.createElement("div");
51
67
grid.className = "palette-grid";
68
let shown = 0;
52
69
if (activeTab === "grounds")
53
70
{
54
71
for (const def of listPlaceableGrounds())
55
72
{
73
if (!matchesSearch(def.displayName))
74
{ continue; }
75
shown += 1;
56
76
const state = defaultStateForType(catalog, "ground", def.key);
57
77
const name = spriteImageName("ground", def.key, resolveState(
58
78
catalog.grounds?.[def.key]?.states ?? [],
@@ -74,6 +94,9 @@ export function initPaletteModal ({ onSelect, catalog, imageUrlFor })
74
94
{
75
95
for (const entry of listPlaceableBlockPaletteEntries(catalog))
76
96
{
97
if (!matchesSearch(entry.displayName))
98
{ continue; }
99
shown += 1;
77
100
grid.append(tileCard({
78
101
label: entry.displayName,
79
102
url: imageUrlFor?.(entry.spriteName),
@@ -93,6 +116,9 @@ export function initPaletteModal ({ onSelect, catalog, imageUrlFor })
93
116
{
94
117
for (const def of listSpawnableMobTypes())
95
118
{
119
if (!matchesSearch(def.displayName))
120
{ continue; }
121
shown += 1;
96
122
grid.append(tileCard({
97
123
label: def.displayName,
98
124
url: imageUrlFor?.(mobSpriteName(def.mobTypeId)),
@@ -104,12 +130,27 @@ export function initPaletteModal ({ onSelect, catalog, imageUrlFor })
104
130
}));
105
131
}
106
132
}
107
panels.append(grid);
133
if (shown === 0)
134
{
135
const empty = document.createElement("p");
136
empty.className = "hint";
137
empty.textContent = searchQuery.trim()
138
? "No matches for that search."
139
: "Nothing to show.";
140
panels.append(empty);
141
}
142
else
143
{ panels.append(grid); }
108
144
}
109
145
110
146
document.getElementById("open-palette").addEventListener("click", () => show(true));
111
147
document.getElementById("palette-close").addEventListener("click", () => show(false));
112
148
backdrop.addEventListener("click", () => show(false));
149
searchInput?.addEventListener("input", () =>
150
{
151
searchQuery = searchInput.value ?? "";
152
render();
153
});
113
154
114
155
return {
115
156
isOpen: () => open,
@@ -11,8 +11,10 @@ export function initPaletteModal ({ onSelect, catalog, imageUrlFor })11
const modal = document.getElementById("palette-modal");11
const modal = document.getElementById("palette-modal");12
const tabs = document.getElementById("palette-tabs");12
const tabs = document.getElementById("palette-tabs");13
const panels = document.getElementById("palette-panels");13
const panels = document.getElementById("palette-panels");14
const searchInput = document.getElementById("palette-search");14
let open = false;15
let open = false;15
let activeTab = "grounds";16
let activeTab = "grounds";17
let searchQuery = "";16
18
17
const tabsSpec = [19
const tabsSpec = [18
{ id: "grounds", label: "Ground tiles" },20
{ id: "grounds", label: "Ground tiles" },@@ -26,7 +28,21 @@ export function initPaletteModal ({ onSelect, catalog, imageUrlFor })26
backdrop.hidden = !visible;28
backdrop.hidden = !visible;27
modal.hidden = !visible;29
modal.hidden = !visible;28
if (visible)30
if (visible)29
{ render(); }31
{32
searchQuery = "";33
if (searchInput)34
{ searchInput.value = ""; }35
render();36
searchInput?.focus();37
}38
}39
40
function matchesSearch (label)41
{42
const q = searchQuery.trim().toLowerCase();43
if (!q)44
{ return true; }45
return String(label ?? "").toLowerCase().includes(q);30
}46
}31
47
32
function render ()48
function render ()@@ -49,10 +65,14 @@ export function initPaletteModal ({ onSelect, catalog, imageUrlFor })49
panels.innerHTML = "";65
panels.innerHTML = "";50
const grid = document.createElement("div");66
const grid = document.createElement("div");51
grid.className = "palette-grid";67
grid.className = "palette-grid";68
let shown = 0;52
if (activeTab === "grounds")69
if (activeTab === "grounds")53
{70
{54
for (const def of listPlaceableGrounds())71
for (const def of listPlaceableGrounds())55
{72
{73
if (!matchesSearch(def.displayName))74
{ continue; }75
shown += 1;56
const state = defaultStateForType(catalog, "ground", def.key);76
const state = defaultStateForType(catalog, "ground", def.key);57
const name = spriteImageName("ground", def.key, resolveState(77
const name = spriteImageName("ground", def.key, resolveState(58
catalog.grounds?.[def.key]?.states ?? [],78
catalog.grounds?.[def.key]?.states ?? [],@@ -74,6 +94,9 @@ export function initPaletteModal ({ onSelect, catalog, imageUrlFor })74
{94
{75
for (const entry of listPlaceableBlockPaletteEntries(catalog))95
for (const entry of listPlaceableBlockPaletteEntries(catalog))76
{96
{97
if (!matchesSearch(entry.displayName))98
{ continue; }99
shown += 1;77
grid.append(tileCard({100
grid.append(tileCard({78
label: entry.displayName,101
label: entry.displayName,79
url: imageUrlFor?.(entry.spriteName),102
url: imageUrlFor?.(entry.spriteName),@@ -93,6 +116,9 @@ export function initPaletteModal ({ onSelect, catalog, imageUrlFor })93
{116
{94
for (const def of listSpawnableMobTypes())117
for (const def of listSpawnableMobTypes())95
{118
{119
if (!matchesSearch(def.displayName))120
{ continue; }121
shown += 1;96
grid.append(tileCard({122
grid.append(tileCard({97
label: def.displayName,123
label: def.displayName,98
url: imageUrlFor?.(mobSpriteName(def.mobTypeId)),124
url: imageUrlFor?.(mobSpriteName(def.mobTypeId)),@@ -104,12 +130,27 @@ export function initPaletteModal ({ onSelect, catalog, imageUrlFor })104
}));130
}));105
}131
}106
}132
}107
panels.append(grid);133
if (shown === 0)134
{135
const empty = document.createElement("p");136
empty.className = "hint";137
empty.textContent = searchQuery.trim()138
? "No matches for that search."139
: "Nothing to show.";140
panels.append(empty);141
}142
else143
{ panels.append(grid); }108
}144
}109
145
110
document.getElementById("open-palette").addEventListener("click", () => show(true));146
document.getElementById("open-palette").addEventListener("click", () => show(true));111
document.getElementById("palette-close").addEventListener("click", () => show(false));147
document.getElementById("palette-close").addEventListener("click", () => show(false));112
backdrop.addEventListener("click", () => show(false));148
backdrop.addEventListener("click", () => show(false));149
searchInput?.addEventListener("input", () =>150
{151
searchQuery = searchInput.value ?? "";152
render();153
});113
154
114
return {155
return {115
isOpen: () => open,156
isOpen: () => open,@@ -1067,6 +1067,16 @@ label {
1067
1067
border-bottom: 1px solid #2c3340;
1068
1068
}
1069
1069
1070
#palette-search {
1071
margin: 0.65rem 1rem 0;
1072
padding: 0.45rem 0.65rem;
1073
border: 1px solid #2c3340;
1074
border-radius: 4px;
1075
background: #0d1016;
1076
color: #e8ecf1;
1077
font: inherit;
1078
}
1079
1070
1080
#tile-config-modal>footer {
1071
1081
border-bottom: 0;
1072
1082
border-top: 1px solid #2c3340;
@@ -1067,6 +1067,16 @@ label {1067
border-bottom: 1px solid #2c3340;1067
border-bottom: 1px solid #2c3340;1068
}1068
}1069
1069
1070
#palette-search {1071
margin: 0.65rem 1rem 0;1072
padding: 0.45rem 0.65rem;1073
border: 1px solid #2c3340;1074
border-radius: 4px;1075
background: #0d1016;1076
color: #e8ecf1;1077
font: inherit;1078
}1079
1070
#tile-config-modal>footer {1080
#tile-config-modal>footer {1071
border-bottom: 0;1081
border-bottom: 0;1072
border-top: 1px solid #2c3340;1082
border-top: 1px solid #2c3340;@@ -4,7 +4,7 @@
4
4
*/
5
5
import { Component } from "../ecs/components.js";
6
6
import { countItemInSlots } from "../../../shared/items/inventory.js";
7
import { skillLevel } from "../../../shared/definitions/skills.js";
7
import { resolveSkillRequirementLevel } from "../../../shared/combat/combatLevel.js";
8
8
import { CHUNK_SIZE } from "../../../shared/protocol/constants.js";
9
9
import { OVERWORLD_ID, normalizeDimensionId } from "../../../shared/world/dimensions.js";
10
10
import { doorHasRequirements, doorRequirementsMet } from "../../../shared/world/doorRequirements.js";
@@ -107,7 +107,7 @@ export function buildEntityConditionContext (world, entityId)
107
107
questState: (questId) => questStates[String(questId)] ?? "not-started",
108
108
dialogueHeard: (dialogueId, stepId) => heard.has(`${dialogueId}\0${stepId}`),
109
109
dialogueTriggerLatched: (dialogueId, trigger) => triggers.has(`${dialogueId}\0${trigger}`),
110
skillLevel: (skillId) => skillLevel(skills ?? {}, skillId),
110
skillLevel: (skillId) => resolveSkillRequirementLevel(skills ?? {}, skillId),
111
111
hasVisitedDimension: (dimId) => visited.has(normalizeDimensionId(dimId)),
112
112
killCount: (condition) =>
113
113
{
@@ -4,7 +4,7 @@4
*/4
*/5
import { Component } from "../ecs/components.js";5
import { Component } from "../ecs/components.js";6
import { countItemInSlots } from "../../../shared/items/inventory.js";6
import { countItemInSlots } from "../../../shared/items/inventory.js";7
import { skillLevel } from "../../../shared/definitions/skills.js";7
import { resolveSkillRequirementLevel } from "../../../shared/combat/combatLevel.js";8
import { CHUNK_SIZE } from "../../../shared/protocol/constants.js";8
import { CHUNK_SIZE } from "../../../shared/protocol/constants.js";9
import { OVERWORLD_ID, normalizeDimensionId } from "../../../shared/world/dimensions.js";9
import { OVERWORLD_ID, normalizeDimensionId } from "../../../shared/world/dimensions.js";10
import { doorHasRequirements, doorRequirementsMet } from "../../../shared/world/doorRequirements.js";10
import { doorHasRequirements, doorRequirementsMet } from "../../../shared/world/doorRequirements.js";@@ -107,7 +107,7 @@ export function buildEntityConditionContext (world, entityId)107
questState: (questId) => questStates[String(questId)] ?? "not-started",107
questState: (questId) => questStates[String(questId)] ?? "not-started",108
dialogueHeard: (dialogueId, stepId) => heard.has(`${dialogueId}\0${stepId}`),108
dialogueHeard: (dialogueId, stepId) => heard.has(`${dialogueId}\0${stepId}`),109
dialogueTriggerLatched: (dialogueId, trigger) => triggers.has(`${dialogueId}\0${trigger}`),109
dialogueTriggerLatched: (dialogueId, trigger) => triggers.has(`${dialogueId}\0${trigger}`),110
skillLevel: (skillId) => skillLevel(skills ?? {}, skillId),110
skillLevel: (skillId) => resolveSkillRequirementLevel(skills ?? {}, skillId),111
hasVisitedDimension: (dimId) => visited.has(normalizeDimensionId(dimId)),111
hasVisitedDimension: (dimId) => visited.has(normalizeDimensionId(dimId)),112
killCount: (condition) =>112
killCount: (condition) =>113
{113
{@@ -8,7 +8,8 @@ import { countItemInSlots, insertStack, takeMatchingFromSlots, takeMatchingUpToF
8
8
import { attachOrigins, godsOrigin } from "../../../shared/items/origin.js";
9
9
import { itemDefinition, itemDisplayName } from "../../../shared/definitions/items.js";
10
10
import { applySkillXp, publicSkillsPayload } from "../../../shared/skills/state.js";
11
import { skillLevel, SKILL_DEFINITIONS } from "../../../shared/definitions/skills.js";
11
import { SKILL_DEFINITIONS } from "../../../shared/definitions/skills.js";
12
import { resolveSkillRequirementLevel } from "../../../shared/combat/combatLevel.js";
12
13
import {
13
14
formatDialogueRewardMessage,
14
15
formatDialogueQuestRewardMessage,
@@ -181,7 +182,7 @@ export class QuestRuntime
181
182
dialogueHeard: (dialogueId, stepId) => this.stateDb.isDialogueHeard(characterId, dialogueId, stepId),
182
183
dialogueTriggerLatched: (dialogueId, trigger) =>
183
184
this.stateDb.isDialogueTriggerLatched(characterId, dialogueId, trigger),
184
skillLevel: (skillId) => skillLevel(playerView?.skills ?? {}, skillId),
185
skillLevel: (skillId) => resolveSkillRequirementLevel(playerView?.skills ?? {}, skillId),
185
186
hasVisitedDimension: (dimId) => this.stateDb.hasVisitedDimension(characterId, dimId),
186
187
killCount: (condition) =>
187
188
{
@@ -8,7 +8,8 @@ import { countItemInSlots, insertStack, takeMatchingFromSlots, takeMatchingUpToF8
import { attachOrigins, godsOrigin } from "../../../shared/items/origin.js";
8
import { attachOrigins, godsOrigin } from "../../../shared/items/origin.js";
9
import { itemDefinition, itemDisplayName } from "../../../shared/definitions/items.js";
9
import { itemDefinition, itemDisplayName } from "../../../shared/definitions/items.js";
10
import { applySkillXp, publicSkillsPayload } from "../../../shared/skills/state.js";
10
import { applySkillXp, publicSkillsPayload } from "../../../shared/skills/state.js";
11
import { skillLevel, SKILL_DEFINITIONS } from "../../../shared/definitions/skills.js";
11
import { SKILL_DEFINITIONS } from "../../../shared/definitions/skills.js";
12
import { resolveSkillRequirementLevel } from "../../../shared/combat/combatLevel.js";
12
import {
13
import {
13
formatDialogueRewardMessage,
14
formatDialogueRewardMessage,
14
formatDialogueQuestRewardMessage,
15
formatDialogueQuestRewardMessage,
@@ -181,7 +182,7 @@ export class QuestRuntime181
dialogueHeard: (dialogueId, stepId) => this.stateDb.isDialogueHeard(characterId, dialogueId, stepId),
182
dialogueHeard: (dialogueId, stepId) => this.stateDb.isDialogueHeard(characterId, dialogueId, stepId),
182
dialogueTriggerLatched: (dialogueId, trigger) =>
183
dialogueTriggerLatched: (dialogueId, trigger) =>
183
this.stateDb.isDialogueTriggerLatched(characterId, dialogueId, trigger),
184
this.stateDb.isDialogueTriggerLatched(characterId, dialogueId, trigger),
184
skillLevel: (skillId) => skillLevel(playerView?.skills ?? {}, skillId),
185
skillLevel: (skillId) => resolveSkillRequirementLevel(playerView?.skills ?? {}, skillId),
185
hasVisitedDimension: (dimId) => this.stateDb.hasVisitedDimension(characterId, dimId),
186
hasVisitedDimension: (dimId) => this.stateDb.hasVisitedDimension(characterId, dimId),
186
killCount: (condition) =>
187
killCount: (condition) =>
187
{
188
{