@@ -1,4 +1,4 @@
|
||||
import { buildCompanionState, PRESET_CHARACTERS, resolveEncounterRecruitCharacter } from '../src/data/characterPresets.ts';
|
||||
import { buildCompanionState, ROLE_TEMPLATE_CHARACTERS, resolveEncounterRecruitCharacter } from '../src/data/characterPresets.ts';
|
||||
import { activateRosterCompanion, benchActiveCompanion, recruitCompanionToParty } from '../src/data/companionRoster.ts';
|
||||
import { getInventoryItemValue, getNpcPurchasePrice } from '../src/data/economy.ts';
|
||||
import {
|
||||
@@ -37,7 +37,7 @@ function assert(condition: unknown, message: string): asserts condition {
|
||||
}
|
||||
|
||||
function createBaseState(worldType: WorldType, sceneId?: string): GameState {
|
||||
const playerCharacter = PRESET_CHARACTERS[0];
|
||||
const playerCharacter = ROLE_TEMPLATE_CHARACTERS[0];
|
||||
const currentScenePreset = sceneId
|
||||
? getScenePresetsByWorld(worldType).find(scene => scene.id === sceneId) ?? null
|
||||
: getScenePresetsByWorld(worldType)[0] ?? null;
|
||||
@@ -114,7 +114,7 @@ function smokeNpcStories() {
|
||||
context: sceneWithNpc.npcs[0].role,
|
||||
xMeters: 3.2,
|
||||
};
|
||||
const playerCharacter = PRESET_CHARACTERS[0];
|
||||
const playerCharacter = ROLE_TEMPLATE_CHARACTERS[0];
|
||||
const npcState = buildInitialNpcState(encounter, worldType);
|
||||
const story = buildNpcEncounterStoryMoment({
|
||||
encounter,
|
||||
@@ -216,7 +216,7 @@ function smokeObserveAndCallOut() {
|
||||
|
||||
function smokeInventoryUseLoop() {
|
||||
for (const worldType of [WorldType.WUXIA, WorldType.XIANXIA]) {
|
||||
const playerCharacter = PRESET_CHARACTERS[0];
|
||||
const playerCharacter = ROLE_TEMPLATE_CHARACTERS[0];
|
||||
const inventory = buildInitialPlayerInventory(playerCharacter, worldType);
|
||||
const usableItem = inventory.find(item => isInventoryItemUsable(item));
|
||||
assert(usableItem, `[inventory] missing usable starter item for ${worldType}`);
|
||||
@@ -231,7 +231,7 @@ function smokeInventoryUseLoop() {
|
||||
}
|
||||
|
||||
function smokeEquipmentLoop() {
|
||||
const playerCharacter = PRESET_CHARACTERS[0];
|
||||
const playerCharacter = ROLE_TEMPLATE_CHARACTERS[0];
|
||||
const starterLoadout = buildInitialEquipmentLoadout(playerCharacter);
|
||||
const starterBonuses = getEquipmentBonuses(starterLoadout);
|
||||
|
||||
@@ -261,7 +261,7 @@ function smokeTradeEconomyLoop() {
|
||||
};
|
||||
const npcState = buildInitialNpcState(encounter, worldType);
|
||||
const npcItem = npcState.inventory[0];
|
||||
const playerItem = buildInitialPlayerInventory(PRESET_CHARACTERS[0], worldType)[0];
|
||||
const playerItem = buildInitialPlayerInventory(ROLE_TEMPLATE_CHARACTERS[0], worldType)[0];
|
||||
assert(npcItem, `[trade] missing npc item for ${worldType}`);
|
||||
assert(playerItem, `[trade] missing player item for ${worldType}`);
|
||||
|
||||
@@ -326,9 +326,9 @@ function smokeEncounterTransitionLoop() {
|
||||
}
|
||||
|
||||
function smokeRosterLoop() {
|
||||
const playerCharacter = PRESET_CHARACTERS[0];
|
||||
const reserveCharacter = PRESET_CHARACTERS[1];
|
||||
const recruitCharacter = PRESET_CHARACTERS[2];
|
||||
const playerCharacter = ROLE_TEMPLATE_CHARACTERS[0];
|
||||
const reserveCharacter = ROLE_TEMPLATE_CHARACTERS[1];
|
||||
const recruitCharacter = ROLE_TEMPLATE_CHARACTERS[2];
|
||||
const activeCompanion = buildCompanionState('active-npc', playerCharacter, 68);
|
||||
const reserveCompanion = buildCompanionState('reserve-npc', reserveCharacter, 62);
|
||||
const recruitedCompanion = buildCompanionState('new-npc', recruitCharacter, 72);
|
||||
|
||||
Reference in New Issue
Block a user