improve and fix ci stuff. cleanup debug
This commit is contained in:
@@ -21,11 +21,29 @@ function parseList(raw) {
|
||||
function parseObjects(raw, type = "rooms") {
|
||||
const cleanedRaw = raw.replace(/Intermediate Rooms:/i, "").replace(/Climax Room:/i, "").trim();
|
||||
const mapper = (entry) => {
|
||||
if (type === "encounters") {
|
||||
// For encounters, format is "Encounter Name: Location Name: details"
|
||||
// We want to keep the encounter name separate and preserve the location:details structure
|
||||
const parts = entry.split(/:/);
|
||||
if (parts.length >= 3) {
|
||||
// Format: "Encounter Name: Location Name: details"
|
||||
return {
|
||||
name: parts[0].trim(),
|
||||
details: parts.slice(1).join(":").trim() // Keep "Location Name: details"
|
||||
};
|
||||
} else if (parts.length === 2) {
|
||||
// Format: "Encounter Name: details" (fallback)
|
||||
return {
|
||||
name: parts[0].trim(),
|
||||
details: parts[1].trim()
|
||||
};
|
||||
}
|
||||
}
|
||||
// For other types, use original logic
|
||||
const [name, ...descParts] = entry.split(/[-–—:]/);
|
||||
const desc = descParts.join(" ").trim();
|
||||
const obj = { name: name.trim() };
|
||||
if (type === "rooms") return { ...obj, description: desc };
|
||||
if (type === "encounters") return { ...obj, details: desc };
|
||||
if (type === "npcs") return { ...obj, trait: desc };
|
||||
if (type === "treasure") return { ...obj, description: desc };
|
||||
return entry;
|
||||
@@ -373,7 +391,7 @@ Generate the rest of the dungeon's content to fill the space between the entranc
|
||||
- Hidden aspects discoverable through interaction or investigation
|
||||
Format as "Name: description" using colons, NOT em-dashes.
|
||||
|
||||
- **Strictly 6 Encounters:** Numbered 1-6 (for d6 rolling). Name (max 6 words) and details (90-120 words per encounter). Each encounter must:
|
||||
- **Strictly 6 Encounters:** Numbered 1-6 (for d6 rolling). Name (max 6 words) and details (2-3 sentences MAX, approximately 30-50 words). Each encounter must:
|
||||
- Start with the room/location name followed by a colon, then the details (e.g., "Location Name: Details text")
|
||||
- The location name must match one of the actual room names from this dungeon
|
||||
- Include environmental hazards/opportunities (cover, elevation, traps, interactable objects, terrain features)
|
||||
@@ -491,7 +509,7 @@ Each resolution should:
|
||||
- Integrate NPCs, faction dynamics, and player actions
|
||||
- Include failure states or unexpected outcomes as options
|
||||
- Reflect different approaches players might take
|
||||
Keep each item to 50-60 words (2-3 sentences). Output as a numbered list, plain text only. Do not use em-dashes (—) anywhere in the output. Absolutely do not use the word "Obsidian" or "obsidian" anywhere in the output.`,
|
||||
Keep each item to 1-2 sentences MAX (approximately 20-30 words). Be extremely concise. Output as a numbered list, plain text only. Do not use em-dashes (—) anywhere in the output. Absolutely do not use the word "Obsidian" or "obsidian" anywhere in the output.`,
|
||||
undefined, 5, "Step 6: Plot Resolutions"
|
||||
);
|
||||
const plotResolutions = parseList(plotResolutionsRaw);
|
||||
|
||||
Reference in New Issue
Block a user