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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
HŸ¿hc@sôddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZdZdZdZedƒ\ZZZZZZZ dfd„ƒYZ!dfd„ƒYZ"dfd    „ƒYZ#d
fd „ƒYZ$d „Z%d fd„ƒYZ&d„Z'd„Z(d„Z)d„Z*ddd„Z+ddd„Z,d„Z-d„Z.dd„Z/d„Z0d„Z1d„Z2d„Z3d„Z4d„Z5e6d„Z7dd „Z8d!„Z9d"„Z:d#„Z;d$„Z<d%„Z=d&„Z>d'„Z?d(„Z@dd)„ZAde6d*„ZBd+„ZCeDeDd,„ZEd-„ZFd.„ZGd/„ZHd0„ZIdS(1iÿÿÿÿNi'it    BatLineupcBs5eZd„Zd„Zd„Zd„Zd„ZRS(cCs^||_||_||_d|_d|_d|_i|_i|_i|_t    |_
dS(Ni( t    turnFighttfactiontnumtownerIDt    shapeTypet
fightPowert posObjIDDicttlingshouObjIDDicttbeautyObjIDDicttActionNumStartt    actionNum(tselfRRR((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt__init__@s                                        cCs
|jjS(N(RtplayerID(R ((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt getPlayerIDMscCs|j S(N(R(R ((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pytisEmptyOscCso|jƒ|jddƒ|_|jddƒ|_|jddƒ|_t||j|j||jƒƒdS(NtPlayerIDit    ShapeTypet
FightPower(    t clearLineuptgetRRRtSummonLineupObjsRRR(R t
lineupInfo((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt    setLineupQs 
"cCs©tjƒ}x$|jjƒD]}|j|ƒqWx$|jjƒD]}|j|ƒqCWx$|jjƒD]}|j|ƒqjWi|_i|_i|_d|_dS(Ni(t    BattleObjt GetBatObjMgrRtvaluest    delBatObjRR    R(R t    batObjMgrtobjID((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR[s                 (t__name__t
__module__R RRRR(((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR=s
                 
t
BatFactioncBs&eZd„Zdd„Zd„ZRS(cCs||_||_i|_dS(N(RRt
lineupDict(R RR((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR ms            icCsNd}||jkr%|j|}n%t|j||jƒ}||j|<|S(N(tNoneR"RRR(R Rtlineup((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt getBatlineupss  cCs(x!|jjƒD]}|jƒqWdS(N(R"RR(R R$((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt clearLineups}s(RR R R%R&(((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR!js    
t    TurnFightcBséeZdZddded„Zeigddd„Zied„Zd„Zd„Zd„Z    d„Z
d    „Z d
„Z ed „Z ejd „Zd „Zed„Zd„Zd„Zd„Zid„Zd„Zd„ZRS(sÙij³¡»ØºÏÕ½¶·£¬Ö§³Ö¶àV¶à£¬ËùÓÐÕ½¶·Í¨Óã¬Ö÷Ïß¡¢ÅÀËþ¡¢PVPµÈ
    ¿ÉÄÜΪϵͳºǫ́·¢ÆðµÄ£¬Ôò¹¥»÷·½¡¢·ÀÊØ·½ÕóÈÝÒÔÍæ¼ÒËù±£´æµÄÕóÈݾµÏñ½øÐÐÕ½¶·
    Èç¹ûÍæ¼Ò·¢ÆðµÄ£¬Ôò¹¥»÷·½Îª·¢Æð·½Íæ¼Ò£¬Ä¿±êΪ·ÀÊØ·½£¬Ö§³Ö¶àV¶à£¬Èç×é¶ÓPK
    ¶àV¶àµÄÇé¿öÒ²ÊÇij¸ö¶ÓÔ±¸÷×Ô·¢ÆðÕ½¶·£¬Ö»ÊÇÓõ½¶ÓÓѵľµÏñÕóÈÝÒ»ÆðÕ½¶·£¬¶ÓÓÑÎÞ¸ÐÖª
    
    ¶àV¶à¿ÉʹÓÃÁ½ÖÖģʽ£º
    1. ¶à¸öÕóÈÝÒ»Æð³ö³¡£¬ÔÚÒ»³¡Õ½¶·ÖÐÍê³É
    2. ÒÔµ¥ÕóÈÝ·½Ê½ÂÖÁ÷³ö³¡Õ½¶·£¬¸Ã·½Ê½Í¬Ñù¿ÉÒÔʹÓ÷½Ê½1µÄÂß¼­ÊµÏÖ£¬¹ÌÓÅÏÈʹÓ÷½Ê½1Õ½¶·Âß¼­£¬·½±ãÀ©Õ¹
    icCsýtjƒ|_||_|r3tjƒj|ƒnd|_||_||_    d|_
d|_ d|_ t |_d|_t |_d|_||_i|_i|_g|_d|_d|_d|_d|_d|_g|_d|_d|_dS(Niÿÿÿÿiiit(t    GameWorldtGetGUIDtguidRtGetPlayerManagertFindPlayerByIDR#t    curPlayertmapIDt
funcLineIDtstatetturnNumtturnMaxtFalset
enterLogict
winFactiontisWint    batBuffert isNeedReporttmsgDictt factionDicttactionSortListt actionIndexttimelinet    startTimetcostTimet lineupIndext lineupIDListt
strongerLVt
difficulty(R R/R0RR9((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR Žs2    $                                                                                    c        Csb||_||_||_||_d|_||_||_||_i|_|j    |ƒdS(Ni(
R/R0R3R9RARBRCRDR:t nextTurnFight(    R R/R0R3R9R:RBRCRD((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt setTurnFight¬s                                     cCsld|_t|_d|_t|_|jj|ƒd|_tjƒ|_    d|_
|rht |ƒndS(Nii( R2R4R5R6R7R:tupdateR>ttimeR?R@tResetByNextTeam(R R:tresetByNextTeam((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyREºs                         cCs,|jtjko+|jt|jƒdkS(Ni(R6tChConfigt Def_FactionARAtlenRB(R ((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pythaveNextLineupÈscCs-|jƒsdS|jd7_|j|jS(Nii(RNRARB(R ((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt nextLineupIDËs cCsb|j|ƒ}|jƒxB|jƒD]4\}}|s>q&n|j|ƒ}|j|ƒq&WdS(N(t getBatFactionR&titemsR%R(R RR"t
batFactionRRt    batLineup((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pytsetFactionLineupÒs
c
Csg}x‰|jjƒD]x}|j}xf|jjƒD]U\}}|jrPdnd}|j}|d| }|j|||||gƒq5WqW|jdt    ƒd|_
g|_ x3|D]+\}    }    }    }}|j j||gƒq»Wt j d|ƒt j d|j ƒdS(Niii
treverses+ÕóÈÝÕ½Á¦ÅÅÐò[isPlayer, fp, sortV, f, n]: %ssÕóÈÝÐж¯Ë³Ðò[f, n]: %s(R;RRR"RQRRtappendtsorttTrueR=R<R)tDebugLog(
R tsortListRRRRRStisPlayerRt    sortValuet_((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pytsortActionQueueÞs         $        cCs |tdS(Ni(t TimelineSet(R R2((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pytgetTurnNumStartTimelinóscCs|jS(N(R>(R ((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt getTimelineôscCs5||_tjd|jƒ|r'|St|ƒ|S(sj»ØºÏÕ½¶·µÄʱ¼äÖá½Úµã £¬¼´µÚ¼¸»ØºÏ¿ªÊ¼£¬Ã¿¸ö»ØºÏÖ§³Ö9999¸öÐж¯½Úµã
        @param turnNum: µÚx»ØºÏ
        sʱ¼ä½Úµã¸üÐÂ: %s(R>R)RYtOnTimelineChange(R R>R((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt setTimelineõs     
cCsEd}||jkr%|j|}nt||ƒ}||j|<|S(N(R#R;R!(R RRR((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyRPs  c    Cs |jr|jStjƒ}xè|jjƒD]×\}}t}x„|jjƒD]s}|s^Pnx`|jjƒD]O\}}|dkrŒqnn|j    |ƒ}|s§qnn|j
ƒrnt }PqnqnWqNW|r,|t j krãt jnt j |_t|jƒ|jSq,WdS(Ni(R6RRR;RQRXR"RRt    getBatObjtIsAliveR4RKt Def_FactionBRLtDoTurnFightOverR+(    R RRRRt    allKilledRStposNumRtbatObj((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pytcheckOverByKilled s,        $  cCsJ|j|stntƒx!|jjƒD]}|jƒq)Wd|_dS(Niÿÿÿÿ(t    syncStatetFightState_OvertFightState_RestR;RR&R1(R trestRR((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt    exitFight+s
    cCs5t|_d|_|j|jƒ|_|jƒdS(Ni(tFightState_StartR1R2R`R>tsyncInit(R ((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt
startFight3s
        
cCs |jdkS(Niÿÿÿÿ(R1(R ((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt    isInFight;scCs©tj|jdtƒ}|jddƒ}tjƒ}|j|_|j    |_
|j |_ ||_ t|j ƒ|_g|_tjƒ}xù|jjƒD]è}|j|ƒ}tjƒ}||_g|_x|jjƒD]}|j|ƒ}tjƒ}    ||    _|j|    _|j|    _ g|    _!x|j"j#ƒD]þ\}
} |j$| ƒ} | s_q8ntj%ƒ} | j&ƒ| _'| j(ƒ| _)| j*ƒ| _+| j,ƒ| _-| j.ƒt/j0| _1| j.ƒt/j0| _2| j3ƒt/j0| _4| j3ƒt/j0| _5| j6ƒ| _7|
| _8| j9ƒ| _:|    j!j;| ƒq8Wt|    j!ƒ|    _<|jj;|    ƒqÝWt|jƒ|_=|jj;|ƒqšWt|jƒ|_>|j?|ƒdS(Nt ensure_asciis R((@tjsontdumpsR:R4treplacetChPyNetSendPackttagSCTurnFightInitR/tMapIDR0t
FuncLineIDR3tTurnMaxtMsgRMtLent FactionListRRR;tkeysRPttagSCTurnFightFactiontFactiont
LineupListR"R%ttagSCTurnFightLineuptNumRtOwnerIDRRtObjListRRQRdttagSCTurnFightObjtGetIDtObjIDtGetNPCIDtNPCIDt    GetHeroIDtHeroIDt    GetSkinIDtSkinIDtGetHPRKtDef_PerPointValuetHPtHPExtGetMaxHPtMaxHPtMaxHPExtGetLVtLVtPosNumtGetXPtAngreXPRVtObjCntt    LineupCntt
FactionCntt
addBatPack(R tmsgt
clientPackRRRRt    tfFactionRRSttfLineupRiRRjttfObj((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyRr=s\                                       cCsŸ||_tj|dtƒ}|jddƒ}tjƒ}|jƒ|j|_    |j
|_ ||_ |j |_||_t|jƒ|_|j|ƒdS(NRus R((R1RvRwR4RxRyttagMCTurnFightStatetClearR/R{R0R|tStateR2tTurnNumR~RMRR¡(R R1R:R¢R£((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyRlos     
            cCs9tjƒ}|jƒ||_||_|j|ƒdS(N(RyttagMCTurnFightObjActionR¨RªR‹R¡(R R2RR£((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt syncObjAction~s  
         cCst|dƒr.d|jj|jjf}nd|j|jf}|jr¼|jƒ}t|ƒ}tjd||fƒ|j    t
j d|ƒ7_    |j    |7_    t j ƒj|ƒnCtjd|ƒ|jrìtj|j|ƒnt j ƒj|ƒdS(NtHeads%02x%02xs»ØºÏÕ½¶·¹ý³Ì·â°ü: %s, len:%sR(s»ØºÏÕ½¶·¹ý³Ì·â°ü: %s(thasattrR­tCmdtSubCmdR9t    GetBufferRMR)RYR8tCommFunct    WriteWORDtObjPoolt
GetPoolMgrtreleaseR.t NetPackCommont SendFakePack(R R£theadStrtpackBufftbuffLen((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR¡†s          (RR t__doc__R4R RFRERNRORTR^R`RaRcRKRLRPRkRpRsRtRrRlR¬R¡(((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR'ƒs(                              
                 2     t TurnFightMgrcBs5eZd„Zdded„Zd„Zd„ZRS(cCs i|_dS(N(t turnFightDict(R ((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR  s    icCsStjƒjt||||ƒ}|s?t||||ƒ}n||j|j<|S(N(R´RµtacquireR'R¾R+(R R/R0RR9ttf((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt addTurnFight¤s
!cCsM|j|ƒ}|sdS|jƒ|jj|dƒtjƒj|ƒdS(N(t getTurnFightRpR¾tpopR#R´RµR¶(R R+R((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt delTurnFight«s
cCs;d}||jkr%|j|}ntr7tƒ}n|S(N(R#R¾R4R'(R R+RÀ((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR´s  (RR R R4RÁRÄRÂ(((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR½s            cCs1d}tjrtj}ntƒ}|t_|S(N(R#t
PyGameDatatg_turnFightMgrR½(ttfMgr((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pytGetTurnFightMgr¼s              t    MainFightcBseZd„Zd„ZRS(cCsO||_d|_d|_d|_d|_tƒjtjd|ƒ|_    dS(Nii(
Rt    chapterIDtlevelNumtwaveMaxtwaveRÈRÁRKtDef_FBMapID_MainR(R R((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR Ès                    cCs|jjtjkS(N(RR/RKtDef_FBMapID_MainBoss(R ((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt isLevelBossÑs(RR R RÐ(((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyRÉÅs        cCstjƒj|ƒ}|jS(N(t PlayerOnlinet GetOnlineMgrtGetOnlinePlayert    mainFight(R.tolPlayer((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pytGetMainFightMgrÕscCs«tj|ƒ\}}}tj|ƒ\}}}||kr§tjd|ƒr§tjd||ƒr§tj|||dƒ}tjd||||f|jƒƒq§ndS(Nt MainChaptert    MainLevelis•µ±Ç°Ö÷Ï߹ؿ¨Õ½ÚÓë¹ý¹ØÕ½ڲ»Ò»ÖÂʱ£¬ÇÒ¹ý¹Ø½ø¶ÈÕ½ÚÒѾ­´æÔÚ£¬Ç¿ÖÆÐÞÕýµ±Ç°Ë¢¹Ö½ø¶ÈΪ¹ý¹ØÕ½ڽø¶È! passChapterID-LV=%s-%s,nowChapterID=%s,fixNowValue=%s(    t PlayerControltGetMainLevelPassInfotGetMainLevelNowInfot IpyGameDataPYtGetIpyGameDataNotLogtSetMainLevelNowInfoR)tLogt GetPlayerID(R.RÊRËR]t nowChapterIDt fixNowValue((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt OnPlayerLoginÚs '    #cCs
i}|S(N((RtlineupIDR((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pytGetPlayerLineupInfoByCacheäscCs |jƒ}tj|ƒj|ƒ}|js1iSi|d6|jd6|jd6}i}|jƒjt    j
ƒ}x|jj ƒD]}|j |ƒ}|j }    |j}
d} d} |
dkr|
|jƒkr|j|
ƒ} | r| jƒ r| jƒ} | jt    jƒ} qng}||j7}i|    d6|jd6| d    6| d
6|jd6d „|jjƒDƒd 6|d 6|t|ƒ<q€W|ji|d6ƒ|S(NRRRR(iiRR‘RštDatacSs1i|]'\}}|dkr|t|ƒ“qS(i(tstr(t.0tktv((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pys
<dictcomp>
s    tAttrDictt SkillIDListtHero(RàRÑRÓt    GetLineuptlineupHeroDictRRtGetItemManagertGetPackt ShareDefinetrptHeroRt GetLineupHerotheroIDt    itemIndextGetCounttGetAttIsEmptyt GetUserDatat GetUserAttrtDef_IudetHeroLVtheroSkillIDListtskinIDtheroBatAttrDictRQRçRG(R.RäRR$RtheroDicttcurPackRitheroRõRötuserDatatheroLVtheroItemt skillIDlist((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pytGetPlayerLineupInfoés<     !          
 
ic    Cs¾tjd|ƒ}|siSi}xtddƒD]p}t|d|ƒsOPnt|d|ƒƒ}|sqq2nt||||ƒ}|s’q2n||t|ƒ<q2Wi|d6|d6}|S(Nt    NPCLineupii
s GetPosNPCID%st NPCLineupIDRíi (RÜtGetIpyGameDatatrangeR®tgetattrtGetNPCBattleDictRç(    RäRCRDtipyDataRRitnpcIDt
battleDictR((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pytGetNPCLineupInfos c    Csmtj|ƒ}|sdS|jƒ}|jƒ}d}|rOtjd|ƒnd}tjd|ƒ}    |    r—|r—tjd|ƒ}|r—|}q—n|s²tjd|ƒ}n|r|r|jƒ}
|
rÚ|
dnd} t    |||j
ƒ|j ƒƒ} nd}d} g|j ƒ} |j ƒ} || krÅ|jƒ}|rÅgt|ƒ}|jƒ}|dkržt|ƒ|kržtj|ƒ|| }n| |7} tjd| |fƒqÅnt|||    |ƒ}|s i|jƒtj6|jƒtj6|jƒtj6|jƒtj6|j ƒtj!6|j"ƒtj#6|j$ƒtj%6|j&ƒtj'6|j(ƒtj)6|j*ƒtj+6|j,ƒtj-6|j.ƒtj/6|j0ƒtj16|j2ƒtj36|j4ƒtj56|j6ƒtj76|j8ƒtj96}|j:|j;ƒƒni|d6|d6| d6|d    6d
„|j<ƒDƒd 6| d 6}tjd ||||fƒ|S(NRít NPCStrongertPlayerLVis"ÕóÈÝboss¼¼ÄÜ: %s, Ëæ»ú¸½¼Ó¼¼ÄÜ: %sRRR‘RšcSs1i|]'\}}|dkr|t|ƒ“qS(i(Rç(RèRéRê((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pys
<dictcomp>fs    RëRìs8GetNPCBattleDict npcID=%s,strongerLV=%s,difficulty=%s,%s(=t    NPCCommont GetNPCDataPytGetRelatedHeroIDR™R#RÜR
RÝt GetSkinIDListtGetNPCHeroSkillIDListtGetReHeroBreakLVtGetReHeroAwakeLVtGetSkillIDListt    GetBossIDtGetSkillIDExListtlistt GetSkillExCntRMtrandomtshuffleR)RYtGetNPCStrongerAttrDicttGetAtkRKt
AttrID_AtktGetDeft
AttrID_DefR–t AttrID_MaxHPtGetFinalDamPertAttrID_FinalDamPertGetFinalDamPerDeftAttrID_FinalDamPerDeft GetMissRatetAttrID_MissRatetGetMissRateDeftAttrID_MissRateDeftGetSuperHitRatetAttrID_SuperHitRatetGetSuperHitRateDeftAttrID_SuperHitRateDeft GetStunRatetAttrID_StunRatetGetStunRateDeftAttrID_StunRateDeft GetComboRatetAttrID_ComboRatetGetComboRateDeftAttrID_ComboRateDeft GetParryRatetAttrID_ParryRatetGetParryRateDeftAttrID_ParryRateDeft GetSuckHPPertAttrID_SuckHPPertGetSuckHPPerDeftAttrID_SuckHPPerDefRGtGetSpecAttrInfoRQ(t lineupIpyDataRRCRDtnpcDataRõtnpcLVt    lvIpyDatat heroIpyDatat npcStrongert
skinIDListRþt skillIDListtbossIDt skillIDExListtrandSkillIDExListt
skillExCntt batAttrDictR((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR *sf      $      
3      #
 
c Csð|jƒ}|jƒ}||g}tjd|ƒ}|rˆxI|D]>}|jƒ|kr_Pn|jƒ}    |    rC|j|    ƒqCqCWntjd|ƒ}
|
rìxI|
D]>} | jƒ|krÃPn| jƒ}    |    r§|j|    ƒq§q§Wn|S(Nt    HeroBreakt    HeroAwake(tGetNormalSkillIDtGetAngerSkillIDRÜtGetIpyGameDataListt
GetBreakLVt
GetSkillIDRVt
GetAwakeLV( RõRItbreakLVtawakeLVt normalSkillIDt angerSkillIDRLtbreakIpyDataListt breakIpyDatatskillIDtawakeIpyDataListt awakeIpyData((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyRms(       c Csi}| s| s| r|S|jƒ}x·tjD]¬}tjd|ƒ}|sYq5n|jƒ}t|d|ƒs~q5nt|d|ƒƒ}    t|d|ƒr½t|d|ƒƒnd}
t|    |
|ƒ} | ||<q5Wt    j
d||||fƒ|S(Nt
PlayerAttrsGetRe%ss
Get%sRatiois,NPC³É³¤ÊôÐÔ: npcID=%s,lv=%s,difficulty=%s,%s( R™RKtCalcBattleAttrIDListRÜR
t GetParameterR®R tintR)RY( RRHRJRDRQtlvtattrIDt attrIpyDatatattrNametreValuetratiot    attrValue((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR"‡s"  /c!Cs tjd|||f|ƒ|rEtjƒj|ƒ}|sEdSn|jj}|jddƒ}|jdiƒ}tjƒ}    t    j
ddƒ}
t    j dd    ƒ} x_|j ƒD]Q\} } t | ƒ}d}d}g}i}|| jd
gƒ7}|j| jd iƒƒ| jd dƒ}| jd dƒ}| jddƒ}| jddƒ}|rqt    jd|ƒnd}|r°|jƒ}|jƒ}|jƒ}|jƒ}n|r×| jddƒ}|s+q²q+nTtj|ƒ}|sòq²n|s+|jƒ}|jƒ}|jƒ}|jƒ}n|    jƒ}|sAPn|jƒ}|rc|j|ƒn|ry|j|ƒn|j|ƒ|j|ƒ|j|ƒ|j||ƒ|j |ƒ|j!|ƒ|j"|ƒ|j#|ƒ|j$|ƒ|j%||ƒ|t&j'kr5t(| ƒdkr,| dnd}n4|t&j)krit(| ƒdkr`| dnd}n|r|j*|ƒn|j+ƒ}|j,ƒx|D]} |j-| ƒqœW||j.|<tjdt/|ƒ|j0ƒfƒ|j1d„|j ƒDƒ|
ƒq²WdS(sÛÕÙ»½ÕóÈÝÕ½¶·ÊµÀý
    @param faction: ËùÊôÕóÓª£¬Ä¿Ç°Ö§³ÖÁ½¸öÕóÓª£¬1»ò2
    @param num: Õ½¶·ÕóÈÝÔÚ¸ÃÕóÓªÉϵıàºÅ£¬1V1ʱĬÈÏ1£¬¶à¶Ô¶àʱ1~n
    @param lineupInfo: ÕóÈÝÐÅÏ¢
    @param playerID: ·¢ÆðµÄÍæ¼ÒID£¬ÏµÍ³³¡´ÎΪ0
    s0SummonLineupObjs faction:%s,num:%s,lineupInfo=%sNRiRítAngerXPitParryCfgiRìRëRRR‘RšRsAddBatObj %s,skill=%scSs%i|]\}}|t|ƒ“qS((Rf(RèRéRê((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pys
<dictcomp>÷s    (2R)RYR,R-RR+RRRRÜt
GetFuncCfgtGetFuncEvalCfgRQRfRGR
R#tGetAtkDistTypetGetNamet
GetCountrytGetSexRRt
GetNPCNamet    addBatObjRŠtSetNPCIDt
SetOwnerIDt    SetTFGUIDtSetNamet
SetFactiont SetLineupPost SetFightPowertSetLVtSetAtkDistTypet
SetCountrytSetSextSetHeroRKtAtkDistType_ShortRMtAtkDistType_LongRVtGetSkillManagert
SkillResettLearnSkillByIDRt
GetObjNameRt InitBatAttr(!RSRRRRR.ttfGUIDtlineupPlayerIDRRtinitXPtatkBackSkillIDListt    posNumKeytheroInfoRitatkBackSkillIDRRLtattrDictRRõRþRgRIt atkDistTypetobjNametcountrytsext    npcDataExRjRt skillManagerR`((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR s’                       %% 
  #$cCs |jtjƒ}|sdStjdƒ|jdƒ}tjƒ}xÀ|jj    ƒD]¯}|j
|ƒ}|suqTnt |ƒ}|j ƒs¤tjd|ƒqTntjd||j ƒ|jƒ|jƒfƒ|jƒ}|jƒtj|ƒtj|ƒqTWdS(NsÇл»Ð¡¶ÓÖØÖÃÍæ¼ÒÕóÈÝÎ佫...is    Òѱ»»÷ɱ²»´¦Àí! %ss!    ÖØÖÃÎ佫: %s, HP:%s/%s, XP:%s(RPRKRLR)RYR%RRRRRdR‰ReR’R–RœtGetBuffManagert    ClearBufftTurnBufftRefreshBuffAttrt TurnPassivetRefreshPassive(RRRRSRRRjR”tbuffMgr((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyRIûs(    / 
 c    Cs-tjƒj|ƒ}|j}|j}|j}|j}|j}tjd|||||f|j    ƒƒt
j ||||||ƒ}    |    s“dSt
j |||ƒ\}
} |
t jksÌ| t jkrÐdS|dkrßnJt
j|||ƒ} | sþdS| \} }}t||||
| ||ƒdS(sb ±¾Õ½¶·»áÒ»´ÎÐÔ´¦ÀíÍêËùÓÐС¶ÓÕ½¶·£¬ÒÔÕ½±¨µÄÐÎʽÏ·¢£¬Ä¿Ç°³ýÁËÖ÷ÏßС¹Ö·Ö¶ÎÕ½¶·Í⣬¾ùʹÓøÃÕ½¶·
    sG»ØºÏÖÆÕ½¶·ÇëÇó: mapID=%s,funcLineID=%s,tagType=%s,tagID=%s,valueList=%sNi(R)R,tGetPlayerByIndexR{R|tTagTypetTagIDt    ValueListRYRàtFBLogictOnTurnFightRequesttGetFBPlayerLineupIDRòR„tGetFBNPCLineupInfotOnTurnFightVSNPC(tindext
clientDatattickR.R/R0ttagTypettagIDt    valueListtreqRett atkLineupIDt defLineupIDtrettnpcLineupIDListRCRD((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt OnTurnFight&s,                          c Csþ|jƒ}tjd||||||f|ƒ|s<dSt||ƒ}|sitjd||ƒdSd}    |tjkrÁtjddƒ}    t|ƒ}
|
j    } | j
ƒrÁ| j ƒqÁnt ƒ} | j |||ƒ} | j}| j|||    td|d|d|ƒ| jtji|d    6ƒx­t|ƒD]Ÿ\}}|| _tjd
||fƒ|d kr‚| jd tƒn| jtjit|||ƒd    6ƒ| jƒ| jƒt| jƒ| js7Pq7q7Wt||| jƒ| j|ƒdS( NsfOnTurnFightVSNPC: mapID=%s,funcLineID=%s,atkLineupID=%s,npcLineupIDList=%s,strongerLV=%s,difficulty=%ss"Íæ¼ÒûÓиÃÕóÈÝÊý¾Ý! atkLineupID=%sitMainlineiRBRCRDis"¶ÔÕ½NPCÕóÈÝ: index=%s, lineupID=%siRJ(RàR)RYRRKRÏRÜRpRÖRRtRpRÈRÁR+RFRXRTRLt    enumerateRARERfRR^Rst__processTurnFightR7tSyncTurnFightReportR8RÄ(R.R/R0R°R³RCRDRtlineupMainInfoR3t mainFightMgrtmainTFRÇRR+R©Rä((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR¨KsF                   (     &
 
      cCsòtjƒj|ƒ}|j}|j}|dkrAt|ƒdS|dkr^t||ƒdStjd||jƒƒt    j
ƒ}d|_ t j ||ƒ|dkr¹t|tƒn|dkrÕt||ƒnd|_ t j ||ƒdS(NiisÖ÷ÏßÕ½¶·ÇëÇó: reqType=%sii(R)R,R tReqTypetReqValuet__doExitMainFightt__doSetFightPointRYRàRyttagSCTurnFightReportSigntSignR·R¸t__doMainLevelWaveRXt __doMainFight(R©RªR«R.treqTypetreqValueR£((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pytOnMainFightReqs(         
             cCs/t|ƒ}|j}|r+|jtƒndS(N(RÖRRpRX(R.RºR((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR¾žs
     cCsStjd|ƒ|dkr n"|dkr/n|dkr>ndS|j|ƒdS(NsÉèÖÃÕ½´¸ÏûºÄ±¶Öµ: %siii(R)RYt SetFightPoint(R.t
fightPoint((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR¿¦s    cCs    |jƒ}tj|ƒ\}}}tjd||||f|ƒt|jƒdƒ}tj|tj    |ƒs‚tjdƒdSt
j d|ƒ}|sždSt
j d||ƒ}|søx<|dkrô|d8}t
j d||ƒ}|r¼Pq¼q¼Wn|sdSd}    xE|    dkrOt |d|    ƒ sBt|d|    ƒƒ rO|    d8}    q W|    dkr`dS||    kru|    }nt|d|ƒƒ}
|
s•dS|
d} t|tjƒ} | sËtjd    |ƒdS|jƒ} |jƒ}t|ƒ}||_||_|    |_||_t
jd
d ƒ}tjtj|||ƒ}}tjd ||||    |
||| | |f
|ƒ|j}|j|||td |
d| d|ƒ|jtj i| d6ƒ|jtj!it"| | |ƒd6ƒ|j#ƒ|j$ƒt%|ƒdS(Ns?ÇëÇó¹Ø¿¨²¨Õ½¶·: chapterID=%s,levelNum=%s,wave=%s,isRestStart=%sisÕ½´¸²»×㣬ÎÞ·¨¿ªÊ¼!R×RØisGetWaveLineupIDList%sisûÓÐÉèÖÃÖ÷ÕóÈÝ!RµisqÉèÖÃÆðʼ¹Ø¿¨²¨: ¹Ø¿¨%s-%s,²¨=%s/%s,lineupIDList=%s,mapID=%s,funcLineID=%s,lineupID=%s,strongerLV=%s,difficulty=%sRBRCRD(&RàRÙRÛR)RYtmaxt GetFightPointt    HaveMoneyRòtTYPE_Price_XiantaoRÜR
RÝR®R Rt Lineup_MaintGetNPCLVt GetDifficultyRÖRÊRËRÌRÍRpRKRÎtComMainLevelValueRRFR4RTRLRfRR^RsRÃ(R.t isRestStartRRÊRËRÍRÈtchapterIpyDatat levelIpyDataRÌRBRäR¹RCRDRºR3R/R0R((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR¶sj   
 :      
                       )    (&
 
 
c
Cs¤|rUd}|j|ƒ}|rB||dkrBtjdƒdS|j||ƒnt|ƒ}|j}|jƒ}|r€dS|jƒst|t    ƒdS|j
}|rL|j ƒ}|r;tjd|j ||j fƒ|jdt    ƒ|jtjit||j|jƒd6ƒ|jƒ|jƒt|ƒn t|tƒdSt|jƒdƒ}    tj|tj|    ƒsŠtjdƒdSt|ƒ}
|
r¢t    nt} t j!ƒ} |j"} |j#}x¾t$| |dƒD]©} |j%| ƒ}|j&ƒ}|d7}||krí|j'|ƒ}tjd    | |fƒ| |_"|rV|j(t)ƒnx”|j*D]†\}}tjd
| ||fƒ|j+|ƒ}|j,|ƒ}d|_-x6|j.j/ƒD]%}| j0|ƒ}t1||| ƒq½Wq`Wn|j2ƒrýPnt3t4|j*ƒ}d }x¼||krÔ|j5t4|j*ƒkrÔ|d7}|j*|j5\}}|j+|ƒ}|j,|ƒ}xt$|j-t3dƒD]}||j.krÐ|d|_-|j'|dt    ƒ}q’n|j.|}| j0|ƒ}| r1|tj6kr1|r1|j7ƒr1tjd ||fƒdSn|d|_-|j'|dƒ}t8||| ƒt9||ƒsvq’n| r•|tj6kr•t    } nPq’W|j5t4|j*ƒdkrÂd |_5q|j5d7_5qW|j'|dƒ}xˆ|j*D]}\}}tjd | ||fƒ|j+|ƒ}|j,|ƒ}x6|j.j/ƒD]%}| j0|ƒ}t:||| ƒqFWqòW|j2ƒrÚPqÚqÚW|j
s t;|j<ƒndS(sŠÖ´ÐÐÖ÷ÏßÕ½¶·£¬µ¥³¡Õ½¶·¶Ïµçʽս¶·£¬ÒÔǰ¶ËÍæ¼ÒÊÖ¶¯µã»÷½Úµã×öΪ¶Ïµã´¦
    Ã¿³¡Õ½¶·µÄ³õʼ»¯¡¢½áÊøÄ¬È϶ϵ㣬ÓÉǰ¶Ë¾ö¶¨×Ô¶¯¼ÌÐø»òÕßµã»÷¼ÌÐø
    tMainFightReqTickièsÖ÷ÏßÕ½¶·ÇëÇóCDÖÐNs6---¿ªÊ¼½øÈëÏÂһС¶Ó: lineupIndex=%s,nextLineupID=%s,%sRJis»ØºÏ¿ªÊ¼Ê±Õ½´¸²»×ã!s1¡¾----- »ØºÏÖÆÕ½¶·ÂÖ´Î: %s -----¡¿ curTimeline=%ss+»ØºÏ¿ªÊ¼Âß¼­: turnNum=%s,faction=%s, num=%sis>Íæ¼ÒÕóÈÝÏÂÒ»¸ö¿ÉÐж¯µÄÎ佫£¬¶Ïµã: curTimeline=%s,nextPosNum=%ss+»ØºÏ½áÊøÂß¼­: turnNum=%s,faction=%s, num=%s(=t GetDictByKeyR)RYtSetDictRÖRRÐRtRÂRXR6RORARBRERTRKRfRRCRDR^RsRÃR4RÉRÊRÙRËRòRÌt
EntryLogicRRR2R3R R`RaRcRltFightState_FightingR<RPR%R RRRdtTurnFightPerTurnBigStartRkt    PosNumMaxRMR=RLt    CanActiontTurnFightHeroTurnStartt OnObjActiontTurnFightPerTurnBigEndt OnTurnAllOverR+(R.R«tkeytlastTickRºRRÐR6RORÈtisEntrytcheckBreakpointRR2R3t turnTimelinet curTimelineRRRRRSRRjtdoMaxtdoCntRi((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyRÃ÷sÄ               ,
 
              
          '
              cCs€tƒj|ƒ}|j}|j}t|ƒtjƒ}x&td|dƒD]}||_t    j
