查看: 1026|回复: 1

[有事请教] 有关检测状态层数的问题

[复制链接]
梦石
0
星屑
46
在线时间
10 小时
注册时间
2023-12-29
回帖
4
发表于 2024-6-7 22:06:41 | 显示全部楼层 |阅读模式

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

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

×
我写了一个状态,备注代码是这样的
<Custom Apply Effect>
this._Warpath  = this._Warpath  || 0;
this._Warpath  += 1;
this.setStateCounter(3, this._Warpath);
user.startAnimation(121);
var p = target.atk;
var value = p * 0.1;
user._addedAtk = user._addedAtk || 0;
user._addedAtk += value;
user.addParam(2,value);
var g = p + value;
$gameMessage.add(g);
</Custom Apply Effect>

<Custom Remove Effect>
user.addParam(2,-user._addedAtk);
user._addedAtk = 0;
this._Warpath = 0;
</Custom Remove Effect>

<Counter Alignment: left>
其中用this._Warpath来记录这个技能的层数,现在我又用另外一个技能来检测这个状态的层数——也就是this._Warpath的层数。现在有一个疑问,状态里面声明的变量是否可以在技能里面直接使用。如果不能的话,那我怎么写才能让技能检测到这个状态的层数。
梦石
0
星屑
46
在线时间
10 小时
注册时间
2023-12-29
回帖
4
 楼主| 发表于 2024-6-7 22:41:37 | 显示全部楼层
<Custom Requirement>
if (user.isStateAffected(3) && this._Warpath > 1) {

} else {

}
</Custom Requirement>
现在看来好像是可以直接使用状态里面的写的变量,那么现在的问题是,怎么通过脚本更改系统里面设定的伤害计算公式呢?
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部