Auto Crit on State using Yanfly's Lunatic Damage Script

● ARCHIVED · READ-ONLY
Started by Manofdusk 1 posts View original ↗
  1.  After a bit of a vanishing spell, I've come back and am trying out a different project. I've picked up Yanfly's Lunatic Damage Script and am learning how to use it. It helps since my damage scripts tent to hit or even exceed the 100 character limit.

     I have a skill called Sirrocco that deals damage based on the heat in the surrounding area (represented by variable 6). When cast on a creature that is vulnerable to withering (such as water creatures or plant creatures), the spell auto crits. I have a state (state 51) that represents this vulnerability.

    here is the damage formula I have plugged into the script.

    when /Wither/I

    @result.critical=true if b.state(51).true;

    value += c = (((a.mat/3) *$game_variables[6]) * 2) - b.mdf; end;

     it gives me the error:

    ------------------------

    unexpected keyword_when, expecting keyword_end

    when /FINALIZATION/I

    --------------------------

    that is the next line of the script and is not mine (I haven't edited it). I have an end keyword on the end of my script so I'm not sure what's wrong.