KB.Driver 发表于 2024-9-15 20:50 好的!谢谢了!我不小心复制粘贴两个state了! |
有两处 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> |
这个式子错误的地方是,假如我有12层,我释放技能减了4层,然后当人物回合时候就报错了。不知道怎么做,我这是按着大佬照葫芦画瓢写的,如果有更简单的式子更好了 |
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2024-9-20 15:05
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.