Make Magic Skills miss

I am making a skill that lowers an enemy's Hit Rate by 100%. Physical skills are always miss but the magic skills always land. I followed along with the thread I posted below. However, the magic skills still hit.

The thread I used: https://forums.rpgmakerweb.com/index.php?threads/magical-attack-hit-rate.143572/
Unfortunately pointing to another topic does not tell us anything about what you have done and how your game looks.
I can't count the number of times where someone claimed to follow a tutorial, but had a mistake and instead of showing his own input (which would have shown the error) only claimed to have done everything "like in this tutorial". And that topic was never confirmed by the OP as working.

So it would be much better if you described the changes you made to your project and the result of those changes to find out what is still missing.

That said, you might also want to check the following topic to better understand the default behaviour:
RPG Maker VXACE and MV Damage Flow | RPG Maker Forums(it's also for MZ)
As Andar said, the link is not super helpful - 3 separate things (one standalone and two using different authors' plugins) were suggested in that thread.

And that's not counting the possibility of user error in copying something over 😉

You should tell us exactly what you implemented and show screenshots of how you did it.
And my suggestion didn't even work. 😛
And my suggestion didn't even work. 😛
So if that's the OP's takeaway from the thread, they're really screwed? 😉
🤣
Sorry, for not being descriptive enough. I added a line of code to my "rmmz object" file. One of my characters applies a state to one opponent that Lowers the Hit and Physical and Magic Evasion by 70% for 2 turns. Once I apply the state to the enemy most of their physical attacks miss but magic doesn't miss despite the hit rate being lowered by 70%.

Spoiler: "rmmz objects" file change
Game Action change.PNG

Spoiler: Enemy State
Blind State.PNG
I added a line of code to my "rmmz object" file.
That's bad practice. You should always put changes into plugins, never directly in the source code files. One, it's much more difficult to keep track of what you've changed unless you keep external notes, and two you can't update any bug fixes to the core scripts without losing your changes.

You should copy that entire function, paste it into a *.js file, and include it as a plugin.

That said, you implemented the code correctly, that should work.

Once I apply the state to the enemy most of their physical attacks miss but magic doesn't miss despite the hit rate being lowered by 70%.
Are you sure the skills they're using are Magic Hit, not Certain Hit?
That's bad practice. You should always put changes into plugins, never directly in the source code files. One, it's much more difficult to keep track of what you've changed unless you keep external notes, and two you can't update any bug fixes to the core scripts without losing your changes.
Another reason is that it makes it so that you have no way to stop other plugins from overwriting your changes, since you won't have the option to adjust the load order. This is likely what's causing problems for the OP, since I seem to recall that he uses a bunch of VisuStella plugins, and multiple of them mess with that particular function.

@KazukiT
If you're using VisuStella Core Engine, you need to make sure that their Accuracy Formula stuff (in the QOL settings) is disabled, otherwise your edited function won't ever get run.
@ATT_Turan The skill I was using that was being used against my characters were definitely set to Magic. I disabled the Accuracy Formula in the QOL settings in the VisuStella Core Engine. I think another VisuStella is modifying the Hit and Evasion Rates because when I turned off all my plugins the magic skills even missed.
As for the VisuStella plugins I have I will provide a list of the ones that affect battle.
Spoiler: Plugin List
Plugins List1.PNGPlugins List2.PNG
As Arthran said above, you might have difficulty making this work with VisuStella plugins. Because they obfuscate their code, we can't see exactly which functions they modify and how.

You can try making sure this change is beneath all VS plugins, but that might break something else in their functionality.

Original thread: https://forums.rpgmakerweb.com/threads/make-magic-skills-miss.154756/