- Joined
- Feb 17, 2013
- Messages
- 40
- Reaction score
- 11
- First Language
- Portuguese
- Primarily Uses
Hi guys!
I'm trying to make a spell that has two functions: if cast on a ally it applies an Absorption Barrier. If cast on an enemy, it'll apply a debuff (in this case, the debuff will increase all damage in that target). I'm using Yanfly plugins to try to achieve that but I can't seem to know what object or function to apply the absorption barrier in the target. Sure, I could use notetags, but I can't in this case because if I target an enemy the effect will be different.
I'm making a series of spells like this so what I achieved so far was with a damage/heal one. If cast on ally it heals, if cast on an enemy it deals damage. I use Target Core to check if the target is friendly, then calculate the damage or heal depending on it and then the Action Sequences to make the cast animation according to what is being cast. I'd like to use the same logic here but the thing is I don't know what object or function to use in the damage part or any other plugin.
Could you help me achieve that?
OT: If anyone is interessed, here's how I did the mentioned spell in the 2nd paragraph. Put the code below on the skill notetag. The skill will have Damage Type: HP Damage.
I'm trying to make a spell that has two functions: if cast on a ally it applies an Absorption Barrier. If cast on an enemy, it'll apply a debuff (in this case, the debuff will increase all damage in that target). I'm using Yanfly plugins to try to achieve that but I can't seem to know what object or function to apply the absorption barrier in the target. Sure, I could use notetags, but I can't in this case because if I target an enemy the effect will be different.
I'm making a series of spells like this so what I achieved so far was with a damage/heal one. If cast on ally it heals, if cast on an enemy it deals damage. I use Target Core to check if the target is friendly, then calculate the damage or heal depending on it and then the Action Sequences to make the cast animation according to what is being cast. I'd like to use the same logic here but the thing is I don't know what object or function to use in the damage part or any other plugin.
Could you help me achieve that?
OT: If anyone is interessed, here's how I did the mentioned spell in the 2nd paragraph. Put the code below on the skill notetag. The skill will have Damage Type: HP Damage.
Code:
// You can select any side
<Enemy or Actor Select>
// This is just to make a variable inside the target object
<Custom Target Eval>
if (target.isActor() === user.isActor()) {
target._isHealing = true;
} else {
target._isHealing = false;
}
targets.push(target);
</Custom Target Eval>
// This part is identical to Yanfly's, except the formula that I adjusted to my needs
<Damage Formula>
// Check if target and user are on the same team.
if (target.isActor() === user.isActor()) {
// Heal formula for allies.
value = user.mdf * 4;
// Otherwise for enemies...
} else {
// Damage formula for enemies.
value = user.mat * 4;
}
</Damage Formula>
<Pre-Damage Eval>
// Check if target and user are on the same team.
if (target.isActor() === user.isActor()) {
// Make it heal the ally instead.
value = -1 * Math.abs(value);
}
</Pre-Damage Eval>
// Here's where I made the animation different if healing or damaging
// Change the animation ID number to whatever you need
<Target Action>
if target._isHealing
animation 215: target
wait for animation
action effect
else
animation 101: target
wait for animation
action effect
end
</Target Action>
