Determine if an actor has a Skill Type

I would like to ask if what's the best way for me to determine if an actor has a certain skill type? (Types being Skill, Special, etc). Because in this code section:

Scene_Battle.prototype.startActorCommandSelection = function() { this._statusWindow.select(BattleManager.actor().index()); this._partyCommandWindow.close(); this._actorCommandWindow.setup(BattleManager.actor());};I would like to make a small graphic that replaces my current actor commands. So for example, Harold has Special and Skill, he would be using the first command graphic set I made, when he only has special, I will use the second command graphic set, if he has skill only, then the third set.

For example,

shqseFt.jpg


This is not mine but Hirei's. I just used it as an example.
If you follow that just a little bit further, you'd go from here:

this._actorCommandWindow.setup(BattleManager.actor());to here:
Code:
Window_ActorCommand.prototype.addSkillCommands = function() {    var skillTypes = this._actor.addedSkillTypes();    skillTypes.sort(function(a,  B)  {        return a - b;    });    skillTypes.forEach(function(stypeId) {        var name = $dataSystem.skillTypes[stypeId];        this.addCommand(name, 'skill', true, stypeId);    }, this);};
(rpg_windows.js line 5391)which in turn leads you here:

Game_BattlerBase.prototype.addedSkillTypes = function() { return this.traitsSet(Game_BattlerBase.TRAIT_STYPE_ADD);};(rpg_objects.js line 2494)So putting them all together, and assuming you want to use them in exactly the same context as above, you would do:

Code:
var skilltypes = BattleManager.actor().traitsSet(Game_BattlerBase.TRAIT_STYPE_ADD);
This would give you an array of numbers that correspond to the skill type ids in the Types database window.

Original thread: https://forums.rpgmakerweb.com/threads/determine-if-an-actor-has-a-skill-type.51560/