Kricketot used Future Sight! Kricketot foresaw an attack! The foe's Swalot ate its Enigma Berry! The foe's Swalot restored some HP! I'm pretty sure Enigma Berry shouldn't be consumed on the activation of Future Sight or Doom Desire. I'm not even sure if it would activate if those moves hit.
It does activate when they hit, assuming the target is weak to Psychic or Steel respectively. The consumption on activation is a bug though.
Just saw the post, but I am too tired to fix it right now. I'll do it if you haven't fixed it after I'll wake up. :3
It's harder than it seemed, but it has been fixed. It probably could have been fixed with less code, but I was too lazy to start trying to remove parts and test, so I'm just gonna go with this.
This was rather annoying to fix until I busted out the cheater option and coded a new function that only DD/FS uses. Won't mess with any other moves this way! Commit: https://github.com/po-devs/pokemon-online/commit/00f81367 Committer: Fuzzysqurl Commit Message: Fix Enigma Berry & DD/FS