| | |
| | | import random
|
| | | import GameObj
|
| | |
|
| | | # 可吞噬的装备位
|
| | | Def_EatItem_EquipPlace = [
|
| | | ShareDefine.retWeapon, #1 主手
|
| | | ShareDefine.retWeapon2, #2 副手
|
| | | ShareDefine.retHat, #3 帽子
|
| | | ShareDefine.retClothes, #4 衣服
|
| | | ShareDefine.retBelt, #5 腰带
|
| | | ShareDefine.retTrousers, #6 裤子
|
| | | ShareDefine.retShoes, #7 鞋子
|
| | | ShareDefine.retNeck, #8 项链
|
| | |
|
| | | ]
|
| | |
|
| | | Def_EatSpace = 5 # 低于X格自动吞噬
|
| | |
|
| | |
|
| | |
| | | aMinAtk = curPlayer.GetMinAtk() # 攻击方最小攻击
|
| | | aMaxAtk = curPlayer.GetMaxAtk() # 攻击方最大攻击
|
| | | aSuperHitRate = curPlayer.GetSuperHitRate() # 暴击率
|
| | | aSuperHit = curPlayer.GetSuperHit() # 暴击伤害
|
| | | aSuperHit = curPlayer.GetSuperHit() # 暴击伤害固定值
|
| | | aIceAtk = curPlayer.GetIceAtk() # 真实伤害
|
| | | aDamagePer = PlayerControl.GetDamagePer(curPlayer) # 外层伤害加成
|
| | | aDamagePVE = PlayerControl.GetDamagePVE(curPlayer) # PVE固定伤害
|
| | | aSkillAtkRate = curPlayer.GetSkillAtkRate() # 技能攻击力加成
|
| | | petMinAtk = PlayerControl.GetPetMinAtk(curPlayer) #灵宠最小攻击
|
| | | petMaxAtk = PlayerControl.GetPetMaxAtk(curPlayer) #灵宠最大攻击
|
| | | petDamPer = GameObj.GetPetDamPer(curPlayer) #灵宠增加伤害
|
| | | atkSpeed = PlayerControl.GetAtkSpeed(curPlayer) # 攻击速度
|
| | | aIgnoreDefRate = curPlayer.GetIgnoreDefRate() # 无视防御比率
|
| | | aLuckyHit = curPlayer.GetLuckyHitVal() # 会心一击
|
| | | aLuckyHit = curPlayer.GetLuckyHitVal() # 会心一击固定值
|
| | | aLuckyHitRate = curPlayer.GetLuckyHitRate() # 会心一击概率
|
| | | aBleedDamage = PlayerControl.GetBleedDamage(curPlayer) # 流血伤害 万分率
|
| | | aFinalHurt = PlayerControl.GetFinalHurt(curPlayer) # 最终固定伤害
|
| | | aFinalHurtPer = PlayerControl.GetFinalHurtPer(curPlayer) # 最终伤害加成万分率
|
| | | aFightPower = curPlayer.GetFightPower() # 战力
|
| | | aReFightPower = lvIpyData.GetReFightPower() # 等级表对应的战力
|
| | | |
| | | aNPCHurtAddPer = PlayerControl.GetNPCHurtAddPer(curPlayer) #PVE 伤害加成万分率
|
| | |
|
| | | npcExp = npcData.GetExp()
|
| | | npcMaxHP = npcData.GetHP() + npcData.GetHPEx()*ShareDefine.Def_PerPointValue
|
| | |
| | | for i in range(len(skills)):
|
| | | locals()["skill%s"%(i+1)] = 1 if skills[i] in PassiveBuffEffMng.FindUsePassiveSkills(curPlayer) else 0
|
| | |
|
| | | |
| | | GameWorld.DebugLog("""CalcTJGExp--%s-%s-%s-%s-reExp:%s, attackEff:%s, aMinAtk:%s, aMaxAtk:%s, aSuperHitRate:%s, aSuperHit:%s, |
| | | aIceAtk:%s, aDamagePer:%s, aSkillAtkRate:%s, petMinAtk:%s, petMaxAtk:%s, petDamPer:%s, atkSpeed:%s,
|
| | | aIgnoreDefRate:%s, aLuckyHit:%s, aLuckyHitRate:%s, aBleedDamage:%s, aFinalHurt:%s, npcExp:%s, npcMaxHP:%s, npcCommendFightPower:%s,
|
| | | petSkillLV:%s, petSkillPer:%s, skill:%s, petSkill:%s"""%(curPlayer.GetID(), curPlayer.GetLV(), times, npcData.GetNPCID(),
|
| | | reExp, attackEff, aMinAtk, aMaxAtk, aSuperHitRate, aSuperHit,
|
| | | aIceAtk, aDamagePer, aSkillAtkRate, petMinAtk, petMaxAtk, petDamPer,
|
| | | atkSpeed, aIgnoreDefRate, aLuckyHit, aLuckyHitRate, aBleedDamage, aFinalHurt, npcExp, npcMaxHP, npcCommendFightPower, petSkillLV,
|
| | | petSkillPer, eval("[" +", ".join(["skill%s"%i for i in range(1, 11)]) + "]"), |
| | | eval("[" +", ".join(["PetSkill%s"%i for i in range(1, 10)]) + "]")))
|
| | | if GameWorld.GetGameWorld().GetDebugLevel():
|
| | | GameWorld.DebugLog("""CalcTJGExp--%s-%s-%s-%s-reExp:%s, attackEff:%s, aMinAtk:%s, aMaxAtk:%s, aSuperHitRate:%s, aSuperHit:%s,
|
| | | aNPCHurtAddPer:%s, aFinalHurtPer:%s, |
| | | aIceAtk:%s, aDamagePVE:%s, aSkillAtkRate:%s, petMinAtk:%s, petMaxAtk:%s, petDamPer:%s, atkSpeed:%s,
|
| | | aIgnoreDefRate:%s, aLuckyHit:%s, aLuckyHitRate:%s, aBleedDamage:%s, aFinalHurt:%s, npcExp:%s, npcMaxHP:%s, npcCommendFightPower:%s,
|
| | | petSkillLV:%s, petSkillPer:%s, skill:%s, petSkill:%s"""%(curPlayer.GetID(), curPlayer.GetLV(), times, npcData.GetNPCID(),
|
| | | reExp, attackEff, aMinAtk, aMaxAtk, aSuperHitRate, aSuperHit, aNPCHurtAddPer, aFinalHurtPer,
|
| | | aIceAtk, aDamagePVE, aSkillAtkRate, petMinAtk, petMaxAtk, petDamPer,
|
| | | atkSpeed, aIgnoreDefRate, aLuckyHit, aLuckyHitRate, aBleedDamage, aFinalHurt, npcExp, npcMaxHP, npcCommendFightPower, petSkillLV,
|
| | | petSkillPer, eval("[" +", ".join(["skill%s"%i for i in range(1, 11)]) + "]"), |
| | | eval("[" +", ".join(["PetSkill%s"%i for i in range(1, 10)]) + "]")))
|
| | |
|
| | | # 1. 经验
|
| | | exp = eval(IpyGameDataPY.GetFuncCompileCfg('TJG', 1))
|
| | |
| | | # 满了不再给物品
|
| | | return
|
| | |
|
| | | dropIDCountDict, dropIDBindDict, money = {}, {}, 0
|
| | | dropIDCountDict, auctionIDList, money = {}, [], 0
|
| | | dropRet = NPCCommon.GetNPCDropInfoTJG(curPlayer, curPlayer.GetMapID(), npcID, killCnt)
|
| | | if dropRet:
|
| | | dropIDCountDict, dropIDBindDict, money = dropRet
|
| | | dropIDCountDict, auctionIDList, money = dropRet
|
| | | # 1. 出售为铜钱 2.放入背包 3.满则不继续给物品
|
| | | for itemID, dropCount in dropIDCountDict.items():
|
| | | if not ItemCommon.CheckPackHasSpace(curPlayer, IPY_GameWorld.rptItem):
|
| | |
| | | if not curItemData:
|
| | | continue
|
| | |
|
| | | # 掉落绑定, 默认绑定
|
| | | isDropBind = dropIDBindDict.get(itemID, 1)
|
| | | isAuctionItem = itemID in auctionIDList
|
| | | itemControl = ItemControler.PlayerItemControler(curPlayer)
|
| | |
|
| | | ## 装备物品 白蓝直接换算铜钱
|
| | |
| | | ## 装备一件件给
|
| | | if ItemCommon.GetIsEquip(curItemData):
|
| | | for _ in xrange(dropCount):
|
| | | curItem = ItemControler.GetOutPutItemObj(itemID, 1, isDropBind)
|
| | | curItem = ItemControler.GetOutPutItemObj(itemID, 1, isAuctionItem, curPlayer=curPlayer)
|
| | | if not curItem:
|
| | | continue
|
| | | if not itemControl.PutInItem(IPY_GameWorld.rptItem, curItem, event=[ChConfig.ItemGive_TJGDropItem, False, {}]):
|
| | |
| | | #记录紫橙装数量用于通知
|
| | | NoteEquip(curPlayer, curItemData.GetItemColor())
|
| | | else:
|
| | | curItem = ItemControler.GetOutPutItemObj(itemID, dropCount, isDropBind)
|
| | | curItem = ItemControler.GetOutPutItemObj(itemID, dropCount, isAuctionItem, curPlayer=curPlayer)
|
| | | if not curItem:
|
| | | continue
|
| | |
|
| | |
| | |
|
| | | equipScores = {}
|
| | | equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | | for i in Def_EatItem_EquipPlace:
|
| | | for i in ChConfig.EquipPlace_Base:
|
| | | equipItem = equipPack.GetAt(i)
|
| | | if not equipItem or equipItem.IsEmpty():
|
| | | continue
|
| | |
| | |
|
| | | ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | |
|
| | | maxMapID = 0
|
| | | maxMapID = 0 # 高级地图按表顺序行排
|
| | | # ---找到可以挂机的最高级地图---
|
| | | for i in xrange(ipyDataMgr.GetMapEventPointCount()):
|
| | | mapInfo = ipyDataMgr.GetMapEventPointByIndex(i)
|
| | |
| | | # ---判断地图表的任务和等级限制---
|
| | | mapData = GameWorld.GetGameData().GetChinMap().GetMapByID(mapID)
|
| | | if not mapData:
|
| | | continue |
| | | continue
|
| | | enterLV = mapData.GetLV()
|
| | |
|
| | | if curPlayer.GetLV() < enterLV:
|
| | |
| | | if missionMapStep < openMapStep:
|
| | | continue
|
| | |
|
| | | if mapID < maxMapID:
|
| | | continue
|
| | | maxMapID = mapID
|
| | |
|
| | | if not maxMapID:
|