Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global VIETOURDAVANT;
- include("utile");
- include('Attaque');
- include('Info ennemy');
- include('soin');
- var degatpris=0;
- var aAttaque=0;
- if (getTurn()==1) init(VIETOURDAVANT);// equipe arme
- else
- {
- degatpris=VIETOURDAVANT-getLife();
- debug("degatpris "+degatpris);
- }
- var monId=getLeek();
- var cible=quiViser();
- debug("notre cible "+cible);
- var Combo=getAllyCombo(monId,cible,0.4);
- var ennemiAterre=0;
- //lethal,combo,meilleurcompromis
- //Combo au format : degat,combo[arme,case],casefina]
- //MEilleurcompromise format : degat,combo,casefinal,lethalennemi
- //debug("Notre combo pour ce tour : "+Combo);
- do
- {
- aAttaque=0;
- if(Combo[0]==1)//lethal
- {
- debug("Lethal");
- ennemiAterre=doingCombo(Combo[1],cible);
- aAttaque=1;
- }
- if((Combo[2][3]==1 or degatpris>getLife() )and aAttaque==0 )//On va crever
- {
- heal(monId,monId);
- setDef(monId,monId);
- Combo=getAllyCombo(monId,cible,0.4);
- ennemiAterre=doingCombo(Combo[2],cible);
- aAttaque=1;
- }
- if(getCellDistance(getCell(cible),getCell(monId))<10+getMP(cible)+getMP(monId) and aAttaque==0)
- {
- setDef(monId,monId);
- Combo=getAllyCombo(monId,cible,0.4);
- // debug("macombo def "+Combo);
- ennemiAterre=doingCombo(Combo[2],cible);
- aAttaque=1;
- }
- else
- {
- ennemiAterre=doingCombo(Combo[2],cible);
- aAttaque=1;
- }
- } while (ennemiAterre==1);
- summon(CHIP_PUNY_BULB,getCellToUseChipOnCell(CHIP_PUNY_BULB,getCell()),bulbe_chetif);
- if(getLife()!=getTotalLife()) heal(monId,monId);
- VIETOURDAVANT=getLife();
- debug("Case finale : "+getCell());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement