You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
3.4 KiB
Go

package model
// Phrase keys for adventure_log.event_code / WS adventure_log_line.event.code.
// No human-readable text on the server — only keys and structured args.
const (
LogPhraseDefeatedEnemy = "log.defeated_enemy"
LogPhraseLeveledUp = "log.leveled_up"
LogPhraseEquippedNew = "log.equipped_new"
LogPhraseInventoryFullDropped = "log.inventory_full_dropped"
LogPhraseBuffActivated = "log.buff_activated"
LogPhraseHeroRevived = "log.hero_revived"
LogPhraseWanderingMerchant = "log.wandering_merchant_encounter"
LogPhraseEncounteredEnemy = "log.encountered_enemy"
LogPhraseDiedFighting = "log.died_fighting"
LogPhraseAutoReviveHours = "log.auto_revive_hours"
LogPhraseAutoReviveAfterSec = "log.auto_revive_after_sec"
LogPhrasePurchasedBuffRefill = "log.purchased_buff_refill"
LogPhrasePurchasedBuffRefillRub = "log.purchased_buff_refill_rub"
LogPhraseSubscribed = "log.subscribed"
LogPhraseUsedHealingPotion = "log.used_healing_potion"
LogPhraseAchievementUnlocked = "log.achievement_unlocked"
LogPhraseMetNPC = "log.met_npc"
LogPhraseWanderingAlmsEquipped = "log.wandering_alms_equipped"
LogPhraseWanderingAlmsDropped = "log.wandering_alms_dropped"
LogPhraseWanderingAlmsStashed = "log.wandering_alms_stashed"
LogPhraseHealedFullTown = "log.healed_full_town"
LogPhraseBoughtPotionTown = "log.bought_potion_town"
LogPhraseSoldItemsMerchant = "log.sold_items_merchant"
LogPhraseNPCSkippedVisit = "log.npc_skipped_visit"
LogPhrasePurchasedPotionFromNPC = "log.purchased_potion_from_npc"
LogPhrasePaidHealerFull = "log.paid_healer_full"
LogPhraseQuestGiverChecked = "log.quest_giver_checked"
LogPhraseQuestAccepted = "log.quest_accepted"
LogPhraseCombatHeroHit = "log.combat.hero_hit"
LogPhraseCombatHeroDodge = "log.combat.hero_dodge"
LogPhraseCombatHeroStun = "log.combat.hero_stun"
LogPhraseCombatEnemyHit = "log.combat.enemy_hit"
LogPhraseCombatEnemyBlock = "log.combat.enemy_block"
LogPhraseCombatDebuffSuffix = "log.combat.debuff_suffix"
)
// Town visit line slugs per NPC kind (order = timed line 0..5). Unknown npcType uses generic slugs with key prefix "generic".
var townVisitLineSlugs = map[string][]string{
"merchant": {
"crates_in_shade",
"practiced_tired_smile",
"chalk_prices_twice",
"rumors_bandits_carts",
"bell_traveler_pack",
"step_back_tally_gold",
},
"healer": {
"linens_herbs_tent",
"professional_frown_onceover",
"slept_badly_nod",
"tonic_steams_table",
"blessings_salves_bandages",
"lighter_under_canvas",
},
"quest_giver": {
"scrolls_wax_desk",
"ink_stained_map_tap",
"busy_roads_noncommittal",
"draft_parchment_smell",
"squint_spine_legend",
"promise_listen_worth_it",
},
"generic": {
"town_noise_blanket",
"grain_prices_argument",
"dust_sunbeam_time",
"strap_tighten_pretend",
"dog_boring_sleeps",
"breathe_ready_move_on",
},
}
// TownVisitPhraseKey returns e.g. town_visit.merchant.bell_traveler_pack (lineIdx 0..5).
func TownVisitPhraseKey(npcType string, lineIdx int) string {
slugs, ok := townVisitLineSlugs[npcType]
keyType := npcType
if !ok {
slugs = townVisitLineSlugs["generic"]
keyType = "generic"
}
if lineIdx < 0 || lineIdx >= len(slugs) {
return ""
}
return "town_visit." + keyType + "." + slugs[lineIdx]
}