hwj35
2025-06-23 aa0f971ae9a59f0fd98d57b6c1d1663a270be92c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
*ýac@sdZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
dZ dZ dZ dZdZdZd    „Zd
„Zd „Zd „Zeejed „Zd„Zd„Zd„Zd„Zdd„Zd„ZdS(sVersion = 2015-03-30 12:00iÿÿÿÿNt PassedCounttLvUpSteptUseSkillPercentiii?BcCs¤tj|ƒ}|jƒ}|jƒjƒdkr@|jƒnN|tjkro|jtj    ƒ|j
dƒn|tj    krŽ|j |ƒn|j t ƒ}t|t|ƒdƒ}|jƒ|jƒ}}||\}    }
tj|||    |
ƒ} | tdkrrt|dt|ƒdƒ} | |krr|jt |dƒ|| \}    }
tj|||    |
ƒ} qrn|j|    |
dƒ\} }|j| |tƒdS(Niii(t    NPCCommont
NPCControlt GetCurActiontGetPlayerHurtListt GetHurtCountt ResetNPC_Initt IPY_GameWorldt laNPCAttackt SetCurActiont    laNPCNullt SetActionTicktProcessHPRestoret GetDictByKeytNPCKey_PassedPointCounttmintlentGetPosXtGetPosYt    GameWorldtGetDistt
Dis_DiffertSetDicttGetMoveNearPostMoveToPosStepBySteptSingleMoveArea(tcurNPCt movePointListttickt
npcControlt curNPCActiontcurPassedPointCounttneedMoveToPointIndextcurPosXtcurPosYtdestPosXtdestPosYtcurDist    nextIndext    moveDestXt    moveDestY((srE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\FBDefenseCommon.pytNpcMoveByMovePointList=s,   cCs…|jtjƒ}|jtjƒ}tjdƒ}|dkrntjd|ƒ}||krn||}qnntj|||ƒdS(NtTDMovePointListis
TD_%s_Move(RtChConfigtDef_NPC_Dict_FromRefreshValuetDef_NPC_Dict_FromRefreshMarkt ReadChConfigtGetEvalChConfigtAICommontNPCMoveByPointList(RRtfromRefreshValuetfromRefreshMarkt MovePointListt movePointDict((srE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\FBDefenseCommon.pyt FBDefenceMovejs  cCs|jƒtjks"|jƒ r&tStj|ƒ}|j|ƒtj    |ƒdkr[dSd}|j
ƒ}|tj kr‹|j ƒ}n|dkr»||j ƒ|kr»|jƒtS|jƒ}|tjkrü|jƒtjkrüt||ƒtStS(Ni(RR    tlaNPCDietIsAlivetFalseRRtRefreshBuffStatetGameObjtGetHPtGetGameNPCObjTypet
gnotSummont GetLastTimet GetBornTimet    SetKilledt    laNPCMovetGetCurMoveTypetmtRuntFastMoveNotMoveBacktTrue(RRRt npcLastTimet
npcObjTypeR ((srE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\FBDefenseCommon.pyt NormalCheck~s$"  "
 $ cCsHtj|ƒ}|jƒjƒdkr7|j|ƒn |j|ƒdS(Ni(RRRRRtProcessBattleHPRestore(RRR((srE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\FBDefenseCommon.pyRG¥s
 c
Cs tj|ƒ}|s•d}|jƒ}|rNtj|jƒ|jƒƒ}n| sp|r´tj    |ƒdkr´|j
|||ƒ|jƒ}q´n|j
|||ƒ|jƒ}|dkrÛ|sÊdSt ||ƒdS|jƒ}|jƒ}    t ||    |||ƒdS(Ni( RRtNonetGetMaxAngryTagRtGetObjtGetObjIDt
GetObjTypeR=R>tRefreshAngryListR8t
__NPCFight(
RRtcanMovetrefreshIntervalt
isUpdAngryRtangryObjt curNPCAngrytcurNPCAngryTypet curNPCAngryID((srE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\FBDefenseCommon.pyt NormalFightµs( !"     cCs1tj|ƒtj|ƒ}tj||ƒ}|dksOtj|ƒdkrSdStj|j    ƒ|j
ƒ|j    ƒ|j
ƒƒ}t j ||||ƒrŸdS||j ƒkrÌ|s»dS|j|ƒdS||jƒ|jƒkrìdS|r|j|j    ƒ|j
ƒƒrdSntj||d|ƒdS(Ni(RtSetNPCInBattleStateRRRORMR=R>RRRR2tDoAutoUseSkillt
GetAtkDisttMoveToObj_Detelt GetAttackTicktGetAtkIntervalt    FixTagPost
BaseAttacktAttack(RttagIDttagTypeRRTRtcurTagttagDist((srE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\FBDefenseCommon.pyRSás( !0 cCst|dkrdS|jƒ}|jƒ|kr2dS|j|ƒ}|sKdStjƒjƒ}tj|||ƒdS(Ni(tGetSkillManagert GetSkillCounttGetSkillByIndexRt GetGameWorldtGetTickt
SkillShellt NPCUseSkill(Rtindext skillManagertcurSkillR((srE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\FBDefenseCommon.pytUseSkillByIndexs  cCs1tj|dƒt||ƒtj|dƒdS(Nii(R=tSetHPRs(RRp((srE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\FBDefenseCommon.pytDeadUseSkillByIndex#s cCs\tj|ƒ}tj|ƒ}|jtƒ}t|ƒtj}|||krTtSt    SdS(N(
R=R>tGetMaxHPRtNPCKey_UseSkillHpPercenttfloatR-tDef_MaxRateValueRHR;(RtcurHptmaxHptnpcUseSkillHpPercentt realPercent((srE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\FBDefenseCommon.pytCallbackCheckHpPercent-scCsû||jƒ|jƒkr tS|jƒ}|jƒ}||krHtS|dkrjtd||ƒ}n|j|ƒ}|sƒtS||jƒ|jƒkr£tS|dkrÀ||ƒ rÀtSt
j |ƒt j krá|}nt
j||||ƒtS(Ni(R`RaR;RiRjRRktGetLastUseTicktGetCoolDownTimeRMRntGetSkillAffectTagR-tDef_ST_CanNPCUseSkilltDoLogic_UseSkillRH(RRgt
skillIndexRtcallbackRqtskillTotalCountRr((srE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\FBDefenseCommon.pytSkillCheckCallback@s&        c    Cso|gkrtS|jƒ}|jƒ}|| }x6t|ƒD](\}}t|||||ƒr?tSq?WtS(N(R;RiRjt    enumerateR‡RH(    RRgRt callbackListRqR†t callBackListRpt curCallback((srE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\FBDefenseCommon.pytSeriesSkillByCallBackListjs   
( t__doc__RnRRR    RcR-R0R2R=trandomRtNPCKey_CurLvUp_StepRwRRt
Def_MaxDisR+R8RKRGRHt Def_NPCRefreshAngryValueIntervalR;R[RSRsRuR~RMR‡RŒ(((srE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\FBDefenseCommon.pyt<module>s6                  -        '    ,    -        
     *