using UnityEngine; namespace Nomadro.Minigame { [System.Serializable] public class QuestDef { public string id; public string title; public string hint; public string doneLine; public Vector3 target; public float radius = 2.5f; public string timeLabel; public float sunElev = 0.5f; public int moneyDelta; public int energyDelta; public int moodDelta; public int focusDelta; } [System.Serializable] public class RandomEventDef { public string id; public string title; public string text; public int weight = 1; public int moneyDelta; public int energyDelta; public int moodDelta; } public static class QuestCatalog { public static readonly QuestDef[] Quests = { new QuestDef { id = "wake", title = "醒来 · 民宿", hint = "走到粉色民宿门口,开始这一天", doneLine = "你冲了个澡,把电脑塞进包里。", target = new Vector3(-8f, 0f, -6f), radius = 2.4f, timeLabel = "07:10", sunElev = 0.35f, moneyDelta = 0, energyDelta = 10, moodDelta = 5, focusDelta = 5, }, new QuestDef { id = "coffee", title = "咖啡馆深工", hint = "去青色咖啡馆插上电脑", doneLine = "接了两单小改,键盘声混着磨豆机。", target = new Vector3(6f, 0f, -4f), radius = 2.6f, timeLabel = "09:40", sunElev = 0.72f, moneyDelta = 45, energyDelta = -18, moodDelta = 8, focusDelta = 15, }, new QuestDef { id = "ship", title = "交付客户", hint = "去联合办公楼顶平台点发送", doneLine = "文件发出去了。Slack 里跳出一句 thank you。", target = new Vector3(4f, 0f, 8f), radius = 2.8f, timeLabel = "13:20", sunElev = 0.95f, moneyDelta = 80, energyDelta = -22, moodDelta = 12, focusDelta = 10, }, new QuestDef { id = "visa", title = "签证材料", hint = "去金色邮局复印住址证明", doneLine = "一沓复印件到手,签证焦虑降了一档。", target = new Vector3(-6f, 0f, 7f), radius = 2.5f, timeLabel = "16:05", sunElev = 0.55f, moneyDelta = -12, energyDelta = -10, moodDelta = -5, focusDelta = 8, }, new QuestDef { id = "sunset", title = "护城河日落", hint = "走到河边看完整日落", doneLine = "晚风吹过护城河,你把今天写进备忘录。", target = new Vector3(0f, 0f, 14f), radius = 3.2f, timeLabel = "18:35", sunElev = 0.18f, moneyDelta = 0, energyDelta = 5, moodDelta = 25, focusDelta = -5, }, }; public static readonly RandomEventDef[] Events = { new RandomEventDef { id = "client_bonus", title = "客户加急", text = "时差里跳出来一条消息:今晚交付,加急费到账。", weight = 3, moneyDelta = 60, energyDelta = -8, moodDelta = 10, }, new RandomEventDef { id = "wifi_down", title = "Wi‑Fi 挂了", text = "咖啡馆断网,你改用热点,日记多写了一段。", weight = 2, moneyDelta = -5, energyDelta = -5, moodDelta = -12, }, new RandomEventDef { id = "meetup", title = "偶遇同路人", text = "有人请你喝咖啡,聊到签证与下一个城市。", weight = 2, moneyDelta = -8, energyDelta = -3, moodDelta = 18, }, new RandomEventDef { id = "viral", title = "笔记爆了", text = "清迈街拍笔记被转发,有品牌来询价。", weight = 1, moneyDelta = 50, moodDelta = 20, }, }; public static RandomEventDef RollEvent() { var total = 0; foreach (var e in Events) total += e.weight; var r = Random.Range(0, total); foreach (var e in Events) { r -= e.weight; if (r < 0) return e; } return Events[0]; } } }