Recover MP after 4 turns

Discussion in 'Javascript/Plugin Support' started by kovak, Jan 28, 2017.

  1. kovak

    kovak Silverguard Veteran

    Messages:
    1,245
    Likes Received:
    1,549
    Location:
    I'm from the Hu3
    First Language:
    PT - EN
    Primarily Uses:
    RMMV
    My idea is to when the actor reaches 10% of MP it will be recovered by 100% after 4 turns.


    Idk javascript so i'm wordering if somebody can give me a hand with it since i'm almost sure it will require a lunatic mode to be done.
     
    #1
  2. lolshtar

    lolshtar Master of Magic thatknow nospell Veteran

    Messages:
    694
    Likes Received:
    100
    First Language:
    French
    Primarily Uses:
    RMMV
    You'll need on each skill

    <After Eval>
    user._mprate = Math.floor(user.mp/user.mmp)
    if (user._mprate < 0.10) {
    user.addState(X) }
    </After Eval>

    State X has 25% MPR and lasts 4 turns

    or you can also try a passive state that has this

    <Custom Action End>
    target._mprate = Math.floor(target.mp/target.mmp)
    if (target._mprate < 0.10) {
    target.addState(X) }
    </Custom Action End>

    Unfortunately, you weren't clear enough so l can't guess for you exactly what you want because balance wise, this would be really bad and probably give infinite mana unless you disable skills with the state.
     
    #2

Share This Page