| | |
| | |
|
| | | def CheckKillNPCByCnt(attacker, defender, isNotify=True):
|
| | | ''' 判断当日击杀该NPC次数是否已满 '''
|
| | | # 函数命名问题,实际上此函数为检查可否攻击boss
|
| | | if defender.GetGameObjType() != IPY_GameWorld.gotNPC:
|
| | | #GameWorld.DebugLog("只判断被攻击的是NPC的情况")
|
| | | return True
|
| | |
| | | sysMark = IpyGameDataPY.GetFuncEvalCfg('KillBossCntLimit', 3, {}).get(index, '')
|
| | | PlayerControl.NotifyCode(atkPlayer, sysMark)
|
| | | return False
|
| | | |
| | | npcDataEx = NPCCommon.GetNPCDataEx(npcID)
|
| | | if npcDataEx and npcDataEx.GetFightPowerLackAtkLimit():
|
| | | if npcDataEx.GetSuppressFightPower() > PlayerControl.GetFightPower(atkPlayer):
|
| | | if isNotify:
|
| | | PlayerControl.NotifyCode(atkPlayer, "BossFightPowerHint") |
| | | #GameWorld.DebugLog("战力不足,无法攻击boss! npcID=%s,SuppressFightPower=%s > playerFightPower=%s" |
| | | # % (npcID, npcDataEx.GetSuppressFightPower(), PlayerControl.GetFightPower(atkPlayer))) |
| | | return False
|
| | | |
| | | return True
|
| | |
|
| | |
|