Project1

标题: 关于yep反击插件的使用请教 [打印本页]

作者: 方南啊    时间: 2024-1-8 16:01
标题: 关于yep反击插件的使用请教
<Custom Counter Skills>
if (user.classId === 1 || user.classId === 2 || user.classId === 3 || user.classId === 4) {
  skills.push(11);
} else if (user.classId === 5 || user.classId === 6 || user.classId === 7) {
  skills.push(64);
} else if (user.classId === 8 || user.classId === 9 || user.classId === 10) {
  skills.push(102);
} else if (user.classId === 11 || user.classId === 12 || user.classId === 13) {
  skills.push(135);
} else if (user.classId === 14 || user.classId === 15 || user.classId === 16) {
  skills.push(168);
} else if (user.classId === 17 || user.classId === 18 || user.classId === 19) {
  skills.push(215);
}
</Custom Counter Skills> 有没有大佬用过yep的反击插件,为啥用他给的自定义反击技能代码却不生效,有知道的大佬嘛,
上面是我写的想实现的效果,下面是它的插件备注,是我哪里用错了嘛,求大佬解答
For those with JavaScript proficiency, you can use the following Lunatic
Mode notetags to give a dynamic set of skills granted for counter usage.

Actor, Class, Enemy, Weapon, Armor, and State Notetags:

  <Custom Counter Skills>
   if (user.name() === 'Harold') {
     skills.push(50, 51, 52);
   } else if (user.name() === 'Therese') {
     skills.push(53, 54, 55);
   } else if (user.name() === 'Marsha') {
     skills.push(56, 57, 58);
   } else if (user.name() === 'Lucius') {
     skills.push(59, 60, 61);
   }
  </Custom Counter Skills>
  The 'skills' variable is an array that will contain all the counter skills
  that will be added to the list of potential skills the battler can counter
  actions with provided that their requirements are met.
作者: shiroin    时间: 2024-1-8 17:18
看你写的格式本身是没什么问题,你有试过范例备注对你的工程有效果吗?
作者: 方南啊    时间: 2024-1-9 10:33
shiroin 发表于 2024-1-8 17:18
看你写的格式本身是没什么问题,你有试过范例备注对你的工程有效果吗?

已经解决了,俩问题,第一个是代码写错了,class那个地方少了个下划线,应该是user._classId这样。然后第二个问题是反击插件的代码本身有问题,大佬帮忙修改了源码中的一个参数就好了。最后谢谢大佬解答了




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1