Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static void apply_type1(Fighter F, Fight fight)
- {
- boolean stop = false;
- while(!stop && F.canPlay())
- {
- int PDVPER = (F.getPDV()*100)/F.getPDVMAX();
- Fighter T = getNearestEnnemy(fight, F); // Ennemis
- Fighter T2 = getNearestFriend(fight,F); // Amis
- if(T == null)
- return;
- if(PDVPER > 15)
- {
- int attack = attackIfPossible(fight,F);
- if(attack != 0)//Attaque
- {
- if(attack == 5) stop = true;//EC
- if(!moveToAttackIfPossible(fight,F))
- {
- if(!buffIfPossible(fight,F,F))//auto-buff
- {
- if(!HealIfPossible(fight,F, false))//soin allié
- {
- if(!buffIfPossible(fight,F,T2))//buff allié
- {
- if(!moveNearIfPossible(fight,F,T))//avancer
- {
- if(!invocIfPossible(fight,F))//invoquer
- {
- stop = true;
- }
- }
- }
- }
- }
- }
- }
- }
- else
- {
- if(!HealIfPossible(fight,F,true))//auto-soin
- {
- int attack = attackIfPossible(fight,F);
- if(attack != 0)//Attaque
- {
- if(attack == 5) stop = true;//EC
- if(!buffIfPossible(fight,F,F))//auto-buff
- {
- if(!HealIfPossible(fight,F,false))//soin allié
- {
- if(!buffIfPossible(fight,F,T2))//buff allié
- {
- if(!invocIfPossible(fight,F))
- {
- if(!moveFarIfPossible(fight, F))//fuite
- {
- stop = true;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- private static void apply_type2(Fighter F, Fight fight)
- {
- boolean stop = false;
- while(!stop && F.canPlay())
- {
- Fighter T = getNearestFriend(fight,F);
- if(!HealIfPossible(fight,F,false))//soin allié
- {
- if(!buffIfPossible(fight,F,T))//buff allié
- {
- if(!moveNearIfPossible(fight,F,T))//Avancer vers allié
- {
- if(!HealIfPossible(fight,F,true))//auto-soin
- {
- if(!buffIfPossible(fight,F,F))//auto-buff
- {
- if(!invocIfPossible(fight,F))
- {
- T = getNearestEnnemy(fight, F);
- int attack = attackIfPossible(fight,F);
- if(attack != 0)//Attaque
- {
- if(attack == 5) stop = true;//EC
- if(!moveFarIfPossible(fight, F))//fuite
- stop = true;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- private static void apply_type3(Fighter F, Fight fight)
- {
- boolean stop = false;
- while(!stop && F.canPlay())
- {
- Fighter T = getNearestFriend(fight,F);
- if(!moveNearIfPossible(fight,F,T))//Avancer vers allié
- {
- if(!HealIfPossible(fight,F,false))//soin allié
- {
- if(!buffIfPossible(fight,F,T))//buff allié
- {
- if(!HealIfPossible(fight,F,true))//auto-soin
- {
- if(!invocIfPossible(fight,F))
- {
- if(!buffIfPossible(fight,F,F))//auto-buff
- {
- stop = true;
- }
- }
- }
- }
- }
- }
- }
- }
- private static void apply_type4(Fighter F, Fight fight) //IA propre La Folle
- {
- boolean stop = false;
- while(!stop && F.canPlay())
- {
- Fighter T = getNearestEnnemy(fight, F);
- if(T == null) return;
- int attack = attackIfPossible(fight,F);
- if(attack != 0)//Attaque
- {
- if(attack == 5) stop = true;//EC
- if(!moveFarIfPossible(fight, F))//fuite
- {
- if(!HealIfPossible(fight,F,false))//soin allié
- {
- if(!buffIfPossible(fight,F,T))//buff allié
- {
- if(!HealIfPossible(fight,F,true))//auto-soin
- {
- if(!invocIfPossible(fight,F))
- {
- if(!buffIfPossible(fight,F,F))//auto-buff
- {
- stop = true;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- private static void apply_type5(Fighter F, Fight fight) //IA propre aux énus
- {
- boolean stop = false;
- while(!stop && F.canPlay())
- {
- Fighter T = getNearestEnnemy(fight, F);
- if(T == null) return;
- if(!moveNearIfPossible(fight,F,T))//Avancer vers enemis
- {
- stop = true;
- }
- }
- }
- private static void apply_type6(Fighter F, Fight fight)
- {
- boolean stop = false;
- while(!stop && F.canPlay())
- {
- if(!invocIfPossible(fight,F))
- {
- Fighter T = getNearestFriend(fight,F);
- if(!HealIfPossible(fight,F,false))//soin allié
- {
- if(!buffIfPossible(fight,F,T))//buff allié
- {
- if(!buffIfPossible(fight,F,F))//buff allié
- {
- if(!HealIfPossible(fight,F,true))
- {
- int attack = attackIfPossible(fight,F);
- if(attack != 0)//Attaque
- {
- if(attack == 5) stop = true;//EC
- if(!moveFarIfPossible(fight, F))//fuite
- stop = true;
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment