hedgewars/uAIAmmoTests.pas
changeset 15686 034955e721a1
parent 15685 78e383fff605
child 15687 326b024a24e3
equal deleted inserted replaced
15685:78e383fff605 15686:034955e721a1
  1507     // Sacrifice up to 10% of own health
  1507     // Sacrifice up to 10% of own health
  1508     heal:= (Me^.Health div 10);
  1508     heal:= (Me^.Health div 10);
  1509 
  1509 
  1510 ap.ExplR:= 0;
  1510 ap.ExplR:= 0;
  1511 ap.Time:= 0;
  1511 ap.Time:= 0;
  1512 if (GameFlags and gfInfAttack) = 0 then
  1512 if (Level >= 4) then
  1513     ap.Power:= max(min(500 * heal - 500, 10000), 10)
  1513     // slow resurrect
       
  1514     ap.Power:= max(512 * heal - 512, 10)
  1514 else
  1515 else
  1515     // Shorter attack duration in inf attack because the clock is ticking!
  1516     // fast resurrect
  1516     ap.Power:= max(min(500 * heal - 500, 3000), 10);
  1517     ap.Power:= max(16 * heal - 16, 10);
       
  1518 
       
  1519 // Time limit
       
  1520 ap.Power:= min(ap.Power, 5000)
       
  1521 
  1517 ap.Angle:= 0;
  1522 ap.Angle:= 0;
  1518 
  1523 
  1519 rate:= RateResurrector(Me);
  1524 rate:= RateResurrector(Me);
  1520 if rate <= 0 then
  1525 if rate <= 0 then
  1521     rate:= BadTurn;
  1526     rate:= BadTurn;