Hi,
I need some help creating a skill that copies specific states, and adds these states to the the rest of the troop.
I was able to create a skill that copies all states and spreads it to the user by using the following code:
When using this attack, it collects al the states on the target, and spreads them among the enemy troop.
What I'm having trouble doing is getting only specific states to transfer. I figure I would have to put specific states in an array, and then have them transferred, but not sure how to approach.
Anyone have an tips? or done anything similar?
I need some help creating a skill that copies specific states, and adds these states to the the rest of the troop.
I was able to create a skill that copies all states and spreads it to the user by using the following code:
JavaScript:
target._states.forEach(state => $gameTroop.members().forEach(member => member.addState(state)));
When using this attack, it collects al the states on the target, and spreads them among the enemy troop.
What I'm having trouble doing is getting only specific states to transfer. I figure I would have to put specific states in an array, and then have them transferred, but not sure how to approach.
Anyone have an tips? or done anything similar?