设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 214|回复: 3
打印 上一主题 下一主题

[有事请教] 问一下这个yep公式怎么错了

[复制链接]

Lv2.观梦者

梦石
0
星屑
585
在线时间
116 小时
注册时间
2023-10-10
帖子
49
跳转到指定楼层
1
发表于 2024-9-15 20:41:17 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x


式子:
  <Help Description>
:消耗该状态使用特殊技能。每5充能状态升级。
充能一级:双攻+20%
充能二级:额外提升敏捷+35%,命中率+5%
充能三级:tp恢复率+30%
当充能为20时,发生过载,双攻-50%
</Help Description>

// 这里是大佬写的子弹公式,我拿来用
<Custom Battle Effect>
user._ammunition1 = 1;
user.setStateCounter(166, user._ammunition1);
user.clampStateCounter(166, 0, 20);
</Custom Battle Effect>

<Custom Turn Start Effect>
user._ammunition1 = user._ammunition1 || 0;
user.setStateCounter(166, user._ammunition1);
user.clampStateCounter(166, 0, 20);
</Custom Turn Start Effect>

<Custom Action Start Effect>
user._ammunition1 = user._ammunition1 || 0;
user.setStateCounter(166, user._ammunition1);
user.clampStateCounter(166, 0, 20);
</Custom Action Start Effect>

<Custom Action End Effect>
user._ammunition1 = user._ammunition1 || 0;
user.setStateCounter(166, user._ammunition1);
user.clampStateCounter(166, 0, 20);
</Custom Action End Effect>

<Custom Initiate Effect>
user._ammunition1 = user._ammunition1 || 0;
user.setStateCounter(166, user._ammunition1);
user.clampStateCounter(166, 0, 20);
</Custom Initiate Effect>

<Custom Select Effect>
target._ammunition1 = target._ammunition1 || 0;
target.setStateCounter(166, target._ammunition1);
target.clampStateCounter(166, 0, 20);
</Custom Select Effect>

<Custom Confirm Effect>
user._ammunition1 = user._ammunition1 || 0;
user.setStateCounter(166, user._ammunition1);
user.clampStateCounter(166, 0, 20);
</Custom Confirm Effect>

<Custom React Effect>
target._ammunition1 = target._ammunition1 || 0;
target.setStateCounter(166, target._ammunition1);
target.clampStateCounter(166, 0, 20);
</Custom React Effect>

<Custom Respond Effect>
target._ammunition1 = target._ammunition1 || 0;
target.setStateCounter(166, target._ammunition1);
target.clampStateCounter(166, 0, 20);
</Custom Respond Effect>

<Custom Establish Effect>
user._ammunition1 = user._ammunition1 || 0;
user.setStateCounter(166, user._ammunition1);
user.clampStateCounter(166, 0, 20);
</Custom Establish Effect>

<Custom Deselect Effect>
target._ammunition1 = target._ammunition1 || 0;
target.setStateCounter(166, target._ammunition1);
target.clampStateCounter(166, 0, 20);
</Custom Deselect Effect>

<Custom Conclude Effect>
user._ammunition1 = user._ammunition1 || 0;
user.setStateCounter(166, user._ammunition1);
user.clampStateCounter(166, 0, 20);
</Custom Conclude Effect>

// 这下面是不同层不同增益的(我自己照葫芦画瓢写的)

<Custom Turn Start Effect>
if (user._ammunition1>=20) {
user.addState(170)
user.removeState(167)
user.removeState(168)
user.removeState(169);
} else if (user._ammunition1>=15) {
user.addState(169)
user.removeState(167)
user.removeState(168)
user.removeState(170);
} else if (user._ammunition1>=10) {
user.addState(168)
user.removeState(167)
user.removeState(169)
user.removeState(170);
} else if (user._ammunition1>=5) {
user.addState(167)
user.removeState(168)
user.removeState(169)
user.removeStateState(170);
}
</Custom Turn Start Effect>

<Custom Remove Effect>
user.removeState(167)
user.removeState(168)
user.removeState(169)
user.removeStateState(170);
</Custom Remove Effect>

Lv2.观梦者

梦石
0
星屑
585
在线时间
116 小时
注册时间
2023-10-10
帖子
49
2
 楼主| 发表于 2024-9-15 20:44:23 | 只看该作者
这个式子错误的地方是,假如我有12层,我释放技能减了4层,然后当人物回合时候就报错了。不知道怎么做,我这是按着大佬照葫芦画瓢写的,如果有更简单的式子更好了
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
10
星屑
39592
在线时间
1920 小时
注册时间
2010-11-14
帖子
3320

