RPG Maker Forums

Hi, i am new are.



I am using the Yanfly Buff and states plugin and trying to recreates the effect of the mirror force card from yugioh.



For those don't know the Mirror Force is trap card that actives when the opponent declares attack, destroying all they monsters.



So i am trying to makes a damage version, dealing 500 damage to every opponent battler before they begin able to deal damage when they utilizes a physical attack against the battle whit the Mirror Force Status and potentially killing enemies before he could even do any damage making the ultimate Attack and defense status.


But even after i creates the bellow code and run it, it comes whit some problems. The one that take the damage is the owner of the status, making the exact opposite from the desired effect


.


below the code 


<Custom React Effect>
if (this.isPhysical())
{
var damage = 500;
var enemies = user.opponentsUnit().aliveMembers();
for (var i = 0; i < enemies.length; ++i)
{
var enemy = enemies;
enemy.startAnimation(107);
enemy.gainHp(-damage);
enemy.startDamagePopup();
enemy.clearResult();
if (enemy.isDead())
{
enemy.performCollapse();
}
}
}
</Custom React Effect>



I will be grateful if some one helps, i am a breaking my mind to makes it works

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,547
Members
137,835
Latest member
yetisteven
Top