?? axemon.pas
字號:
end;
SM_SKELETON:
begin
m_nStartFrame := pm.ActDeath.start;
m_nEndFrame := m_nStartFrame + pm.ActDeath.frame - 1;
m_dwFrameTime := pm.ActDeath.ftime;
m_dwStartTime := GetTickCount;
end;
SM_ALIVE:
begin
m_nStartFrame := pm.ActDeath.start + m_btDir * (pm.ActDeath.frame + pm.ActDeath.skip);
m_nEndFrame := m_nStartFrame + pm.ActDeath.frame - 1;
m_dwFrameTime := pm.ActDeath.ftime;
m_dwStartTime := GetTickCount;
end;
end;
end;
function TSkeletonOma.GetDefaultFrame (wmode: Boolean): integer;
var
cf, dr: integer;
pm: PTMonsterAction;
begin
Result:=0;//jacky
pm := GetRaceByPM (m_btRace,m_wAppearance);
if pm = nil then exit;
if m_boDeath then begin
//快擱蓖老 版快
if m_wAppearance in [30..34, 151] then //快擱蓖牢 版快 矯眉啊 葷恩闌 丹綽 巴闌 阜扁 困秦
m_nDownDrawLevel := 1;
if m_boSkeleton then
Result := pm.ActDeath.start
else Result := pm.ActDie.start + m_btDir * (pm.ActDie.frame + pm.ActDie.skip) + (pm.ActDie.frame - 1);
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;
procedure TSkeletonOma.LoadSurface;
begin
inherited LoadSurface;
case m_btRace of
//閣膠磐
14, 15, 17, 22, 53:
begin
if m_boUseEffect then
EffectSurface := FrmMain.WMon3Img.GetCachedImage (DEATHEFFECTBASE + m_nCurrentFrame-m_nStartFrame, ax, ay);
end;
23:
begin
if m_nCurrentAction = SM_DIGUP then begin
m_BodySurface := nil;
EffectSurface := FrmMain.WMon4Img.GetCachedImage (m_nBodyOffset + m_nCurrentFrame, ax, ay);
m_boUseEffect := TRUE;
end else
m_boUseEffect := FALSE;
end;
end;
end;
procedure TSkeletonOma.Run;
var
prv: integer;
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;
m_boMsgMuch := FALSE;
if m_MsgList.Count >= 2 then m_boMsgMuch := TRUE;
//葷款靛 瓤苞
RunActSound (m_nCurrentFrame - m_nStartFrame);
RunFrameAction (m_nCurrentFrame - m_nStartFrame);
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;
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 TSkeletonOma.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 begin
DrawEffSurface (dsurface, m_BodySurface, dx + m_nPx + m_nShiftX, dy + m_nPy + m_nShiftY, blend, ceff);
end;
if m_boUseEffect then
if EffectSurface <> nil then begin
DrawBlend (dsurface,
dx + ax + m_nShiftX,
dy + ay + m_nShiftY,
EffectSurface, 1);
end;
end;
{============================== TSkeletonOma =============================}
// 秦榜 坷付(秦榜, 奴檔嘗秦榜, 秦榜傈葷)
{--------------------------}
procedure TDualAxeOma.Run;
var
prv: integer;
m_dwFrameTimetime: longword;
meff: TFlyingAxe;
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);
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;
end;
if (m_nCurrentAction = SM_FLYAXE) and (m_nCurrentFrame-m_nStartFrame = AXEMONATTACKFRAME-4) then begin
//付過 慣葷
meff := TFlyingAxe (PlayScene.NewFlyObject (self,
m_nCurrX,
m_nCurrY,
m_nTargetX,
m_nTargetY,
m_nTargetRecog,
mtFlyAxe));
if meff <> nil then begin
meff.ImgLib := FrmMain.WMon3Img;
case m_btRace of
15: meff.FlyImageBase := FLYOMAAXEBASE;
22: meff.FlyImageBase := THORNBASE;
end;
end;
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;
{============================== TGasKuDeGi =============================}
// TCatMon : 豹撈, 橇貳烙籃 秦榜撈爾 鞍絆, 磐瘤綽 局聰啊 絕瀾.
procedure TWarriorElfMonster.RunFrameAction (frame: integer); //橇貳烙付促 刀漂竅霸 秦具且老
var
meff: TMapEffect;
event: TClEvent;
begin
if m_nCurrentAction = SM_HIT then begin
if (frame = 5) and (oldframe <> frame) then begin
meff := TMapEffect.Create (WARRIORELFFIREBASE + 10 * m_btDir + 1, 5, m_nCurrX, m_nCurrY);
meff.ImgLib := FrmMain.WMon18Img;
meff.NextFrameTime := 100;
PlayScene.m_EffectList.Add (meff);
end;
oldframe := frame;
end;
end;
{============================== TGasKuDeGi =============================}
// TCatMon : 豹撈, 橇貳烙籃 秦榜撈爾 鞍絆, 磐瘤綽 局聰啊 絕瀾.
{--------------------------}
procedure TCatMon.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;
{============================= TArcherMon =============================}
procedure TArcherMon.Run;
var
prv: integer;
m_dwFrameTimetime: longword;
meff: TFlyingAxe;
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);
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;
end;
if (m_nCurrentAction = SM_FLYAXE) and (m_nCurrentFrame-m_nStartFrame = 4) then begin
//拳混 唱皚
//(** 6巋菩摹
meff := TFlyingArrow (PlayScene.NewFlyObject (self,
m_nCurrX,
m_nCurrY,
m_nTargetX,
m_nTargetY,
m_nTargetRecog,
mtFlyArrow));
if meff <> nil then begin
meff.ImgLib := FrmMain.WEffectImg; //WMon5Img;
meff.NextFrameTime := 30;
meff.FlyImageBase := ARCHERBASE2;
end;
//**)
(** 撈傈
meff := TFlyingArrow (PlayScene.NewFlyObject (self,
XX,
YY,
TargetX,
TargetY,
TargetRecog,
mtFlyAxe));
if meff <> nil then begin
meff.ImgLib := FrmMain.WMon5Img;
meff.NextFrameTime := 30;
meff.FlyImageBase := ARCHERBASE;
end;
//**)
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;
{============================= TZombiDigOut =============================}
procedure TZombiDigOut.RunFrameAction (frame: integer);
var
clevent: TClEvent;
begin
if m_nCurrentAction = SM_DIGUP then begin
if frame = 6 then begin
clevent := TClEvent.Create (m_nCurrentEvent, m_nCurrX, m_nCurrY, ET_DIGOUTZOMBI);
clevent.m_nDir := m_btDir;
EventMan.AddEvent (clevent);
//pdo.DSurface := FrmMain.WMon6Img.GetCachedImage (ZOMBIDIGUPDUSTBASE+Dir, pdo.px, pdo.py);
end;
end;
end;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -