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
!M‹bc@sÍddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    d„Z
d„Z d„Z d„Z d„Zd„Zd„Zd    „Zd
„ZdS( iÿÿÿÿNcCs|jƒjtjƒdS(N(t GetNPCAngrytInittChConfigtDef_SuperFBBossAngryCount(tcurNPC((slE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\AIType_21.pytDoInit$scCs|jtƒdS(N(tSetIsNeedProcesstTrue(R((slE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\AIType_21.pyt OnNPCReborn(s cCsÒtj|ƒ}|jƒtjks1|jƒ r5dS|j|ƒtj|ƒdkr[dS|j    |ƒ|j
ƒ}|dkr£|j ƒdkrŸt |ƒndS|jƒ}|jƒ}t||||ƒdS(Ni(t    NPCCommont
NPCControlt GetCurActiont IPY_GameWorldtlaNPCDietIsAlivetRefreshBuffStatetGameObjtGetHPtRefreshAngryListtGetMaxAngryTagtNonetGetSpeedt __RobotMovet
GetObjTypetGetObjIDt
__NPCFight(Rttickt
npcControlt curNPCAngrytcurNPCAngryTypet curNPCAngryID((slE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\AIType_21.pyt    ProcessAI1s "       c Csé|jƒtjkrdStjƒjƒ}tjƒ}tj|ƒ}t    j
ddiƒ}t |ƒ|krˆt ||t |ƒƒdSd||f}t    j ddƒ}||krÙd|df}||krÙdSn||}d}|j|ƒd}    |    dkr'tjdt|ƒdƒ}    nM||    \}
} tj|jƒ|jƒ|
| ƒ} | dkrt|    d7}    n|    dks’|    t|ƒkr±tjdt|ƒdƒ}    n|j||    dƒ||    \}
} |j|
| ƒdS(Nt
AI198Pointis%d%02diitRobotMovePosIndex(R R t    laNPCMovet    GameWorldtGetMaptGetMapIDtFBCommontGetFBPropertyMarktGetRecordMapIDt IpyGameDataPYtGetFuncEvalCfgtstrt __RobotMove2t
GetFuncCfgt GetDictByKeytrandomtrandinttlentGetDisttGetPosXtGetPosYtSetDicttMove( RtmapIDtlineIDt    dataMapIDtfbRandMovePosDicttposKeyt fbMovePosDicttposListt Key_PosIndextposIndexttagPosXttagPosYttagDist((slE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\AIType_21.pyRNs<   
 $  c Cs>|s
dSd}d}|j|ƒ}|j|ƒ}|d|d}}|d|d}}    |jƒ|jƒ}
} t} |ró|    ró|t|ƒkrót||ƒttgkró|t||ƒkró|||||    gkrót} qón| rd} xøt    |ƒD]|\}}xmt    |ƒD]_\}}|\}}t
j |
| ||ƒ}|| kr%|} ||}}||}}    q%q%Wq Wnkt
j |
| ||    ƒ}|dkrút |||ƒ}|rút j|ƒ\}}|||\}}    qún|j||d|ƒ|j||d|    ƒ|j||    ƒdS(s® ¸ù¾Ý¶àÌõ·¾¶Ëæ»úÒÆ¶¯£¬²»Í¬Â·¾¶¼äÈç¹û´æÔÚ½»²æµã£¬ÄÇô¿ÉÄÜËæ»ú¸Ä±ä·¾¶
    @param randPosList: [[[·¾¶Aµã1x,y],[·¾¶Aµã2x,y],...], [[·¾¶Bµã1x,y],[·¾¶Bµã2x,y],...], ...]
    NtRobotMoveIndexInfotRobotMovePosInfoidi'iÿàõi(R.R3R4RR1ttypetlistttupletFalset    enumerateR#R2t__getNearPosIndexListR/tchoiceR5R6(Rt randPosListRCRDt    indexInfotposInfottagIttagJR@RAtcurPosXtcurPosYt resetPosPatht nearestDisttitpathListtjtpostposXtposYRBtnearPosIndexList((slE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\AIType_21.pyR,tsD D     cCs||}| s#t|ƒdkr'dS|||\}}t|||ƒ}x»t|ƒD]­\}}||krxqZnxŒt|ƒD]~\}    }
|
\} } | |kr…| |kr…xKt|||    ƒD]4\} }| |g|krÈ|j| |gƒqÈqÈWq…q…WqZW|S(Ni(R1t__getNearIndexByPathRItappend(RLRORPt pathPosListR@RAR[RURVRWRXRYRZtnitnj((slE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\AIType_21.pyRJ¯s
  %cCsÏg}|dks(|t|ƒdkr|d|dkre|j|dgƒ|j|dgƒqË|dkr‡|j|dgƒqË|j|dgƒn.|j||dgƒ|j||dgƒ|S(Niiiÿÿÿÿiþÿÿÿ(R1R](R^RORPR[((slE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\AIType_21.pyR\Äs" cCsåtj|ƒtj|ƒ}tj||ƒ}|dksOtj|ƒdkrSdStj|j    ƒ|j
ƒ|j    ƒ|j
ƒƒ}t j ||||ƒrŸdS|j ƒdkr||jƒkrÇdS||jƒ|jƒkrçdStj||d|ƒdS||jƒkrtj|jƒ|jƒ|j    ƒ|j
ƒƒ}||jƒkrn|jƒtjkrndS|j|ƒdS|jƒ||jƒ|jƒkr©dS|j|j    ƒ|j
ƒƒrËdStj||d|ƒdS(Ni(R    tSetNPCInBattleStateR
R#tGetObjRRRR2R3R4tAICommontDoAutoUseSkillRt
GetAtkDistt GetAttackTicktGetAtkIntervalt
BaseAttacktAttackt GetDestPosXt GetDestPosYR R R"tMoveToObj_DeteltStopMovet    FixTagPos(RttagIDttagTypeRRtcurTagRBtdestDist((slE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\AIType_21.pyRás8 !00' 
cCstj|ƒdS(N(RctDoNPCUseSkillOnDie(RthurtTypethurtID((slE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\AIType_21.pytOnDies (RRcR    RhR)R R#R&RR/RRRRR,RJR\RRv(((slE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCAI\AIType_21.pyt<module>s$                              &    ;            =