Using <condition Weakness> it is possible to add a Buff to the actor but would it be possible to add a Debuff to the enemy if (and only if) it is weak to the skill?
YEP Skills Rewards, add a Buff to the enemy not the actor?
Javascript/Plugin SupportJust using the Skill Core you can do it like this.
Code:
<Post-Damage Eval>
// Check if the action deals HP damage
if (this.isHpEffect() && value > 0) {
// Get this action's elements
var elements = this.getItemElements();
// Loop through each of the elements
for (var i = 0; i < elements.length; ++i) {
// Get the currently looped element
var elementId = elements[i];
// Check if the target is weak to the element
if (target.elementRate(elementId) > 1.00) {
// Add Buff to user and Debuff to target.
user.addBuff(1,2);
target.addDebuff(2,2);
// Break the loop
break;
}
}
}
</Post-Damage Eval>
Awesome @Icenick it worked perfectly.
One last question, is it possible to call a common event instead of adding a buff/debuff?
One last question, is it possible to call a common event instead of adding a buff/debuff?
Away from computer but you can try this let me know if it works.
Code:
$gameTemp.reserveCommonEvent(X)
@Icenick It did! You're ace!
Original thread: https://forums.rpgmakerweb.com/threads/yep-skills-rewards-add-a-buff-to-the-enemy-not-the-actor.122241/