Multiple hits and damage formulas

Ptolam

Warper
Member
Joined
Jul 18, 2016
Messages
4
Reaction score
0
First Language
French
Primarily Uses
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. :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,019
Members
137,564
Latest member
McFinnaPants
Top