MV Skill types not being sealed unless both of them are sealed

The title may not make much sense at first glance, but I'm using Yanfly's Multi-Type Skills and Yanfly's Row Formation. When actors are in the back row, they're not supposed to be able to use Melee skills, however if the other skill type isn't sealed, they can use the skill. See screenshots for what I mean.

Spoiler
screenshot001_2025-04-19.png
screenshot003_2025-04-19.png
screenshot002_2025-04-19.png
I know I could just remove the other skill type, but that's inadequate because I would have way too many skill types in the menu and I feel that'd just confuse my players. If anyone could assist me I'd appreciate it.

EDIT: SOLVED as per this reply: https://forums.rpgmakerweb.com/inde...s-both-of-them-are-sealed.177071/post-1510037
It seems obvious to a programmer that the multi-type logic is implemented as a logical OR, because the skill works as either type.

But with an OR, blocking one option never blocks the other, so you would need to block both to prevent skill use.

That is basic logic behavior, which means this can only be changed by a reprogramming of the multi-type plugin.
So there is no easy fix for this. I think it would be best if you request a new multi-type plugin with different behaviour rules, that would be easier than modifying something that deeply in the original plugin.
actually, that one is a mistake in the plugin. its supposed to disable a skill if if any of its skill types are sealed, but it doesnt loop through the skilltypes properly and ends up only passing skills based on its assigned database skiltype.

add this as a plugin and load it after the multitype plugin
Code:
Game_BattlerBase.prototype.meetsSkillConditions = function(skill) {
  var value = Yanfly.MTS.Game_BattlerBase_msC.call(this, skill);
  if (!value) return false;
  if (skill && skill.skillTypes) {
    var sTypes = skill.skillTypes;
    for (var n = 0; n < sTypes.length; n++) {
      if (this.isSkillTypeSealed(skill.skillTypes[n])) {
        return false;
      }
    }
  }
  return true;
};
actually, that one is a mistake in the plugin. its supposed to disable a skill if if any of its skill types are sealed, but it doesnt loop through the skilltypes properly and ends up only passing skills based on its assigned database skiltype.

add this as a plugin and load it after the multitype plugin
Code:
Game_BattlerBase.prototype.meetsSkillConditions = function(skill) {
  var value = Yanfly.MTS.Game_BattlerBase_msC.call(this, skill);
  if (!value) return false;
  if (skill && skill.skillTypes) {
    var sTypes = skill.skillTypes;
    for (var n = 0; n < sTypes.length; n++) {
      if (this.isSkillTypeSealed(skill.skillTypes[n])) {
        return false;
      }
    }
  }
  return true;
};
this works perfectly, thank you!

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/skill-types-not-being-sealed-unless-both-of-them-are-sealed.177071/