index e37e2e448b5115c204097f6c81c5467e5e01d5ae..27846f4421f4d34f484698a0a2771fb67fbf5ca4 100644 (file)
--- a/src/game/g_monsters.pas
+++ b/src/game/g_monsters.pas
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*)
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*)
-{$MODE DELPHI}
+{$INCLUDE g_amodes.inc}
unit g_monsters;
interface
unit g_monsters;
interface
function Live(): Boolean;
procedure SetHealth(aH: Integer);
procedure Push(vx, vy: Integer);
function Live(): Boolean;
procedure SetHealth(aH: Integer);
procedure Push(vx, vy: Integer);
- function Damage(Damage: Word; VelX, VelY: Integer; SpawnerUID: Word; t: Byte): Boolean;
+ function Damage(aDamage: Word; VelX, VelY: Integer; SpawnerUID: Word; t: Byte): Boolean;
function Heal(Value: Word): Boolean;
procedure BFGHit();
procedure Update();
function Heal(Value: Word): Boolean;
procedure BFGHit();
procedure Update();
vilefire := nil;
end;
vilefire := nil;
end;
-function TMonster.Damage(Damage: Word; VelX, VelY: Integer; SpawnerUID: Word; t: Byte): Boolean;
+function TMonster.Damage(aDamage: Word; VelX, VelY: Integer; SpawnerUID: Word; t: Byte): Boolean;
var
c, it: Integer;
p: TPlayer;
var
c, it: Integer;
p: TPlayer;
// Ðîáîòó óðîíà íåò:
if FMonsterType = MONSTER_ROBO then
// Ðîáîòó óðîíà íåò:
if FMonsterType = MONSTER_ROBO then
- Damage := 0;
+ aDamage := 0;
// Íàíîñèì óðîí:
// Íàíîñèì óðîí:
- if g_Game_IsServer then Dec(FHealth, Damage);
+ if g_Game_IsServer then Dec(FHealth, aDamage);
// Óñèëèâàåì áîëü ìîíñòðà îò óðîíà:
if FPain = 0 then
FPain := 3;
// Óñèëèâàåì áîëü ìîíñòðà îò óðîíà:
if FPain = 0 then
FPain := 3;
- FPain := FPain+Damage;
+ FPain := FPain+aDamage;
// Åñëè áîëü ñóùåñòâåííàÿ, òî ìåíÿåì ñîñòîÿíèå íà áîëåâîå:
if FState <> STATE_PAIN then
// Åñëè áîëü ñóùåñòâåííàÿ, òî ìåíÿåì ñîñòîÿíèå íà áîëåâîå:
if FState <> STATE_PAIN then
// Åñëè ðàçðåøåíà êðîâü - ñîçäàåì áðûçãè êðîâè:
if (gBloodCount > 0) then
begin
// Åñëè ðàçðåøåíà êðîâü - ñîçäàåì áðûçãè êðîâè:
if (gBloodCount > 0) then
begin
- c := Min(Damage, 200);
- c := c*gBloodCount - (Damage div 4) + Random(c div 2);
+ c := Min(aDamage, 200);
+ c := c*gBloodCount - (aDamage div 4) + Random(c div 2);
if (VelX = 0) and (VelY = 0) then
MakeBloodSimple(c)
if (VelX = 0) and (VelY = 0) then
MakeBloodSimple(c)