-
Notifications
You must be signed in to change notification settings - Fork 761
bugfix&新武将 #2666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix&新武将 #2666
Conversation
1.修复鹰狼效果没失效、劝酒使用酒后不能打出牌的bug 2.新武将:吉邈吉穆 3.新杀钟毓调整至最新版 4.修复夏侯紫萼无视条件发动夺刃以及夺刃十常侍的bug 5.葛玄灵宝补充ai以及修复若干bug
| links: links, | ||
| async content(event, trigger, player) { | ||
| const links = lib.skill[event.name].links; | ||
| if (links.includes("draw")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Array#includes相当于遍历一遍数组
虽然此处数组的长度就是2,完全可忽略不计,但或许for (const link of links)后判断link的值会更好一点
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个的话是因为它要有一定的执行顺序,用for的话有可能因为点击的顺序还得排一次序,加上确实就两个,就干脆这样写了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
也确实,如果真要改得“合理”点,那么就得把两种情况改成函数,然后判断links.length:为2则顺序执行,为1就判断具体是啥
如果能对links里的字符串增加index就能通过Array#sort进行排序,然后再循环;Array#sort和一次循环的时间复杂度应该比多次o(n)好,虽然也不好说(不过考虑到Array#sort肯定有优化,必然比纯Javascript的循环效率高)
| backup(links, player) { | ||
| return { | ||
| audio: "dczouyi", | ||
| links: links, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
说起来,既然content里不再访问技能的属性,此处似乎不再需要links: links,更别说可以直接links
不过这倒没啥后果,无名杀冗余数据挺多的,不差这里
character/tw/skill.js
Outdated
| complexSelect: true, | ||
| check(button) { | ||
| const card = button.link; | ||
| const suits = player |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
忘get.player了
1.修复谋关威临判断印牌时没有unsure的问题 2.修改钟毓的部分代码的写法 3.威吕布威张辽村规:只要有一张是标记牌即可无次数限制使用
character/tw/skill.js
Outdated
| complexSelect: true, | ||
| check(button) { | ||
| const card = button.link; | ||
| const suits = get.player() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我突然才发现漏了个分号
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有漏,因为格式化之后长一点的都给放后面了,后面有函数需要访问这个的。
但ai确实写错……
PR受影响的平台
所有
诱因和背景
群友反馈以及新武将
PR描述
1.修复鹰狼效果没失效、劝酒使用酒后不能打出牌的bug
2.新武将:吉邈吉穆
3.新杀钟毓调整至最新版
4.修复夏侯紫萼无视条件发动夺刃以及夺刃十常侍的bug
5.葛玄灵宝补充ai以及修复若干bug
6.修复谋关威临判断印牌时没有unsure的问题
7.威吕布威张辽统一:只要有一张是标记牌即可无次数限制使用
8.修复OL界廖化当先即使不摸杀也会受到伤害的bug
9.新杀谋刘协结算调整
PR测试
已在本地测试
扩展适配
无
检查清单
master分支WIP直到本PR内容全部提交character/rank.js中添加对应的武将强度评级,并对双人武将/复姓武将添加name:xxx的参数lib.translate中加入语音文件的文字台词PR描述中写入详细文档扩展适配中写入详细文档诱因和背景中明确链接到该issue.editorconfig、eslint.config.mjs和prettier.config.mjs所规定的代码样式,并且已经通过prettier格式化过代码