Expand description
Trigger/Effect Stones — what a player owns, where it sits, how it levels.
The data half of the feature — nothing here fires anything. Trigger
evaluation, the global cooldown and effect execution live in
overlord_event_system::logic::stones, which reads these types plus
configs::stones.
Three facts shape everything below:
- One instance per catalog entry, plus a stock of raw copies. A stone is
identified by its
Stone::template_idand carries aStone::copiescount, not N interchangeable rows. Template ids are unique across both catalogs (GameConfig::validate_stones). The consequence: one instance means one socket, so a second insert of the same template is refused withStoneError::AlreadySocketed. - Triggers and Effects are separate collections. Never socketable into
each other’s sockets and never sharing copies, so two
Vecs keyed byStoneKindrather than one list with a flag. - A socketed stone never leaves the inventory. Inserting sets
Stone::socket, removing clears it — there is no second home for a stone to be lost in.
Structs§
- Stone
- The one instance a player owns of a catalog entry, plus its stock of raw copies.
- Stone
Inventory - Everything a character owns in the stone system: the two collections, kept apart, plus the socket assignments carried by the stones themselves.
- Stone
Kind Iter - An iterator over the variants of StoneKind
- Stone
Socket Key - Where one socketed stone sits: which equipment slot, which of its three sockets.
- Stone
Socket Slot Iter - An iterator over the variants of StoneSocketSlot
- Stone
Tier Iter - An iterator over the variants of StoneTier
- Upgraded
Stones Map - What one
UpgradeAllStonescall actually changed: template id -> (from, to) level. Modelled onUpgradedAbilitiesMapand used the same way — the client shows the result window from this, and quests read it for progress.
Enums§
- Stone
Error - Why an insert/remove/upgrade was refused. Every variant is a rule from the design doc, so the caller can report the actual reason instead of a generic failure.
- Stone
Kind - Which of the two collections a stone belongs to.
- Stone
Socket Slot - One of the three sockets a two-sided equipment slot carries.
- Stone
Tier - Rarity tier of a stone.