じ☆ve冰风 发表于 2026-8-5 14:36:34

Yanfly's Lunatic Damage: Apply State to Self

Hey guys.


        Quick question here.... I want to apply a state to user when using an attacking skill.


        On the script, I used something like this:


        when /customdamage/i
                  value+=a.add_state(7);(120 + a.atk * 4 - b.def * 2)*(b.state?(9) ? 0 : 1)*(b.state?(32) ? 0 : 1);


        But everytime the skill hits, it says "Nil cannot be coerced into Fixnum"


        Is it possible to do this? Thanks.


本贴来自国际rpgmaker官方论坛作者:Kevin Eontrainer处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/yanflys-lunatic-damage-apply-state-to-self.68030/
页: [1]
查看完整版本: Yanfly's Lunatic Damage: Apply State to Self