mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 17:02:42 +00:00
Five post-game dungeons above the T5 ceiling, gated on both T5 bosses beaten + level 18. Opt-in endgame: deadly solo, clearable by a party with Pete + pets. - P1 gating: postgameUnlocked (T5 clears + level floor), zonesForLevel excludes T6 unconditionally; wired into startZoneRun, !zone/!expedition, party accept, boredom picker, and the list dividers. - P2 bestiary: 15 elites + 5 signature bosses (Layer-1 stat blocks). - P3 zone defs + 4-region registries; ZoneLootEntry.BossOnly. - P4 five zone graphs on a shared builder (44–52 rooms, no soft-lock; Ossuary secret Verse nodes). - P5 loot: BossOnly enforced; signature items are real registry magic items; five Thom pity recipes off the per-zone crafting anchors. - P6 narration/flavor (5 files), T6 achievements, Pete stays zone-parametric. - P7 (in progress): sim can now reach gated T6 (SimRunner.SeedPostgameUnlock + IsPostgameZone). First calibration pass on millenia — hardened ossuary + drowned_star, softened first_hoard + unplace; last_meridian in band. Fix: party members were refused from every T6 zone because expeditionCmdAccept ran the level gate (which excludes T6) before the postgame check — the intended party endgame was unreachable. Route T6 through postgameUnlocked. Regression tests added.
69 lines
2.7 KiB
Go
69 lines
2.7 KiB
Go
package plugin
|
|
|
|
// Magic items — Open5e SRD import.
|
|
//
|
|
// Per the open5e integration plan, magic items are the one genuinely net-new
|
|
// surface: EquipmentDef is a flavor ladder, not a structured magic-item table,
|
|
// so there is nothing to extend. This file is the single new, non-dnd_-prefixed
|
|
// table the plan allows for them.
|
|
//
|
|
// Like the bestiary staging table, this is a vendored *reference registry* —
|
|
// 237 SRD magic items with classified Kind/Rarity/Slot/attunement and a
|
|
// rarity-bracket sell value. It is deliberately NOT wired into the zone loot
|
|
// tables or Luigi's shop yet; that integration is a separate follow-up pass.
|
|
// buildSRDMagicItems() is the generated dump (see magic_items_srd_data.go);
|
|
// magicItemOverlay is the hand-authored refinement layer that wins on ID
|
|
// collision, mirroring the spell- and bestiary-import pattern.
|
|
|
|
// MagicItemKind is the coarse Open5e item category — the first word of Open5e's
|
|
// free-text "type" field, normalised.
|
|
type MagicItemKind string
|
|
|
|
const (
|
|
MagicItemWondrous MagicItemKind = "wondrous"
|
|
MagicItemWeapon MagicItemKind = "weapon"
|
|
MagicItemArmor MagicItemKind = "armor"
|
|
MagicItemRing MagicItemKind = "ring"
|
|
MagicItemWand MagicItemKind = "wand"
|
|
MagicItemRod MagicItemKind = "rod"
|
|
MagicItemStaff MagicItemKind = "staff"
|
|
MagicItemPotion MagicItemKind = "potion"
|
|
MagicItemScroll MagicItemKind = "scroll"
|
|
)
|
|
|
|
// MagicItem is one classified SRD magic item.
|
|
type MagicItem struct {
|
|
ID string
|
|
Name string
|
|
Kind MagicItemKind
|
|
Rarity DnDRarity
|
|
Attunement bool
|
|
// Slot is a best-effort equip slot. It is "" for consumables (potions,
|
|
// scrolls) and for wondrous items whose name carries no wearable noun.
|
|
Slot DnDSlot
|
|
Value int // sell value, derived from the §8.1-aligned rarity bracket
|
|
Desc string // first-sentence summary of the SRD description
|
|
}
|
|
|
|
// magicItemOverlay — hand-authored magic items that win on ID collision with
|
|
// the generated SRD dump. Corrections (or wholly new items) land here rather
|
|
// than being edited into the generated file. Today it carries the T6 signature
|
|
// items (postgame_magic_items.go); this is a plain var reference, not an init()
|
|
// append, so it resolves before buildMagicItemRegistry() reads it.
|
|
var magicItemOverlay = postgameSignatureMagicItems
|
|
|
|
// magicItemRegistry is the merged lookup table: the generated SRD dump with the
|
|
// hand-authored overlay layered on top.
|
|
var magicItemRegistry = buildMagicItemRegistry()
|
|
|
|
func buildMagicItemRegistry() map[string]MagicItem {
|
|
reg := make(map[string]MagicItem)
|
|
for _, mi := range buildSRDMagicItems() {
|
|
reg[mi.ID] = mi
|
|
}
|
|
for _, mi := range magicItemOverlay {
|
|
reg[mi.ID] = mi // hand-authored wins
|
|
}
|
|
return reg
|
|
}
|