📄 axemon.pas
字号:
end;
71: begin //MTK
case m_nCurrentAction of
SM_HIT: begin //close range attack
n26C := FrmMain.WMon21Img.GetCachedImage (
{2780} 3490 + (m_btDir * 10) + m_nEffectFrame - m_nEffectStart,
ax, ay);
end;
end;
end;
72: begin
if m_nCurrentAction = SM_HIT then begin
n26C := FrmMain.WMon21Img.GetCachedImage (
3490 + (m_btDir * 10) + m_nEffectFrame - m_nEffectStart,
ax, ay);
end;
end;
78: begin
if m_nCurrentAction = SM_HIT then begin
n26C := FrmMain.WMon22Img.GetCachedImage (
3440 + (m_btDir * 10) + m_nEffectFrame - m_nEffectStart,
ax, ay);
end;
end;
end;
end;
end;
end;
procedure TBanyaGuardMon.Run;
var
prv: integer;
m_dwEffectFrameTimetime, m_dwFrameTimetime: longword;
bo11:Boolean;
begin
if (m_nCurrentAction = SM_WALK) or (m_nCurrentAction = SM_BACKSTEP) or (m_nCurrentAction = SM_RUN) or (m_nCurrentAction = SM_HORSERUN) then exit;
m_boMsgMuch := FALSE;
if m_MsgList.Count >= 2 then m_boMsgMuch := TRUE;
RunActSound (m_nCurrentFrame - m_nStartFrame);
RunFrameAction (m_nCurrentFrame - m_nStartFrame);
if m_boUseEffect then begin
if m_boMsgMuch then m_dwEffectFrameTimetime := Round(m_dwEffectFrameTime * 2 / 3)
else 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;
prv := m_nCurrentFrame;
if m_nCurrentAction <> 0 then begin
if (m_nCurrentFrame < m_nStartFrame) or (m_nCurrentFrame > m_nEndFrame) then
m_nCurrentFrame := m_nStartFrame;
if m_boMsgMuch then m_dwFrameTimetime := Round(m_dwFrameTime * 2 / 3)
else m_dwFrameTimetime := m_dwFrameTime;
if GetTickCount - m_dwStartTime > m_dwFrameTimetime then begin
if m_nCurrentFrame < m_nEndFrame then begin
Inc (m_nCurrentFrame);
m_dwStartTime := GetTickCount;
end else begin
m_nCurrentAction := 0;
m_boUseEffect := FALSE;
bo260:=False;
end;
if m_nCurrentAction = SM_LIGHTING then begin
if (m_nCurrentFrame - m_nStartFrame) = 4 then begin
if (m_btRace = 101) then begin //RightGuard
PlayScene.NewMagic (Self,1,1,m_nCurrX,m_nCurrY,m_nTargetX,m_nTargetY,m_nTargetRecog,mtFly,True,20,bo11);
PlaySound (m_nMagicFireSound);
end;
if (m_btRace = 70) then begin //leftguard
PlayScene.NewMagic (Self,7,9,m_nCurrX,m_nCurrY,m_nTargetX,m_nTargetY,m_nTargetRecog,mtThunder,False,30,bo11);
PlaySound(10112);
end;
if (m_btRace = 71) then begin //MTK attack
PlayScene.NewMagic (Self,11,32,m_nCurrX,m_nCurrY,m_nTargetX,m_nTargetY,m_nTargetRecog,mt13,True,30,bo11);
PlaySound(10012);
end;
if (m_btRace = 72) then begin
PlayScene.NewMagic (Self,11,32,m_nCurrX,m_nCurrY,m_nTargetX,m_nTargetY,m_nTargetRecog,mt13,False,30,bo11);
PlaySound(2276);
end;
if (m_btRace = 78) then begin
PlayScene.NewMagic (Self,11,37,m_nCurrX,m_nCurrY,m_nCurrX,m_nCurrY,m_nTargetRecog,mt13,True,30,bo11);
PlaySound(2396);
end;
if (m_btRace = 81) then begin
PlayScene.NewMagic (Self,7,9,m_nCurrX,m_nCurrY,m_nTargetX,m_nTargetY,m_nTargetRecog,mtThunder,False,30,bo11);
PlaySound(10112);
end;
end;
end;
m_nCurrentDefFrame := 0;
m_dwDefFrameTime := GetTickCount;
end;
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;
{ TElectronicScolpionMon }
procedure TElectronicScolpionMon.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);
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_dwWarModeTime := GetTickCount;
Shift (m_btDir, 0, 0, 1);
m_boUseEffect := TRUE;
firedir := m_btDir;
m_nEffectFrame := m_nStartFrame;
m_nEffectStart := m_nStartFrame;
m_nEffectEnd := m_nEndFrame;
m_dwEffectStartTime := GetTickCount;
m_dwEffectFrameTime := m_dwFrameTime;
end;
else begin
inherited;
end;
end;
end;
procedure TElectronicScolpionMon.LoadSurface;
begin
inherited;
{
if (m_btRace = 60) and BoUseEffect and (CurrentAction = SM_SPELL) then begin
AttackEffectSurface := FrmMain.WMon19Img.GetCachedImage (
430 + (firedir * 10) + m_nEffectFrame - m_nEffectStart,
ax, ay);
}
if (m_btRace = 60) and m_boUseEffect and (m_nCurrentAction = SM_LIGHTING) then begin
AttackEffectSurface := FrmMain.WMon19Img.GetCachedImage (
430 + (firedir * 10) + m_nEffectFrame - m_nEffectStart,
ax, ay);
end;
end;
{ TBossPigMon }
procedure TBossPigMon.LoadSurface;
begin
inherited;
if (m_btRace = 61) and m_boUseEffect then begin
AttackEffectSurface := FrmMain.WMon19Img.GetCachedImage (
860 + (firedir * 10) + m_nEffectFrame - m_nEffectStart,
ax, ay);
end;
end;
{ TKingOfSculpureKingMon }
procedure TKingOfSculpureKingMon.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;
firedir := m_btDir;
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_dwWarModeTime := GetTickCount;
Shift (m_btDir, 0, 0, 1);
m_boUseEffect := TRUE;
firedir := m_btDir;
m_nEffectFrame := m_nStartFrame;
m_nEffectStart := m_nStartFrame;
m_nEffectEnd := m_nEndFrame;
m_dwEffectStartTime := GetTickCount;
m_dwEffectFrameTime := m_dwFrameTime;
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;
m_nEffectFrame := pm.ActDie.start;
m_nEffectStart := pm.ActDie.start;
m_nEffectEnd := pm.ActDie.start + pm.ActDie.frame - 1;
m_dwEffectStartTime := GetTickCount;
m_dwEffectFrameTime := m_dwFrameTime;
m_boUseEffect := TRUE;
end;
else begin
inherited;
end;
end;
end;
procedure TKingOfSculpureKingMon.LoadSurface;
begin
inherited;
if (m_btRace = 62) and m_boUseEffect then begin
case m_nCurrentAction of
SM_HIT: begin
AttackEffectSurface := FrmMain.WMon19Img.GetCachedImage (
1490 + (firedir * 10) + m_nEffectFrame - m_nEffectStart,
ax, ay);
end;
SM_LIGHTING: begin
AttackEffectSurface := FrmMain.WMon19Img.GetCachedImage (
1380 + (firedir * 10) + m_nEffectFrame - m_nEffectStart,
ax, ay);
end;
SM_NOWDEATH: begin
AttackEffectSurface := FrmMain.WMon19Img.GetCachedImage (
1470 + m_nEffectFrame - m_nEffectStart,
ax, ay);
end;
end;
end;
end;
{ TSkeletonArcherMon }
procedure TSkeletonArcherMon.CalcActorFrame;
begin
inherited;
if (m_nCurrentAction = SM_NOWDEATH) and (m_btRace <> 72) then begin
bo260:=True;
end;
end;
procedure TSkeletonArcherMon.DrawEff(dsurface: TDirectDrawSurface; dx,
dy: integer);
begin
inherited;
if bo260 and (AttackEffectSurface <> nil) then begin
DrawBlend (dsurface,dx + n264 + m_nShiftX,dy + n268 + m_nShiftY,AttackEffectSurface, 1);
end;
end;
procedure TSkeletonArcherMon.LoadSurface;
begin
inherited;
if bo260 then begin
AttackEffectSurface := FrmMain.WMon20Img.GetCachedImage (
1600 + m_nEffectFrame - m_nEffectStart,
n264, n268);
end;
end;
procedure TSkeletonArcherMon.Run;
var
m_dwFrameTimetime: longword;
begin
if m_boMsgMuch then m_dwFrameTimetime := Round(m_dwFrameTime * 2 / 3)
else m_dwFrameTimetime := m_dwFrameTime;
if m_nCurrentAction <> 0 then begin
if (GetTickCount - m_dwStartTime) > m_dwFrameTimetime then begin
if m_nCurrentFrame < m_nEndFrame then begin
end else begin
m_nCurrentAction:=0;
bo260:=False;
end;
end;
end;
inherited;
end;
{ TFlyingSpider }
procedure TFlyingSpider.CalcActorFrame;
var
Eff8:TNormalDrawEffect;
begin
inherited;
if m_nCurrentAction = SM_NOWDEATH then begin
Eff8:=TNormalDrawEffect.Create(m_nCurrX,m_nCurrY,FrmMain.WMon12Img,1420,20,m_dwFrameTime,True);
if Eff8 <> nil then begin
Eff8.MagOwner:=g_MySelf;
PlayScene.m_EffectList.Add(Eff8);
end;
end;
end;
{ TExplosionSpider }
procedure TExplosionSpider.CalcActorFrame;
begin
inherited;
case m_nCurrentAction of
SM_HIT: begin
m_boUseEffect:=False;
end;
SM_NOWDEATH: begin
m_nEffectStart:=m_nStartFrame;
m_nEffectFrame:=m_nStartFrame;
m_dwEffectStartTime:=GetTickCount();
m_dwEffectFrameTime:=m_dwFrameTime;
m_nEffectEnd:=m_nEndFrame;
m_boUseEffect:=True;
end;
end;
end;
procedure TExplosionSpider.LoadSurface;
begin
inherited;
if m_boUseEffect then
AttackEffectSurface := FrmMain.WMon14Img.GetCachedImage (
730 + m_nEffectFrame-m_nEffectStart,
ax, ay);
end;
{ TSkeletonKingMon }
procedure TSkeletonKingMon.CalcActorFrame;
var
pm: PTMonsterAction;
actor: TActor;
haircount, scx, scy, stx, sty: integer;
meff: TCharEffect;
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_BACKSTEP,SM_WALK: 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_nEffectFrame:=pm.ActWalk.start;
m_nEffectStart:=pm.ActWalk.start;
m_nEffectEnd:=pm.ActWalk.start + pm.ActWalk.frame -1;
m_dwEffectStartTime:=GetTickCount();
m_dwEffectFrameTime:=m_dwFrameTime;
m_boUseEffect:=True;
m_nMaxTick := pm.ActWalk.UseTick;
m_nCurTick := 0;
//WarMode := FALSE;
m_n
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -