| | |
| | |
|
| | | return
|
| | |
|
| | |
|
| | | ## 收集中
|
| | | def OnCollecting(curPlayer, tick):
|
| | | tagObj = curPlayer.GetActionObj()
|
| | |
| | |
|
| | | lostCD = IpyGameDataPY.GetFuncEvalCfg('DogzFBCollect', 1, {}).get(npcID, 1)
|
| | | lostTime = (tick - collectLostHPTick) / 1000/lostCD # 掉血次数
|
| | | if lostTime >3:
|
| | | if lostTime >2:
|
| | | gameFB.SetPlayerGameFBDict(playerID, Map_Dogzfb_CollectLostHPTick, tick)
|
| | | return
|
| | |
|
| | | if not lostTime:
|
| | | return
|
| | | gameFB.SetGameFBDict(Map_Dogzfb_CollectLostHPTick, tick)
|
| | | gameFB.SetPlayerGameFBDict(playerID, Map_Dogzfb_CollectLostHPTick, tick)
|
| | |
|
| | |
|
| | | lostHPPer = IpyGameDataPY.GetFuncEvalCfg('DogzFBCollect', 2, {}).get(npcID, 1)
|
| | |
| | | lostValue = min(int(GameObj.GetMaxHP(curPlayer) * lostHPPer / 100.0) * lostTime, GameObj.GetHP(curPlayer)-1)
|
| | | if lostValue <=0:
|
| | | return
|
| | | #GameWorld.DebugLog("OnCollecting npcID=%s, lostHPPer=%s,lostTime=%s,lostValue=%s" % (npcID, lostHPPer, lostTime, lostValue))
|
| | | GameWorld.DebugLog("OnCollecting npcID=%s, lostHPPer=%s,lostTime=%s,lostValue=%s" % (npcID, lostHPPer, lostTime, lostValue))
|
| | | SkillCommon.SkillLostHP(curPlayer, skillTypeID, buffOwner, lostValue, tick)
|
| | | return
|
| | |
|