Conditional Branch to test if actor X has buff Y on?

What it says.
But since buffs can also be doubled (or even tripled etc with Yanfly's stuff), is it also possible to test for double buffs? Just wondering.
if(condition){
doThis;
}

condition is an eval of a variable or a returned function call. If true, the if statement executes code within the brackets. If false, it's skipped

doThis can be a command or a function.
Yes but what's the syntax to test a buff (or double buff) on a given actor?
The buff level of a basic param is 0 for no (de)buff, -1 for 1 debuff, +2 for 2 buffs, etc. 😮‍💨

This will return the current MHP buff level (MHP is param ID 0) of actor ID 1:
JavaScript:
$gameActors.actor(1).buff(0)
This will return the current ATK buff level (ATK is param ID 2) of the party leader (party index 0):
JavaScript:
$gameParty.members()[0].buff(2)
So you could use one of these references (adjust the numbers as needed) and test it against a suitable number. E.g. Conditional Branch > Script:
JavaScript:
$gameParty.members()[0].buff(6) > 0
I.e. "does the party leader have an AGI buff active?". 😤

Basic param ID <-> param name reference:
Spoiler
0 MHP 1 MMP 2 ATK 3 DEF 4 MAT 5 MDF 6 AGI 7 LUK
[Edit: whoops, I had MAT and MDF swapped in the spoiler. Fixed!]
Sounds excellent to me, thank you!

Original thread: https://forums.rpgmakerweb.com/threads/conditional-branch-to-test-if-actor-x-has-buff-y-on.122426/