| | |
| | | randMaxLV = gameFB.GetGameFBDictByKey(ChConfig.Def_FB_NPCStrengthenMaxLV)
|
| | | strengthenLV = random.randint(randMinLV, randMaxLV)
|
| | |
|
| | | # 木桩怪最大、平均成长等级处理,直接取归属玩家等级
|
| | | if lvStrengthenType in [1, 2] and curNPC.GetType() in [ChConfig.ntPriWoodPilePVE, ChConfig.ntPriWoodPilePVP]:
|
| | | owner = None
|
| | | summonPlayerID = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_PriWoodPilePlayerID)
|
| | | if summonPlayerID:
|
| | | owner = GameWorld.GetObj(summonPlayerID, IPY_GameWorld.gotPlayer)
|
| | | if owner:
|
| | | strengthenLV = owner.GetLV()
|
| | | |
| | | if strengthenIpyData.GetCmpNPCBaseLV():
|
| | | strengthenLV = max(strengthenLV, curNPC.GetLV())
|
| | |
|
| | |
| | | maxCount = 3
|
| | | nowCount = len(playerPriWoodNPCList)
|
| | | summonCount = min(count, maxCount - nowCount)
|
| | | #GameWorld.DebugLog("召唤: count=%s,maxCount=%s,nowCount=%s,summonCount=%s,hp=%s,hpEx=%s" |
| | | # % (count, maxCount, nowCount, summonCount, hp, hpEx))
|
| | | GameWorld.DebugLog("召唤木桩: npcID=%s,count=%s,maxCount=%s,nowCount=%s,summonCount=%s,hp=%s,hpEx=%s" |
| | | % (npcID, count, maxCount, nowCount, summonCount, hp, hpEx))
|
| | | if summonCount <= 0:
|
| | | return
|
| | |
|
| | |
| | | #技能召唤坐标 ChConfig.Def_SummonAppearDist
|
| | | summonPos = GameMap.GetEmptyPlaceInArea(curPlayer.GetPosX(), curPlayer.GetPosY(), 3)
|
| | | summonNPC.Reborn(summonPos.GetPosX(), summonPos.GetPosY(), False)
|
| | | NPCControl(summonNPC).ResetNPC_Init(isReborn=True)
|
| | | if hp or hpEx:
|
| | | summonNPC.SetHP(hp)
|
| | | summonNPC.SetHPEx(hpEx)
|