57 function CheckGearNear(Gear: PGear; Kind: TGearType; rX, rY: LongInt): PGear; forward; |
57 function CheckGearNear(Gear: PGear; Kind: TGearType; rX, rY: LongInt): PGear; forward; |
58 procedure SpawnBoxOfSmth; forward; |
58 procedure SpawnBoxOfSmth; forward; |
59 procedure AfterAttack; forward; |
59 procedure AfterAttack; forward; |
60 procedure HedgehogStep(Gear: PGear); forward; |
60 procedure HedgehogStep(Gear: PGear); forward; |
61 procedure doStepHedgehogMoving(Gear: PGear); forward; |
61 procedure doStepHedgehogMoving(Gear: PGear); forward; |
62 procedure HedgehogChAngle(Gear: PGear); forward; |
62 procedure HedgehogChAngle(HHGear: PGear); forward; |
63 procedure ShotgunShot(Gear: PGear); forward; |
63 procedure ShotgunShot(Gear: PGear); forward; |
64 procedure PickUp(HH, Gear: PGear); forward; |
64 procedure PickUp(HH, Gear: PGear); forward; |
65 procedure HHSetWeapon(Gear: PGear); forward; |
65 procedure HHSetWeapon(HHGear: PGear); forward; |
66 procedure doStepCase(Gear: PGear); forward; |
66 procedure doStepCase(Gear: PGear); forward; |
67 |
67 |
68 {$INCLUDE "GSHandlers.inc"} |
68 {$INCLUDE "GSHandlers.inc"} |
69 {$INCLUDE "HHHandlers.inc"} |
69 {$INCLUDE "HHHandlers.inc"} |
70 |
70 |
1032 begin // this cannot just use Damage or it interrupts shotgun and gets you called stupid |
1041 begin // this cannot just use Damage or it interrupts shotgun and gets you called stupid |
1033 inc(CurrentHedgehog^.Gear^.Karma, tmpDmg); |
1042 inc(CurrentHedgehog^.Gear^.Karma, tmpDmg); |
1034 spawnHealthTagForHH(CurrentHedgehog^.Gear, tmpDmg); |
1043 spawnHealthTagForHH(CurrentHedgehog^.Gear, tmpDmg); |
1035 end; |
1044 end; |
1036 end; |
1045 end; |
1037 end else // not gtHedgehog |
1046 end else if Gear^.Kind <> gtStructure then // not gtHedgehog nor gtStructure |
1038 begin |
1047 begin |
1039 AddFileLog('Assigning hedgehog ' + inttostr(LongInt(AttackerHog)) + ' to gear ' + inttostr(Gear^.uid)); |
1048 AddFileLog('Assigning hedgehog ' + inttostr(LongInt(AttackerHog)) + ' to gear ' + inttostr(Gear^.uid)); |
1040 Gear^.Hedgehog:= AttackerHog; |
1049 Gear^.Hedgehog:= AttackerHog; |
1041 end; |
1050 end; |
1042 inc(Gear^.Damage, Damage); |
1051 inc(Gear^.Damage, Damage); |
1330 gtHedgehog, |
1341 gtHedgehog, |
1331 gtMine, |
1342 gtMine, |
1332 gtSMine, |
1343 gtSMine, |
1333 gtTarget, |
1344 gtTarget, |
1334 gtCase, |
1345 gtCase, |
1335 gtExplosives: begin |
1346 gtExplosives, |
|
1347 gtStructure: begin |
1336 if (Ammo^.Kind = gtDrill) then begin Ammo^.Timer:= 0; exit; end; |
1348 if (Ammo^.Kind = gtDrill) then begin Ammo^.Timer:= 0; exit; end; |
1337 if (not Gear^.Invulnerable) then |
1349 if (not Gear^.Invulnerable) then |
1338 ApplyDamage(Gear, Ammo^.Hedgehog, tmpDmg, dsShove) |
1350 ApplyDamage(Gear, Ammo^.Hedgehog, tmpDmg, dsShove) |
1339 else |
1351 else |
1340 Gear^.State:= Gear^.State or gstWinner; |
1352 Gear^.State:= Gear^.State or gstWinner; |