d|ƒ|j |ƒ}|j |dƒ}|r¦|j tƒnx‘|jD]†\}}t    j
d|||fƒ|j|ƒ}    |    j|ƒ}
d|
_x6|
jjƒD]%} |j| ƒ} t|| |ƒq Wq°W|jƒrJPntt|jƒ} d}xK|| kr°|jt|jƒkr°|d7}|j|j\}}|j|ƒ}    |    j|ƒ}
x«t|
jtdƒD]“}|d|
_||
jkr|j |dtƒ}qßn|j |dƒ}|
j|} |j| ƒ} t|| |ƒt|| ƒsqqßnPqßW|jt|jƒdkržd|_qf|jd7_qfW|j |dƒ}xˆ|jD]}\}}t    j
d|||fƒ|j|ƒ}    |    j|ƒ}
x6|
jjƒD]%} |j| ƒ} t|| |ƒq"WqÎW|jƒrNPqNqNW|js|t |j!ƒndS(Nis"¡¾----- »ØºÏÖÆÕ½¶·ÂÖ´Î: %s -----¡¿s+»ØºÏ¿ªÊ¼Âß¼­: turnNum=%s,faction=%s, num=%sis+»ØºÏ½áÊøÂß¼­: turnNum=%s,faction=%s, num=%s("RÈRÂR.R3R×RRR R2R)RYR`RcRlRØR<RPR%R RRRdRÙRkRÚRMR=RXRÜRÝRÞR6RßR+(R+RR.R3RR2RåRRRRRSRRjRæRçRi((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR·Šsr        
          '
        cCs¢|j}|j}|j}|j}|j}tj|jƒƒ}|rY|d|7}n|rp|d|7}nd|tj    krˆdnd|||j
