Custom Damage-over-time Effect

SonoKiabutsu

Villager
Member
Joined
Jul 4, 2015
Messages
8
Reaction score
1
First Language
Enland
Primarily Uses
So I'm trying to create a custom damage over time effect where the damage and turns it takes is based on the users MP at the time the skill is used (the MP shouldn't be a cost, but it clears once the effect hits the enemy. It's 5 as that's the characters max MP at all times).


I am using YanFly's Buffs and States core for this. The adding turns is working fine, however the variables in the custom apply effect need to go through to the custom regenerate effect (if I set the variable there it will just update to the current MP of the character which is not what I want.)


Here is the code:

<Custom Apply Effect>
var RuptureMult = origin.mp;
user.setStateTurns(137, RuptureMult + 1);
origin.gainMp(-5);
</Custom Apply Effect>


<Custom Regenerate Effect>
var elementId = 13;
var damage = Math.round(Math.ceil(origin.level *0.05) * ((origin.atk * 4) * 0.6) * (RuptureMult * RuptureMult));
damage *= user.elementRate(elementId);
damage = Math.floor(damage);
user.gainHp(-damage);
user.startDamagePopup();
user.clearResult();
</Custom Regenerate Effect>


Any help would be appreciated.
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
l don't understand what you need exactly inside the custom regenerate effect.
 

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