Relife Habits 简体中文汉化脚本

网页游戏 Relife Habits (https://relifehabits.com/) 的简体中文汉化脚本。Simplified Chinese i18n script for web game Relife Habits.

  1. // ==UserScript==
  2. // @name Relife Habits 简体中文汉化脚本
  3. // @namespace https://www.g8hh.com.cn/
  4. // @version 0.0.11
  5. // @description 网页游戏 Relife Habits (https://relifehabits.com/) 的简体中文汉化脚本。Simplified Chinese i18n script for web game Relife Habits.
  6. // @author 好阳光的小锅巴 & 麦子
  7. // @copyright 锅巴汉化
  8. // @contributionUR https://gityx.com/donate/intro.html
  9. // @icon https://relifehabits.com/icon.ico
  10. // @require https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery/3.6.0/jquery.min.js
  11. // @license MIT
  12. // @include *https://relifehabits.com/*
  13. // @grant none
  14. // @website https://www.gityx.com/
  15. // ==/UserScript==
  16. /**
  17. * ---------------------------
  18. * Time: 2025/02/19 21:19
  19. * Author: guoba
  20. * View: https://www.gityx.com/
  21. * ---------------------------
  22. */
  23. //1.汉化杂项
  24. var cnItems = {
  25. _OTHER_: [],
  26.  
  27. //设置
  28. 'Save': '保存',
  29. 'Export': '导出',
  30. 'Import': '导入',
  31. 'Settings': '设置',
  32. 'Achievements': '成就',
  33. 'Statistics': '统计',
  34. 'Changelog': '更新日志',
  35. 'Hotkeys': '快捷键',
  36. 'ALL': '全部',
  37. 'Default': '默认',
  38. 'AUTO': '自动',
  39. 'default': '默认',
  40. "points": "点数",
  41. "Reset for +": "重置得到 + ",
  42. "Currently": "当前",
  43. "Effect": "效果",
  44. "Cost": "成本",
  45. "Goal:": "目标:",
  46. "Reward": "奖励",
  47. "Start": "开始",
  48. "Exit Early": "提前退出",
  49. "Finish": "完成",
  50. "Milestone Gotten!": "获得里程碑!",
  51. "Milestones": "里程碑",
  52. "Completed": "已完成",
  53. "Default Save": "默认存档",
  54. "Delete": "删除",
  55. "No": "否",
  56. "Saves": "存档",
  57. "Options": "选项",
  58. "Yes": "是",
  59. "Are you sure?": "你确定吗?",
  60. "Edit Name": "编辑名称",
  61. "Info": "信息",
  62. "Currently:": "当前:",
  63. "Appearance": "外观",
  64. "How the game looks.": "游戏看起来如何。",
  65. "Theme": "主题",
  66. "Show milestones": "显示里程碑",
  67. "Show TPS meter at the bottom-left corner of the page.": "在页面左下角显示 TPS。",
  68. "Show TPS": "显示 TPS",
  69. "None": "无",
  70. "Align modifier units": "对齐概览单位",
  71. "Align numbers to the beginning of the unit in modifier view.": "在概览视图中将数字与单元的开头对齐。",
  72. "Select which milestones to display based on criterias.": "根据标准选择要显示的里程碑。",
  73. "All": "全部",
  74. "Classic": "经典",
  75. "Configurable": "可配置",
  76. "Duplicate": "复制",
  77. "Mute": "静音",
  78. "Unmute": "播放",
  79. "Help": "帮助",
  80. "Health:": "生命值:",
  81. "gold": "金币",
  82. "Decrease speed": "降低速度",
  83. "Increase speed": "提高速度",
  84. "Inventory": "库存",
  85. "Mana:": "法力:",
  86. "DMG:": "伤害:",
  87. "Exit Tower": "退出塔",
  88. "Enter the Tower": "进入塔",
  89. "Combat Logs": "战斗日志",
  90. "Blogs": "博客",
  91. "Current Speed:": "当前速度:",
  92. "Lvl.": "等级",
  93. "Leaderboard": "排行榜",
  94. "Monster": "怪物",
  95. "Player": "玩家",
  96. "Our Discord": "我们的 Discord",
  97. "Retry": "重试",
  98. "Quests": "任务",
  99. "Re:LIFE": "重生之塔",
  100. "Progress": "进度",
  101. "Retry Tower": "重试爬塔",
  102. "Shop": "商店",
  103. "Spells": "法术",
  104. "Tower": "塔",
  105. "The Tower of Rebirth": "重生之塔",
  106. "Total Reward:": "总计奖励:",
  107. "XP to level:": "升级经验:",
  108. "Difficulty:": "难度:",
  109. "Vows": "誓约",
  110. "This should be easy...": "这应该很容易……",
  111. "damage to": "伤害到",
  112. "Account": "账户",
  113. "About Us": "关于我们",
  114. ", Current Physical Parry value:": ",当前物理格挡值:",
  115. ", Current Melee Hit Ability value:": ",当前近战命中能力值:",
  116. "armor": "护甲",
  117. "Game Over": "游戏结束",
  118. "Goblin Bandit": "哥布林强盗",
  119. "Frail Goblin": "虚弱的哥布林",
  120. "rolled": "掷出了",
  121. "Bandit Cove": "强盗湾",
  122. "dealt": "输出",
  123. "Floor": "楼层",
  124. "Floors": "楼层",
  125. "Hero's Landing": "英雄大陆",
  126. "It's a long way up...": "这是一条很长的路…",
  127. "You have been defeated. Do some quests or buy items from the shop to get stronger": "你被打败了。做一些任务或从商店购买物品来变得更强",
  128. "You need to enable JavaScript to run this app.": "你需要启用JavaScript来运行这个应用程序。",
  129. "Your Active Quests": "你的可用任务",
  130. "XP": "经验值",
  131. "View Daily Quests": "查看日常任务",
  132. "Select Quest": "选择任务",
  133. "Write Down 3 Goals": "写下3个目标",
  134. "Clean Your Room": "打扫你的房间",
  135. "Complete 10 push-ups to boost your strength.": "完成10个俯卧撑来增强力量。",
  136. "Complete 20 sit-ups to improve your core strength.": "完成20个仰卧起坐来提高你的核心力量。",
  137. "Compliment Someone": "赞美他人",
  138. "Declutter your inbox by unsubscribing from unnecessary newsletters.": "取消订阅不必要的时事通讯,清理你的收件箱。",
  139. "Do 10 Pushups": "做10个俯卧撑",
  140. "Do 10 Push-Ups": "做10个俯卧撑",
  141. "Do 20 Sit-Ups": "做20个仰卧起坐",
  142. "Get better quests as you level up": "随着等级的提升,可以获得更好的任务",
  143. "Give a genuine compliment to someone.": "真诚地赞美别人。",
  144. "Make it a point to smile at five different people today.": "今天一定要对五个不同的人微笑。",
  145. "Meditation Practice": "冥想练习",
  146. "Pick your Daily Quests": "选择你的每日任务",
  147. "Plan three goals you want to achieve this month.": "计划三个你想在这个月实现的目标。",
  148. "Read for 20 Minutes": "阅读20分钟",
  149. "Smile at 5 People": "对5个人微笑",
  150. "Spend 20 minutes reading a book or article.": "花20分钟读一本书或一篇文章。",
  151. "Spend 20 minutes tidying up your living space.": "花20分钟整理你的生活空间。",
  152. "Spend 5 minutes meditating to improve focus.": "花5分钟冥想来提高注意力。",
  153. "Unsubscribe from 5 Emails": "取消订阅5封电子邮件",
  154. "You can pick a quest from the daily quests section.": "你可以从每日任务中选择一个任务。",
  155. "Finish Quest": "完成任务",
  156. "Joined at:": "加入时间:",
  157. "Remove Quest": "移除任务",
  158. "Show Less": "收起",
  159. "Show More": "展开",
  160. "After Stats": "之后的属性",
  161. "Before Stats": "之前的属性",
  162. "bravery": "勇气",
  163. "endurance": "耐力",
  164. "intelligence": "智力",
  165. "Level After": "之后的等级",
  166. "Level Before": "之前的等级",
  167. "Level:": "等级:",
  168. "No levels.": "无等级。",
  169. "strength": "力量",
  170. "XP:": "经验值:",
  171. "You have no items right now.": "您现在没有物品。",
  172. "Bravery": "勇气",
  173. "Endurance": "耐力",
  174. "Intelligence": "智力",
  175. "Loading stats...": "加载统计…",
  176. "N/A": "N/A",
  177. "Player Progress": "玩家进度",
  178. "Strength": "力量",
  179. "World Median:": "世界中位数:",
  180. "Your Weekly Stat:": "你的每周统计:",
  181. "Available Spells": "可用法术",
  182. "Click on your spell, and select the slot you want to put it in.": "点击你的法术,选择你想要放置的位置。",
  183. "First": "第一个",
  184. "Fourth": "第四个",
  185. "No spell selected": "没有选择法术",
  186. "Saved": "保存",
  187. "Second": "第二个",
  188. "Select Spell Order": "选择法术顺序",
  189. "Third": "第三个",
  190. "Update Spells": "更新法术",
  191. "You have no spells right now.": "你现在没有法术。",
  192. "'s Account": "的账户",
  193. "Armor": "护甲",
  194. "BASE STATS": "基础属性",
  195. "COMBAT STATS": "战斗属性",
  196. "Damage": "伤害",
  197. "Hit Ability": "命中能力",
  198. "Magic Penetration": "魔法穿透",
  199. "Magic Resistance": "魔法抗性",
  200. "Mana Regeneration": "法力回复",
  201. "Max Health": "最大生命值",
  202. "Max Mana": "最大法力值",
  203. "Parry": "闪避",
  204. "Sign Out": "登出",
  205. "Spell Effect Multiplier": "法术效果乘数",
  206. "XP Progress": "经验进度",
  207. "XP to next level:": "距离下一级经验值:",
  208. "Game Shop": "游戏商店",
  209. "Buy Now": "购买",
  210. "items": "物品",
  211. "Items": "物品",
  212. "rounds": "回合",
  213. "LEVEL": "等级",
  214. "Duration:": "持续时长:",
  215. "INTELLIGENCE": "智力",
  216. "Gold": "金币",
  217. "Gold:": "金币:",
  218. "Heal": "治疗",
  219. "Health": "生命值",
  220. "Banana Gun": "香蕉枪",
  221. "Bamboozle": "欺骗",
  222. "HitAbility": "命中",
  223. "(Enter the tower to earn more gold and upgrade your gear!)": "(进入塔中获得更多金币并升级你的装备!)",
  224. "A brutal dragon slaying sword that Guts used to slay the apostles.": "一把残忍的屠龙剑,内脏用来杀死使徒。",
  225. "A chestplate that's a little too big for your torso": "胸甲对你的身体来说有点太大了",
  226. "A common sword that guards use to defend the tower.": "守卫用来保卫塔的普通剑。",
  227. "A funny gun that will trip up monsters.": "一把能绊倒怪物的有趣的枪。",
  228. "A futuristic looking jacket that the protagonist of Cyberpunk used.": "赛博朋克的主角用过的一件未来主义风格的夹克。",
  229. "A helmet made up of the rarest crystals": "一个由最稀有的水晶制成的头盔",
  230. "A hood made out of goblin leather.": "用地精皮革做的兜帽。",
  231. "A pair of boots made by Crimson Energy": "一双深红能源公司的靴子",
  232. "A pair of boots that is made up of the rarest crystals": "一双由最稀有的水晶制成的靴子",
  233. "A pair of pants that is made up of the rarest crystals": "一条由最稀有的水晶制成的裤子",
  234. "A pair of pants that's really hard to run in": "一条很难穿的裤子",
  235. "A pair of pants woven by special threads which infuse Crimson Energy": "一条用特殊的线织成的裤子,注入了深红色的能量",
  236. "A pair of shoes made out of suspicious leather": "一双用可疑的皮革做的鞋",
  237. "A powerful chestpiece made up of Crimson Energy, granting bravery to the user": "由深红色能量制成的强大胸牌,赋予使用者勇气",
  238. "A powerful helmet made up of Crimson Energy": "一个由深红色能量组成的强大头盔",
  239. "A stylish skirt that will attract all the goblins to the floor.": "一条时髦的裙子会吸引所有的小妖精到地板上。",
  240. "A sword carved out of pumpkins. Just kidding, it's trees.": "一把用南瓜雕刻的剑。开个玩笑,这是树。",
  241. "A weapon that plants itself in the hearts of its enemies.": "一种能植入敌人心中的武器。",
  242. "An artistic chestpiece made up of the rarest crystals": "一个由最稀有的水晶组成的艺术箱子",
  243. "An axe carved out of the very trees its predecessor cut down": "斧头是用它的前辈砍倒的树木雕刻而成的",
  244. "An underpiece made out of goblin leather and wool": "用地精皮革和羊毛制成的内衣",
  245. "As opposed to a ribcage that's not made of bones?": "而不是由骨头构成的胸腔?",
  246. "available in the shop at the moment.": "目前在商店有售。",
  247. "Built from the remnants of a skeleton defeated in combat": "由在战斗中战败的骷髅残骸建造而成",
  248. "Business in the front, party in the back": "工作在前面,聚会在后面",
  249. "Covers your eyes so it's hard to see, but durable against even hard blows": "遮住你的眼睛,这样就看不见了,但即使是重击也能承受",
  250. "David Jacket(Cyberpunk)": "大卫夹克(网络朋客)",
  251. "Discombobulate": "混乱",
  252. "Doesn't do any damage but it certainly blocks enemy attacks": "虽然不会造成任何伤害,但却能阻挡敌人的攻击",
  253. "Elucidator and Dark Repulser(SAO)": "阐释者和黑暗排斥者(SAO)",
  254. "Frazzle": "破碎",
  255. "Fright": "惊吓",
  256. "Goblin Slayer Club": "哥布林杀手俱乐部",
  257. "Guardian Angel": "守护天使",
  258. "Intelligence Required:": "智力要求:",
  259. "It leaves a lot of splinters in your enemy but otherwise not very effective": "它会在你的敌人身上留下很多碎片,但除此之外效果并不好",
  260. "It looks shakespearean and makes you feel more confident in attacking": "它看起来像莎士比亚,让你在进攻时更有信心",
  261. "Legendary blades from the legendary dual wielder of Sword Art Online": "来自《剑术在线》传奇双持者的传奇剑刃",
  262. "MagicPenetration": "魔法穿透",
  263. "MagicRes": "魔法",
  264. "MagicResistance": "魔抗",
  265. "Mana cost:": "法力消耗:",
  266. "NO! Not the metal band. This is metal though. But it's METAL-metal. It's very hard.": "不!不是金属乐队。但这是金属。但它是金属-金属。这很难。",
  267. "Normally used for cutting grass, now used for cutting down your enemies": "通常用来割草,现在用来砍你的敌人",
  268. "Not Enough Gold": "没有足够的金币",
  269. "Not very protective but great for kicking": "不是很有保护作用,但很适合踢腿",
  270. "Once used by goblins for clubbing, now used by you for partying": "曾经被地精用来泡吧,现在被你用来开派对",
  271. "Owning this won't make you a weeb. You'll just look like one.": "拥有这个不会让你活一个星期。你看起来就像一个。",
  272. "Rejuvenate": "恢复",
  273. "Shatter": "粉碎",
  274. "Similar to the weapon used to assassinate Julius Caesar.": "和刺杀凯撒所用的武器很像。",
  275. "Some boots shaped to match your feet": "一些适合你脚的靴子",
  276. "Some gear forged by some random guy named Smith": "一个叫史密斯的人伪造的装备",
  277. "Some ugly pants made out of goblin leather": "用妖精皮做的丑裤子",
  278. "Surprisingly good-looking, durable, and unsurprisingly hard to manuever in": "令人惊讶的好看,耐用,毫不奇怪的是很难操纵",
  279. "Taken from a necromancer, filled with magical residue but uncomfortable to wear": "从死灵法师身上取下,充满魔法残留物,但戴起来不舒服",
  280. "The best chestpiece in the game made by the blood and teeth of dragons.": "游戏中最好的胸部是用龙的血和牙齿做成的。",
  281. "The best helmet in the game made by the blood and teeth of dragons.": "游戏中最好的头盔由龙的血和牙齿制成。",
  282. "The best pair of boots in the game made by the blood and teeth of dragons.": "游戏中最好的一双靴子,由龙的血和牙齿制成。",
  283. "The best pair of pants in the game made by the blood and teeth of dragons.": "游戏中最好的一条裤子是用龙的血和牙齿做成的。",
  284. "Twin blades slicing with the fury of a red dragon's claws": "用红龙狂暴的利爪劈着双刃",
  285. "You will certainly win more arguments while wearing this": "穿上它,你肯定会赢得更多的争论",
  286. "You're gonna wear a leather shirt?": "你要穿皮革的衬衫吗?",
  287. "You": "你",
  288. "Players": "玩家",
  289. "Loading leaderboard...": "排行榜加载中...",
  290. "Last Floor:": "最高层数:",
  291. "Achieved On:": "达成时间:",
  292. "Level": "等级",
  293. "Mysterious Camp": "神秘营地",
  294. "What are they doing here?": "他们在这里做什么?",
  295. "boss": "Boss",
  296. ", Current Magic Penetration value:": ",当前魔法穿透值:",
  297. ", Current Magic Resistance value:": ",当前魔抗值:",
  298. "Casting": "施法",
  299. "Dancing Escort": "跳舞护航",
  300. "Frazzle is still on cooldown.": "混乱仍在冷却中",
  301. "Frazzle...": "混乱…",
  302. "Goblin Alchemist rolled Magic Penetration of": "哥布林炼金术师掷出了魔法穿透",
  303. "I wonder where this house dropped from...": "我想知道这房子是从哪里掉下来的……",
  304. "rolled Magic Resistance of": "掷出了魔抗",
  305. "round(s) remaining": "剩余回合数",
  306. "Three's a party.": "三个人就够了。",
  307. "Veteran Goblin has appeared": "资深哥布林出现",
  308. "Witch's Hut": "女巫小屋",
  309. "1 Minute Wall Sit": "坐墙1分钟",
  310. "Bone-Horned Helmet": "骨角头盔",
  311. "Complete 10 pushups to improve your chest and overall upperbody strength.": "完成10个俯卧撑来提高你的胸部和整个上半身的力量。",
  312. "Increase your core stability and legs by wall-sitting for 1 minute.": "坐墙1分钟,增加核心稳定性和腿部力量。",
  313. "Listen to a Podcast": "听播客",
  314. "Read a Biography": "阅读传记",
  315. "Read a biography of a historical figure to gain inspiration.": "读一个历史人物的传记来获得灵感。",
  316. "Spend 30 minutes listening to an educational podcast.": "花30分钟听一个有教育意义的播客。",
  317. "Stretch your body for 5 minutes to improve flexibility.": "伸展身体5分钟,提高柔韧性。",
  318. "Take a 5-Minute Stretch Break": "休息5分钟,伸展一下身体",
  319. "torso": "躯干",
  320. "feet": "脚部",
  321. "weapon": "武器",
  322. "Surprise Party": "惊喜派对",
  323. "Two's a crowd.": "两个人太多了。",
  324. "Need Help?": "需要帮助?",
  325. "If you rolled 6 and 6, then you would roll 2 more dice, one for each 6 you get. In this example, your extra rolls might come out to 6 and 5. Very lucky! Since you got another 6, you can reroll a third time, and say you get 2. Your final EDR would be 6 + 6 + 6 + 5 + 2 = 25.": "如果你掷出6和6,那么你将再掷出2个骰子,每掷出6一个骰子。在这个例子中,额外掷出的点数可能是6和5。非常幸运!既然你又得到了6,你可以第三次掷骰子,得到2。你最终的EDR是6 + 6 + 6 + 5 + 2 = 25。",
  326. "Multiplies all spell effects by this amount without changing their mana cost, duration or cooldown. Ex: If a spell would heal you for 5, then with a 2x multiplier you would instead heal 10.": "在不改变法力值、持续时间或冷却时间的情况下,将所有法术效果乘以这个数值。例如:如果一个法术能治疗你5点,那么用一个2倍的加成,你就能治疗10点。",
  327. "Physical Strength directly relates to attack. Bravery is required to fight mini-bosses and bosses. Intelligence is used to get higher discounts in the shop. Stamina is a multiplier to health.": "物理力量直接关系到攻击力。勇气是对抗迷你boss和boss的必要条件。智力是用来在商店里得到更高的折扣。耐力是生命值的乘数。",
  328. "Armor = (0.25 * endurance)0.7 + items + EDR": "护甲=(0.25 *耐力)0.7 + 物品 + EDR",
  329. "Currently each floor will reward a certain amount of gold. We also plan to make monsters drop materials for items as well.": "目前,每个楼层都会奖励一定数量的金币。我们也计划让怪物掉落物品的材料。",
  330. "Damage = ([1 * strength] + [0.25 * bravery])^0.66 + items + EDR": "伤害=([1 *力量]+[0.25 *勇气])^0.66 + 物品 + EDR",
  331. "Damage dealt to health. Damage cannot go lower than 0.": "对健康造成的损害伤害不能低于0。",
  332. "Decreases incoming damage by this value. Armor cannot go lower than 0.": "减少该值的伤害。护甲不能低于0。",
  333. "For example, if you roll 4 and 6, then you can roll again, and then get 3 for example. Your final EDR would be 4 + 6 + 3 = 13.": "例如,如果你掷出4和6,那么你可以再掷一次,然后得到3。最终的EDR是4 + 6 + 3 = 13。",
  334. "Gold is used to purchase items in the shop.": "金币是用来在商店购买物品的。",
  335. "Health = ([10 * endurance] + [2 * strength])^0.7 + items": "生命值=([10 *耐力]+[2 *力量])^0.7 + 物品",
  336. "Hover over your character in the account page and you will see circles; click on those circles and select the gear that you want to put on.": "将鼠标悬停在帐户页面中的角色上,您将看到圆圈;点击那些圆圈,选择你想要穿上的装备。",
  337. "How do I equip gear?": "我如何装备装备?",
  338. "In order for a hit to succeed, this value must be higher than the opposing parry value.": "为了使攻击成功,这个值必须高于对方的值。",
  339. "In order for an offensive spell to succeed, this value must be higher than the opposing magic resistance value.": "为了使攻击法术成功,这个值必须高于对方的魔法抗性值。",
  340. "In order to block a hit, this value must be equal or greater than the opposing hit ability value.": "为了阻挡一个命中,这个值必须等于或大于对方的命中能力值。",
  341. "In order to block an incoming offensive spell, this value must be equal or greater than the opposing magic penetration value.": "为了阻挡来袭的攻击法术,这个值必须等于或大于对方的魔法穿透值。",
  342. "It provides access to higher level quests which reward more stats, XP, and items.": "它提供了访问更高级别任务的途径,从而奖励更多属性、经验值和道具。",
  343. "Join Our Community": "加入我们的社区",
  344. "Magic Penetration = 9 + ([1 * intelligence] + [0.25 * strength])^0.5 + items + EDR": "魔法穿透= 9 +([1 *智力]+[0.25 *力量])^0.5 + 物品 + EDR",
  345. "Magic resistance = 9 + ([0.8 * intelligence] + [0.25*endurance])^0.5 + items + EDR": "魔抗= 9 +([0.8 *智力]+[0.25*耐力])^0.5 + 物品 + EDR",
  346. "Mana Regeneration = [2 * intelligence] + items": "法力回复=[2 *智力] + 物品",
  347. "Max Mana = [10 * intelligence] + [2 * endurance] + items": "最大法力=[10 *智力]+[2 *耐力] + 物品",
  348. "Melee hit ability = 9 + ([1.25 * strength] + [0.5 * bravery])^0.5 + items + EDR": "近战命中= 9 +([1.25 *力量]+[0.5 *勇气])^0.5 + 物品 + EDR",
  349. "Melee parry = 8 + ([0.75 * endurance] + [0.25 * strength])0.5 + items + EDR": "近战招架= 8 +([0.75 *耐力]+[0.25 *力量])0.5 + 物品 + EDR",
  350. "Passive regeneration amount for your mana every combat round.": "每个战斗回合被动回复的法力值。",
  351. "Quests will provide the player with more XP, stats, and items. Doing these quests in real life will also help to improve your daily habits": "任务将为玩家提供更多的经验值、属性和物品。在现实生活中做这些任务也会有助于改善你的日常习惯",
  352. "Search for answers or browse through common topics.": "搜索答案或浏览常见主题。",
  353. "Spell effect multiplier = ([0.5 * intelligence] + [0.15 * strength])^0.33": "法术效果乘数=([0.5 *智力]+[0.15 *力量])^0.33",
  354. "The EDR is the sum of rolling of 2 six-sided dice. It 'explodes' because if any dice lands on 6, another six-sided dice is rolled and added back to the sum.": "EDR是掷两个六面骰子的总和。它会“爆炸”,因为如果有一个骰子落在6上,另一个六面骰子就会被滚动并加回总和。",
  355. "The following values are subject to being added by an exploding dice roll during a combat action: Damage, Armor, Melee Hit Ability, Melee Parry, Magic Penetration, Magic Resistance.": "以下数值将在战斗行动中由爆炸掷骰增加:伤害、护甲、近战命中技能、近战招架、魔法穿透、魔法抵抗。",
  356. "The maximum mana you can have during combat. Mana regen won’t allow your current mana to go higher than this.": "你在战斗中可以拥有的最大法力值。法力回复将不允许你的当前法力值高于此值。",
  357. "What do I get by entering the tower?": "进入塔能得到什么?",
  358. "What do the stats mean?": "这些数据意味着什么?",
  359. "What does increasing my level do?": "提高我的等级有什么作用?",
  360. "What is Armor?": "护甲是什么?",
  361. "What is Damage?": "什么是伤害?",
  362. "What is Explosive Dice Roll (EDR)?": "什么是爆炸掷骰(EDR)?",
  363. "What is gold for?": "金币有什么用?",
  364. "What is Health?": "什么是生命值?",
  365. "What is Magic Penetration?": "什么是魔法穿透?",
  366. "What is Magic Resistance?": "什么是魔法抵抗?",
  367. "What is Mana Regeneration?": "什么是法力回复?",
  368. "What is Max Mana?": "什么是最大法力值?",
  369. "What is Melee Hit Ability?": "什么是近战攻击技能?",
  370. "What is Melee Parry?": "什么是近战招架?",
  371. "What is the Spell Effect Multiplier": "什么是法术效果乘数",
  372. "Why should I do the quests?": "我为什么要做任务?",
  373. "Your hitpoints. If this reaches 0, you die.": "你的生命值。如果这个等于0,你就死了。",
  374. "Don't have an account?": "还没有账号?",
  375. "Log In": "登录(不可用)",
  376. "Password": "密码",
  377. "Register": "注册(不可用)",
  378. "Username": "用户名",
  379. "Back": "返回",
  380. "Enter Your Email (optional)": "请输入电子邮箱(可选)",
  381. "Enter Your Username": "请输入你的用户名",
  382. "Enter Your Password": "请输入你的密码",
  383. "Next": "下一步",
  384. "Prefer not to say": "宁愿不说",
  385. "Select your age range": "请选择你的年龄范围",
  386. "Under 18": "未满18岁",
  387. "Select Your Age Range (Optional: So that we can tailor a better experience for you)": "选择您的年龄范围(可选:以便我们为您量身定制更好的体验)",
  388. "Username is required": "用户名不能为空",
  389. "Make a Vow": "许下誓约",
  390. "My Vows": "我的誓约",
  391. "No vows found.": "暂无誓约。",
  392. "Vows give GREAT rewards, but DIRE consequences if not finished on time.": "誓约会带来巨大的回报,但如果没有按时完成,后果会很严重。",
  393. "Add Vow": "添加誓约",
  394. "Cancel": "取消",
  395. "Cancel": "选择属性",
  396. "Commit a New Vow": "提交一个新誓约",
  397. "Completion Date": "完成日期",
  398. "Description": "描述",
  399. "Difficulty": "难度",
  400. "Vow Name": "誓约名称",
  401. "Choose Stats": "选择属性",
  402. "damage": "伤害",
  403. "hitAbility": "命中",
  404. "parry": "闪避",
  405. "Deadline:": "截止日期:",
  406. "Consequences:": "结果:",
  407. "Finish Vow": "现在完成",
  408. "COMPLETED": "已完成",
  409. "Current Level": "当前等级",
  410. "Current Stats": "当前属性",
  411. "Cooldown:": "冷却时间:",
  412. "HealthAdd": "生命值增加",
  413. "magicPenetration": "魔法穿透",
  414. "magicResistance": "魔抗",
  415. "mana": "法力",
  416. "Mana Cost:": "法力成本:",
  417. "Remove": "移除",
  418. "Selected Spell:": "已选择法术:",
  419. "Type:": "类型:",
  420. "Stat:": "属性:",
  421. "": "",
  422. "": "",
  423. "": "",
  424. "": "",
  425. "": "",
  426. "": "",
  427. "": "",
  428. "": "",
  429. "": "",
  430. "": "",
  431. "": "",
  432. "": "",
  433. "": "",
  434. "": "",
  435. "": "",
  436. "": "",
  437. "": "",
  438. "": "",
  439. "": "",
  440. "": "",
  441. "": "",
  442. "": "",
  443. "": "",
  444. "": "",
  445. "": "",
  446. "": "",
  447. "": "",
  448. "": "",
  449. "": "",
  450. "": "",
  451. "": "",
  452. "": "",
  453. "": "",
  454. "": "",
  455. "": "",
  456. "": "",
  457. "": "",
  458. "": "",
  459. "Veteran Goblin": "哥布林老兵",
  460. "Goblin Alchemist": "哥布林炼金术师",
  461. "Goblin Assassin": "哥布林杀手",
  462. "Goblin Dancer": "哥布林舞者",
  463. "head": "头部",
  464. "legs": "腿部",
  465. "Intelligence:": "智力:",
  466. "Endurance:": "耐力:",
  467. "Rewards:": "奖励:",
  468. "Bravery:": "勇气:",
  469. "Strength:": "力量:",
  470. "MR:": "法力回复:",
  471. "MP:": "法力值:",
  472. "MR:": "魔抗:",
  473. "PP:": "物理闪避:",
  474. "MHA:": "近战命中:",
  475. "ARM:": "护甲:",
  476. "The": "",
  477. "": "",
  478. "": "",
  479. "Breeches": "制马裤",
  480. "Ribcage": "制胸甲",
  481. "Sandals": "制凉鞋",
  482. "-Horned Helmet": "角头盔",
  483. "Axe": "斧子",
  484. "Bascinet": "烤炉",
  485. "Chausses": "马裤",
  486. "Cuirass": "胸甲",
  487. "Katana": "武士刀",
  488. "Sabatons": "萨巴顿",
  489. "Scythe": "镰刀",
  490. "Slayer(Berserk)": "杀手(狂暴)",
  491. "Sword": "剑",
  492. "Shield": "盾牌",
  493. "Blades": "剑刃",
  494. "Helmet": "头盔",
  495. "Dagger": "匕首",
  496. "Chestplate": "板甲",
  497. "Boots": "靴子",
  498. "Clogs": "木屐",
  499. "Fedora": "软呢帽",
  500. "Gambeson": "软铠甲",
  501. "Hood": "风帽",
  502. "Pants": "裤子",
  503. "Shirt": "衬衫",
  504. "Shoes": "鞋子",
  505. "Skirt": "裙子",
  506.  
  507. // 图标代码,不能汉化
  508. "Jacorb's Games": "Jacorb's Games",
  509. "- VS -": "- VS -",
  510. "": "",
  511. "": "",
  512. "": "",
  513. "": "",
  514. ":": ":",
  515. "/": "/",
  516. "Scientific": "科学计数法",
  517. "Standard": "标准",
  518. "Blind": "盲文",
  519. "Letters": "字母",
  520. "Mixed Engineering": "混合工程",
  521. "Mixed Scientific": "混合科学",
  522. "Chemistry": "化学",
  523. "Engineering": "工程符号",
  524. "By Jacorb90": "By Jacorb90",
  525. "content_copy": "content_copy",
  526. "library_books": "library_books",
  527. "discord": "discord",
  528. "drag_handle": "drag_handle",
  529. "edit": "edit",
  530. "forum": "forum",
  531. "content_paste": "content_paste",
  532. "delete": "delete",
  533. "info": "info",
  534. "settings": "settings",
  535. 'Twitter': 'Twitter',
  536. "Discord": "Discord",
  537. "Facebook": "Facebook",
  538. "Instagram": "Instagram",
  539. "gityxcom": "gityxcom",
  540. "Footer": "Footer",
  541. "Wiki": "Wiki",
  542. "gityx": "gityx",
  543.  
  544. //树游戏
  545. 'Loading...': '加载中...',
  546. 'ALWAYS': '一直',
  547. 'HARD RESET': '硬重置',
  548. 'Export to clipboard': '导出到剪切板',
  549. 'INCOMPLETE': '不完整',
  550. 'HIDDEN': '隐藏',
  551. 'AUTOMATION': '自动',
  552. 'NEVER': '从不',
  553. 'ON': '打开',
  554. 'OFF': '关闭',
  555. 'SHOWN': '显示',
  556. 'Play Again': '再次游戏',
  557. 'Keep Going': '继续',
  558. 'The Modding Tree Discord': '模型树Discord',
  559. 'You have': '你有',
  560. 'It took you {{formatTime(player.timePlayed)}} to beat the game.': '花费了 {{formatTime(player.timePlayed)}} 时间去通关游戏.',
  561. 'Congratulations! You have reached the end and beaten this game, but for now...': '恭喜你! 您已经结束并通关了本游戏,但就目前而言...',
  562. 'Main Prestige Tree server': '主声望树服务器',
  563. 'Reach {{formatWhole(ENDGAME)}} to beat the game!': '达到 {{formatWhole(ENDGAME)}} 去通关游戏!',
  564. "Loading... (If this takes too long it means there was a serious error!": "正在加载...(如果这花费的时间太长,则表示存在严重错误!",
  565. 'Loading... (If this takes too long it means there was a serious error!)←': '正在加载...(如果时间太长,则表示存在严重错误!)←',
  566. 'Main\n\t\t\t\tPrestige Tree server': '主\n\t\t\t\t声望树服务器',
  567. 'The Modding Tree\n\t\t\t\t\t\t\tDiscord': '模型树\n\t\t\t\t\t\t\tDiscord',
  568. 'Please check the Discord to see if there are new content updates!': '请检查 Discord 以查看是否有新的内容更新!',
  569. 'aqua': '水色',
  570. 'AUTOMATION, INCOMPLETE': '自动化,不完整',
  571. 'LAST, AUTO, INCOMPLETE': '最后,自动,不完整',
  572. 'NONE': '无',
  573. 'P: Reset for': 'P: 重置获得',
  574. 'Git游戏': 'Git游戏',
  575. 'QQ群号': 'QQ群号',
  576. 'x': 'x',
  577. 'QQ群号:': 'QQ群号:',
  578. '* 启用后台游戏': '* 启用后台游戏',
  579. '更多同类游戏:': '更多同类游戏:',
  580. 'i': 'i',
  581. 'I': 'I',
  582. 'II': 'I',
  583. 'III': 'III',
  584. 'IV': 'IV',
  585. 'V': 'V',
  586. 'VI': 'VI',
  587. 'VII': 'VII',
  588. 'VIII': 'VIII',
  589. 'X': 'X',
  590. 'XI': 'XI',
  591. 'XII': 'XII',
  592. 'XIII': 'XIII',
  593. 'XIV': 'XIV',
  594. 'XV': 'XV',
  595. 'XVI': 'XVI',
  596. 'A': 'A',
  597. 'B': 'B',
  598. 'C': 'C',
  599. 'D': 'D',
  600. 'E': 'E',
  601. 'F': 'F',
  602. 'G': 'G',
  603. 'H': 'H',
  604. 'I': 'I',
  605. 'J': 'J',
  606. 'K': 'K',
  607. 'L': 'L',
  608. 'M': 'M',
  609. 'N': 'N',
  610. 'O': 'O',
  611. 'P': 'P',
  612. 'Q': 'Q',
  613. 'R': 'R',
  614. 'S': 'S',
  615. 'T': 'T',
  616. 'U': 'U',
  617. 'V': 'V',
  618. 'W': 'W',
  619. 'X': 'X',
  620. 'Y': 'Y',
  621. 'Z': 'Z',
  622. '<': '<',
  623. '<<': '<<',
  624. '>': '>',
  625. '>>': '>>',
  626. "Gityx": "Gityx",
  627. "Gz": "Gz",
  628. "O": "O",
  629. 'Jan': '1月',
  630. 'Feb': '2月',
  631. 'Mar': '3月',
  632. 'Apr': '4月',
  633. 'May': '5月',
  634. 'Jun': '6月',
  635. 'Jul': '7月',
  636. 'Aug': '8月',
  637. 'Sep': '9月',
  638. 'Oct': '10月',
  639. 'Nov': '11月',
  640. 'Dec': '12月',
  641. "": "",
  642. "": "",
  643. "": "",
  644. "": "",
  645. "": "",
  646. }
  647.  
  648.  
  649. //需处理的前缀
  650. var cnPrefix = {
  651. "\n": "\n",
  652. " ": "",
  653. " ": "",
  654. " ": "",
  655. " ": "",
  656. " ": "",
  657. " ": "",
  658. " ": "",
  659. " ": "",
  660. " ": "",
  661. " ": "",
  662. " ": "",
  663. " ": "",
  664. " ": "",
  665. " ": "",
  666. " ": "",
  667. " ": "",
  668. " ": "",
  669. " ": " ",
  670. " ": " ",
  671. //树游戏
  672. "\t\t\t": "\t\t\t",
  673. "\n\n\t\t": "\n\n\t\t",
  674. "\n\t\t": "\n\t\t",
  675. "\t": "\t",
  676. "Show Milestones: ": "显示里程碑:",
  677. "Autosave: ": "自动保存: ",
  678. "Offline Prod: ": "离线生产: ",
  679. "Completed Challenges: ": "完成的挑战: ",
  680. "High-Quality Tree: ": "高质量树贴图: ",
  681. "Offline Time: ": "离线时间: ",
  682. "Theme: ": "主题: ",
  683. "Anti-Epilepsy Mode: ": "抗癫痫模式:",
  684. "In-line Exponent: ": "直列指数:",
  685. "Single-Tab Mode: ": "单标签模式:",
  686. "Time Played: ": "已玩时长:",
  687. "Shift-Click to Toggle Tooltips: ": "Shift-单击以切换工具提示:",
  688. "Notation: ": "符号: ",
  689. "Toggle Music: ": "切换声音: ",
  690. "damage to ": "伤害到 ",
  691. "New enemy appeared: ": "新的敌人出现了: ",
  692. "Welcome to ": "欢迎来到 ",
  693. "Iron ": "铁",
  694. "Dragon ": "龙",
  695. "Crystal ": "水晶",
  696. "Bone ": "骨",
  697. "Wooden ": "木制",
  698. "Steel ": "钢",
  699. "Crimson ": "绯红",
  700. "Leather ": "皮革",
  701. "": "",
  702. "": "",
  703. "": "",
  704. "": "",
  705. "": "",
  706. "": "",
  707. "": "",
  708. "": "",
  709. "": "",
  710. "": "",
  711. "": "",
  712. "": "",
  713. "": "",
  714. "": "",
  715. "": "",
  716. "": "",
  717. "": "",
  718. "": "",
  719. }
  720.  
  721. //需处理的后缀
  722. var cnPostfix = {
  723. " ": "",
  724. " ": "",
  725. " ": "",
  726. " ": "",
  727. " ": "",
  728. " ": "",
  729. " ": "",
  730. " ": "",
  731. " ": "",
  732. " ": "",
  733. " ": "",
  734. " ": "",
  735. " ": "",
  736. " ": "",
  737. " ": "",
  738. " ": "",
  739. " ": "",
  740. " ": " ",
  741. " ": " ",
  742. "\n": "\n",
  743. "\n\t\t\t": "\n\t\t\t",
  744. "\t\t\n\t\t": "\t\t\n\t\t",
  745. "\t\t\t\t": "\t\t\t\t",
  746. "\n\t\t": "\n\t\t",
  747. "\t": "\t",
  748. ' I': ' I',
  749. ' II': ' II',
  750. ' III': ' III',
  751. ' IV': ' IV',
  752. ' V': ' V',
  753. ' VI': ' VI',
  754. ' VII': ' VII',
  755. ' VIII': ' VIII',
  756. ' X': ' X',
  757. ' XI': ' XI',
  758. ' XII': ' XII',
  759. ' XIII': ' XIII',
  760. ' XIV': ' XIV',
  761. ' XV': ' XV',
  762. ' XVI': ' XVI',
  763. "/sec)": "/秒)",
  764. "% bonus": "% 奖励",
  765. " day(s)": " 天",
  766. "!": "!",
  767. " rolled Physical Parry of": " 掷出了 物理闪避 ",
  768. "rolled Physical Parry of": "掷出了 物理闪避 ",
  769. " rolled Melee Hit Ability of": " 掷出了 近战命中能力 ",
  770. " rolled Melee Hit Ability of -": " 掷出了 近战命中能力 -",
  771. "rolled Melee Hit Ability of": "掷出了 近战命中能力 ",
  772. " has been defeated": " 已经被击败",
  773. " dealt": " 造成",
  774. "": "",
  775. "": "",
  776. "": "",
  777. "": "",
  778. "": "",
  779. "": "",
  780. "": "",
  781. "": "",
  782. "": "",
  783. "": "",
  784. "": "",
  785. "": "",
  786. "": "",
  787. "": "",
  788. }
  789.  
  790. //需排除的,正则匹配
  791. var cnExcludeWhole = [
  792. /^(\d+)$/,
  793. /^\s*$/, //纯空格
  794. /^([\d\.]+):([\d\.]+)$/,
  795. /^([\d\.]+):([\d\.]+):([\d\.]+)$/,
  796. /^([\d\.]+):([\d\.]+):([\d\.]+):([\d\.]+)$/,
  797. /^([\d\.]+):([\d\.]+):([\d\.]+):([\d\.]+):([\d\.]+)$/,
  798. /^([\d\.]+)s$/,
  799. /^([\d\.]+)h$/,
  800. /^([\d\.]+)m$/,
  801. /^([\d\.]+)m ([\d\.]+)s$/,
  802. /^([\d\.]+)h ([\d\.]+)m ([\d\.]+)s$/,
  803. /^([\d\.]+)d ([\d\.]+)h ([\d\.]+)m ([\d\.]+)s$/,
  804. /^([\d\.]+)y ([\d\.]+)d ([\d\.]+)h ([\d\.]+)m ([\d\.]+)s$/,
  805. /^([\d\.]+)y ([\d\.]+)d ([\d\.]+)h$/,
  806. /^([\d\.]+)\-([\d\.]+)\-([\d\.]+)$/,
  807. /^([\d\.]+)e(\d+)$/,
  808. /^([\d\.]+)$/,
  809. /^\$([\d\.]+)$/,
  810. /^\(([\d\.]+)\)$/,
  811. /^([\d\.]+)\%$/,
  812. /^([\d\.]+)\/([\d\.]+)$/,
  813. /^([\d\.]+)\/([\d\.,]+)$/,
  814. /^([\d\.,]+)\/([\d\.,]+)$/,
  815. /^\(([\d\.]+)\/([\d\.]+)\)$/,
  816. /^成本(.+)$/,
  817. /^\(([\d\.]+)\%\)$/,
  818. /^([\d\.]+):([\d\.]+):([\d\.]+)$/,
  819. /^([\d\.]+)K$/,
  820. /^([\d\.]+)M$/,
  821. /^([\d\.]+)B$/,
  822. /^([\d\.]+) K$/,
  823. /^([\d\.]+) M$/,
  824. /^([\d\.]+) B$/,
  825. /^([\d\.]+) T$/,
  826. /^([\d\.]+) Qi$/,
  827. /^([\d\.]+) Qa$/,
  828. /^([\d\.]+)s$/,
  829. /^([\d\.]+)x$/,
  830. /^x([\d\.]+)$/,
  831. /^([\d\.,]+)$/,
  832. /^\$([\d\.,]+)$/,
  833. /^\+([\d\.,]+)$/,
  834. /^\-([\d\.,]+)$/,
  835. /^([\d\.,]+)x$/,
  836. /^x([\d\.,]+)$/,
  837. /^([\d\.,]+) \/ ([\d\.,]+)$/,
  838. /^([\d\.]+)e([\d\.,]+)$/,
  839. /^([\d\.]+)e([\d\.,]+) \/ ([\d\.]+)e([\d\.,]+)$/,
  840. /^\$([\d\.]+)e([\d\.,]+)$/,
  841. /^([\d\.,]+)\/([\d\.]+)e([\d\.,]+)$/,
  842. /^([\d\.]+)e([\d\.,]+)\/([\d\.]+)e([\d\.,]+)$/,
  843. /^([\d\.]+)e\+([\d\.,]+)$/,
  844. /^e([\d\.]+)e([\d\.,]+)$/,
  845. /^x([\d\.]+)e([\d\.,]+)$/,
  846. /^([\d\.]+)e([\d\.,]+)x$/,
  847. /^([\uD800-\uDBFF][\uDC00-\uDFFF])|([\u2600-\u27BF])|([\u2300-\u23FF])|([\u2B50-\u2B55])|([\u203C-\u3299])|[\u21A9\u21AA\u25B6\u25C0\u2B06\u2B07\u2B05\u2B95\u2B99\u2B9A]+$/,
  848. // /^([\uD800-\uDBFF][\uDC00-\uDFFF])|([\u2600-\u27BF])|([\u2300-\u23FF])|([\u2B50-\u2B55])|([\u203C-\u3299])+$/,
  849. // /^[\uD800-\uFFFF]+$/,
  850. /^[\u4E00-\u9FA5]+$/
  851. ];
  852. var cnExcludePostfix = []
  853.  
  854. //正则替换,带数字的固定格式句子
  855. //纯数字:(\d+)
  856. //逗号:([\d\.,]+)
  857. //小数点:([\d\.]+)
  858. //原样输出的字段:(.+)
  859. var cnRegReplace = new Map([
  860. [/^([\d\.]+) hours ([\d\.]+) minutes ([\d\.]+) seconds$/, '$1 小时 $2 分钟 $3 秒'],
  861. [/^You are gaining (.+) elves per second$/, '你每秒获得 $1 精灵'],
  862. [/^You have (.+) points$/, '你有 $1 点数'],
  863. [/^Next at (.+) points$/, '下一个在 $1 点数'],
  864. [/^Jan ([\d\.,]+) ([\d\.,]+), ([\d\.,]+):([\d\.,]+)$/, '$2 年 1 月 $1, $3:$4'],
  865. [/^Feb ([\d\.,]+) ([\d\.,]+), ([\d\.,]+):([\d\.,]+)$/, '$2 年 2 月 $1, $3:$4'],
  866. [/^Mar ([\d\.,]+) ([\d\.,]+), ([\d\.,]+):([\d\.,]+)$/, '$2 年 3 月 $1, $3:$4'],
  867. [/^Apr ([\d\.,]+) ([\d\.,]+), ([\d\.,]+):([\d\.,]+)$/, '$2 年 4 月 $1, $3:$4'],
  868. [/^May ([\d\.,]+) ([\d\.,]+), ([\d\.,]+):([\d\.,]+)$/, '$2 年 5 月 $1, $3:$4'],
  869. [/^Jun ([\d\.,]+) ([\d\.,]+), ([\d\.,]+):([\d\.,]+)$/, '$2 年 6 月 $1, $3:$4'],
  870. [/^Jul ([\d\.,]+) ([\d\.,]+), ([\d\.,]+):([\d\.,]+)$/, '$2 年 7 月 $1, $3:$4'],
  871. [/^Aug ([\d\.,]+) ([\d\.,]+), ([\d\.,]+):([\d\.,]+)$/, '$2 年 8 月 $1, $3:$4'],
  872. [/^Sep ([\d\.,]+) ([\d\.,]+), ([\d\.,]+):([\d\.,]+)$/, '$2 年 9 月 $1, $3:$4'],
  873. [/^Oct ([\d\.,]+) ([\d\.,]+), ([\d\.,]+):([\d\.,]+)$/, '$2 年 10 月 $1, $3:$4'],
  874. [/^Nov ([\d\.,]+) ([\d\.,]+), ([\d\.,]+):([\d\.,]+)$/, '$2 年 11 月 $1, $3:$4'],
  875. [/^Dec ([\d\.,]+) ([\d\.,]+), ([\d\.,]+):([\d\.,]+)$/, '$2 年 12 月 $1, $3:$4'],
  876. [/^([\d\.]+)\/sec$/, '$1\/秒'],
  877. [/^([\d\.,]+)\/sec$/, '$1\/秒'],
  878. [/^([\d\.,]+) OOMs\/sec$/, '$1 OOMs\/秒'],
  879. [/^([\d\.]+) OOMs\/sec$/, '$1 OOMs\/秒'],
  880. [/^([\d\.]+)e([\d\.,]+)\/sec$/, '$1e$2\/秒'],
  881. [/^requires ([\d\.]+) more research points$/, '需要$1个研究点'],
  882. [/^([\d\.]+)e([\d\.,]+) points$/, '$1e$2 点数'],
  883. [/^([\d\.]+) elves$/, '$1 精灵'],
  884. [/^([\d\.]+)d ([\d\.]+)h ([\d\.]+)m$/, '$1天 $2小时 $3分'],
  885. [/^([\d\.]+)e([\d\.,]+) elves$/, '$1e$2 精灵'],
  886. [/^([\d\.,]+) elves$/, '$1 精灵'],
  887. [/^\+([\d\.,]+) to Player$/, '\+$1 到玩家'],
  888. [/^\-([\d\.,]+) to Enemies$/, '\-$1 到敌人'],
  889. [/^Level ([\d\.,]+)$/, '等级 $1'],
  890. [/^Day ([\d\.,]+)$/, '天数 $1'],
  891. [/^\*(.+) to electricity gain$/, '\*$1 到电力增益'],
  892. [/^Cost: (.+) points$/, '成本:$1 点数'],
  893. [/^Req: (.+) elves$/, '要求:$1 精灵'],
  894. [/^Req: (.+) \/ (.+) elves$/, '要求:$1 \/ $2 精灵'],
  895. [/^Usages: (\d+)\/$/, '用途:$1\/'],
  896. [/^workers: (\d+)\/$/, '工人:$1\/'],
  897.  
  898. ]);
  899.  
  900. var CNITEM_DEBUG = 0;
  901.  
  902. function cnItemByTag(text, itemgroup, node, textori) {
  903. for (let i in itemgroup) {
  904. if (i[0] == '.') { //匹配节点及其父节点的class
  905. let current_node = node;
  906. while (current_node) {
  907. if (current_node.classList && current_node.classList.contains(i.substr(1))) {
  908. return itemgroup[i];
  909. } else if (current_node.parentElement && current_node.parentElement != document.documentElement) {
  910. current_node = current_node.parentElement;
  911. } else {
  912. break;
  913. }
  914. }
  915. } else if (i[0] == '#') { //匹配节点及其父节点的id
  916. let current_node = node;
  917. while (current_node) {
  918. if (current_node.id == i.substr(1)) {
  919. return itemgroup[i];
  920. } else if (current_node.parentElement && current_node.parentElement != document.documentElement) {
  921. current_node = current_node.parentElement;
  922. } else {
  923. break;
  924. }
  925. }
  926. } else if (i[0] == '$') { //执行document.querySelector
  927. if (document.querySelector(i.substr(1)) != null) {
  928. return itemgroup[i];
  929. }
  930. } else if (i[0] == '*') { //搜索原始文本
  931. if (textori.includes(i.substr(1))) {
  932. return itemgroup[i];
  933. }
  934. }
  935. // and more ...
  936. else {
  937. CNITEM_DEBUG && console.log({ text, itemgroup, dsc: "不识别的标签" + i })
  938. }
  939. }
  940. return null;
  941. }
  942.  
  943. //2.采集新词
  944. //20190320@JAR rewrite by 麦子
  945. var cnItem = function(text, node) {
  946.  
  947. if (typeof(text) != "string")
  948. return text;
  949. let textori = text;
  950. //处理前缀
  951. let text_prefix = "";
  952. for (let prefix in cnPrefix) {
  953. if (text.substr(0, prefix.length) === prefix) {
  954. text_prefix += cnPrefix[prefix];
  955. text = text.substr(prefix.length);
  956. }
  957. }
  958. //处理后缀
  959. let text_postfix = "";
  960. for (let postfix in cnPostfix) {
  961. if (text.substr(-postfix.length) === postfix) {
  962. text_postfix = cnPostfix[postfix] + text_postfix;
  963. text = text.substr(0, text.length - postfix.length);
  964. }
  965. }
  966. //处理正则后缀
  967. let text_reg_exclude_postfix = "";
  968. for (let reg of cnExcludePostfix) {
  969. let result = text.match(reg);
  970. if (result) {
  971. text_reg_exclude_postfix = result[0] + text_reg_exclude_postfix;
  972. text = text.substr(0, text.length - result[0].length);
  973. }
  974. }
  975.  
  976. //检验字典是否可存
  977. if (!cnItems._OTHER_) cnItems._OTHER_ = [];
  978.  
  979. //检查是否排除
  980. for (let reg of cnExcludeWhole) {
  981. if (reg.test(text)) {
  982. return text_prefix + text + text_reg_exclude_postfix + text_postfix;;
  983. }
  984. }
  985.  
  986. //尝试正则替换
  987. for (let [key, value] of cnRegReplace.entries()) {
  988. if (key.test(text)) {
  989. return text_prefix + text.replace(key, value) + text_reg_exclude_postfix + text_postfix;
  990. }
  991. }
  992.  
  993. //遍历尝试匹配
  994. for (let i in cnItems) {
  995. //字典已有词汇或译文、且译文不为空,则返回译文
  996. if (typeof(cnItems[i]) == "string" && (text == i || text == cnItems[i])) {
  997. return text_prefix + cnItems[i] + text_reg_exclude_postfix + text_postfix;
  998. } else if (typeof(cnItems[i]) == "object" && text == i) {
  999. let result = cnItemByTag(i, cnItems[i], node, textori);
  1000. if (result != null) {
  1001. return text_prefix + result + text_reg_exclude_postfix + text_postfix;
  1002. } else {
  1003. CNITEM_DEBUG && console.log({ text: i, cnitem: cnItems[i], node });
  1004. }
  1005. } else {
  1006. // continue;
  1007. }
  1008. }
  1009.  
  1010. //调整收录的词条,0=收录原文,1=收录去除前后缀的文本
  1011. let save_cfg = 1;
  1012. let save_text = save_cfg ? text : textori;
  1013. //遍历生词表是否收录
  1014. for (
  1015. let i = 0; i < cnItems._OTHER_.length; i++
  1016. ) {
  1017. //已收录则直接返回
  1018. if (save_text == cnItems._OTHER_[i])
  1019. return text_prefix + text + text_reg_exclude_postfix + text_postfix;
  1020. }
  1021.  
  1022. if (cnItems._OTHER_.length < 1000) {
  1023. //未收录则保存
  1024. cnItems._OTHER_.push(save_text);
  1025. cnItems._OTHER_.sort(
  1026. function(a, b) {
  1027. return a.localeCompare(b)
  1028. }
  1029. );
  1030. }
  1031.  
  1032. //开启生词打印
  1033. CNITEM_DEBUG && console.log(
  1034. '有需要汉化的英文:', text
  1035. );
  1036.  
  1037. //返回生词字串
  1038. return text_prefix + text + text_reg_exclude_postfix + text_postfix;
  1039. };
  1040.  
  1041. transTaskMgr = {
  1042. tasks: [],
  1043. addTask: function(node, attr, text) {
  1044. this.tasks.push({
  1045. node,
  1046. attr,
  1047. text
  1048. })
  1049. },
  1050. doTask: function() {
  1051. let task = null;
  1052. while (task = this.tasks.pop())
  1053. task.node[task.attr] = task.text;
  1054. },
  1055. }
  1056.  
  1057. function TransSubTextNode(node) {
  1058. if (node.childNodes.length > 0) {
  1059. for (let subnode of node.childNodes) {
  1060. if (subnode.nodeName === "#text") {
  1061. let text = subnode.textContent;
  1062. let cnText = cnItem(text, subnode);
  1063. cnText !== text && transTaskMgr.addTask(subnode, 'textContent', cnText);
  1064. //console.log(subnode);
  1065. } else if (subnode.nodeName !== "SCRIPT" && subnode.nodeName !== "STYLE" && subnode.nodeName !== "TEXTAREA") {
  1066. if (!subnode.childNodes || subnode.childNodes.length == 0) {
  1067. let text = subnode.innerText;
  1068. let cnText = cnItem(text, subnode);
  1069. cnText !== text && transTaskMgr.addTask(subnode, 'innerText', cnText);
  1070. //console.log(subnode);
  1071. } else {
  1072. TransSubTextNode(subnode);
  1073. }
  1074. } else {
  1075. // do nothing;
  1076. }
  1077. }
  1078. }
  1079. }
  1080. let clicks = null;
  1081. let checks = null;
  1082. // 自动战斗
  1083. function autoFight(){
  1084. if($('.fixed.inset-0.bg-black.bg-opacity-50.z-50 .bg-red-500.text-white').length > 0){
  1085. $('.flex.gap-3.mt-4 .w-full.bg-red-500').trigger('click');
  1086. }
  1087. }
  1088.  
  1089. // 检测链接
  1090. function checkUrl(){
  1091. if(location.href.indexOf('/game') < 0){
  1092. $('#btnStart').hide();
  1093. $('#btnStart').removeClass('open');
  1094. $('#btnStart').text('开始战斗')
  1095. clearInterval(clicks);
  1096. }else{
  1097. $('#btnStart').show();
  1098. if(!$('#btnStart').hasClass('open')){
  1099. $('#btnStart').trigger('click');
  1100. }
  1101. }
  1102. }
  1103. // 在页面上添加 HTML 结构
  1104. function createHTML() {
  1105. var btnStart = '<button id="btnStart" class="px-4 py-2 bg-indigo-600 rounded-md mb-4" style="position: absolute;right: 20px;top: 90px;color: #fff;display: none;">开启自动战斗</button>'
  1106. $('body').append(btnStart);
  1107. }
  1108.  
  1109.  
  1110. ! function() {
  1111. console.log("加载汉化模块");
  1112. // 创建按钮
  1113. // createHTML();
  1114. // 检测链接,显示战斗按钮
  1115. // checks = setInterval(checkUrl,3000);
  1116. // 自动战斗
  1117. $('#btnStart').click(function(){
  1118. if( $('#btnStart').hasClass('open')){
  1119. clearInterval(clicks);
  1120. clearInterval(checks);
  1121. $('#btnStart').removeClass('open');
  1122. $('#btnStart').text('开始战斗')
  1123. }else{
  1124. clicks=setInterval(autoFight,5000);
  1125. checks = setInterval(checkUrl,3000);
  1126. $('#btnStart').addClass('open');
  1127. $('#btnStart').text('停止战斗')
  1128. }
  1129. })
  1130. let observer_config = {
  1131. attributes: false,
  1132. characterData: true,
  1133. childList: true,
  1134. subtree: true
  1135. };
  1136. let targetNode = document.body;
  1137. //汉化静态页面内容
  1138. TransSubTextNode(targetNode);
  1139. transTaskMgr.doTask();
  1140. //监听页面变化并汉化动态内容
  1141. let observer = new MutationObserver(function(e) {
  1142. //window.beforeTransTime = performance.now();
  1143. observer.disconnect();
  1144. for (let mutation of e) {
  1145. if (mutation.target.nodeName === "SCRIPT" || mutation.target.nodeName === "STYLE" || mutation.target.nodeName === "TEXTAREA") continue;
  1146. if (mutation.target.nodeName === "#text") {
  1147. mutation.target.textContent = cnItem(mutation.target.textContent, mutation.target);
  1148. } else if (!mutation.target.childNodes || mutation.target.childNodes.length == 0) {
  1149. mutation.target.innerText = cnItem(mutation.target.innerText, mutation.target);
  1150. } else if (mutation.addedNodes.length > 0) {
  1151. for (let node of mutation.addedNodes) {
  1152. if (node.nodeName === "#text") {
  1153. node.textContent = cnItem(node.textContent, node);
  1154. //console.log(node);
  1155. } else if (node.nodeName !== "SCRIPT" && node.nodeName !== "STYLE" && node.nodeName !== "TEXTAREA") {
  1156. if (!node.childNodes || node.childNodes.length == 0) {
  1157. if (node.innerText)
  1158. node.innerText = cnItem(node.innerText, node);
  1159. } else {
  1160. TransSubTextNode(node);
  1161. }
  1162. }
  1163. }
  1164. }
  1165. }
  1166. transTaskMgr.doTask();
  1167. observer.observe(targetNode, observer_config);
  1168. //window.afterTransTime = performance.now();
  1169. //console.log("捕获到页面变化并执行汉化,耗时" + (afterTransTime - beforeTransTime) + "毫秒");
  1170. });
  1171. observer.observe(targetNode, observer_config);
  1172. window.cnItems = cnItems
  1173. }();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址