Hello,
I've recently been trying to recreate two skills from smite's god Zhong Kui, which essentially applies a dot, and if the other skill is used to remove it, they take damage and 75% of the remaining damage is done instantly. I have tried to recreate this with this code but I am having trouble getting effects to run while removing the state, so I'm probably putting my energy into the wrong thing. I'm just looking for the simple numbers of course not an exact recreation, just the main functions.
I've recently been trying to recreate two skills from smite's god Zhong Kui, which essentially applies a dot, and if the other skill is used to remove it, they take damage and 75% of the remaining damage is done instantly. I have tried to recreate this with this code but I am having trouble getting effects to run while removing the state, so I'm probably putting my energy into the wrong thing. I'm just looking for the simple numbers of course not an exact recreation, just the main functions.
Code:
<Custom Apply Effect>
this._DemonCounter = 1;
</Custom Apply Effect>
<Custom Regenerate Effect>
var n = this._DemonCounter;
var value = Math.floor(n * 222 * -1);
user.gainHp(value);
this._DemonCounter += 1;
</Custom Regenerate Effect>
<Custom Leave Effect>
// Reset the stack count.
this._DemonCounter = 0;
</Custom Leave Effect>
<Custom Remove Effect>
// Declare the dispeller.
var dispeller = BattleManager._subject;
// Check to see if the effect is a leave effect or removal.
var notLeaveEffect = !$gameTemp._customLeaveEffectEval;
// Check the conditions to see if they're met.
if (dispeller && notLeaveEffect) {
// Get the Silence status effect.
var stateId = 6;
// Get the Darkness element.
var elementId = 9;
var n = this._DemonCounter;
var value = Math.Ceil(222);
var exorcism = Math.Ceil(value * (n === 3 ? +0 || n === 1 ? +2 || n === 2 ? +1;));
exorcism *= 0.75;
exorcism *= target.elementRate(elementId);
user.startAnimation(102);
user.addState(stateId);
user.gainHp(-exorcism);
user.startDamagePopup();
if (user.isDead()) {
user.performCollapse();
}
user.clearResult();
}
</Custom Remove Effect>