EDIT: Fixed. After getting the new versions of those two plugins now everything works perfectly.
Hi, I've been using a few tips & tricks from good ol' Yanfly, but for some reason this one doesn't work properly.
This one is called Kyrie Eleison, and is basically a state that once applied to anyone can block 10 physical hits before disappearing. It can also be destroyed when the user loses 30% of his HP.
Here's the link to the video:
The thing is that, whenever an actor or enemy with this state is hit, the battle crashes and gives me the error from below.
I've tried deactivating all my plugins but the two that I need to make this work (Battle Engine Core and Buffs and States Core) but it crashed anyway.
Here's the code needed to make the state work:
Here's what I've digged up so far:
I have a lot of plugins and the MV 1.3.4, but I've been making lots of stuff and there hasn't been any incompatibility like this before.
So if anyone can please help I'll be in doubt, thanks.
Hi, I've been using a few tips & tricks from good ol' Yanfly, but for some reason this one doesn't work properly.
This one is called Kyrie Eleison, and is basically a state that once applied to anyone can block 10 physical hits before disappearing. It can also be destroyed when the user loses 30% of his HP.
Here's the link to the video:
The thing is that, whenever an actor or enemy with this state is hit, the battle crashes and gives me the error from below.
I've tried deactivating all my plugins but the two that I need to make this work (Battle Engine Core and Buffs and States Core) but it crashed anyway.
Here's the code needed to make the state work:
Code:
<Custom Apply Effect>
// The number of hits before the shield wears off.
user._KyrieHits = 10;
// The number of damage before the shield wears off.
user._KyrieHP = Math.floor(user.mhp * 0.30);
// Set the state counter to display HP left.
user.setStateCounter(stateId, user._KyrieHP);
</Custom Apply Effect>
<Custom Remove Effect>
// Remove the number of hits to expire the shield.
user._KyrieHits = undefined;
// Remove the damage needed to expire the shield.
user._KyrieHP = undefined;
// Reset the state counter.
user.setStateCounter(stateId, 0);
</Custom Remove Effect>
<Custom React Effect>
// Check if the action deals HP damage.
if (this.isHpEffect() && value > 0) {
// Play an animation on the target.
target.startAnimation(53);
// Calculate the amount of HP to reduce.
var reduce = Math.min(value, target._KyrieHP);
// Reduce that from the value.
value -= reduce;
// Reduce that value from the shield amount.
target._KyrieHP -= reduce;
// Reduce the hits from the shield count.
target._KyrieHits -= 1;
// Set the state counter to reflect the new HP amount left
target.setStateCounter(stateId, target._KyrieHP);
// Create a text to display.
var text = "<CENTER>" + target.name() + "'s shield blocks " + reduce + " damage and has " + target._KyrieHits + (target._KyrieHits !== 1 ? " hits" : " hit") + " left."
// Set the wait time.
var wait = 90;
// Display the text.
BattleManager.addText(text, wait);
}
Here's what I've digged up so far:
Code:
TypeError: undefined is not a function
at Game_Action.eval (eval at <anonymous> (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/plugins/YEP_BuffsStatesCore.js:1653:32), <anonymous>:20:17)
at Game_Action.customEffectEval (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/plugins/YEP_BuffsStatesCore.js:1653:5)
at Game_Action.reactStateEffects (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/plugins/YEP_BuffsStatesCore.js:1750:17)
at Game_Action.onReactStateEffects (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/plugins/YEP_BuffsStatesCore.js:1744:20)
at Game_Action.executeDamage (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/plugins/YEP_BuffsStatesCore.js:1716:18)
at Game_Action.apply (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/rpg_objects.js:1657:18)
at Game_Action.apply (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/plugins/YEP_BattleEngineCore.js:2685:34)
at Game_Action.apply (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/plugins/YEP_BuffsStatesCore.js:1635:34)
at Function.BattleManager.invokeNormalAction (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/rpg_managers.js:2337:18)
at Function.BattleManager.invokeAction (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/plugins/YEP_BattleEngineCore.js:1514:14)
I have a lot of plugins and the MV 1.3.4, but I've been making lots of stuff and there hasn't been any incompatibility like this before.
So if anyone can please help I'll be in doubt, thanks.