hedgewars/uMisc.pas
changeset 1861 98de5dc5fda7
parent 1854 6e05013899b2
child 1888 e76274ce7365
--- a/hedgewars/uMisc.pas	Wed Mar 04 16:35:36 2009 +0000
+++ b/hedgewars/uMisc.pas	Thu Mar 05 14:54:02 2009 +0000
@@ -134,6 +134,7 @@
 function  toPowerOf2(i: Longword): Longword;
 function DecodeBase64(s: shortstring): shortstring;
 procedure MakeScreenshot(s: shortstring);
+function modifyDamage(dmg: Longword): Longword;
 
 var CursorPoint: TPoint;
     TargetPoint: TPoint = (X: NoPointX; Y: 0);
@@ -404,6 +405,11 @@
 FreeMem(p)
 end;
 
+function modifyDamage(dmg: Longword): Longword;
+begin
+ModifyDamage:= hwRound(int2HwFloat(dmg) * cDamageModifier)
+end;
+
 {$IFDEF DEBUGFILE}
 procedure AddFileLog(s: shortstring);
 begin