Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.49 KB | None | 0 0
  1. global VIETOURDAVANT;
  2. include("utile");
  3. include('Attaque');
  4. include('Info ennemy');
  5. include('soin');
  6.  
  7. var degatpris=0;
  8. var aAttaque=0;
  9. if (getTurn()==1) init(VIETOURDAVANT);// equipe arme
  10. else
  11. {
  12.     degatpris=VIETOURDAVANT-getLife();
  13.     debug("degatpris "+degatpris);
  14. }
  15. var monId=getLeek();
  16. var cible=quiViser();
  17. debug("notre cible "+cible);
  18. var Combo=getAllyCombo(monId,cible,0.4);
  19. var ennemiAterre=0;
  20. //lethal,combo,meilleurcompromis
  21. //Combo au format : degat,combo[arme,case],casefina]
  22. //MEilleurcompromise format : degat,combo,casefinal,lethalennemi
  23.  
  24. //debug("Notre combo pour ce tour : "+Combo);
  25. do
  26. {
  27.     aAttaque=0;
  28.     if(Combo[0]==1)//lethal
  29. {
  30.     debug("Lethal");
  31.     ennemiAterre=doingCombo(Combo[1],cible);
  32.     aAttaque=1;
  33. }
  34. if((Combo[2][3]==1 or degatpris>getLife() )and aAttaque==0 )//On va crever
  35. {
  36.     heal(monId,monId);
  37.     setDef(monId,monId);
  38.     Combo=getAllyCombo(monId,cible,0.4);
  39.     ennemiAterre=doingCombo(Combo[2],cible);
  40.     aAttaque=1;
  41. }
  42. if(getCellDistance(getCell(cible),getCell(monId))<10+getMP(cible)+getMP(monId) and aAttaque==0)
  43. {
  44.     setDef(monId,monId);
  45.     Combo=getAllyCombo(monId,cible,0.4);
  46. //  debug("macombo def "+Combo);
  47.     ennemiAterre=doingCombo(Combo[2],cible);
  48.     aAttaque=1;
  49. }
  50. else
  51. {  
  52.     ennemiAterre=doingCombo(Combo[2],cible);
  53.     aAttaque=1;
  54. }
  55. } while (ennemiAterre==1);
  56.  
  57. summon(CHIP_PUNY_BULB,getCellToUseChipOnCell(CHIP_PUNY_BULB,getCell()),bulbe_chetif);
  58. if(getLife()!=getTotalLife()) heal(monId,monId);
  59. VIETOURDAVANT=getLife();
  60. debug("Case finale : "+getCell());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement