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

Project1

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

[有事请教] 找到一个承担伤害的状态但不知道怎么改成敌人用的求助

[复制链接]

Lv4.逐梦者

梦石
0
星屑
5732
在线时间
1556 小时
注册时间
2011-6-14
帖子
520
跳转到指定楼层
1
发表于 2018-10-19 01:58:37 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
10星屑
哪位大大帮我改下,能让这个状态技能敌人也可以生效

JAVASCRIPT 代码复制
  1. <Custom React Effect>
  2. // Split the damage
  3. value = Math.floor(value / $gameParty.aliveMembers().length);
  4. // Start loop
  5. for (var i = 0; i < $gameParty.aliveMembers().length; i++) {
  6. var actor = $gameParty.aliveMembers()[i];
  7. // Ignore actor if the actor is the target (= Don't damage the target twice)
  8. if (actor === target) { continue };
  9. // Actor loses HP
  10. actor.gainHp(-value);
  11. actor.startDamagePopup();
  12. actor.clearResult();
  13. // Collapse Actor if dead
  14. if (actor.isDead()) { actor.performCollapse() };
  15. };
  16. </Custom React Effect>

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

本版积分规则

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

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

GMT+8, 2024-5-15 22:39

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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