查看: 826|回复: 3

[有事请教] 能力值附加在战斗结束后永久附加了

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

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

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

×
<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.addParam(2,value);
var g = p + value;
$gameMessage.add(g);
</Custom Apply Effect>

<Custom Remove Effect>
this._Warpath = 0;
</Custom Remove Effect>

<Counter Alignment: left>
梦石
0
星屑
46
在线时间
10 小时
注册时间
2023-12-29
回帖
4
 楼主| 发表于 2024-6-6 21:45:34 | 显示全部楼层
状态的备注是这么写的,其中user.addParam(2,value);导致了战斗中状态获取的能力值变成了永久增加的,请问各位大佬怎么让这个变成只在战斗里面生效战斗结束之后变回来。$gameActors.actor(1).addParam(2, -value);的方法做不到恢复到进入战斗的时候的能力值吧
回复

使用道具 举报

梦石
0
星屑
29896
在线时间
5733 小时
注册时间
2016-3-8
回帖
1653
发表于 2024-6-7 16:09:20 | 显示全部楼层
<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>

这样行不
回复 1 0

使用道具 举报

梦石
0
星屑
46
在线时间
10 小时
注册时间
2023-12-29
回帖
4
 楼主| 发表于 2024-6-7 19:38:26 | 显示全部楼层
alexncf125 发表于 2024-6-7 16:09
this._Warpath  = this._Warpath  || 0;
this._Warpath  += 1;
this.setStateCounter(3, this._Warpath);

感谢大佬,这样写解决了!
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部