Multiple hits and damage formulas

Discussion in 'Javascript/Plugin Support' started by Ptolam, Jul 22, 2016.

  1. Ptolam

    Ptolam Warper Member

    Messages:
    4
    Likes Received:
    0
    Location:
    Canada, Québec
    First Language:
    French
    Hi, I'm using Yanfly Target Core and BOB Custom Stats plugins to build my basic attack skill. It hits multiple times, based on the user's attack speed. For that part, I kind of succeed, with something like that :


    <Custom Target Eval>
    var hits = Math.ceil(user.vitatk);
    var lastHit = user.vitatk % 1;
    hits = hits.clamp(1, 5);
    this._totalHits = hits;
    this._lastHitMultiplier = lastHit;

    while (hits--) {
    targets.push(target);
    }
    </Custom Target Eval>


    The thing is, when it comes to evaluate how much damage each hit will deal. For instance, an actor with 2.40 attack speed should hit 3 times, with the last one being only 40% of my damage formula.


    Is there an easy way to do it?


    Thanks in advance. :)
     
    #1

Share This Page