equal
deleted
inserted
replaced
684 fallDmg, valueResult: LongInt; |
684 fallDmg, valueResult: LongInt; |
685 begin |
685 begin |
686 if Level > 4 then exit(BadTurn); |
686 if Level > 4 then exit(BadTurn); |
687 dmgMod:= 0.01 * hwFloat2Float(cDamageModifier) * cDamagePercent; |
687 dmgMod:= 0.01 * hwFloat2Float(cDamageModifier) * cDamagePercent; |
688 Level:= Level; // avoid compiler hint |
688 Level:= Level; // avoid compiler hint |
689 ap.ExplR:= 0; |
689 ap.ExplR:= 1; |
690 ap.Time:= 0; |
690 ap.Time:= 0; |
691 ap.Power:= 1; |
691 ap.Power:= 1; |
692 |
692 |
693 x:= hwFloat2Float(Me^.X); |
693 x:= hwFloat2Float(Me^.X); |
694 y:= hwFloat2Float(Me^.Y); |
694 y:= hwFloat2Float(Me^.Y); |
714 or (trunc(x) > LAND_WIDTH) |
714 or (trunc(x) > LAND_WIDTH) |
715 or (trunc(y) > LAND_HEIGHT) |
715 or (trunc(y) > LAND_HEIGHT) |
716 or (d > 48); |
716 or (d > 48); |
717 |
717 |
718 if Abs(Targ.X - trunc(x)) + Abs(Targ.Y - trunc(y)) < 5 then |
718 if Abs(Targ.X - trunc(x)) + Abs(Targ.Y - trunc(y)) < 5 then |
719 begin |
719 valueResult:= RateShove(Me, Targ.X, Targ.Y, 1, 7, 20, vX*0.125, vY*0.125, afTrackFall) |
720 fallDmg:= TraceShoveFall(Targ.X, Targ.Y, vX * 0.00125 * 20, vY * 0.00125 * 20); |
720 else valueResult:= BadTurn; |
721 if fallDmg < 0 then |
|
722 valueResult:= 204800 |
|
723 else valueResult:= Max(0, (4 - d div 12) * trunc((7 + fallDmg) * dmgMod) * 1024) |
|
724 end |
|
725 else |
|
726 valueResult:= BadTurn; |
|
727 TestDesertEagle:= valueResult |
721 TestDesertEagle:= valueResult |
728 end; |
722 end; |
729 |
723 |
730 |
724 |
731 function TestSniperRifle(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
725 function TestSniperRifle(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
764 or (trunc(x) > LAND_WIDTH) |
758 or (trunc(x) > LAND_WIDTH) |
765 or (trunc(y) > LAND_HEIGHT) |
759 or (trunc(y) > LAND_HEIGHT) |
766 or (d > 22); |
760 or (d > 22); |
767 |
761 |
768 if Abs(Targ.X - trunc(x)) + Abs(Targ.Y - trunc(y)) < 4 then |
762 if Abs(Targ.X - trunc(x)) + Abs(Targ.Y - trunc(y)) < 4 then |
769 begin |
763 TestSniperRifle:= RateShove(Me, Targ.X, Targ.Y, 1, trunc(dmg), 20, vX*0.166, vY*0.166, afTrackFall) |
770 fallDmg:= TraceShoveFall(Targ.X, Targ.Y, vX * 0.00166 * dmg, vY * 0.00166 * dmg); |
764 else TestSniperRifle:= BadTurn; |
771 if fallDmg < 0 then |
|
772 TestSniperRifle:= BadTurn |
|
773 else |
|
774 TestSniperRifle:= Max(0, trunc((dmg + fallDmg) * dmgMod) * 1024) |
|
775 end |
|
776 else |
|
777 TestSniperRifle:= BadTurn |
|
778 end; |
765 end; |
779 |
766 |
780 |
767 |
781 function TestBaseballBat(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
768 function TestBaseballBat(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
782 var valueResult, a, v1, v2: LongInt; |
769 var valueResult, a, v1, v2: LongInt; |