ƒ|fS(Ns Hero:%ss NPC:%ss%s%s-P%s ID:%s %stAtB( Rt    lineupNumRiRõRR)t    CodeToGbkRsRKRLRŠ(RjRRRiRõRR”((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR‰Ös                    cCs³|jr dStjdƒtjƒ}x}|jD]r\}}|j|ƒ}|j|ƒ}t|_    x<|j
j ƒD]+}|j |ƒ}t j||tjƒqsWq0Wt|_tS(NsÖ´Ðнø³¡Âß¼­...(R5R)RYRRR<RPR%R
R RRRdRtOnTriggerPassiveEffectRKtTriggerWay_FightStartRX(RRRRRRRSRRj((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR×ãs              c Cs|jƒ}tjƒ}xò|jjƒD]á}xØ|jjƒD]Ç}x¾|jjƒD]­}|j|ƒ}| sT|jƒ rƒqTn|j    t
j dƒ|j    t
j dƒ|j    t
j dƒ|jƒ}|jƒ}xÙtd|jƒƒD]Â}    |j|    ƒ}
|
s qên|
jƒ} | s#qên|
jƒ} t| |tƒ} | dkrSqên|
jƒ}td| | ƒ}|
j|ƒ|
j|ƒtjd|||| | fƒqêW|jƒ}xBt|jƒƒddd…D]!}    |j|    ƒ}|j ƒ}|jƒ}|j!ƒ}|j"ƒt
j#kr0qÜn|jƒ} | sHqÜn|jƒ} t| |t$ƒ} | dkrxqÜntd| | ƒ}tjd||||| | fƒ|dkrê|j|ƒ|j|ƒt%j&|||ƒqÜt%j'|||ƒqÜWqTWq>Wq(WdS(NisT¸üм¼ÄÜÊ£Óà»ØºÏÊý: curID=%s,skillID=%s,updRemainTime=%s,calcTimeline=%s,passTurn=%siÿÿÿÿs^¸üÐÂbuffÊ£Óà»ØºÏÊý: curID=%s,buffID=%s,skillID=%s,updRemainTime=%s,calcTimeline=%s,passTurn=%s((RaRRR;RR"RRdReRÖRKtDef_Obj_Dict_TurnComboNumtDef_Obj_Dict_TurnMissNumtDef_Obj_Dict_TurnParryNumRŠR†R t GetSkillCounttGetSkillByIndext GetRemainTimet GetCalcTimet__calcPassturnRXRXRÉt SetRemainTimet SetCalcTimeR)RYR™t GetBuffCounttGetBuffByIndext    GetBuffIDt GetSkillDatat GetSkillTypetDef_LstBuff_ListR4R›tSyncBuffRefresht    DoBuffDel(Rt nowTimelineRRRRSRRjtcurIDR˜R©tcurSkillt
remainTimet calcTimelinetpassTurnR`t updRemainTimeRŸtbufftbuffIDt    skillData((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyRbõsl               &             #cCs–|t}|t}|t}|t}|r`||krKtd||ƒStd||dƒS||kr}td||ƒStd||dƒSdS(Nii(R_RÉ(RRtequalOKt calcTurnNumt calcTimeNodet
nowTurnNumt nowTimeNode((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyRõ;s
 
 
 
  cCs:|s
dS|jƒdkr dStj||tjƒdS(Ni(R’RRìRKtTriggerWay_BigTurnStart(RRjR2((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyRÙLs cCs:|s
dS|jƒdkr dStj||tjƒdS(Ni(R’RRìRKtTriggerWay_BigTurnEnd(RRjR2((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyRÞWs cCs:|s
dS|jƒdkr dStj||tjƒdS(Ni(R’RRìRKtTriggerWay_HeroTurnStart(RRjR2((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyRÜbs cCsX|s
dS|jƒ}|jƒ}|j|ƒ}tjd||||||fƒdS(NsT        Í³¼ÆÖÎÁÆ: curID=%s,srcID=%s,skillID=%s,addValue=%s,cureHP=%s,updStatValue=%s(RŠt StatCureValueR)RY(tcurObjtsrcObjtaddValuetcureHPR`RtsrcIDt updStatValue((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pytAddTurnObjCureHPms      c    
Csé|dkrdS|jƒ}|jƒ}||kr¼|j|ƒ}tjd|||||||jƒ|fƒ|rå|j|ƒ}tjd|||||||jƒ|fƒqån)tjd||||||jƒfƒdS(Nisj        Í³¼ÆÉËѪ: curID=%s,tagID=%s,skillID=%s,hurtValue=%s,lostHP=%s,updStatValue=%s,tagHP=%s,isBounce=%ssj        Í³¼Æ³ÐÉË: curID=%s,tagID=%s,skillID=%s,hurtValue=%s,lostHP=%s,updStatValue=%s,curHP=%s,isBounce=%ssJ        ×Ô²Ð: curID=%s,tagID=%s,skillID=%s,hurtValue=%s,lostHP=%s,curHP=%s(RŠt StatHurtValueR)RYR’t StatDefValue(    t    curBatObjt    tagBatObjt    hurtValuetlostHPR`tisBounceRR­R((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pytAddTurnObjHurtValue}s        &    ,     cCs]|s
dS|jƒ}|jƒ}|dkr2dS|j}t|ƒ}|jƒ}|sttjd||fƒdS|jƒ}|jƒ}tjd|||||j    ƒ|fƒ|j
||ƒt j ||t jƒtjddƒ}    |jƒ}
g} xtd|
jƒƒD]ì} |
j| ƒ} | s6qn| jƒt jt jgkrZqntj| ƒroqn| jƒrqn| jƒ}tj| ƒrÜ||    kr®qn|jt jƒrÓtjdƒqnd}n|j|ƒ}| j ||| gƒqW| j!ƒx1| D])}|d} t"j#||| ƒrPqqWt j ||t j$ƒt%S(Nis¡ï»ØºÏ%s %s µ±Ç°×´Ì¬²»¿ÉÐж¯!s.¡ï»ØºÏ%s %s Ðж¯ : atk=%s,curHP=%s/%s,curXP=%sRnis³°·í״̬Ï£¬ÎÞ·¨Ö÷¶¯ÊÍ·ÅÅ­¼¼!iÿÿÿÿ(&R’RŠR2R‰RÛR)RYR#RœR–R¬RRìRKtTriggerWay_HeroActionStartRÜRpR†R RñRòt GetFuncTypet Def_SkillFuncType_TurnNormaSkilltDef_SkillFuncType_AngerSkillt SkillCommontisPassiveSkillRóRXt isAngerSkillt    IsInStatetBatObjState_SneertGetSkillUseCntRVRWt    TurnSkillt
OnUseSkilltTriggerWay_HeroActionEndRX(RRtcurHPRR2R”t    canActiontatktcurXPtxpMaxR˜t useSkillListR©tuseSkillR`tuseCnttuseInfo((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyRÝ”s^           )         
 
c    Csü|jƒ}|r|jƒnd}|r6|jƒnd}tjdt|ƒ|||fƒ|jƒtjƒjt    j
ƒ}||_ ||_ ||_ |j|ƒ|j}|rø|jtjkrø|jƒtjkrøtj|tjdƒntS(NisA        %s »ØºÏÕ½¶·Ö÷Ìå±»»÷ɱ: curID=%s,killerObjID=%s,skillID=%si(RŠRXR)RYR‰tSetDeadR´RµR¿RyttagMCTurnFightObjDeadR‹t KillerObjIDtSkillIDR¡R.R/RKRÎt
GetFactionRLt
PlayerTaskt AddTaskValuetTaskType_KillNPCRX(    RtgameObjtkillerR5Rt killerObjIDR`R£R.((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt SetObjKilled×s #
                 -cCsztjdƒtƒj|ƒ}|s)dS|jr6dS|jrNtj|_ntj    tj
tjgƒ|_t |ƒdS(Ns ËùÓлغϽáÊø( R)RYRÈRÂR6RRKRfR tchoiceRLRg(R+R((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyRßês         
cCstƒ}|j|ƒ}|s"dStjƒ|j|_|j}|tjk|_t    j
d||j|fƒt j ƒ}i}x¼|j jƒD]«}t|ƒ|kr½i|t|ƒ<n|t|ƒ}|j|ƒ}x^|jjƒD]M}    t|    ƒ|kri|t|    ƒ<n|t|    ƒ}
|j|    ƒ} t    j
d||    fƒxé| jjƒD]Ø\} } |j| ƒ}|s„q]n|jƒ} |jƒ}|jƒ}|j}|j}|j}t    j
d| | |||jƒ|jƒ|||f    ƒi| d6|d6|d6|d6|d6|d    6|
t| ƒ<q]WqìWq’Wi|d
6|d 6}|j}|j}|j }t!j"|||||ƒ|j#t$|ƒdS( Ns5--- Õ½¶·½áÊø´¦Àí ---, winFaction=%s, costTime=%ss, %ssÕóÈÝÃ÷ϸ: faction=%s,num=%ssE    Pos:%s ID=%s,npcID=%s,heroID=%s,HP=%s/%s, Êä³ö=%s,³ÐÉË=%s,ÖÎÁÆ=%sR‹RRtAtkHurttDefHurttCureHPR6tstatInfo(%RÈRÂRHR?R@R6RKRLR7R)RYRRR;RRçRPR"R%RRQRdRŠRŒRŽthurtStattdefStattcureStatR’R–R.R/R0R¤tOnTurnFightOverRltFightState_Award(R+RÇRR6RRHRt facStatInfoRRRtlineupStatInfoRSRiRRjRRõtatkHurttdefHurtRtoverMsgR.R/R0((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyRgþsR                            /F            cCsdS(N((R©RªR«((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pytOnTurnFightReportView7scCsDtjƒ}||_||_t|jƒ|_tj||ƒdS(N(RyttagSCTurnFightReporttGUIDtReportRMRR·R¸(R.R+treprotR£((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyR¸>s          (JRKR=RyR·RÙR)RÜRÑRRòRÅR&RRR,R›R²R´R¤R RHRvR_RÚR
R RqtFightState_PrepareOKRØtFightState_FightEndRMRmRnRR!R'R½RÈRÉRÖRãRåRRR RR"RRIR´R¨RÆR¾R¿R4RÂRÃR·R‰R×RbRõRÙRÞRÜRR!RÝR#RCRßRgRSR¸(((siD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Attack\TurnAttack.pyt<module>s‚                       !-ÿ                
        (C         [    +    %    6             A “    L             F                       C        9