Future Sight vs. Enigma Berry

Discussion in 'Solved Bugs' started by beforedawn, Mar 23, 2016.

  1. beforedawn

    beforedawn Active Member

    Joined:
    Mar 10, 2011
    Messages:
    288
    Likes Received:
    136
    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.
     
  2. Strudels

    Strudels ・◡・ Super Moderator Server Administrator Super Moderator Server Administrator

    Joined:
    Oct 31, 2013
    Messages:
    322
    Likes Received:
    1,104
    PO Trainer Name:
    Strudels/Ripper Roo
    It does activate when they hit, assuming the target is weak to Psychic or Steel respectively. The consumption on activation is a bug though.
     
    Edna likes this.
  3. Fuzzysqurl

    Fuzzysqurl baa baa mareep I do what I want Server Owner Developer I do what I want Server Owner Developer

    Joined:
    Sep 12, 2012
    Messages:
    2,096
    Likes Received:
    967
    Easy enough fix if turbedi doesn't beat me to it by time I get home.
     
    turbedi likes this.
  4. turbedi

    turbedi Professional circle clicker ~~~ Forum Moderator Developer Forum Moderator Developer

    Joined:
    Jul 18, 2013
    Messages:
    385
    Likes Received:
    155
    PO Trainer Name:
    turbedi
    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
     
  5. Fuzzysqurl

    Fuzzysqurl baa baa mareep I do what I want Server Owner Developer I do what I want Server Owner Developer

    Joined:
    Sep 12, 2012
    Messages:
    2,096
    Likes Received:
    967
    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.
     
    turbedi likes this.
  6. Fuzzysqurl

    Fuzzysqurl baa baa mareep I do what I want Server Owner Developer I do what I want Server Owner Developer

    Joined:
    Sep 12, 2012
    Messages:
    2,096
    Likes Received:
    967
    Had to revert the fix due to crash. This is bugged again.
     
  7. Fuzzysqurl

    Fuzzysqurl baa baa mareep I do what I want Server Owner Developer I do what I want Server Owner Developer

    Joined:
    Sep 12, 2012
    Messages:
    2,096
    Likes Received:
    967
    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