Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // IA.java => apply_typePerco()
- // Remplacer tous par :
- private static void apply_typePerco(Fighter F, Fight fight)
- {
- int notWhile = 0;
- try
- {
- do
- {
- notWhile++;
- if (notWhile >= 12) stop = true;
- if (notWhile > 15) return;
- Fighter T = getNearestEnnemy(fight, F);
- if(T == null) return;
- int attack = attackIfPossiblePerco(fight,F);
- if(attack != 0)//Attaque
- {
- if(attack == 5) stop = true;//EC
- if(!moveFarIfPossible(fight, F))//fuite
- {
- if(!HealIfPossiblePerco(fight,F,false))//soin allié
- {
- if(!buffIfPossiblePerco(fight,F,T))//buff allié
- {
- if(!HealIfPossiblePerco(fight,F,true))//auto-soin
- {
- if(!buffIfPossiblePerco(fight,F,F))//auto-buff
- {
- stop = true;
- }
- }
- }
- }
- }
- }
- if(stop) break;
- }while(F.canPlay());
- }catch(Exception e)
- {
- return;
- }
- }
- // Voici se que j'ai modifier :
- int notWhile = 0;
- do
- {
- notWhile++;
- if (notWhile >= 12) stop = true;
- if (notWhile > 15) return;
- if(stop) break;
- }while(F.canPlay());
- }catch(Exception e)
- {
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment