So the Console from CoreEngine printed the error below. Can you tell me the mistake I made?
This was what I put into "Escape Ratio"
($gameParty.luck() * 5 + $gameParty.agility()) / $gameTroop.agility()
It tells you exactly what your mistake is in the screenshot you posted. $gameParty.luck isn't a function. If you want to use the party's average luck, you'll have to code the calculation yourself.
(($gameParty.members().reduce((accumulator, currentValue) => { return accumulator + currentValue.agi }, 0) / $gameParty.members().length) * 5 + $gameParty.agility()) / $gameTroop.agility()
Have you done tutorials for MV, that walk you through how to configure actors and classes? You seem to be jumping ahead to advanced JavaScript usage without understanding the basics of the software - there is no such thing as "the party's luck," only "the luck of this specific actor."
If you want to reference a specific actor's Luck value, you can do it by referencing that actor's ID in the database: $gameActors.actor(ID).param(7)
Trihan's suggestion is helpful if you are trying to reference the average agility of all the party members, and you can do something similar for luck, but still - I would suggest you complete some more tutorials to build a sample game, then play it to get a better idea of how the mechanics work.
There are a number of places in the code that affect HP value and more which access the property's value, so you can't just set a breakpoint for that. If you caused the problem recently, I would recommend turning plugins off one by one until you no longer get the issue, at which point you know which one caused it.
Ah, yeah. With the formula you have there, when a stat is unbuffed, it becomes its value * 0 * 0.2, and multiplying something by 0 always returns 0. Stats can't be 0, so they go to their minimum of 1.