- Joined
- Jun 4, 2016
- Messages
- 29
- Reaction score
- 2
- First Language
- English
- Primarily Uses
- RMMV
Hi all!
Was wondering if anyone could help me edit this skill yanfly made replicating pokemon's bide ability.
Currently it attacks all enemies but I'd like it to just hit one random enemy.
If anyone can help, I'd hugely appreciate it!
Thank you
http://yanfly.moe/2016/04/16/tips-tricks-bide-pokemon-rpg-maker-mv/
<Custom Apply Effect>
// Upon applying Bide, set the Bide damage to 0.
user._bide = 0;
</Custom Apply Effect>
<Custom Respond Effect>
// Check if the target took any HP damage.
if (target.result().hpDamage > 0) {
// If the target did, raise the Bide damage by the HP damage taken.
target._bide += target.result().hpDamage;
}
</Custom Respond Effect>
<Custom Remove Effect>
// Check if the party is in battle.
if ($gameParty.inBattle()) {
// Play animation 97 on the user.
user.startAnimation(97);
// Calculate the damage. The damage dealt is equal to 2x Bide damage.
var damage = Math.ceil(user._bide * 2);
// Get the group of alive enemies.
var enemies = user.opponentsUnit().aliveMembers();
// Loop through each of the enemies.
for (var i = 0; i < enemies.length; ++i) {
// Get the enemy.
var enemy = enemies;
// Play animation 107 on the enemy.
enemy.startAnimation(107);
// Make the enemy take damage.
enemy.gainHp(-damage);
// Prompt the enemy's damage popup.
enemy.startDamagePopup();
// Clear the results of the enemy taking damage.
enemy.clearResult();
// Check if the enemy is dead.
if (enemy.isDead()) {
// If the enemy is dead, make it collapse.
enemy.performCollapse();
}
}
// Reset the Bide damage value.
user._bide = 0;
} // Check if the party is in battle.
</Custom Remove Effect>
Was wondering if anyone could help me edit this skill yanfly made replicating pokemon's bide ability.
Currently it attacks all enemies but I'd like it to just hit one random enemy.
If anyone can help, I'd hugely appreciate it!
Thank you
http://yanfly.moe/2016/04/16/tips-tricks-bide-pokemon-rpg-maker-mv/
<Custom Apply Effect>
// Upon applying Bide, set the Bide damage to 0.
user._bide = 0;
</Custom Apply Effect>
<Custom Respond Effect>
// Check if the target took any HP damage.
if (target.result().hpDamage > 0) {
// If the target did, raise the Bide damage by the HP damage taken.
target._bide += target.result().hpDamage;
}
</Custom Respond Effect>
<Custom Remove Effect>
// Check if the party is in battle.
if ($gameParty.inBattle()) {
// Play animation 97 on the user.
user.startAnimation(97);
// Calculate the damage. The damage dealt is equal to 2x Bide damage.
var damage = Math.ceil(user._bide * 2);
// Get the group of alive enemies.
var enemies = user.opponentsUnit().aliveMembers();
// Loop through each of the enemies.
for (var i = 0; i < enemies.length; ++i) {
// Get the enemy.
var enemy = enemies;
// Play animation 107 on the enemy.
enemy.startAnimation(107);
// Make the enemy take damage.
enemy.gainHp(-damage);
// Prompt the enemy's damage popup.
enemy.startDamagePopup();
// Clear the results of the enemy taking damage.
enemy.clearResult();
// Check if the enemy is dead.
if (enemy.isDead()) {
// If the enemy is dead, make it collapse.
enemy.performCollapse();
}
}
// Reset the Bide damage value.
user._bide = 0;
} // Check if the party is in battle.
</Custom Remove Effect>


