Mandrew

WEC 1.337

Mar 8th, 2013
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.78 KB | None | 0 0
  1.  equation, which this program implements in a friendly command interface. As of
  2.  11 May 2012, this program remains untested for Wurmple evolution in any games
  3.  prior to Black and White.
  4. */
  5.  
  6. #include <iostream>
  7. #include <stdint.h>
  8. using namespace std;
  9.  
  10. class EvolutionFlag {
  11. private:
  12.     unsigned char EvolutionTest;
  13.     string SilcoonOrCascoon;
  14.  
  15. public:
  16.     EvolutionFlag(uint32_t PID)
  17.     {
  18.         unsigned char EvolutionTest = (PID >> 0x10) % 0xA;
  19.         if (EvolutionTest <= 4)
  20.             SilcoonOrCascoon = "Silcoon";
  21.         else
  22.             SilcoonOrCascoon = "Cascoon";
  23.     }
  24.  
  25.     string GetEvo() {
  26.         return SilcoonOrCascoon;
  27.     }
  28. };
  29.  
  30.  
  31. int main()
  32. {
  33.     cout << "Wurmple Evolution Calculator \n";
  34.     cout << "ver. 1.337 by M.andrew 2012 \n";
  35.     cout << "Discovery of mechanism: Bond697 \n\n";
  36.  
  37.     while (1) {
  38.         unsigned int PIDFormat;
  39.         do {
  40.             PIDFormat == 0;
  41.             cout << "Which PID format?\n";
  42.             cout << "\t0 for hex\n\t1 for decimal\n\tCtrl-C at any time quits the program\n\n";
  43.             cout << "Eh? ";
  44.             cin >> PIDFormat;
  45.             if (PIDFormat > 1)
  46.             {
  47.                 cout << "\n***ERROR!***\nYou have entered a value besides 0 or 1.\n";
  48.                 continue;
  49.             }
  50.         } while ((PIDFormat != 0) && (PIDFormat != 1));
  51.  
  52.         uint32_t WurmplePID;
  53.         switch (PIDFormat)
  54.         {
  55.             case 0:
  56.                 cout << "Specify PID of Wurmple (hex): ";
  57.                 cin >> hex >> WurmplePID;
  58.                 break;
  59.             case 1:
  60.                 cout << "Specify PID of Wurmple (dec): ";
  61.                 cin >> WurmplePID;
  62.                 break;
  63.         }
  64.  
  65.         EvolutionFlag NewEvo(WurmplePID);
  66.         cout << "\n\nYour Wurmple will evolve into " + NewEvo.GetEvo() + "!\n\n";
  67.     }
  68. }
Advertisement
Add Comment
Please, Sign In to add comment