diff --git a/internal/plugin/adventure.go b/internal/plugin/adventure.go index 51e1411..423df19 100644 --- a/internal/plugin/adventure.go +++ b/internal/plugin/adventure.go @@ -1374,6 +1374,7 @@ func (p *AdventurePlugin) sendTreasureDiscoveryDM(userID id.UserID, char *Advent "{treasure_name}": def.Name, "{bonus_desc}": def.InventoryDesc, "{location}": loc.Name, + "{location_mid}": advLocationMidSentence(loc.Name), }) p.SendDM(userID, text) @@ -1400,8 +1401,9 @@ func (p *AdventurePlugin) announceTreasureToRoom(char *AdventureCharacter, def * } displayName, _ := loadDisplayName(char.UserID) announce := advSubstituteFlavor(def.RoomAnnounce, map[string]string{ - "{name}": displayName, - "{location}": loc.Name, + "{name}": displayName, + "{location}": loc.Name, + "{location_mid}": advLocationMidSentence(loc.Name), }) p.SendMessage(id.RoomID(gr), announce) } diff --git a/internal/plugin/adventure_flavor_treasure.go b/internal/plugin/adventure_flavor_treasure.go index 3e1975e..3a6fc55 100644 --- a/internal/plugin/adventure_flavor_treasure.go +++ b/internal/plugin/adventure_flavor_treasure.go @@ -232,7 +232,7 @@ var TreasureDiscovery = map[int][]string{ // No exclamation marks. No enthusiasm. Just weight. 5: { "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" + "BONUS: {bonus_desc}.\n\n" + "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" + "BONUS: {bonus_desc}.\n\n" + - "This is a Tier 5 rare. The Abyssal Maw doesn't give these up. " + - "The Abyssal Maw gave this one up. " + + "This is a Tier 5 rare. Nothing in {location_mid} gives these up. " + + "Something in {location_mid} gave this one up. " + "That's a sentence worth sitting with.", "You have the {treasure_name}.\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. " + - "The Maw is noting this. So is the item.", + "The place is noting this. So is the item.", "The {treasure_name}.\n\n" + "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" + "You have it. " + "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" + "BONUS: {bonus_desc}.\n\n" + - "The Abyssal Maw had it. You have it now. " + - "The Maw is aware of the transfer. " + - "The Maw is considering its position. " + - "You should not be in the Maw when it finishes considering.", + "It sat in {location_mid} until you took it. You have it now. " + + "The place is aware of the transfer. " + + "The place is considering its position. " + + "You should not be in {location_mid} when it finishes considering.", }, } diff --git a/internal/plugin/adventure_render.go b/internal/plugin/adventure_render.go index b19f1b8..f8f2514 100644 --- a/internal/plugin/adventure_render.go +++ b/internal/plugin/adventure_render.go @@ -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. func advSubstituteFlavor(template string, vars map[string]string) string { pairs := make([]string, 0, len(vars)*2) diff --git a/internal/plugin/adventure_treasure.go b/internal/plugin/adventure_treasure.go index 0c4d0b6..8c01423 100644 --- a/internal/plugin/adventure_treasure.go +++ b/internal/plugin/adventure_treasure.go @@ -213,7 +213,7 @@ var advAllTreasures = map[int][]AdvTreasureDef{ {Type: "success_chance", Value: 10}, }, 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, @@ -230,13 +230,13 @@ var advAllTreasures = map[int][]AdvTreasureDef{ {Type: "death_chance", Value: -5}, }, 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, Bonuses: []advTreasureBonusDef{{Type: "all_skills", Value: 12}}, 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, @@ -246,7 +246,7 @@ var advAllTreasures = map[int][]AdvTreasureDef{ // Note: +15 to chosen skill is v2 interactive }, 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, @@ -255,7 +255,7 @@ var advAllTreasures = map[int][]AdvTreasureDef{ {Type: "special_monthly_death_bypass", Value: 1}, // v2 }, 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.", }, }, }