Zarel/Pokemon-Showdown — pull request #690 by Slayer95 (2014-02-26 05:01:04+00:00)
Title: Item usage refactor

Deprecate the method pokemon.eatItem, as well as the events 'Eat' and 'EatItem', due to being fundamentally the same as pokemon.useItem, 'Use' and 'UseItem'.
Implement the method pokemon.tryUseItem to handle ordinary item usage, as well as the event 'TryUseItem' to deal with its failure (e.g. due to Unnerve).
Use the method pokemon.useItem for the moves Pluck, Bug Bite and Fling instead of running directly an event.
This cleans the codebase a bit and fixes a couple of bugs with Cheek Pouch. Namely, its activating when the opponent has Unnerve, and its not activating when using Pluck, Bug Bite or Fling.