adventure: name the zone the treasure actually came from

Every Tier 5 treasure line said the Abyssal Maw, whichever zone the drop
came from. A find in Dragon's Lair announced itself as the Maw while
Pete's dispatch, which reads the real location off the fact, named the
Lair. Two tellings of one moment that disagreed about where it happened.

Substitute the location instead, in the room announce and the discovery
DM both. {location_mid} lowercases the leading article so a line reads
"found in the Abyssal Maw" after a preposition; {location} keeps the
display form for sentence-initial and "The {location}" positions, which
the T1-T4 pools already rely on.
This commit is contained in:
prosolis
2026-07-25 10:21:32 -07:00
parent c8878b095c
commit afa49b2d4c
4 changed files with 31 additions and 17 deletions
+2
View File
@@ -1374,6 +1374,7 @@ func (p *AdventurePlugin) sendTreasureDiscoveryDM(userID id.UserID, char *Advent
"{treasure_name}": def.Name, "{treasure_name}": def.Name,
"{bonus_desc}": def.InventoryDesc, "{bonus_desc}": def.InventoryDesc,
"{location}": loc.Name, "{location}": loc.Name,
"{location_mid}": advLocationMidSentence(loc.Name),
}) })
p.SendDM(userID, text) p.SendDM(userID, text)
@@ -1402,6 +1403,7 @@ func (p *AdventurePlugin) announceTreasureToRoom(char *AdventureCharacter, def *
announce := advSubstituteFlavor(def.RoomAnnounce, map[string]string{ announce := advSubstituteFlavor(def.RoomAnnounce, map[string]string{
"{name}": displayName, "{name}": displayName,
"{location}": loc.Name, "{location}": loc.Name,
"{location_mid}": advLocationMidSentence(loc.Name),
}) })
p.SendMessage(id.RoomID(gr), announce) p.SendMessage(id.RoomID(gr), announce)
} }
+10 -10
View File
@@ -232,7 +232,7 @@ var TreasureDiscovery = map[int][]string{
// No exclamation marks. No enthusiasm. Just weight. // No exclamation marks. No enthusiasm. Just weight.
5: { 5: {
"The {treasure_name}.\n\n" + "The {treasure_name}.\n\n" +
"You found it in the Abyssal Maw. It found you in the Abyssal Maw. " + "You found it in {location_mid}. It found you in {location_mid}. " +
"The distinction matters less at depth.\n" + "The distinction matters less at depth.\n" +
"BONUS: {bonus_desc}.\n\n" + "BONUS: {bonus_desc}.\n\n" +
"It came with you. Some things don't come with you. This one did. " + "It came with you. Some things don't come with you. This one did. " +
@@ -240,15 +240,15 @@ var TreasureDiscovery = map[int][]string{
"The {treasure_name} is in your inventory.\n\n" + "The {treasure_name} is in your inventory.\n\n" +
"BONUS: {bonus_desc}.\n\n" + "BONUS: {bonus_desc}.\n\n" +
"This is a Tier 5 rare. The Abyssal Maw doesn't give these up. " + "This is a Tier 5 rare. Nothing in {location_mid} gives these up. " +
"The Abyssal Maw gave this one up. " + "Something in {location_mid} gave this one up. " +
"That's a sentence worth sitting with.", "That's a sentence worth sitting with.",
"You have the {treasure_name}.\n\n" + "You have the {treasure_name}.\n\n" +
"BONUS: {bonus_desc}.\n\n" + "BONUS: {bonus_desc}.\n\n" +
"It was in the Abyssal Maw. The things that were between you and it " + "It was in {location_mid}. The things that were between you and it " +
"are not between anything and anything anymore. " + "are not between anything and anything anymore. " +
"The Maw is noting this. So is the item.", "The place is noting this. So is the item.",
"The {treasure_name}.\n\n" + "The {treasure_name}.\n\n" +
"It's warm. It was warm when you found it, which it shouldn't be, " + "It's warm. It was warm when you found it, which it shouldn't be, " +
@@ -262,14 +262,14 @@ var TreasureDiscovery = map[int][]string{
"The {treasure_name}. {bonus_desc}.\n\n" + "The {treasure_name}. {bonus_desc}.\n\n" +
"You have it. " + "You have it. " +
"Keep it somewhere it won't be lost. " + "Keep it somewhere it won't be lost. " +
"The Abyssal Maw does not give second chances.", "There are no second chances in {location_mid}.",
"The {treasure_name} is yours.\n\n" + "The {treasure_name} is yours.\n\n" +
"BONUS: {bonus_desc}.\n\n" + "BONUS: {bonus_desc}.\n\n" +
"The Abyssal Maw had it. You have it now. " + "It sat in {location_mid} until you took it. You have it now. " +
"The Maw is aware of the transfer. " + "The place is aware of the transfer. " +
"The Maw is considering its position. " + "The place is considering its position. " +
"You should not be in the Maw when it finishes considering.", "You should not be in {location_mid} when it finishes considering.",
}, },
} }
+12
View File
@@ -70,6 +70,18 @@ func advClearFlavorHistory() {
}) })
} }
// advLocationMidSentence renders a location display name for use after a
// preposition: "The Abyssal Maw" becomes "the Abyssal Maw" so a line reads
// "found in the Abyssal Maw" rather than "found in The Abyssal Maw".
// Templates opt in with {location_mid}; {location} keeps the display form for
// sentence-initial and "The {location}" positions.
func advLocationMidSentence(name string) string {
if strings.HasPrefix(name, "The ") {
return "the " + strings.TrimPrefix(name, "The ")
}
return name
}
// advSubstituteFlavor replaces {var} placeholders in a flavor text string. // advSubstituteFlavor replaces {var} placeholders in a flavor text string.
func advSubstituteFlavor(template string, vars map[string]string) string { func advSubstituteFlavor(template string, vars map[string]string) string {
pairs := make([]string, 0, len(vars)*2) pairs := make([]string, 0, len(vars)*2)
+5 -5
View File
@@ -213,7 +213,7 @@ var advAllTreasures = map[int][]AdvTreasureDef{
{Type: "success_chance", Value: 10}, {Type: "success_chance", Value: 10},
}, },
InventoryDesc: "[THUNDERFURY, BLESSED BLADE OF THE WINDSEEKER]. Yes you got it. +12 Combat.", InventoryDesc: "[THUNDERFURY, BLESSED BLADE OF THE WINDSEEKER]. Yes you got it. +12 Combat.",
RoomAnnounce: "⚡ Did {name} get Thunderfury? {name} got Thunderfury. [THUNDERFURY, BLESSED BLADE OF THE WINDSEEKER] has been found in {location}.", RoomAnnounce: "⚡ Did {name} get Thunderfury? {name} got Thunderfury. [THUNDERFURY, BLESSED BLADE OF THE WINDSEEKER] has been found in {location_mid}.",
}, },
{ {
Key: "ocarina", Name: "The Ocarina (Cracked, Still Plays)", Tier: 4, Key: "ocarina", Name: "The Ocarina (Cracked, Still Plays)", Tier: 4,
@@ -230,13 +230,13 @@ var advAllTreasures = map[int][]AdvTreasureDef{
{Type: "death_chance", Value: -5}, {Type: "death_chance", Value: -5},
}, },
InventoryDesc: "Shard of the Unnamed. +15 Combat, +10% XP, -5% death.", InventoryDesc: "Shard of the Unnamed. +15 Combat, +10% XP, -5% death.",
RoomAnnounce: "🔴 {name} has recovered the Shard of the Unnamed from the Abyssal Maw. The server feels different.", RoomAnnounce: "🔴 {name} has recovered the Shard of the Unnamed from {location_mid}. The server feels different.",
}, },
{ {
Key: "cartographers_final_map", Name: "The Cartographer's Final Map", Tier: 5, Key: "cartographers_final_map", Name: "The Cartographer's Final Map", Tier: 5,
Bonuses: []advTreasureBonusDef{{Type: "all_skills", Value: 12}}, Bonuses: []advTreasureBonusDef{{Type: "all_skills", Value: 12}},
InventoryDesc: "The Cartographer's Final Map. Updates on its own. +12 all skills, full map.", InventoryDesc: "The Cartographer's Final Map. Updates on its own. +12 all skills, full map.",
RoomAnnounce: "🔴 {name} has found the Cartographer's Final Map in the Abyssal Maw. It has their name on it. It always did.", RoomAnnounce: "🔴 {name} has found the Cartographer's Final Map in {location_mid}. It has their name on it. It always did.",
}, },
{ {
Key: "triforce_shard", Name: "The Triforce Shard (One Third of Something Larger)", Tier: 5, Key: "triforce_shard", Name: "The Triforce Shard (One Third of Something Larger)", Tier: 5,
@@ -246,7 +246,7 @@ var advAllTreasures = map[int][]AdvTreasureDef{
// Note: +15 to chosen skill is v2 interactive // Note: +15 to chosen skill is v2 interactive
}, },
InventoryDesc: "Triforce Shard (×1/3). Warm. Waiting. +5 all skills, -8% death.", InventoryDesc: "Triforce Shard (×1/3). Warm. Waiting. +5 all skills, -8% death.",
RoomAnnounce: "🔺 {name} has recovered a Triforce Shard from the Abyssal Maw. One third of something. The other two thirds are somewhere. Probably.", RoomAnnounce: "🔺 {name} has recovered a Triforce Shard from {location_mid}. One third of something. The other two thirds are somewhere. Probably.",
}, },
{ {
Key: "the_corridor", Name: "The Corridor (You Know the One)", Tier: 5, Key: "the_corridor", Name: "The Corridor (You Know the One)", Tier: 5,
@@ -255,7 +255,7 @@ var advAllTreasures = map[int][]AdvTreasureDef{
{Type: "special_monthly_death_bypass", Value: 1}, // v2 {Type: "special_monthly_death_bypass", Value: 1}, // v2
}, },
InventoryDesc: "The Corridor. Folded. Don't look back. +12 all skills, monthly death bypass.", InventoryDesc: "The Corridor. Folded. Don't look back. +12 all skills, monthly death bypass.",
RoomAnnounce: "🔴 {name} found The Corridor in the Abyssal Maw. They know the one. So does it.", RoomAnnounce: "🔴 {name} found The Corridor in {location_mid}. They know the one. So does it.",
}, },
}, },
} }