equal
deleted
inserted
replaced
583 |
583 |
584 while Gear <> nil do |
584 while Gear <> nil do |
585 begin |
585 begin |
586 if Gear^.Kind = gtHedgehog then |
586 if Gear^.Kind = gtHedgehog then |
587 begin |
587 begin |
588 if PHedgehog(Gear^.Hedgehog)^.Poisoned then |
588 if PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] then |
589 inc(Gear^.Damage, min(5, max(0,Gear^.Health - 1 - Gear^.Damage))); |
589 inc(Gear^.Damage, min(5, max(0,Gear^.Health - 1 - Gear^.Damage))); |
590 inc(Gear^.Damage, min(cHealthDecrease, max(0,Gear^.Health - 1 - Gear^.Damage))); |
590 inc(Gear^.Damage, min(cHealthDecrease, max(0,Gear^.Health - 1 - Gear^.Damage))); |
591 if PHedgehog(Gear^.Hedgehog)^.King then |
591 if PHedgehog(Gear^.Hedgehog)^.King then |
592 begin |
592 begin |
593 flag:= false; |
593 flag:= false; |
915 defaultPos:= true; |
915 defaultPos:= true; |
916 HatVisible:= false; |
916 HatVisible:= false; |
917 |
917 |
918 sx:= hwRound(Gear^.X) + 1 + WorldDx; |
918 sx:= hwRound(Gear^.X) + 1 + WorldDx; |
919 sy:= hwRound(Gear^.Y) - 3 + WorldDy; |
919 sy:= hwRound(Gear^.Y) - 3 + WorldDy; |
|
920 |
|
921 if HH^.Effects[hePoisoned] then |
|
922 begin |
|
923 glColor4f(0.25, 1, 0, 0.25); |
|
924 DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 2, 0, 0, sx, sy, 0, 1, 22, 22, (RealTicks shr 36) mod 360); |
|
925 glColor4f(1, 1, 1, 1) |
|
926 end; |
|
927 |
920 if ((Gear^.State and gstWinner) <> 0) and |
928 if ((Gear^.State and gstWinner) <> 0) and |
921 ((CurAmmoGear = nil) or (CurAmmoGear^.Kind <> gtPickHammer)) then |
929 ((CurAmmoGear = nil) or (CurAmmoGear^.Kind <> gtPickHammer)) then |
922 begin |
930 begin |
923 DrawHedgehog(sx, sy, |
931 DrawHedgehog(sx, sy, |
924 hwSign(Gear^.dX), |
932 hwSign(Gear^.dX), |
1245 LongInt(topY)+WorldDy, |
1253 LongInt(topY)+WorldDy, |
1246 LongInt(rightX)+WorldDx, |
1254 LongInt(rightX)+WorldDx, |
1247 cWaterLine+WorldDy, |
1255 cWaterLine+WorldDy, |
1248 LongInt(leftX)+WorldDx) |
1256 LongInt(leftX)+WorldDx) |
1249 end; |
1257 end; |
1250 //amBee: DrawRotatedF(sprHandBee, hx, hy, (RealTicks div 125) mod 4, hwSign(Gear^.dX), aangle); |
1258 amBee: DrawRotatedF(sprHandBee, hx, hy, (RealTicks div 125) mod 4, hwSign(Gear^.dX), aangle); |
1251 amBee: DrawRotatedF(sprHandBee, hx, hy, 0, hwSign(Gear^.dX), aangle); |
|
1252 end; |
1259 end; |
1253 |
1260 |
1254 case amt of |
1261 case amt of |
1255 amAirAttack, |
1262 amAirAttack, |
1256 amMineStrike: DrawRotated(sprHandAirAttack, sx, hwRound(Gear^.Y) + WorldDy, hwSign(Gear^.dX), 0); |
1263 amMineStrike: DrawRotated(sprHandAirAttack, sx, hwRound(Gear^.Y) + WorldDy, hwSign(Gear^.dX), 0); |
1425 |
1432 |
1426 if (Gear^.State and gstDrowning) = 0 then |
1433 if (Gear^.State and gstDrowning) = 0 then |
1427 if (Gear^.State and gstHHThinking) <> 0 then |
1434 if (Gear^.State and gstHHThinking) <> 0 then |
1428 DrawSprite(sprQuestion, hwRound(Gear^.X) - 10 + WorldDx, hwRound(Gear^.Y) - cHHRadius - 34 + WorldDy, (RealTicks shr 9) mod 8) |
1435 DrawSprite(sprQuestion, hwRound(Gear^.X) - 10 + WorldDx, hwRound(Gear^.Y) - cHHRadius - 34 + WorldDy, (RealTicks shr 9) mod 8) |
1429 end |
1436 end |
|
1437 end; |
|
1438 |
|
1439 if HH^.Effects[hePoisoned] then |
|
1440 begin |
|
1441 glColor4f(0.25, 1, 0, 0.5); |
|
1442 DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 1.5, 0, 0, sx, sy, 0, 1, 22, 22, 360 - (RealTicks shr 37) mod 360); |
|
1443 glColor4f(1, 1, 1, 1) |
1430 end; |
1444 end; |
1431 |
1445 |
1432 if Gear^.Invulnerable then |
1446 if Gear^.Invulnerable then |
1433 begin |
1447 begin |
1434 glColor4f(1, 1, 1, 0.25 + abs(1 - ((RealTicks div 2) mod 1500) / 750)); |
1448 glColor4f(1, 1, 1, 0.25 + abs(1 - ((RealTicks div 2) mod 1500) / 750)); |
1817 Gear^.State:= (Gear^.State or gstMoving) and (not gstLoser); |
1831 Gear^.State:= (Gear^.State or gstMoving) and (not gstLoser); |
1818 if not Gear^.Invulnerable then |
1832 if not Gear^.Invulnerable then |
1819 Gear^.State:= (Gear^.State or gstMoving) and (not gstWinner); |
1833 Gear^.State:= (Gear^.State or gstMoving) and (not gstWinner); |
1820 Gear^.Active:= true; |
1834 Gear^.Active:= true; |
1821 FollowGear:= Gear |
1835 FollowGear:= Gear |
1822 end; |
1836 end; |
1823 |
1837 if ((Mask and EXPLPoisoned) <> 0) and (Gear^.Kind = gtHedgehog) then |
1824 if ((Mask and EXPLPoisoned) <> 0) and (Gear^.Kind = gtHedgehog) then |
1838 PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] := true; |
1825 PHedgehog(Gear^.Hedgehog)^.Poisoned := true; |
1839 end; |
1826 end; |
|
1827 |
1840 |
1828 end; |
1841 end; |
1829 gtGrave: begin |
1842 gtGrave: begin |
1830 // Run the calcs only once we know we have a type that will need damage |
1843 // Run the calcs only once we know we have a type that will need damage |
1831 if hwRound(hwAbs(Gear^.X-int2hwFloat(X))+hwAbs(Gear^.Y-int2hwFloat(Y))) < dmgBase then |
1844 if hwRound(hwAbs(Gear^.X-int2hwFloat(X))+hwAbs(Gear^.Y-int2hwFloat(Y))) < dmgBase then |