📄 magic.pas
字号:
if MagMakeHolyCurtain(PlayObject, GetPower13(40) +
GetRPow(PlayObject.m_WAbil.SC) * 3, nTargetX, nTargetY) > 0
then
boTrain := True;
end;
SKILL_SKELLETON {17}:
begin //召唤骷髅 004943A2
if MagMakeSlave(PlayObject, UserMagic) then
begin
boTrain := True;
end;
(*
if not PlayObject.sub_4DD704 then begin
if PlayObject.MakeSlave(g_Config.sBoneFamm,UserMagic.btLevel,g_Config.nBoneFammCount{1},10 * 24 * 60 * 60) <> nil then
boTrain:=True;
end;
*)
end;
SKILL_CLOAK {18}:
begin //隐身术 004943DF
if MagMakePrivateTransparent(PlayObject, GetPower13(30) +
GetRPow(PlayObject.m_WAbil.SC) * 3) then
boTrain := True;
end;
SKILL_BIGCLOAK {19}:
begin //集体隐身术
if MagMakeGroupTransparent(PlayObject, nTargetX, nTargetY,
GetPower13(30) + GetRPow(PlayObject.m_WAbil.SC) * 3) then
boTrain := True;
end;
end; // case
boSpellFail := False;
sub_4934B4(PlayObject);
end;
end;
SKILL_TAMMING {20}:
begin //诱惑之光 00493A51
if PlayObject.IsProperTarget(TargeTBaseObject) then
begin
if MagTamming(PlayObject, TargeTBaseObject, nTargetX, nTargetY,
UserMagic.btLevel) then
boTrain := True;
end;
end;
SKILL_SPACEMOVE {21}:
begin //瞬息移动 00493ADD
PlayObject.SendRefMsg(RM_MAGICFIRE, 0,
MakeWord(UserMagic.MagicInfo.btEffectType,
UserMagic.MagicInfo.btEffect), MakeLong(nTargetX, nTargetY),
Integer(TargeTBaseObject), '');
boSpellFire := False;
if MagSaceMove(PlayObject, UserMagic.btLevel) then
boTrain := True;
end;
SKILL_EARTHFIRE {22}:
begin //火墙 00493B40
if MagMakeFireCross(PlayObject,
PlayObject.GetAttackPower(GetPower(MPow(UserMagic)) +
LoWord(PlayObject.m_WAbil.MC),
SmallInt(HiWord(PlayObject.m_WAbil.MC) - LoWord(PlayObject.m_WAbil.MC))
+ 1),
GetPower(10) + (Word(GetRPow(PlayObject.m_WAbil.MC)) shr 1),
nTargetX,
nTargetY) > 0 then
boTrain := True;
end;
SKILL_FIREBOOM {23}:
begin //爆裂火焰 00493BD5
if MagBigExplosion(PlayObject,
PlayObject.GetAttackPower(GetPower(MPow(UserMagic)) +
LoWord(PlayObject.m_WAbil.MC), SmallInt(HiWord(PlayObject.m_WAbil.MC)
- LoWord(PlayObject.m_WAbil.MC)) + 1),
nTargetX,
nTargetY,
g_Config.nFireBoomRage {1}) then
boTrain := True;
end;
SKILL_LIGHTFLOWER {24}:
begin //地狱雷光 00493CB1
if MagElecBlizzard(PlayObject,
PlayObject.GetAttackPower(GetPower(MPow(UserMagic)) +
LoWord(PlayObject.m_WAbil.MC), SmallInt(HiWord(PlayObject.m_WAbil.MC)
-
LoWord(PlayObject.m_WAbil.MC)) + 1)) then
boTrain := True;
end;
SKILL_SHOWHP {28}:
begin
if (TargeTBaseObject <> nil) and not TargeTBaseObject.m_boShowHP then
begin
if Random(6) <= (UserMagic.btLevel + 3) then
begin
TargeTBaseObject.m_dwShowHPTick := GetTickCount();
TargeTBaseObject.m_dwShowHPInterval :=
GetPower13(GetRPow(PlayObject.m_WAbil.SC) * 2 + 30) * 1000;
TargeTBaseObject.SendDelayMsg(TargeTBaseObject, RM_DOOPENHEALTH, 0,
0, 0, 0, '', 1500);
boTrain := True;
end;
end;
end;
SKILL_BIGHEALLING {29}:
begin //群体治疗术 00493E42
nPower := PlayObject.GetAttackPower(GetPower(MPow(UserMagic)) +
LoWord(PlayObject.m_WAbil.SC) * 2,
SmallInt(HiWord(PlayObject.m_WAbil.SC) - LoWord(PlayObject.m_WAbil.SC))
* 2 + 1);
if MagBigHealing(PlayObject, nPower, nTargetX, nTargetY) then
boTrain := True;
end;
SKILL_SINSU {30}:
begin //00494476
boSpellFail := True;
if CheckAmulet(PlayObject, 5, 1, nAmuletIdx) then
begin
UseAmulet(PlayObject, 5, 1, nAmuletIdx);
{
if BaseObject.m_UseItems[U_ARMRINGL].Dura >= 500 then Dec(BaseObject.m_UseItems[U_ARMRINGL].Dura,500)
else BaseObject.m_UseItems[U_ARMRINGL].Dura:=0;
BaseObject.SendMsg(BaseObject,RM_DURACHANGE,5,BaseObject.m_UseItems[U_ARMRINGL].Dura,BaseObject.m_UseItems[U_ARMRINGL].DuraMax,0,'');
}
// if (UserMagic.MagicInfo.wMagicId = 30) and not PlayObject.sub_4DD704 then begin
if MagMakeSinSuSlave(PlayObject, UserMagic) then
begin
boTrain := True;
end;
// if PlayObject.MakeSlave(g_Config.sDogz,UserMagic.btLevel,1,10 * 24 * 60 * 60) <> nil then
// boTrain:=True;
// end;
boSpellFail := False;
end;
end;
SKILL_SHIELD {31}:
begin //魔法盾 00493D15
if PlayObject.MagBubbleDefenceUp(UserMagic.btLevel,
GetPower(GetRPow(PlayObject.m_WAbil.MC) + 15)) then
boTrain := True;
end;
SKILL_KILLUNDEAD {32}:
begin //00493A97 圣言术
if PlayObject.IsProperTarget(TargeTBaseObject) then
begin
if MagTurnUndead(PlayObject, TargeTBaseObject, nTargetX, nTargetY,
UserMagic.btLevel) then
boTrain := True;
end;
end;
SKILL_SNOWWIND {33}:
begin //00493C43 冰咆哮
if MagBigExplosion(PlayObject,
PlayObject.GetAttackPower(GetPower(MPow(UserMagic)) +
LoWord(PlayObject.m_WAbil.MC), SmallInt(HiWord(PlayObject.m_WAbil.MC)
- LoWord(PlayObject.m_WAbil.MC)) + 1),
nTargetX,
nTargetY,
g_Config.nSnowWindRange {1}) then
boTrain := True;
end;
SKILL_UNAMYOUNSUL {34}:
begin //解毒术
if TargeTBaseObject = nil then
begin
TargeTBaseObject := PlayObject;
nTargetX := PlayObject.m_nCurrX;
nTargetY := PlayObject.m_nCurrY;
end;
if PlayObject.IsProperFriend {0FFF3}(TargeTBaseObject) then
begin
if Random(7) - (UserMagic.btLevel + 1) < 0 then
begin
if TargeTBaseObject.m_wStatusTimeArr[POISON_DECHEALTH] <> 0 then
begin
TargeTBaseObject.m_wStatusTimeArr[POISON_DECHEALTH] := 1;
boTrain := True;
end;
if TargeTBaseObject.m_wStatusTimeArr[POISON_DAMAGEARMOR] <> 0 then
begin
TargeTBaseObject.m_wStatusTimeArr[POISON_DAMAGEARMOR] := 1;
boTrain := True;
end;
if TargeTBaseObject.m_wStatusTimeArr[POISON_STONE] <> 0 then
begin
TargeTBaseObject.m_wStatusTimeArr[POISON_STONE] := 1;
boTrain := True;
end;
end;
end;
end;
SKILL_WINDTEBO {35}: if MagWindTebo(PlayObject, UserMagic) then
boTrain := True;
//冰焰
SKILL_MABE {36}:
begin
with PlayObject do
begin
nPower := GetAttackPower(GetPower(MPow(UserMagic)) +
LoWord(m_WAbil.MC),
SmallInt(HiWord(m_WAbil.MC) - LoWord(m_WAbil.MC)) + 1);
end;
if MabMabe(PlayObject, TargeTBaseObject, nPower, UserMagic.btLevel,
nTargetX, nTargetY) then
boTrain := True;
end;
SKILL_GROUPLIGHTENING {37 群体雷电术}:
begin
if MagGroupLightening(PlayObject, UserMagic, nTargetX, nTargetY,
TargeTBaseObject, boSpellFire) then
boTrain := True;
end;
SKILL_GROUPAMYOUNSUL {38 群体施毒术}:
begin
if MagGroupAmyounsul(PlayObject, UserMagic, nTargetX, nTargetY,
TargeTBaseObject) then
boTrain := True;
end;
SKILL_GROUPDEDING {39 地钉}:
begin
if MagGroupDeDing(PlayObject, UserMagic, nTargetX, nTargetY,
TargeTBaseObject) then
boTrain := True;
end;
SKILL_40:
begin //双龙斩
end;
SKILL_41:
begin //狮子吼
if MagGroupMb(PlayObject, UserMagic, nTargetX, nTargetY,
TargeTBaseObject) then
boTrain := True;
end;
SKILL_42:
begin //狂风斩
end;
SKILL_43:
begin //破空剑
end;
//法师
SKILL_44:
begin //结冰掌
if MagHbFireBall(PlayObject, UserMagic, nTargetX, nTargetY,
TargeTBaseObject) then
boTrain := True;
end;
SKILL_45:
begin //灭天火
if PlayObject.IsProperTarget(TargeTBaseObject) then
begin
if (Random(10) >= TargeTBaseObject.m_nAntiMagic) then
begin
nPower := PlayObject.GetAttackPower(GetPower(MPow(UserMagic)) +
LoWord(PlayObject.m_WAbil.MC),
SmallInt(HiWord(PlayObject.m_WAbil.MC) -
LoWord(PlayObject.m_WAbil.MC)) + 1);
if TargeTBaseObject.m_btLifeAttrib = LA_UNDEAD then
nPower := ROUND(nPower * 1.5);
// TargeTBaseObject.m_boMagicShield:=True;
TargeTBaseObject.m_45 := True;
PlayObject.SendDelayMsg(PlayObject, RM_DELAYMAGIC, nPower,
MakeLong(nTargetX, nTargetY), 2, Integer(TargeTBaseObject), '',
600);
if TargeTBaseObject.m_btRaceServer >= RC_ANIMAL then
boTrain := True;
end
else
TargeTBaseObject := nil
end
else
TargeTBaseObject := nil;
end;
SKILL_46:
begin //分身术
boTrain := True;
end;
SKILL_47:
begin //火龙气焰
if MagBigExplosion(PlayObject,
PlayObject.GetAttackPower(GetPower(MPow(UserMagic)) +
LoWord(PlayObject.m_WAbil.MC), 4),
nTargetX,
nTargetY,
g_Config.nFireBoomRage {1}) then
boTrain := True;
end;
//道士
SKILL_48:
begin //气功波
if MagPushArround1(PlayObject, UserMagic.btLevel) > 0 then
boTrain := True;
end;
SKILL_49:
begin //净化术
boTrain := True;
end;
SKILL_50:
begin
//无极真气 Add By DelphiLxh 2005-07-26
if PlayObject <> nil then
begin
with PlayObject do
begin
if m_wStatusArrValue[2] = 0 then //道术如果在增加状态下则不起作用
begin
m_wStatusArrValue[2] := HiWord(PlayObject.m_WAbil.SC) - 2;
// nPower:=Random(HiWord(PlayObject.m_WAbil.SC)-LOWord(PlayObject.m_WAbil.SC))+LoWord(PlayObject.m_WAbil.SC);
nPower :=
PlayObject.GetAttackPower(GetPower(MPow(UserMagic)) +
LoWord(PlayObject.m_WAbil.SC),
SmallInt(HiWord(PlayObject.m_WAbil.SC) -
LoWord(PlayObject.m_WAbil.SC)) + 1);
nPower := nPower div 10;
if nPower = 0 then
nPower := Random(3);
case UserMagic.btLevel of
0: nPower := 1 + Random(2);
1: nPower := Min(nPower, 2) + 3;
2: nPower := Min(nPower, 3) + 5;
3: nPower := Min(nPower, 2) + 8;
end;
m_dwStatusArrTimeOutTick[2] := GetTickCount + nPower * 1000;
SysMsg('道术增加' + IntToStr(nPower) + '秒', c_Green, t_Hint);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -