查看: 4961|回复: 8

[有事请教] 如何判断当前使用技能是否是某个技能

[复制链接]
梦石
0
星屑
368
在线时间
222 小时
注册时间
2009-10-3
回帖
5
发表于 2019-5-9 13:06:19 | 显示全部楼层 |阅读模式
悬赏30星屑未解决
加到状态备注栏,配合yep状态插件使用

判断当前使用的技能是否是某编号技能,是这样写吗???

未标题-1.png

未标题-1.png
未标题-1.png
梦石
0
星屑
39236
在线时间
11155 小时
注册时间
2009-3-15
回帖
4768
发表于 2019-5-9 17:17:00 | 显示全部楼层
skill.id
ZZZZZZZZZZZZZZZZ
回复

使用道具 举报

梦石
0
星屑
2772
在线时间
215 小时
注册时间
2017-9-28
回帖
255
发表于 2019-5-9 18:01:00 | 显示全部楼层
this.item() == $dataSkills[1]
回复

使用道具 举报

梦石
0
星屑
368
在线时间
222 小时
注册时间
2009-10-3
回帖
5
 楼主| 发表于 2019-5-11 22:31:22 | 显示全部楼层
擦不完的水 发表于 2019-5-9 18:01
this.item() == $dataSkills[1]

大神这句话加到哪里呢 我试了下加到if里不行
回复

使用道具 举报

梦石
0
星屑
368
在线时间
222 小时
注册时间
2009-10-3
回帖
5
 楼主| 发表于 2019-5-11 22:31:55 | 显示全部楼层
soulsaga 发表于 2019-5-9 17:17
skill.id
ZZZZZZZZZZZZZZZZ

大神这句话加到哪里呢 我试了下加到if里不行
回复

使用道具 举报

梦石
0
星屑
39236
在线时间
11155 小时
注册时间
2009-3-15
回帖
4768
发表于 2019-5-11 22:32:56 | 显示全部楼层
gulangr 发表于 2019-5-11 22:31
大神这句话加到哪里呢 我试了下加到if里不行

var skill下面..
回复

使用道具 举报

梦石
0
星屑
368
在线时间
222 小时
注册时间
2009-10-3
回帖
5
 楼主| 发表于 2019-5-11 22:42:31 | 显示全部楼层


<Custom Action Start Effect>
// If a chained action is stored...
if ($gameTemp._chainAction === undefined) {
  // ...then set the action to the user's current action.
  $gameTemp._chainAction = user.currentAction();
} else {
  // ...then clear the stored action.
  $gameTemp._chainAction = undefined;
}
</Custom Action Start Effect>

<Custom Action End Effect>
// If a chained action is stored...
if ($gameTemp._chainAction) {
  // Set the 'action' variable to the chained action.
  var action = $gameTemp._chainAction;
  // Check if the action exists, is a skill, and is a magical attack.
  if (action && action.isSkill()) {
    // Get the skill used for that action.
    var skill = action.item();
    if (skill.id = 1)
    // Check if the user can pay the skill cost.
    if (user.canPaySkillCost(skill)) {
      // Check if the battle system is DTB.
      if (BattleManager.isDTB()) {
        // If it is, add the action to queue.
        user.setAction(0, action);
      // If the battle system isn't DTB...
      } else {
        // ...make it a forced forced.
        BattleManager.queueForceAction(user, skill.id, -2);
      }
    }
  }
}
</Custom Action End Effect>

<Custom Remove Effect>
// Clear the chained action effect.
$gameTemp._chainAction = undefined;
</Custom Remove Effect>

这样写吗 实在有点搞不懂 忘指教

点评

程式里面 == 才是= 只有= 会报错.... 顺便科普 != 是不等  发表于 2019-5-20 01:30
不是=..是==  发表于 2019-5-11 23:52
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部