📄 axemon.pas
字号:
end;
end;
m_nCurrentDefFrame := 0;
m_dwDefFrameTime := GetTickCount;
end else begin
if GetTickCount - m_dwSmoothMoveTime > 200 then begin
if GetTickCount - m_dwDefFrameTime > 500 then begin
m_dwDefFrameTime := GetTickCount;
Inc (m_nCurrentDefFrame);
if m_nCurrentDefFrame >= m_nDefFrameCount then
m_nCurrentDefFrame := 0;
end;
DefaultMotion;
end;
end;
if prv <> m_nCurrentFrame then begin
m_dwLoadSurfaceTime := GetTickCount;
LoadSurface;
end;
end;
procedure TGasKuDeGi.DrawChr (dsurface: TDirectDrawSurface; dx, dy: integer; blend: Boolean;boFlag:Boolean);
var
idx: integer;
d: TDirectDrawSurface;
ceff: TColorEffect;
begin
if not (m_btDir in [0..7]) then exit;
if GetTickCount - m_dwLoadSurfaceTime > 60 * 1000 then begin
m_dwLoadSurfaceTime := GetTickCount;
LoadSurface; //bodysurface loadsurface
end;
ceff := GetDrawEffectValue;
if m_BodySurface <> nil then
DrawEffSurface (dsurface, m_BodySurface, dx + m_nPx + m_nShiftX, dy + m_nPy + m_nShiftY, blend, ceff);
end;
procedure TGasKuDeGi.DrawEff (dsurface: TDirectDrawSurface; dx, dy: integer);
var
idx: integer;
d: TDirectDrawSurface;
ceff: TColorEffect;
begin
if m_boUseEffect then
if AttackEffectSurface <> nil then begin
DrawBlend (dsurface,
dx + ax + m_nShiftX,
dy + ay + m_nShiftY,
AttackEffectSurface, 1);
end;
if BoUseDieEffect then
if DieEffectSurface <> nil then begin
DrawBlend (dsurface,
dx + bx + m_nShiftX,
dy + by + m_nShiftY,
DieEffectSurface, 1);
end;
end;
{-----------------------------------------------------------}
function TFireCowFaceMon.Light: integer;
var
l: integer;
begin
l := m_nChrLight;
if l < 2 then begin
if m_boUseEffect then
l := 2;
end;
Result := l;
end;
function TCowFaceKing.Light: integer;
var
l: integer;
begin
l := m_nChrLight;
if l < 2 then begin
if m_boUseEffect then
l := 2;
end;
Result := l;
end;
{-----------------------------------------------------------}
//procedure TZombiLighting.Run;
{-----------------------------------------------------------}
procedure TSculptureMon.CalcActorFrame;
var
pm: PTMonsterAction;
haircount: integer;
begin
m_nCurrentFrame := -1;
m_nBodyOffset := GetOffset (m_wAppearance);
pm := GetRaceByPM (m_btRace,m_wAppearance);
if pm = nil then exit;
m_boUseEffect := FALSE;
case m_nCurrentAction of
SM_TURN:
begin
if (m_nState and STATE_STONE_MODE) <> 0 then begin
if (m_btRace = 48) or (m_btRace = 49) then
m_nStartFrame := pm.ActDeath.start // + Dir * (pm.ActDeath.frame + pm.ActDeath.skip)
else
m_nStartFrame := pm.ActDeath.start + m_btDir * (pm.ActDeath.frame + pm.ActDeath.skip);
m_nEndFrame := m_nStartFrame;
m_dwFrameTime := pm.ActDeath.ftime;
m_dwStartTime := GetTickCount;
m_nDefFrameCount := pm.ActDeath.frame;
end else begin
m_nStartFrame := pm.ActStand.start + m_btDir * (pm.ActStand.frame + pm.ActStand.skip);
m_nEndFrame := m_nStartFrame + pm.ActStand.frame - 1;
m_dwFrameTime := pm.ActStand.ftime;
m_dwStartTime := GetTickCount;
m_nDefFrameCount := pm.ActStand.frame;
end;
Shift (m_btDir, 0, 0, 1);
end;
SM_WALK, SM_BACKSTEP:
begin
m_nStartFrame := pm.ActWalk.start + m_btDir * (pm.ActWalk.frame + pm.ActWalk.skip);
m_nEndFrame := m_nStartFrame + pm.ActWalk.frame - 1;
m_dwFrameTime := pm.ActWalk.ftime;
m_dwStartTime := GetTickCount;
m_nMaxTick := pm.ActWalk.UseTick;
m_nCurTick := 0;
//WarMode := FALSE;
m_nMoveStep := 1;
if m_nCurrentAction = SM_WALK then
Shift (m_btDir, m_nMoveStep, 0, m_nEndFrame-m_nStartFrame+1)
else //sm_backstep
Shift (GetBack(m_btDir), m_nMoveStep, 0, m_nEndFrame-m_nStartFrame+1);
end;
SM_DIGUP:
begin
if (m_btRace = 48) or (m_btRace = 49) then begin
m_nStartFrame := pm.ActDeath.start;
end else begin
m_nStartFrame := pm.ActDeath.start + m_btDir * (pm.ActDeath.frame + pm.ActDeath.skip);
end;
m_nEndFrame := m_nStartFrame + pm.ActDeath.frame - 1;
m_dwFrameTime := pm.ActDeath.ftime;
m_dwStartTime := GetTickCount;
//WarMode := FALSE;
Shift (m_btDir, 0, 0, 1);
end;
SM_HIT:
begin
m_nStartFrame := pm.ActAttack.start + m_btDir * (pm.ActAttack.frame + pm.ActAttack.skip);
m_nEndFrame := m_nStartFrame + pm.ActAttack.frame - 1;
m_dwFrameTime := pm.ActAttack.ftime;
m_dwStartTime := GetTickCount;
if m_btRace = 49 then begin
m_boUseEffect := TRUE;
firedir := m_btDir;
m_nEffectFrame := 0; //startframe;
m_nEffectStart := 0; //startframe;
m_nEffectEnd := m_nEffectStart + 8;
m_dwEffectStartTime := GetTickCount;
m_dwEffectFrameTime := m_dwFrameTime;
end;
Shift (m_btDir, 0, 0, 1);
end;
SM_STRUCK:
begin
m_nStartFrame := pm.ActStruck.start + m_btDir * (pm.ActStruck.frame + pm.ActStruck.skip);
m_nEndFrame := m_nStartFrame + pm.ActStruck.frame - 1;
m_dwFrameTime := m_dwStruckFrameTime; //pm.ActStruck.ftime;
m_dwStartTime := GetTickCount;
end;
SM_DEATH:
begin
m_nStartFrame := pm.ActDie.start + m_btDir * (pm.ActDie.frame + pm.ActDie.skip);
m_nEndFrame := m_nStartFrame + pm.ActDie.frame - 1;
m_nStartFrame := m_nEndFrame; //
m_dwFrameTime := pm.ActDie.ftime;
m_dwStartTime := GetTickCount;
end;
SM_NOWDEATH:
begin
m_nStartFrame := pm.ActDie.start + m_btDir * (pm.ActDie.frame + pm.ActDie.skip);
m_nEndFrame := m_nStartFrame + pm.ActDie.frame - 1;
m_dwFrameTime := pm.ActDie.ftime;
m_dwStartTime := GetTickCount;
end;
end;
end;
procedure TSculptureMon.LoadSurface;
begin
inherited LoadSurface;
case m_btRace of
48, 49:
begin
if m_boUseEffect then
AttackEffectSurface := FrmMain.WMon7Img.GetCachedImage (
SCULPTUREFIREBASE + (firedir * 10) + m_nEffectFrame-m_nEffectStart, //
ax, ay);
end;
end;
end;
function TSculptureMon.GetDefaultFrame (wmode: Boolean): integer;
var
cf, dr: integer;
pm: PTMonsterAction;
begin
Result:=0;
pm := GetRaceByPM (m_btRace,m_wAppearance);
if pm = nil then exit;
if m_boDeath then begin
Result := pm.ActDie.start + m_btDir * (pm.ActDie.frame + pm.ActDie.skip) + (pm.ActDie.frame - 1);
end else begin
if (m_nState and STATE_STONE_MODE) <> 0 then begin
case m_btRace of
47: Result := pm.ActDeath.start + m_btDir * (pm.ActDeath.frame + pm.ActDeath.skip);
48, 49: Result := pm.ActDeath.start;
end;
end else begin
m_nDefFrameCount := pm.ActStand.frame;
if m_nCurrentDefFrame < 0 then cf := 0
else if m_nCurrentDefFrame >= pm.ActStand.frame then cf := 0
else cf := m_nCurrentDefFrame;
Result := pm.ActStand.start + m_btDir * (pm.ActStand.frame + pm.ActStand.skip) + cf;
end;
end;
end;
procedure TSculptureMon.DrawEff (dsurface: TDirectDrawSurface; dx, dy: integer);
var
idx: integer;
d: TDirectDrawSurface;
ceff: TColorEffect;
begin
if m_boUseEffect then
if AttackEffectSurface <> nil then begin
DrawBlend (dsurface,
dx + ax + m_nShiftX,
dy + ay + m_nShiftY,
AttackEffectSurface, 1);
end;
end;
procedure TSculptureMon.Run;
var
m_dwEffectFrameTimetime, m_dwFrameTimetime: longword;
begin
if (m_nCurrentAction = SM_WALK) or (m_nCurrentAction = SM_BACKSTEP) or (m_nCurrentAction = SM_RUN) or (m_nCurrentAction = SM_HORSERUN) then exit;
if m_boUseEffect then begin
m_dwEffectFrameTimetime := m_dwEffectFrameTime;
if GetTickCount - m_dwEffectStartTime > m_dwEffectFrameTimetime then begin
m_dwEffectStartTime := GetTickCount;
if m_nEffectFrame < m_nEffectEnd then begin
Inc (m_nEffectFrame);
end else begin
m_boUseEffect := FALSE;
end;
end;
end;
inherited Run;
end;
{ TBanyaGuardMon }
procedure TBanyaGuardMon.CalcActorFrame;
var
pm: PTMonsterAction;
begin
m_nCurrentFrame := -1;
m_nBodyOffset := GetOffset (m_wAppearance);
pm := GetRaceByPM (m_btRace,m_wAppearance);
if pm = nil then exit;
case m_nCurrentAction of
SM_HIT: begin
m_nStartFrame := pm.ActAttack.start + m_btDir * (pm.ActAttack.frame + pm.ActAttack.skip);
m_nEndFrame := m_nStartFrame + pm.ActAttack.frame - 1;
m_dwFrameTime := pm.ActAttack.ftime;
m_dwStartTime := GetTickCount;
m_dwWarModeTime := GetTickCount;
Shift (m_btDir, 0, 0, 1);
m_boUseEffect := TRUE;
m_nEffectFrame := m_nStartFrame;
m_nEffectStart := m_nStartFrame;
m_nEffectEnd := m_nEndFrame;
m_dwEffectStartTime := GetTickCount;
m_dwEffectFrameTime := m_dwFrameTime;
end;
SM_LIGHTING: begin
m_nStartFrame := pm.ActCritical.start + m_btDir * (pm.ActCritical.frame + pm.ActCritical.skip);
m_nEndFrame := m_nStartFrame + pm.ActCritical.frame - 1;
m_dwFrameTime := pm.ActCritical.ftime;
m_dwStartTime := GetTickCount;
m_nCurEffFrame:=0;
m_boUseEffect := TRUE;
m_dwWarModeTime := GetTickCount;
Shift (m_btDir, 0, 0, 1);
// if (m_btRace = 71) or (m_btRace = 101) then begin
if (m_btRace <> 78) and (m_btRace <> 70) and (m_btRace <> 101) then begin //this hopefully fixes deva , 78 = omaking he's the only mob that uses this that CANT do effect while casting magic
m_boUseEffect := TRUE;
m_nEffectFrame := m_nStartFrame;
m_nEffectStart := m_nStartFrame;
m_nEffectEnd := m_nEndFrame;
m_dwEffectStartTime := GetTickCount;
m_dwEffectFrameTime := m_dwFrameTime;
end;
if m_btRace = 78 then
m_boUseEffect:=FALSE;
end;
//SM_NOWDEATH: begin
//end;
else begin
inherited;
end;
end;
end;
constructor TBanyaGuardMon.Create;
begin
inherited;
n26C:=nil;
end;
procedure TBanyaGuardMon.DrawEff(dsurface: TDirectDrawSurface; dx,
dy: integer);
begin
inherited;
if m_boUseEffect and (n26C <> nil) then begin
DrawBlend (dsurface,dx + ax + m_nShiftX,dy + ay + m_nShiftY,n26C, 1);
end;
end;
procedure TBanyaGuardMon.LoadSurface;
begin
inherited;
if bo260 then begin
case m_btRace of
70: begin //left guard
AttackEffectSurface := FrmMain.WMon21Img.GetCachedImage (
2320 + m_nCurrentFrame - m_nStartFrame,
n264, n268);
end;
101: begin //right guard
AttackEffectSurface := FrmMain.WMon21Img.GetCachedImage (
2870 + (m_btDir * 10) + m_nCurrentFrame - m_nStartFrame,
n264, n268);
end;
78: begin //omaking
AttackEffectSurface := FrmMain.WMon22Img.GetCachedImage (
3120 + (m_btDir * 20) + m_nCurrentFrame - m_nStartFrame,
n264, n268);
end;
end;
end else begin
if m_boUseEffect then begin
case m_btRace of
101: begin //rightguard
if m_nCurrentAction = SM_HIT then begin
n26C := FrmMain.WMon21Img.GetCachedImage (
2780 + (m_btDir * 10) + m_nEffectFrame - m_nEffectStart,
ax, ay);
end;
if m_nCurrentAction = SM_LIGHTING then begin
n26C := FrmMain.WMon21Img.GetCachedImage (
2960 + (m_btDir * 10) + m_nEffectFrame - m_nEffectStart,
ax, ay);
end;
end;
70: begin //leftguard
if m_nCurrentAction = SM_HIT then begin
n26C := FrmMain.WMon21Img.GetCachedImage (
2230 + (m_btDir * 10) + m_nEffectFrame - m_nEffectStart,
ax, ay);
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -