deez

apply_typePerco()

Jun 8th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.12 KB | None | 0 0
  1.     private static void apply_typePerco(Fight.Fighter F, Fight fight)
  2.     {
  3.       try
  4.       {
  5.         int noBoucle = 0;
  6.         do
  7.         {
  8.           noBoucle++;
  9.           if (noBoucle >= 12) stop = true;
  10.           if (noBoucle > 15) return;
  11.           Fight.Fighter T = getNearestEnnemy(fight, F);
  12.           if (T == null) return;
  13.           int attack = attackIfPossiblePerco(fight, F);
  14.           if (attack != 0)
  15.           {
  16.             if (attack == 5) stop = true;
  17.             if (!moveFarIfPossible(fight, F))
  18.             {
  19.               if (!HealIfPossiblePerco(fight, F, false))
  20.               {
  21.                 if (!buffIfPossiblePerco(fight, F, T))
  22.                 {
  23.                   if (!HealIfPossiblePerco(fight, F, true))
  24.                   {
  25.                     if (!buffIfPossiblePerco(fight, F, F))
  26.                     {
  27.                       stop = true;
  28.                     }
  29.                   }
  30.                 }
  31.               }
  32.             }
  33.           }
  34.           if (stop) break;
  35.         }while (F.canPlay());
  36.       }
  37.       catch (Exception e)
  38.       {
  39.         return;
  40.       }
  41.     }
Advertisement
Add Comment
Please, Sign In to add comment