R考场第七期纪念奖

3
发表于 2024-9-15 20:50:07 | 只看该作者
有两处 user.removeStateState,看上去是拼写错误
改成 user.removeState 之后看看:

<Help Description>
:消耗该状态使用特殊技能。每5充能状态升级。
充能一级:双攻+20%
充能二级:额外提升敏捷+35%,命中率+5%
充能三级:tp恢复率+30%
当充能为20时,发生过载,双攻-50%
</Help Description>

// 这里是大佬写的子弹公式,我拿来用
<Custom Battle Effect>
user._ammunition1 = 1;
user.setStateCounter(166, user._ammunition1);
user.clampStateCounter(166, 0, 20);
</Custom Battle Effect>

<Custom Turn Start Effect>
user._ammunition1 = user._ammunition1 || 0;
user.setStateCounter(166, user._ammunition1);
user.clampStateCounter(166, 0, 20);
</Custom Turn Start Effect>

<Custom Action Start Effect>
user._ammunition1 = user._ammunition1 || 0;
user.setStateCounter(166, user._ammunition1);
user.clampStateCounter(166, 0, 20);
</Custom Action Start Effect>

<Custom Action End Effect>
user._ammunition1 = user._ammunition1 || 0;
user.setStateCounter(166, user._ammunition1);
user.clampStateCounter(166, 0, 20);
</Custom Action End Effect>

<Custom Initiate Effect>
user._ammunition1 = user._ammunition1 || 0;
user.setStateCounter(166, user._ammunition1);
user.clampStateCounter(166, 0, 20);
</Custom Initiate Effect>

<Custom Select Effect>
target._ammunition1 = target._ammunition1 || 0;
target.setStateCounter(166, target._ammunition1);
target.clampStateCounter(166, 0, 20);
</Custom Select Effect>

<Custom Confirm Effect>
user._ammunition1 = user._ammunition1 || 0;
user.setStateCounter(166, user._ammunition1);
user.clampStateCounter(166, 0, 20);
</Custom Confirm Effect>

<Custom React Effect>
target._ammunition1 = target._ammunition1 || 0;
target.setStateCounter(166, target._ammunition1);
target.clampStateCounter(166, 0, 20);
</Custom React Effect>

<Custom Respond Effect>
target._ammunition1 = target._ammunition1 || 0;
target.setStateCounter(166, target._ammunition1);
target.clampStateCounter(166, 0, 20);
</Custom Respond Effect>

<Custom Establish Effect>
user._ammunition1 = user._ammunition1 || 0;
user.setStateCounter(166, user._ammunition1);
user.clampStateCounter(166, 0, 20);
</Custom Establish Effect>

<Custom Deselect Effect>
target._ammunition1 = target._ammunition1 || 0;
target.setStateCounter(166, target._ammunition1);
target.clampStateCounter(166, 0, 20);
</Custom Deselect Effect>

<Custom Conclude Effect>
user._ammunition1 = user._ammunition1 || 0;
user.setStateCounter(166, user._ammunition1);
user.clampStateCounter(166, 0, 20);
</Custom Conclude Effect>

// 这下面是不同层不同增益的(我自己照葫芦画瓢写的)

<Custom Turn Start Effect>
if (user._ammunition1>=20) {
user.addState(170)
user.removeState(167)
user.removeState(168)
user.removeState(169);
} else if (user._ammunition1>=15) {
user.addState(169)
user.removeState(167)
user.removeState(168)
user.removeState(170);
} else if (user._ammunition1>=10) {
user.addState(168)
user.removeState(167)
user.removeState(169)
user.removeState(170);
} else if (user._ammunition1>=5) {
user.addState(167)
user.removeState(168)
user.removeState(169)
user.removeState(170); //user.removeStateState(170);
}
</Custom Turn Start Effect>

<Custom Remove Effect>
user.removeState(167)
user.removeState(168)
user.removeState(169)
user.removeState(170); //user.removeStateState(170);
</Custom Remove Effect>
用头画头像,用脚写脚本
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
585
在线时间
116 小时
注册时间
2023-10-10
帖子
49
4
 楼主| 发表于 2024-9-15 20:54:34 | 只看该作者
KB.Driver 发表于 2024-9-15 20:50
有两处 user.removeStateState,看上去是拼写错误
改成 user.removeState 之后看看:

好的!谢谢了!我不小心复制粘贴两个state了!
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-22 03:28

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表