MV SRD Timed Attacks and conditionals

Hello,

I'm trying to make an attack that will restore mana to the party if a plugin-specific variable is high enough. I'm using SRD's Timed Attack plugins (http://sumrndm.site/timed-attack-wheel/).

Right now, my code is something like:

if ($gameTemp.tas_power >= 0.75)
$gameParty.aliveMembers().addBuff(3,3);

This isn't working though, really not great with code, any help would be appreciated.
Moved to: Plugin Support
$gameParty.aliveMembers().addBuff(3,3);
This isn't valid syntax - aliveMembers() is the array of all the living party members, and addBuff() needs to be called on a specific actor.

Also, it wouldn't do what you said - adding a buff doesn't restore mana (MP).

You could do something like:
Code:
$gameParty.aliveMembers().forEach(actor => actor.gainMp(20));
That will restore 20 MP to each living actor in the party.
This isn't valid syntax - aliveMembers() is the array of all the living party members, and addBuff() needs to be called on a specific actor.

Also, it wouldn't do what you said - adding a buff doesn't restore mana (MP).

You could do something like:
Code:
$gameParty.aliveMembers().forEach(actor => actor.gainMp(20));
That will restore 20 MP to each living actor in the party.
Ohhh, I see, thank you so much! Sorry, I had a few different things I was trying to get to work between the buffs and the MP, so my code looks even more confused haha.

Thanks again!

Original thread: https://forums.rpgmakerweb.com/threads/srd-timed-attacks-and-conditionals.158137/