Issue with Yanfly Autobattle Script (VXAce)

In my project I'm using Yanfly's Autobattle script, which can be found here: https://yanflychannel.wordpress.com/rmvxa/battle-scripts/command-autobattle/

However, I found an odd bug with the script today. It seems that when autobattle is on, characters can use skills even if they don't have the proper skill type for that skill. In other words, consider the skill Mind Tap, which requires the Mind Magic Skill Type to use. However, if Autobattle is turned on, the character can use that skill regardless of whether or not they have the proper skill type.

I looked at the script and it seems the issue is it creates the actions for autobattle using the same rules as enemies, and enemies don't require the proper skill type to use a skill. So is there a way to fix this so that actors can only use skills they have the proper skill type for equipped at that point in time?
You can't change the features of any database objects by default, so they never put in any checks for your scenario.
It simply checks for all learned skills, whether their skill type or ID is sealed, and that's all.
Once it's learned, it doesn't matter which skill type it belongs to, it just assumes that the actor can use it unless it's sealed.

You could try to use this snippet:
Spoiler
Code:
class Game_Actor < Game_Battler

  alias strip_list6414 make_action_list
  def make_action_list
    list = strip_list6414
    list.reject! {|act| ![*added_skill_types,0].include?(act.item.stype_id) }
    return list
  end

end
Put it below the default scripts.
It will filter out any skills belonging to a skill type which the actor doesn't have currently in the skill type feature list.
No idea if it will cause any troubles with other scripts, but that method is used for autobattle actions only anyway, so there shouldn't be any major issues, I guess.
Ohh, and I haven't really tested this, as usual. 😛
Forgot about this for a while, sorry, but it appears to be working as intended. Thanks.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/issue-with-yanfly-autobattle-script-vxace.95682/