Sacrificial Bolt (MV Plugin Tips & Tricks)
From Dragon’s Dogma, the Sacrificial Bolt is a skill that kills off a random pawn to deal damage to a foe. If that were to be remade in RPG Maker MV, the skill effect would be to sacrifice a random ally to deal damage to a foe. The damage dealt and such would be based off of the sacrificed ally’s stats!
The following plugin(s) is required to create this Tips & Tricks effect:
For help on how to install plugins, click here.
For help on how to update plugins, click here.
This is a Tips & Tricks effect created for RPG Maker MV. Tips & Tricks are not to be confused with plugins. Instead, they are usually customized code created for the sake of producing unique features/effects that do not require an entire plugin to do.
Follow video instructions.
You can find the copy and paste version of the code here:
<Custom Requirement> // Get the group that the user belongs to. var group = user.friendsUnit(); // Get the alive members of the group. var allies = group.aliveMembers(); // Check to see if there are more than 1 allied members (user + ally). value = allies.length > 1; </Custom Requirement> <Custom Cost Display> \iAlly </Custom Cost Display> <Custom Execution> // Get the group that the user belongs to. var group = user.friendsUnit(); // Get the alive members of the group. var allies = group.aliveMembers(); // Remove the user from the group. allies.splice(allies.indexOf(user), 1); // Pick a random ally. var ally = allies[Math.floor(Math.random() * allies.length)]; // Store the ally's current HP value with the user. user._allyHp = ally.hp; // Store the ally's current MAT value with the user. user._allyMat = ally.mat; // Play animation 65 on the ally. ally.startAnimation(65); // Time to kill off the ally. ally.gainHp(-1 * ally.hp); // Perform the collapse effect on the ally. ally.performCollapse(); </Custom Execution> <Damage Formula> // Damage Formula used for the skill. value = user._allyHp + user._allyMat * 14; // Remove stored ally HP value. user._allyHp = undefined; // Remove stored ally MAT value. user._allyMat = undefined; </Damage Formula>