MZ Converting an existing param into block chance [Solved]

I am working on an idea to repurpose an unused param in my project to block chance. I have made significant progress.

Edit:
All the issues are solved and it works in the base MZ engine. Its posted in the MZ release forums.
result.blocked = !result.missed && Math.random() < this.itemCev(target);
there is no GameAction.itemCev() method. youll either have to make one or use the target's cev directly
Thanks, I did just add that in. After testing it still isnt performing a block.
are you sure that its not blocking? in your createBlock you have the text to display "Miss". everything else looks fine
I have my actor with 100% Block but when the enemy attacks him it does damage. I wasnt even getting a miss message (which I fixed now to block). But if i give him 100% evasion it will popup miss.

Its weird because I agree it seems like it should be working.
what do your database entries look like? are you using plugins? i took your updated code as-is and added it to a default project. it works on my end
1704069491275.png

1704069346218.png
(+100% cev)
Hmmm ok then there must be a conflict somewhere. Which is odd as i didnt thing i had another plugin that effected any of this code. Ill poke around my plugins. Thanks for the help.


Edit: I found it was an issue with VS Battlecore. I have managed to make some of it compatible but other bits not so much. I have updated the original post with the changes and issues.

Original thread: https://forums.rpgmakerweb.com/threads/converting-an-existing-param-into-block-chance-solved.164327/