Debuff stopped working

Hi!
This will probably not have a solution...
In previous versions of my game there was no problem, but suddently, skills who adds debuff, as by title, stopped adding debuffs. I changed nothing, and the enemies not have some particular resistance.
Strange bugs like this already happened - for example, once enemies began to always missing their attacks despite having a 100% hit, and I "solved" deleting the enemy and making another identical one - so I tried to delete and remake all the skills which does debuff, but this time is not working.

I attached an example of a skill and an example of one enemy, but believe it's just the game file which got corrupted, right?
I had this problem a long time ago but I can't remember the solution. I think it *may* have been a script causing it but i can't recall. Have you edited/added any scripts?
Actually, yes! I added one for making HP bars and one for not making certain states disappear aven after KO, though. I don't know Ruby but seems unrelated...
I also once edited a base script when some skills (which had 100% success) randomly started to not apply ("there was no effect on..."), so I tinkered with "luck" stat effects? Even though that actually worked I don't remember very well what I did and on what script... maybe was that!
If you edited a default script that could have all sorts of knock-on effects, which is why we strongly urge people to use a script snippet instead. You need to track back to the original problem which caused you to try that solution, because it sounds as if you never really solved it.

The only thing you can do is to reinstall the default scripts into your current project and then reinstall your HP bars script and retaining states script. To get the default script file, create a new project, open its game folder and then the Data folder. Copy the Scripts file you see there and paste it into your current project.

Playtest that and see what happens. We will then have a clean problem to try and solve, rather than one which could be multi-layered due to editing.
Found it! I followed those advices, and found what i did then.
In my desperation at the time for cancel Luck effects in the game because I thought that was the reason behind 100% skills not working 100% of the times despite targets not having resistances or % of evading, I BLINDLY modified the Game_Battler script, changing this line (713)

#--------------------------------------------------------------------------
# * Get Effect Change Rate by Luck
#--------------------------------------------------------------------------
def luk_effect_rate(user)
[1.0 + (user.luk - luk) * 0.001, 0.0].max
end

into

def luk_effect_rate(user)
[0.0 + (user.luk - luk) * 0.000, 0.0].max
end

The problem was here, debuffs works again! BUT...!
After I modified that line, 100% stats has actually began to work 100% of the times, so I probably exchanged one problem for another? I'll try to test the "100% skills" problem again, but being a luck-based thing it will take a while. If the problem comes out again, I'll open a new topic.

For now, thanks!
@Fabelerron Please don't start a new thread, just post again in this one.
Ok, I'll do. Let's hope I don't need that!
LUK stat is affecting the probability of landing buff/debuff and states. What else you use the LUK stat for? Depending on what you're trying to achieve, maybe you can try to remove the LUK stat from affecting the buff/debuff and states landing probability.
I wasn't trying to achieve anything with LUK, neither I was trying to use it for something different than the default functions. I tinkered with it just because some stats and skills with a 100% success began occasionally stopping working ("there was no effect on X!") without apparent reason.
I thought that was LUK stat's fault, so I tried to "remove the LUK stat from affecting the buff/debuff and states landing probability", as you said.
I think it worked (100% sucess was 100%), but the side effect was no more debuffs. I returned the code as it was before, and I'm testing if the old, inexplicable "not quite 100% success" problem has returned, but for now seems like not.
To remove LUK from affecting everything, use this
Code:
def luk_effect_rate(user)
  return 1.0
end
Many thanks! I'll probably use it.
Noob question, though: where I should put it, precisely? ^_^'
Noob question, though: where I should put it, precisely? ^_^'
New script slot. And use this instead.
Code:
class Game_Battler
  def luk_effect_rate(user)
    return 1.0
  end
end
And yes, this is the only code you need.

Original thread: https://forums.rpgmakerweb.com/threads/debuff-stopped-working.118898/