Most efficient way to check each actor's stats for a requirement?

I want to create a function where once the party has come back to town, the game will check each character's LUK stat to see if it's above a certain requirement, of which then they change class to a higher tiered version of their own class.

Is the only way to do this creating a conditional branch checking each character or is there a more efficient way?

(and does $game_actor.add_param(1,1) work on party members not in the party?)

Thanks in advance?
they have scripts ways for doing that's for sure 

but in simple you want to check luck stats? 

I think something like that's would works : 

class Game_Party < Game_Unitdef luck@battler = Game_BattlerBase.newreturn @battler.lukendclass Game_Actor < Game_Battlerdef check_lucks(lucks_rate)@party = $party.member.luck.each.collect@luck_rate = lucks_ratecase param(6)when @party < @luck_rate$game_switch[id] = falseendenddon't try this code this not works  but this was trhe idea I had in mind but I don't know enough in the params for transfert correctly the datas

but this could be a good ways for set your condition?

you just call the method by specifying the rates and this will works likes a charms and save you a lots of times

Original thread: https://forums.rpgmakerweb.com/threads/most-efficient-way-to-check-each-actors-stats-for-a-requirement.42982/