Skip to content

Conversation

@xjm0708
Copy link
Contributor

@xjm0708 xjm0708 commented Jun 6, 2025

PR受影响的平台

所有

诱因和背景

群友反馈以及新武将

PR描述

1.修复鹰狼效果没失效、劝酒使用酒后不能打出牌的bug
2.新武将:吉邈吉穆
3.新杀钟毓调整至最新版
4.修复夏侯紫萼无视条件发动夺刃以及夺刃十常侍的bug
5.葛玄灵宝补充ai以及修复若干bug
6.修复谋关威临判断印牌时没有unsure的问题
7.威吕布威张辽统一:只要有一张是标记牌即可无次数限制使用
8.修复OL界廖化当先即使不摸杀也会受到伤害的bug
9.新杀谋刘协结算调整

PR测试

已在本地测试

扩展适配

检查清单

  • 我没有把该PR提交到master分支
  • commit中没有无用信息,和没有具体内容的“bugfix”
  • 我已经进行了充足的测试,且现有的测试都已通过
  • 若我拥有PR标签权限,则已确保为该PR打上标签;若我未拥有PR标签权限且该PR仍需继续提交内容,则已确保为该PR名称打上WIP直到本PR内容全部提交
  • 如果此次PR中添加了新的武将,则我已在character/rank.js中添加对应的武将强度评级,并对双人武将/复姓武将添加name:xxx的参数
  • 如果此次PR中添加了新的语音文件,则我已在lib.translate中加入语音文件的文字台词
  • 如果此次PR涉及到新功能的添加,我已在PR描述中写入详细文档
  • 如果此次PR需要扩展跟进,我已在扩展适配中写入详细文档
  • 如果这个PR解决了一个issue,我在诱因和背景中明确链接到该issue
  • 我保证该PR中没有随意修改换行符等内容,没有制造出大量的Diff
  • 我保证该PR遵循项目中.editorconfigeslint.config.mjsprettier.config.mjs所规定的代码样式,并且已经通过prettier格式化过代码

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")) {
Copy link
Member

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的值会更好一点

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个的话是因为它要有一定的执行顺序,用for的话有可能因为点击的顺序还得排一次序,加上确实就两个,就干脆这样写了

Copy link
Member

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的循环效率高)

@rintim rintim added App:Character Level:P3 Minor, Zephyr labels Jun 6, 2025
@xjm0708 xjm0708 requested a review from rintim June 6, 2025 15:22
backup(links, player) {
return {
audio: "dczouyi",
links: links,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

说起来,既然content里不再访问技能的属性,此处似乎不再需要links: links,更别说可以直接links

不过这倒没啥后果,无名杀冗余数据挺多的,不差这里

complexSelect: true,
check(button) {
const card = button.link;
const suits = player
Copy link
Collaborator

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.威吕布威张辽村规:只要有一张是标记牌即可无次数限制使用
1.修复OL界廖化当先即使不摸杀也会受到伤害的bug
2.葛玄忘记get.player()以及backup改为直接使用links
1.吉吉国王增加动态翻译以及优化部分代码
2.新杀谋刘协结算调整
complexSelect: true,
check(button) {
const card = button.link;
const suits = get.player()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我突然才发现漏了个分号

Copy link
Contributor Author

@xjm0708 xjm0708 Jun 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有漏,因为格式化之后长一点的都给放后面了,后面有函数需要访问这个的。
但ai确实写错……

@xizifu xizifu merged commit 22735ed into libnoname:PR-Branch Jun 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants