462 gear^.Radius:= 16; // todo: check |
446 gear^.Radius:= 16; // todo: check |
463 gear^.Timer:= 0; |
447 gear^.Timer:= 0; |
464 gear^.Health := 2000; |
448 gear^.Health := 2000; |
465 gear^.FlightTime := 2; |
449 gear^.FlightTime := 2; |
466 end; |
450 end; |
467 gtBigExplosion: begin |
|
468 gear^.Angle:= random(360); |
|
469 end; |
|
470 gtEgg: begin |
451 gtEgg: begin |
471 gear^.Radius:= 4; |
452 gear^.Radius:= 4; |
472 gear^.Elasticity:= _0_6; |
453 gear^.Elasticity:= _0_6; |
473 gear^.Friction:= _0_96; |
454 gear^.Friction:= _0_96; |
474 if gear^.Timer = 0 then gear^.Timer:= 3000 |
455 if gear^.Timer = 0 then gear^.Timer:= 3000 |
531 if (hwRound(Gear^.Y) >= cWaterLine) then |
512 if (hwRound(Gear^.Y) >= cWaterLine) then |
532 begin |
513 begin |
533 t:= max(Gear^.Damage, Gear^.Health); |
514 t:= max(Gear^.Damage, Gear^.Health); |
534 Gear^.Damage:= t; |
515 Gear^.Damage:= t; |
535 if (cWaterOpacity < $FF) and (hwRound(Gear^.Y) < cWaterLine + 256) then |
516 if (cWaterOpacity < $FF) and (hwRound(Gear^.Y) < cWaterLine + 256) then |
536 AddGear(hwRound(Gear^.X), min(hwRound(Gear^.Y),cWaterLine+cVisibleWater+32), gtHealthTag, t, _0, _0, 0)^.Hedgehog:= Gear^.Hedgehog; |
517 AddVisualGear(hwRound(Gear^.X), min(hwRound(Gear^.Y),cWaterLine+cVisibleWater+32), vgtHealthTag, t)^.Hedgehog:= Gear^.Hedgehog; |
537 uStats.HedgehogDamaged(Gear) |
518 uStats.HedgehogDamaged(Gear) |
538 end; |
519 end; |
539 |
520 |
540 team:= PHedgehog(Gear^.Hedgehog)^.Team; |
521 team:= PHedgehog(Gear^.Hedgehog)^.Team; |
541 if CurrentHedgehog^.Gear = Gear then |
522 if CurrentHedgehog^.Gear = Gear then |
592 not PHedgehog(Gear^.Hedgehog)^.King and |
573 not PHedgehog(Gear^.Hedgehog)^.King and |
593 not PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] and |
574 not PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] and |
594 not SuddenDeathDmg then |
575 not SuddenDeathDmg then |
595 Gear^.State:= Gear^.State or gstLoser; |
576 Gear^.State:= Gear^.State or gstLoser; |
596 |
577 |
597 AddGear(hwRound(Gear^.X), hwRound(Gear^.Y) - cHHRadius - 12, |
578 AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y) - cHHRadius - 12, |
598 gtHealthTag, dmg, _0, _0, 0)^.Hedgehog:= Gear^.Hedgehog; |
579 vgtHealthTag, dmg)^.Hedgehog:= Gear^.Hedgehog; |
599 |
580 |
600 RenderHealth(PHedgehog(Gear^.Hedgehog)^); |
581 RenderHealth(PHedgehog(Gear^.Hedgehog)^); |
601 RecountTeamHealth(PHedgehog(Gear^.Hedgehog)^.Team); |
582 RecountTeamHealth(PHedgehog(Gear^.Hedgehog)^.Team); |
602 |
583 |
603 end; |
584 end; |
913 if ((GameFlags and gfKarma) <> 0) and |
894 if ((GameFlags and gfKarma) <> 0) and |
914 ((GameFlags and gfInvulnerable) = 0) and |
895 ((GameFlags and gfInvulnerable) = 0) and |
915 not CurrentHedgehog^.Gear^.Invulnerable then |
896 not CurrentHedgehog^.Gear^.Invulnerable then |
916 begin // this cannot just use Damage or it interrupts shotgun and gets you called stupid |
897 begin // this cannot just use Damage or it interrupts shotgun and gets you called stupid |
917 inc(CurrentHedgehog^.Gear^.Karma, tmpDmg); |
898 inc(CurrentHedgehog^.Gear^.Karma, tmpDmg); |
918 AddGear(hwRound(CurrentHedgehog^.Gear^.X), |
899 AddVisualGear(hwRound(CurrentHedgehog^.Gear^.X), |
919 hwRound(CurrentHedgehog^.Gear^.Y), |
900 hwRound(CurrentHedgehog^.Gear^.Y), |
920 gtHealthTag, tmpDmg, _0, _0, 0)^.Hedgehog:= CurrentHedgehog; |
901 vgtHealthTag, tmpDmg)^.Hedgehog:= CurrentHedgehog; |
921 end; |
902 end; |
922 end; |
903 end; |
923 end; |
904 end; |
924 inc(Gear^.Damage, Damage); |
905 inc(Gear^.Damage, Damage); |
925 end; |
906 end; |
1167 {$IFDEF DEBUGFILE}if Radius > 4 then AddFileLog('Explosion: at (' + inttostr(x) + ',' + inttostr(y) + ')');{$ENDIF} |
1148 {$IFDEF DEBUGFILE}if Radius > 4 then AddFileLog('Explosion: at (' + inttostr(x) + ',' + inttostr(y) + ')');{$ENDIF} |
1168 if Radius > 25 then KickFlakes(Radius, X, Y); |
1149 if Radius > 25 then KickFlakes(Radius, X, Y); |
1169 |
1150 |
1170 if ((Mask and EXPLNoGfx) = 0) then |
1151 if ((Mask and EXPLNoGfx) = 0) then |
1171 begin |
1152 begin |
1172 if Radius > 50 then AddGear(X, Y, gtBigExplosion, 0, _0, _0, 0) |
1153 if Radius > 50 then AddVisualGear(X, Y, vgtBigExplosion) |
1173 else if Radius > 10 then AddGear(X, Y, gtExplosion, 0, _0, _0, 0); |
1154 else if Radius > 10 then AddVIsualGear(X, Y, vgtExplosion); |
1174 end; |
1155 end; |
1175 if (Mask and EXPLAutoSound) <> 0 then PlaySound(sndExplosion); |
1156 if (Mask and EXPLAutoSound) <> 0 then PlaySound(sndExplosion); |
1176 |
1157 |
1177 if (Mask and EXPLAllDamageInRadius) = 0 then |
1158 if (Mask and EXPLAllDamageInRadius) = 0 then |
1178 dmgRadius:= Radius shl 1 |
1159 dmgRadius:= Radius shl 1 |