Hybrid Skills.

Hello everyone,


I am looking at creating a skill that deals single target damage based on one damage formula and then aoe damage to all enemies with a different damage formula. What is the best way to achieve this hybrid type of skill? 
I don't know if it's the best way, but it's a way. You'll need Yanfly's core engine, damage core and skill core plugins.


Edit: Made a shorter version


You're going to make a new skill, like any other, set the damage type to HP damage, write on the dmg formula space the first damage formula you want to use, and set the scope to 1 enemy. anything else you can set it to whatever you want. Keep in my that only one enemy will be affected by the skill animation you choose, a longer animation looks better (ones like slash special 1).


Here is the code, paste it in your skill's notebox.


<Post-Damage Eval>
var aoe_damage = 1000;
for (var i = 0; i < $gameTroop.members().length; ++i) {
if(i==$gameTroop.members().indexOf(target)) { continue; }
if ($gameTroop.members().isDead()) { continue; }
$gameTroop.members().startAnimation(66, false, 0);
$gameTroop.members().gainHp(Math.round(-aoe_damage));
$gameTroop.members().startDamagePopup();
if ($gameTroop.members().isDead()) {
$gameTroop.members().performCollapse();
}
}
</Post-Damage Eval>


Here's a brief explanation:

Code:
<Post-Damage Eval>
   var aoe_damage = 100 + a.mat * 2 - b.mdf * 2;
   for (var i = 0; i < condition; ++i) {
     ...
     ...
     $gameTroop.members()[i].startAnimation(66, false, 0);
     ...
     ...   
   }
</Post-Damage Eval>

in the first line, you're going to put your second damage formula. Do not remove the aoe_damage variable.


In the second line, the one that says startAnimation... you're going to switch the 66 with the animation ID you want to play in the enemies affected by the aoe damage, try using a single target animation, since it's going to play once in every enemy.


And that's it, try using it and let me know how it goes.
@Blue Symphony I am astounded by your detailed response. Thank you, I will try this tomorrow and let you know of the results.
Looks like that worked out! Mods can close the Thread if they please.

Original thread: https://forums.rpgmakerweb.com/threads/hybrid-skills.70995/