121 【武将】武将系统-服务端(去除旧属性;优化命令Hero、PrintFightPower;优化武将技能战力计算;)
| | |
| | | PacketSubCMD_1=0x20
|
| | | PacketCallFunc_1=OnTalk
|
| | |
|
| | | ;属性果实
|
| | | [PlayerAttrFruit]
|
| | | ScriptName = Player\PlayerAttrFruit.py
|
| | | Writer = xdh
|
| | | Releaser = xdh
|
| | | RegType = 0
|
| | | RegisterPackCount = 3
|
| | |
|
| | | PacketCMD_1=0xA3
|
| | | PacketSubCMD_1=0x2B
|
| | | PacketCallFunc_1=OnEatAllFruitItem
|
| | |
|
| | | PacketCMD_2=0xA3
|
| | | PacketSubCMD_2=0x2A
|
| | | PacketCallFunc_2=OnRecycleAttrFruit
|
| | |
|
| | | PacketCMD_3=0xA3
|
| | | PacketSubCMD_3=0x17
|
| | | PacketCallFunc_3=OnAddFruitUseLimit
|
| | |
|
| | |
|
| | | ;开服活动
|
| | | [OpenServerCampaign]
|
| | | ScriptName = Player\OpenServerCampaign.py
|
| | |
| | | # 卡牌项目玩家/主公属性仅为中间层属性,并非最终属性,最终属性体现在卡牌上,暂定全部前端自己算
|
| | | # 所以仅配置战斗场景需要同步的属性即可
|
| | | CDBRefresh_AttrIDDict = {
|
| | | # AttrID_Atk:[IPY_PlayerDefine.CDBPlayerRefresh_MAXATK, 0],
|
| | | # AttrID_Def:[IPY_PlayerDefine.CDBPlayerRefresh_DEF, 0],
|
| | | AttrID_MaxHP:[IPY_PlayerDefine.CDBPlayerRefresh_MaxHP, 1],
|
| | | AttrID_HP:[IPY_PlayerDefine.CDBPlayerRefresh_HP, 1],
|
| | | # AttrID_Speed:[ShareDefine.CDBPlayerRefresh_SpeedValue, 0],
|
| | | # AttrID_AtkSpeed:[IPY_PlayerDefine.CDBPlayerRefresh_BattleValEx1, 0],
|
| | | AttrID_XP:[IPY_GameWorld.CDBPlayerRefresh_XP, 0],
|
| | | # AttrID_StunRate:[ShareDefine.CDBPlayerRefresh_StunRate, 0],
|
| | | # AttrID_StunRateDef:[ShareDefine.CDBPlayerRefresh_StunRateDef, 0],
|
| | | # AttrID_SuperHitRate:[IPY_PlayerDefine.CDBPlayerRefresh_SuperHitRate, 0],
|
| | | # AttrID_SuperHitRateDef:[ShareDefine.CDBPlayerRefresh_SuperHitRateDef, 0],
|
| | | # AttrID_ComboRate:[ShareDefine.CDBPlayerRefresh_ComboRate, 0],
|
| | | # AttrID_ComboRateDef:[ShareDefine.CDBPlayerRefresh_ComboRateDef, 0],
|
| | | # AttrID_MissRate:[IPY_PlayerDefine.CDBPlayerRefresh_Miss, 0],
|
| | | # AttrID_MissRateDef:[IPY_PlayerDefine.CDBPlayerRefresh_HIT, 0],
|
| | | # AttrID_ParryRate:[ShareDefine.CDBPlayerRefresh_ParryRate, 0],
|
| | | # AttrID_ParryRateDef:[ShareDefine.CDBPlayerRefresh_ParryRateDef, 0],
|
| | | # AttrID_SuckHPPer:[ShareDefine.CDBPlayerRefresh_SuckHPPer, 0],
|
| | | # AttrID_SuckHPPerDef:[ShareDefine.CDBPlayerRefresh_SuckHPPerDef, 0],
|
| | | # AttrID_FinalDamPer:[ShareDefine.CDBPlayerRefresh_FinalDamPer, 0],
|
| | | # AttrID_FinalDamPerDef:[ShareDefine.CDBPlayerRefresh_FinalDamPerDef, 0],
|
| | | # AttrID_PhyDamPer:[ShareDefine.CDBPlayerRefresh_PhyDamPer, 0],
|
| | | # AttrID_PhyDamPerDef:[ShareDefine.CDBPlayerRefresh_PhyDamPerDef, 0],
|
| | | # AttrID_MagDamPer:[ShareDefine.CDBPlayerRefresh_MagDamPer, 0],
|
| | | # AttrID_MagDamPerDef:[ShareDefine.CDBPlayerRefresh_MagDamPerDef, 0],
|
| | | # AttrID_NormalSkillPer:[ShareDefine.CDBPlayerRefresh_NormalSkillPer, 0],
|
| | | # AttrID_NormalSkillPerDef:[ShareDefine.CDBPlayerRefresh_NormalSkillPerDef, 0],
|
| | | # AttrID_AngerSkillPer:[ShareDefine.CDBPlayerRefresh_AngerSkillPer, 0],
|
| | | # AttrID_AngerSkillPerDef:[ShareDefine.CDBPlayerRefresh_AngerSkillPerDef, 0],
|
| | | # AttrID_SuperDamPer:[ShareDefine.CDBPlayerRefresh_SuperDamPer, 0],
|
| | | # AttrID_SuperDamPerDef:[ShareDefine.CDBPlayerRefresh_SuperDamPerDef, 0],
|
| | | # AttrID_CurePer:[ShareDefine.CDBPlayerRefresh_CurePer, 0],
|
| | | # AttrID_CurePerDef:[ShareDefine.CDBPlayerRefresh_CurePerDef, 0],
|
| | | # AttrID_ShieldPer:[ShareDefine.CDBPlayerRefresh_ShieldPer, 0],
|
| | | # AttrID_ShieldPerDef:[ShareDefine.CDBPlayerRefresh_ShieldPerDef, 0],
|
| | | # AttrID_DOTPer:[ShareDefine.CDBPlayerRefresh_DOTPer, 0],
|
| | | # AttrID_DOTPerDef:[ShareDefine.CDBPlayerRefresh_DOTPerDef, 0],
|
| | | }
|
| | |
|
| | | #刷属性分类索引
|
| | | Def_CalcAttrList = (
|
| | | Def_CalcAttr_LV, # 角色等级 0
|
| | | Def_CalcAttr_LV, # 主公等级 0
|
| | | Def_CalcAttr_MainEquip, # 主装备 1
|
| | | Def_CalcAttr_HeroBook, # 武将图鉴 2
|
| | | ) = range(3)
|
| | |
|
| | | CalcAttrName = {
|
| | | Def_CalcAttr_LV:"主公等级",
|
| | | Def_CalcAttr_MainEquip:"主装备",
|
| | | Def_CalcAttr_HeroBook:"武将图鉴",
|
| | | }
|
| | |
|
| | | ##-----------------------------------------------------------------------------------------------
|
| | |
|
| | |
| | | TYPE_Calc_FacePicDefPer, # 头像框防御加成
|
| | | ) = range(1, Def_Calc_AllAttrType_MAX)
|
| | |
|
| | | ## 支持大数值属性,超过20E
|
| | | TYPE_BIGVALUE_ATTR = [TYPE_Calc_AttrHP, TYPE_Calc_AttrMaxHP]
|
| | |
|
| | | ## NPC 专属属性
|
| | | TYPE_NPCAttr_Calc = [TYPE_Calc_AtkInterval]
|
| | |
|
| | |
|
| | | # 衰减递增的属性列表, 衰减递增算法: 1-(1-a1)*(1-a2); 非衰减递增算法: a1+a2
|
| | | TYPE_Calc_DeclineList = []
|
| | |
|
| | | #宠物属性列表
|
| | | Def_Pet_Attr = []
|
| | | #[ TYPE_Calc_PetSTR, TYPE_Calc_PetPNE, TYPE_Calc_PetPHY, TYPE_Calc_PetCON ]
|
| | | #===============================================================================
|
| | | # 1006 增加%d力量
|
| | | # 1007 增加%d筋骨
|
| | | # 1008 增加%d体魄
|
| | | # 1009 增加%d真元
|
| | | #===============================================================================
|
| | | #宠物基础属性效果ID
|
| | | Def_PetBaseEffectList = range(5000, 5007 + 1)
|
| | |
|
| | | #---------------------------------------------------------------------------
|
| | | Def_ItemCount_Max = 2000000000 # 物品最大叠加上限
|
| | |
| | | Def_PlayerKey_LastAttackerObjID = "LastAttackerObjID" # 被攻击者记录的最近攻击玩家ID
|
| | | Def_PlayerKey_HadInitFruitAttr = "HadInitFruitAttr" # 是否已经刷新过果实属性
|
| | |
|
| | | #功能索引ShareDefine.Def_AttrFruitFuncList
|
| | | Def_PlayerKey_FruitAttr = "FruitAttr_%s_%s" # 属性果实增加的属性,参数为(功能索引, 物品效果id)
|
| | | Def_PlayerKey_FruitFightPowerEx = "FruitFightPowerEx_%s" # 属性果实增加的附加战力,参数为(功能索引)
|
| | |
|
| | | Def_PDict_QueryTechLVUPState = "QueryTechLVUPState" # 查询科技等级提升状态
|
| | |
|
| | | Def_PDict_PKStateTick = "PKStateTick" # PK状态tick,只要有一方发起攻击,双方均进入PK状态
|
| | |
| | | Def_PDict_MixLoginDay = "MixLoginDay" # 合服首登处理标记天
|
| | |
|
| | | Def_PDict_AddPointValue = "AddPointValue_%s" # 已加属性点数, 参数(属性ID)
|
| | | Def_PDict_AttrFruitEatCnt = "AttrFruitEatCnt_%s" # 已吃属性果实个数,参数为物品id
|
| | | Def_PDict_AttrFruitAddValue = "AttrFruitAddValue_%s" # 已吃属性果实增加的属性,参数为物品id
|
| | | Def_PDict_AttrFruitAddItemCnt = "FruitAddItemCnt_%s" # 增幅丹增加上限数,参数为果实物品id
|
| | | Def_PDict_AttrFruitItemBreakCnt = "FruitItemBreakCnt_%s" # 增幅丹突破次数,参数为果实物品id
|
| | |
|
| | | Def_PDict_NobleLV = "NobleLV" # 贵族等级, 0位为不同贵族模式版本切换标记位, 从1位开始表示每种等级贵族开通情况, 1-已开通过;9-永久
|
| | | Def_PDict_NobleEndTime = "NobleEndTime_%s" # 贵族到期结束时间<单位s>, 参数为贵族等级, 从1开始
|
| | |
| | |
|
| | | #物品效果(ID或指定类型)对应的属性计算信息 {效果(ID/指定类型):[[属性索引, ...], 是否基础属性,(非)线性]}
|
| | | #对应 Def_Calc_AllAttrType_MAX
|
| | | ItemEffect_AttrDict = {
|
| | | #基础属性
|
| | | ShareDefine.Def_Effect_Metal:[[TYPE_Calc_Metal], True, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_Wood:[[TYPE_Calc_Wood], True, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_Water:[[TYPE_Calc_Water], True, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_Fire:[[TYPE_Calc_Fire], True, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_Earth:[[TYPE_Calc_Earth], True, TYPE_Linear],
|
| | | |
| | | #战斗线性
|
| | | ShareDefine.Def_Effect_MaxHP:[[TYPE_Calc_AttrMaxHP], False, TYPE_Linear], # 最大血量
|
| | | ShareDefine.Def_Effect_MaxMP:[[TYPE_Calc_AttrMaxMP], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_Def:[[TYPE_Calc_AttrDEF], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_Miss:[[TYPE_Calc_AttrMiss], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_SuperHitRate:[[TYPE_Calc_SuperHitRate], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_SuperHit:[[TYPE_Calc_SuperHit], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_SuperHitReduce:[[TYPE_Calc_SuperHitReduce], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_Hit:[[TYPE_Calc_AttrHit], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_MinAtk:[[TYPE_Calc_AttrATKMin], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_MaxAtk:[[TYPE_Calc_AttrATKMax], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_Atk:[[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax], False, TYPE_Linear],
|
| | | #ShareDefine.Def_Effect_Atk:[[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax, |
| | | # TYPE_Calc_AttrMATKMin, TYPE_Calc_AttrMATKMax], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_AddAtk:[[TYPE_Calc_AttrATKMax], False, TYPE_Linear],
|
| | | #ShareDefine.Def_Effect_AddAtk:[[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax], False, TYPE_Linear],
|
| | | #ShareDefine.Def_Effect_AddMAtk:[[TYPE_Calc_AttrMATKMin, TYPE_Calc_AttrMATKMax], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_AtkSpeed:[[TYPE_Calc_AttrAtkSpeed], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_ToxinDef:[[TYPE_Calc_AttrPoisonDef], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_ThunderDef:[[TYPE_Calc_AttrThunderDef], False, TYPE_Linear], |
| | | ShareDefine.Def_Effect_IgnoreDefRate:[[TYPE_Calc_IgnoreDefRate], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_DamBackPer:[[TYPE_Calc_DamBackPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_GreatHit:[[TYPE_Calc_GreatHit], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_LuckyHit:[[TYPE_Calc_LuckyHit], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_LuckyHitRate:[[TYPE_Calc_LuckyHitRate], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_Luck:[[TYPE_Calc_Luck], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_ReduceSkillCDPer:[[TYPE_Calc_ReduceSkillCDPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_IceAtk:[[TYPE_Calc_AttrIceAtk], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_IceDef:[[TYPE_Calc_AttrIceDef], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_HPRestore:[[TYPE_Calc_HPRestorePer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_DropMoneyPer:[[TYPE_Calc_DropMoneyPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_FightExpRate:[[TYPE_Calc_AttrFightExpRate], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_SkillAtkRate:[[TYPE_Calc_SkillAtkRate], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_SkillAtkRateReduce:[[TYPE_Calc_SkillAtkRateReduce], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_DamagePVP:[[TYPE_Calc_DamagePVP], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_DamagePVPReduce:[[TYPE_Calc_DamagePVPReduce], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_DamagePerPVP:[[TYPE_Calc_DamagePerPVP], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_DamagePerPVPReduce:[[TYPE_Calc_DamagePerPVPReduce], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_BleedDamage:[[TYPE_Calc_BleedDamage], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_NPCHurtAddPer:[[TYPE_Calc_NPCHurtAddPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_JobAHurtAddPer:[[TYPE_Calc_JobAHurtAddPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_JobBHurtAddPer:[[TYPE_Calc_JobBHurtAddPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_JobCHurtAddPer:[[TYPE_Calc_JobCHurtAddPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_JobAAtkReducePer:[[TYPE_Calc_JobAAtkReducePer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_JobBAtkReducePer:[[TYPE_Calc_JobBAtkReducePer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_JobCAtkReducePer:[[TYPE_Calc_JobCAtkReducePer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_SuperHitRateReduce:[[TYPE_Calc_SuperHitRateReduce], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_FinalHurt:[[TYPE_Calc_FinalHurt], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_FinalHurtReduce:[[TYPE_Calc_FinalHurtReduce], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_Speed:[[TYPE_Calc_AttrSpeed], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_PetSkillAtkRate:[[TYPE_Calc_PetSkillAtkRate], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_OnlyFinalHurt:[[TYPE_Calc_OnlyFinalHurt], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_PVPAtkBackHP:[[TYPE_Calc_PVPAtkBackHP], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_NormalHurt:[[TYPE_Calc_NormalHurt], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_NormalHurtPer:[[TYPE_Calc_NormalHurtPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_FabaoHurt:[[TYPE_Calc_FabaoHurt], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_FabaoHurtPer:[[TYPE_Calc_FabaoHurtPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_SuperHitRateReduce:[[TYPE_Calc_SuperHitRateReduce], False, TYPE_Linear], # 暴击概率抗性
|
| | | ShareDefine.Def_Effect_DamagePVE:[[TYPE_Calc_DamagePVE], False, TYPE_Linear], # PVE固定伤害
|
| | | ShareDefine.Def_Effect_BossFinalHurtPer:[[TYPE_Calc_BossFinalHurtPer], False, TYPE_Linear], # Boss最终伤害万分率
|
| | | ShareDefine.Def_Effect_FinalHurtPer:[[TYPE_Calc_FinalHurtPer], False, TYPE_Linear], # 最终伤害万分率
|
| | | ShareDefine.Def_Effect_FinalHurtReducePer:[[TYPE_Calc_FinalHurtReducePer], False, TYPE_Linear], # 最终伤害减少万分
|
| | | ShareDefine.Def_Effect_YinjiTime:[[TYPE_Calc_YinjiTime], False, TYPE_Linear], # 每X秒自动消失一个印记
|
| | | ShareDefine.Def_Effect_TheFBSkillsCD:[[TYPE_Calc_TheFBSkillsCD], False, TYPE_Linear], # 减少指定技能组CD XX%
|
| | | ShareDefine.Def_Effect_BurnValue:[[TYPE_Calc_BurnValue], False, TYPE_Linear], # 灼烧固定伤害
|
| | | ShareDefine.Def_Effect_BurnTimePer:[[TYPE_Calc_BurnTimePer], False, TYPE_Linear], # 延长灼烧时间百分比
|
| | | ShareDefine.Def_Effect_SubSpeedPer:[[TYPE_Calc_SubSpeedPer], False, TYPE_Linear], # 减移动速度百分比
|
| | | ShareDefine.Def_Effect_SkillAddPer1:[[TYPE_Calc_SkillAddPer1], False, TYPE_Linear], # 技能伤害增强1
|
| | | ShareDefine.Def_Effect_SkillAddPer2:[[TYPE_Calc_SkillAddPer2], False, TYPE_Linear], # 技能伤害增强2
|
| | | ShareDefine.Def_Effect_SkillAddPer3:[[TYPE_Calc_SkillAddPer3], False, TYPE_Linear], # 技能伤害增强3
|
| | | ShareDefine.Def_Effect_SkillAddPer4:[[TYPE_Calc_SkillAddPer4], False, TYPE_Linear], # 技能伤害增强4
|
| | | ShareDefine.Def_Effect_SkillAddPer5:[[TYPE_Calc_SkillAddPer5], False, TYPE_Linear], # 技能伤害增强5
|
| | | ShareDefine.Def_Effect_SkillAddPer6:[[TYPE_Calc_SkillAddPer6], False, TYPE_Linear], # 技能伤害增强6
|
| | | ShareDefine.Def_Effect_SkillAddPer7:[[TYPE_Calc_SkillAddPer7], False, TYPE_Linear], # 技能伤害增强7
|
| | | ShareDefine.Def_Effect_SkillReducePer1:[[TYPE_Calc_SkillReducePer1], False, TYPE_Linear], # 受到技能伤害减少1
|
| | | ShareDefine.Def_Effect_SkillReducePer2:[[TYPE_Calc_SkillReducePer2], False, TYPE_Linear], # 受到技能伤害减少2
|
| | | ShareDefine.Def_Effect_SkillReducePer3:[[TYPE_Calc_SkillReducePer3], False, TYPE_Linear], # 受到技能伤害减少3
|
| | | ShareDefine.Def_Effect_SkillReducePer4:[[TYPE_Calc_SkillReducePer4], False, TYPE_Linear], # 受到技能伤害减少4
|
| | | ShareDefine.Def_Effect_SkillReducePer5:[[TYPE_Calc_SkillReducePer5], False, TYPE_Linear], # 受到技能伤害减少5
|
| | | ShareDefine.Def_Effect_SkillReducePer6:[[TYPE_Calc_SkillReducePer6], False, TYPE_Linear], # 受到技能伤害减少6
|
| | | ShareDefine.Def_Effect_SkillReducePer7:[[TYPE_Calc_SkillReducePer7], False, TYPE_Linear], # 受到技能伤害减少7
|
| | | ShareDefine.Def_Effect_AffairSpeedPer:[[TYPE_Calc_AffairSpeedPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_FamilyBossHurtPer:[[TYPE_Calc_FamilyBossHurtPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_FamilyWarHPPer:[[TYPE_Calc_FamilyWarHPPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_FamilyWarAtkPer:[[TYPE_Calc_FamilyWarAtkPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_FamilySitExpPer:[[TYPE_Calc_FamilySitExpPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_ComboDefRate:[[TYPE_Calc_ComboDefRate], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_AtkBackRate:[[TYPE_Calc_AtkBackRate], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_AtkBackDefRate:[[TYPE_Calc_AtkBackDefRate], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_SuckHPPer:[[TYPE_Calc_SuckHPPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_SuckHPDefPer:[[TYPE_Calc_SuckHPDefPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_CurePer:[[TYPE_Calc_CurePer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_CureDefPer:[[TYPE_Calc_CureDefPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_PetStrengthenPer:[[TYPE_Calc_PetStrengthenPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_PetWeakenPer:[[TYPE_Calc_PetWeakenPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_SuperHitHurtPer:[[TYPE_Calc_SuperHitHurtPer], False, TYPE_Linear],
|
| | | ShareDefine.Def_Effect_SuperHitHurtDefPer:[[TYPE_Calc_SuperHitHurtDefPer], False, TYPE_Linear],
|
| | | |
| | | #战斗非线性
|
| | | ShareDefine.Def_Effect_SuperHitPer:[[TYPE_Calc_SuperHit], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_LuckyHitPer:[[TYPE_Calc_LuckyHit], False, TYPE_NoLinear], # 会心一击伤害百分比
|
| | | ShareDefine.Def_Effect_MaxHPPer:[[TYPE_Calc_AttrMaxHP], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_DefPer:[[TYPE_Calc_AttrDEF], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_HitRate:[[TYPE_Calc_AttrHit], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_MissRate:[[TYPE_Calc_AttrMiss], False, TYPE_NoLinear],
|
| | | #ShareDefine.Def_Effect_AddMAtkByPer:[[TYPE_Calc_AttrMATKMin, TYPE_Calc_AttrMATKMax], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_AddAtkByPer:[[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_SpeedPer:[[TYPE_Calc_AttrSpeed], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_LuckPer:[[TYPE_Calc_Luck], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_IceAtkPer:[[TYPE_Calc_AttrIceAtk], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_IceDefPer:[[TYPE_Calc_AttrIceDef], False, TYPE_NoLinear],
|
| | | |
| | | #功能交叉影响的战斗非线性
|
| | | ShareDefine.Def_Effect_BaseAtkAddPer:[[TYPE_Calc_BaseAtkAddPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_BaseMaxHPAddPer:[[TYPE_Calc_BaseMaxHPAddPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_BaseDefAddPer:[[TYPE_Calc_BaseDefAddPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_BaseHitAddPer:[[TYPE_Calc_BaseHitAddPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_BaseMissAddPer:[[TYPE_Calc_BaseMissAddPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_FaQiMaxHPPer:[[TYPE_Calc_FaQiMaxHPPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_FaQiAtkPer:[[TYPE_Calc_FaQiAtkPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_FaQiDefPer:[[TYPE_Calc_FaQiDefPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_GodWeaponMaxHPPer:[[TYPE_Calc_GodWeaponMaxHPPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_GodWeaponAtkPer:[[TYPE_Calc_GodWeaponAtkPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_StoneMaxHPPer:[[TYPE_Calc_StoneMaxHPPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_StoneAtkPer:[[TYPE_Calc_StoneAtkPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_StoneBasePer:[[TYPE_Calc_StoneBasePer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_RealmBasePer:[[TYPE_Calc_RealmBasePer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_HorseAtkPer:[[TYPE_Calc_HorseAtkPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_HorseMaxHPPer:[[TYPE_Calc_HorseMaxHPPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_HorseTrainAttrPer:[[TYPE_Calc_HorseTrainAttrPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_HorseSkinMaxHPPer:[[TYPE_Calc_HorseSkinMaxHPPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_HorseSkinAtkPer:[[TYPE_Calc_HorseSkinAtkPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_HorseSkinDefPer:[[TYPE_Calc_HorseSkinDefPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_PetTrainAttrPer:[[TYPE_Calc_PetTrainAttrPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_GuardTrainAttrPer:[[TYPE_Calc_GuardTrainAttrPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_WingTrainAttrPer:[[TYPE_Calc_WingTrainAttrPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_PeerlessWeaponTrainAttrPer:[[TYPE_Calc_PeerlessWeaponTrainAttrPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_PeerlessWeapon2TrainAttrPer:[[TYPE_Calc_PeerlessWeapon2TrainAttrPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_LianTiAttrPer:[[TYPE_Calc_LianTiAttrPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_WingHPPer:[[TYPE_Calc_WingHPPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_SuiteBasePer:[[TYPE_Calc_SuiteBasePer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_PlusBaseAtkPer:[[TYPE_Calc_PlusBaseAtkPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_TitleMaxHPPer:[[TYPE_Calc_TitleMaxHPPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_TitleAtkPer:[[TYPE_Calc_TitleAtkPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_TitleDefPer:[[TYPE_Calc_TitleDefPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_FaceMaxHPPer:[[TYPE_Calc_FaceMaxHPPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_FaceAtkPer:[[TYPE_Calc_FaceAtkPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_FaceDefPer:[[TYPE_Calc_FaceDefPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_FacePicMaxHPPer:[[TYPE_Calc_FacePicMaxHPPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_FacePicAtkPer:[[TYPE_Calc_FacePicAtkPer], False, TYPE_NoLinear],
|
| | | ShareDefine.Def_Effect_FacePicDefPer:[[TYPE_Calc_FacePicDefPer], False, TYPE_NoLinear],
|
| | | }
|
| | | ItemEffect_AttrDict = {}
|
| | |
|
| | | # 各功能点交叉非线性属性影响提升
|
| | | # 注:该非线性层使用的基值是功能点战斗属性;而上面的非线性层使用的基值是当前角色的实际战斗属性
|
| | | FuncNoLinearAttrDict = {
|
| | | TYPE_Calc_BaseAtkAddPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax],
|
| | | TYPE_Calc_BaseMaxHPAddPer:[TYPE_Calc_AttrMaxHP],
|
| | | TYPE_Calc_BaseDefAddPer:[TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_BaseHitAddPer:[TYPE_Calc_AttrHit],
|
| | | TYPE_Calc_BaseMissAddPer:[TYPE_Calc_AttrMiss],
|
| | | TYPE_Calc_FaQiMaxHPPer:[TYPE_Calc_AttrMaxHP],
|
| | | TYPE_Calc_FaQiAtkPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax],
|
| | | TYPE_Calc_FaQiDefPer:[TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_GodWeaponMaxHPPer:[TYPE_Calc_AttrMaxHP],
|
| | | TYPE_Calc_GodWeaponAtkPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax],
|
| | | TYPE_Calc_StoneMaxHPPer:[TYPE_Calc_AttrMaxHP],
|
| | | TYPE_Calc_StoneAtkPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax],
|
| | | TYPE_Calc_StoneBasePer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax, |
| | | TYPE_Calc_AttrMaxHP, TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_RealmBasePer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax, |
| | | TYPE_Calc_AttrMaxHP, TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_HorseAtkPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax],
|
| | | TYPE_Calc_HorseMaxHPPer:[TYPE_Calc_AttrMaxHP],
|
| | | TYPE_Calc_HorseTrainAttrPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax, |
| | | TYPE_Calc_AttrMaxHP, TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_PetTrainAttrPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax, |
| | | TYPE_Calc_AttrMaxHP, TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_HorseSkinMaxHPPer:[TYPE_Calc_AttrMaxHP],
|
| | | TYPE_Calc_HorseSkinAtkPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax],
|
| | | TYPE_Calc_HorseSkinDefPer:[TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_TitleMaxHPPer:[TYPE_Calc_AttrMaxHP],
|
| | | TYPE_Calc_TitleAtkPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax],
|
| | | TYPE_Calc_TitleDefPer:[TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_FaceMaxHPPer:[TYPE_Calc_AttrMaxHP],
|
| | | TYPE_Calc_FaceAtkPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax],
|
| | | TYPE_Calc_FaceDefPer:[TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_FacePicMaxHPPer:[TYPE_Calc_AttrMaxHP],
|
| | | TYPE_Calc_FacePicAtkPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax],
|
| | | TYPE_Calc_FacePicDefPer:[TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_WingTrainAttrPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax, |
| | | TYPE_Calc_AttrMaxHP, TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_GuardTrainAttrPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax, |
| | | TYPE_Calc_AttrMaxHP, TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_PeerlessWeaponTrainAttrPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax, |
| | | TYPE_Calc_AttrMaxHP, TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_PeerlessWeapon2TrainAttrPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax, |
| | | TYPE_Calc_AttrMaxHP, TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_LianTiAttrPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax, |
| | | TYPE_Calc_AttrMaxHP, TYPE_Calc_AttrDEF],
|
| | | TYPE_Calc_WingHPPer:[TYPE_Calc_AttrMaxHP],
|
| | | TYPE_Calc_SuiteBasePer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax, |
| | | TYPE_Calc_AttrMaxHP],
|
| | | TYPE_Calc_PlusBaseAtkPer:[TYPE_Calc_AttrATKMin, TYPE_Calc_AttrATKMax],
|
| | | }
|
| | |
|
| | | # 对装备基础属性加成配置 {属性ID:[影响部位信息, [影响的计算属性列表]], ...}
|
| | | # 影响部位信息: 大于0-指定部位; -1-所有部位; -2-基础部位
|
| | | EquipBassAttrAddInfoSet = {
|
| | | ShareDefine.Def_Effect_EquipBaseAddPer: [-1, [ShareDefine.Def_Effect_Atk, ShareDefine.Def_Effect_MinAtk, ShareDefine.Def_Effect_MaxAtk, ShareDefine.Def_Effect_MaxHP, ShareDefine.Def_Effect_Def]],
|
| | | ShareDefine.Def_Effect_BaseEquipAddPer: [-2, [ShareDefine.Def_Effect_Atk, ShareDefine.Def_Effect_MinAtk, ShareDefine.Def_Effect_MaxAtk, ShareDefine.Def_Effect_MaxHP, ShareDefine.Def_Effect_Def]],
|
| | | ShareDefine.Def_Effect_BaseEquipAtkAddPer: [-2, [ShareDefine.Def_Effect_Atk, ShareDefine.Def_Effect_MinAtk, ShareDefine.Def_Effect_MaxAtk]],
|
| | | ShareDefine.Def_Effect_BaseEquipMaxHPAddPer: [-2, [ShareDefine.Def_Effect_MaxHP]],
|
| | | ShareDefine.Def_Effect_WeaponAddPer: [ShareDefine.retWeapon, [ShareDefine.Def_Effect_Atk, ShareDefine.Def_Effect_MinAtk, ShareDefine.Def_Effect_MaxAtk]],
|
| | | ShareDefine.Def_Effect_Weapon2AddPer: [ShareDefine.retWeapon2, [ShareDefine.Def_Effect_Atk, ShareDefine.Def_Effect_MinAtk, ShareDefine.Def_Effect_MaxAtk]],
|
| | | ShareDefine.Def_Effect_BeltAddPer: [ShareDefine.retBelt, [ShareDefine.Def_Effect_Atk, ShareDefine.Def_Effect_MinAtk, ShareDefine.Def_Effect_MaxAtk]],
|
| | | ShareDefine.Def_Effect_GloveAddPer: [ShareDefine.retGlove, [ShareDefine.Def_Effect_Atk, ShareDefine.Def_Effect_MinAtk, ShareDefine.Def_Effect_MaxAtk]],
|
| | | ShareDefine.Def_Effect_ClothesAddPer: [ShareDefine.retClothes, [ShareDefine.Def_Effect_MaxHP, ShareDefine.Def_Effect_Def]],
|
| | | ShareDefine.Def_Effect_HatAddPer: [ShareDefine.retHat, [ShareDefine.Def_Effect_MaxHP, ShareDefine.Def_Effect_Def]],
|
| | | ShareDefine.Def_Effect_TrousersAddPer: [ShareDefine.retTrousers, [ShareDefine.Def_Effect_MaxHP, ShareDefine.Def_Effect_Def]],
|
| | | ShareDefine.Def_Effect_ShoesAddPer: [ShareDefine.retShoes, [ShareDefine.Def_Effect_MaxHP, ShareDefine.Def_Effect_Def]],
|
| | | ShareDefine.Def_Effect_ShawlAddPer: [ShareDefine.retShawl, [ShareDefine.Def_Effect_Atk, ShareDefine.Def_Effect_MinAtk, ShareDefine.Def_Effect_MaxAtk, ShareDefine.Def_Effect_MaxHP]],
|
| | | ShareDefine.Def_Effect_RingAddPer: [ShareDefine.retRing, [ShareDefine.Def_Effect_Atk, ShareDefine.Def_Effect_MinAtk, ShareDefine.Def_Effect_MaxAtk, ShareDefine.Def_Effect_MaxHP]],
|
| | | ShareDefine.Def_Effect_NeckAddPer: [ShareDefine.retNeck, [ShareDefine.Def_Effect_Atk, ShareDefine.Def_Effect_MinAtk, ShareDefine.Def_Effect_MaxAtk, ShareDefine.Def_Effect_MaxHP]],
|
| | | ShareDefine.Def_Effect_AmuletAddPer: [ShareDefine.retAmulet, [ShareDefine.Def_Effect_Atk, ShareDefine.Def_Effect_MinAtk, ShareDefine.Def_Effect_MaxAtk, ShareDefine.Def_Effect_MaxHP]],
|
| | | }
|
| | | FuncNoLinearAttrDict = {}
|
| | |
|
| | | # 指定地图生效的非线性属性配置
|
| | | MapAttrInfoDict_Noline = {
|
| | |
| | | Def_CalcAttrFunc_ChatBox, # 气泡框 65
|
| | | ) = range(66)
|
| | |
|
| | | # 技能功能点列表 - 默认不算战力,不享受百分比加成,技能功能点暂时配置,之后优化技能属性逻辑后可去掉
|
| | | CalcAttrFuncSkillList = [Def_CalcAttrFunc_HorseSkill, Def_CalcAttrFunc_PetSkill, Def_CalcAttrFunc_DogzBattleSkill]
|
| | | # 不计算战力的功能点列表 - 由其他方式计算的战力的功能点,如装备用评分计算
|
| | | CalcAttrFuncNoFightPowerList = [Def_CalcAttrFunc_Equip, Def_CalcAttrFunc_DogzEquip, Def_CalcAttrFunc_LingQiAttr]
|
| | |
|
| | | #战斗力分组类型对应功能点属性分类索引列表,并不是一一对应的,有些战斗力类型可由多个功能点组成
|
| | | #***注意***: 以下功能点需包含上面定义的所有功能点,不然会导致有些属性无法加上
|
| | | MFPTypeAttrFuncIndexDict = {ShareDefine.Def_MFPType_Role:[Def_CalcAttrFunc_RoleBase],
|
| | | ShareDefine.Def_MFPType_Equip:[Def_CalcAttrFunc_Equip],
|
| | | ShareDefine.Def_MFPType_LingGen:[Def_CalcAttrFunc_LingGenQuailty, Def_CalcAttrFunc_LingGen],
|
| | | ShareDefine.Def_MFPType_Star:[Def_CalcAttrFunc_Star],
|
| | | ShareDefine.Def_MFPType_Plus:[Def_CalcAttrFunc_Plus],
|
| | | ShareDefine.Def_MFPType_Stone:[Def_CalcAttrFunc_Stone],
|
| | | ShareDefine.Def_MFPType_Enchant:[Def_CalcAttrFunc_Enchant],
|
| | | ShareDefine.Def_MFPType_Gubao:[Def_CalcAttrFunc_Gubao, Def_CalcAttrFunc_GubaoResonance],
|
| | | ShareDefine.Def_MFPType_Shentong:[Def_CalcAttrFunc_Shentong],
|
| | | ShareDefine.Def_MFPType_LingQi:[Def_CalcAttrFunc_LingQi, Def_CalcAttrFunc_LingQiAttr, Def_CalcAttrFunc_LingQiJingLianAttr, Def_CalcAttrFunc_GuardTarin, |
| | | Def_CalcAttrFunc_WingTarin, Def_CalcAttrFunc_PeerlessWeaponTrain, Def_CalcAttrFunc_PeerlessWeapon2Train],
|
| | | ShareDefine.Def_MFPType_Wash:[Def_CalcAttrFunc_Wash],
|
| | | ShareDefine.Def_MFPType_Pet:[Def_CalcAttrFunc_Pet, Def_CalcAttrFunc_PetSign, Def_CalcAttrFunc_PetSkill, Def_CalcAttrFunc_PetSkin, Def_CalcAttrFunc_PetTarin, Def_CalcAttrFunc_PetStar],
|
| | | ShareDefine.Def_MFPType_PetSoul:[Def_CalcAttrFunc_PetSoul],
|
| | | ShareDefine.Def_MFPType_Horse:[Def_CalcAttrFunc_Horse, Def_CalcAttrFunc_HorseSkill, Def_CalcAttrFunc_HorseSkin, Def_CalcAttrFunc_HorseTarin, Def_CalcAttrFunc_HorseStar],
|
| | | ShareDefine.Def_MFPType_HorseSoul:[Def_CalcAttrFunc_HorseSoul],
|
| | | ShareDefine.Def_MFPType_FaQi:[Def_CalcAttrFunc_FaQi],
|
| | | ShareDefine.Def_MFPType_Love:[Def_CalcAttrFunc_LoveRing, Def_CalcAttrFunc_LoveRingCouple],
|
| | | ShareDefine.Def_MFPType_Charm:[Def_CalcAttrFunc_Charm],
|
| | | ShareDefine.Def_MFPType_LianTi:[Def_CalcAttrFunc_LianTi],
|
| | | ShareDefine.Def_MFPType_Prestige:[Def_CalcAttrFunc_Prestige],
|
| | | ShareDefine.Def_MFPType_GodWeapon:[Def_CalcAttrFunc_GodWeapon],
|
| | | ShareDefine.Def_MFPType_Dienstgrad:[Def_CalcAttrFunc_Dienstgrad, Def_CalcAttrFunc_TitleStar],
|
| | | ShareDefine.Def_MFPType_Rune:[Def_CalcAttrFunc_Rune],
|
| | | ShareDefine.Def_MFPType_MagicWeapon1:[Def_CalcAttrFunc_MagicWeapon1],
|
| | | ShareDefine.Def_MFPType_MagicWeapon2:[Def_CalcAttrFunc_MagicWeapon2],
|
| | | ShareDefine.Def_MFPType_MagicWeapon3:[Def_CalcAttrFunc_MagicWeapon3, Def_CalcAttrFunc_Stove, Def_CalcAttrFunc_VIP],
|
| | | ShareDefine.Def_MFPType_MagicWeapon4:[Def_CalcAttrFunc_MagicWeapon4],
|
| | | ShareDefine.Def_MFPType_StoveYao:[Def_CalcAttrFunc_StoveYao],
|
| | | ShareDefine.Def_MFPType_GatherSoul:[Def_CalcAttrFunc_GatherSoul],
|
| | | ShareDefine.Def_MFPType_GatherTheSoul:[Def_CalcAttrFunc_GatherTheSoul],
|
| | | ShareDefine.Def_MFPType_Coat:[Def_CalcAttrFunc_Coat],
|
| | | ShareDefine.Def_MFPType_Dogz:[Def_CalcAttrFunc_Dogz, Def_CalcAttrFunc_DogzEquip, Def_CalcAttrFunc_DogzEquipPlus, Def_CalcAttrFunc_DogzBattleSkill],
|
| | | ShareDefine.Def_MFPType_FamilyZhenfa:[Def_CalcAttrFunc_FamilyZhenfa],
|
| | | ShareDefine.Def_MFPType_Face:[Def_CalcAttrFunc_Face],
|
| | | ShareDefine.Def_MFPType_FacePic:[Def_CalcAttrFunc_FacePic],
|
| | | ShareDefine.Def_MFPType_ChatBox:[Def_CalcAttrFunc_ChatBox],
|
| | | ShareDefine.Def_MFPType_Other:[Def_CalcAttrFunc_Success, Def_CalcAttrFunc_FamilyTech, Def_CalcAttrFunc_EquipDecompose],
|
| | | }
|
| | |
|
| | | MFPTypeName = {ShareDefine.Def_MFPType_Role:"角色", ShareDefine.Def_MFPType_LingGen:"灵根", ShareDefine.Def_MFPType_Equip:"装备", ShareDefine.Def_MFPType_Star:"升星",
|
| | | ShareDefine.Def_MFPType_Plus:"强化", ShareDefine.Def_MFPType_Stone:"宝石", ShareDefine.Def_MFPType_Wash:"洗练", ShareDefine.Def_MFPType_LingQi:"灵器",
|
| | | ShareDefine.Def_MFPType_Pet:"灵宠", ShareDefine.Def_MFPType_Horse:"坐骑", ShareDefine.Def_MFPType_Prestige:"境界", ShareDefine.Def_MFPType_GodWeapon:"神兵",
|
| | | ShareDefine.Def_MFPType_Dienstgrad:"称号", ShareDefine.Def_MFPType_Rune:"符印", ShareDefine.Def_MFPType_GatherSoul:"聚魂", ShareDefine.Def_MFPType_StoveYao:"丹药",
|
| | | ShareDefine.Def_MFPType_MagicWeapon1:"人族", ShareDefine.Def_MFPType_MagicWeapon2:"魔族", ShareDefine.Def_MFPType_MagicWeapon3:"仙族", ShareDefine.Def_MFPType_MagicWeapon4:"王者",
|
| | | ShareDefine.Def_MFPType_PetSoul:"宠魂", ShareDefine.Def_MFPType_HorseSoul:"骑魂", ShareDefine.Def_MFPType_FaQi:"法器", ShareDefine.Def_MFPType_Dogz:"神兽",
|
| | | ShareDefine.Def_MFPType_Coat:"时装", ShareDefine.Def_MFPType_Love:"情缘", ShareDefine.Def_MFPType_Charm:"魅力", ShareDefine.Def_MFPType_LianTi:"炼体",
|
| | | ShareDefine.Def_MFPType_Enchant:"附魔", ShareDefine.Def_MFPType_Gubao:"古宝", ShareDefine.Def_MFPType_Shentong:"神通", ShareDefine.Def_MFPType_FamilyZhenfa:"阵法", |
| | | ShareDefine.Def_MFPType_GatherTheSoul:"聚魂新", ShareDefine.Def_MFPType_Face:"头像", ShareDefine.Def_MFPType_FacePic:"头像框", ShareDefine.Def_MFPType_ChatBox:"气泡框", |
| | | ShareDefine.Def_MFPType_Other:"其他",
|
| | | }
|
| | |
|
| | | FuncIndexName = {
|
| | | Def_CalcAttrFunc_RoleBase:"角色基础", Def_CalcAttrFunc_LingGen:"灵根", Def_CalcAttrFunc_LingGenQuailty:"灵根品质", Def_CalcAttrFunc_Equip:"装备", |
| | | Def_CalcAttrFunc_Star:"升星", Def_CalcAttrFunc_Plus:"强化", Def_CalcAttrFunc_Stone:"宝石", Def_CalcAttrFunc_Wash:"洗练", |
| | | Def_CalcAttrFunc_LingQi:"灵器", Def_CalcAttrFunc_LingQiAttr:"灵器属性", Def_CalcAttrFunc_LingQiJingLianAttr:"灵器精炼", Def_CalcAttrFunc_Pet:"灵宠",
|
| | | Def_CalcAttrFunc_Horse:"坐骑", Def_CalcAttrFunc_Prestige:"境界", Def_CalcAttrFunc_GodWeapon:"神兵", Def_CalcAttrFunc_Dienstgrad:"称号", |
| | | Def_CalcAttrFunc_Rune:"符印", Def_CalcAttrFunc_GatherSoul:"聚魂", Def_CalcAttrFunc_Success:"成就", Def_CalcAttrFunc_VIP:"VIP", |
| | | Def_CalcAttrFunc_Stove:"炼丹炉", Def_CalcAttrFunc_FamilyTech:"心法", Def_CalcAttrFunc_EquipDecompose:"装备分解", Def_CalcAttrFunc_PetSoul:"宠物魂石", |
| | | Def_CalcAttrFunc_HorseSoul:"坐骑魂石", Def_CalcAttrFunc_HorseSkill:"坐骑技能属性", Def_CalcAttrFunc_PetSkill:"宠物技能属性", Def_CalcAttrFunc_StoveYao:"炼丹炉丹药", |
| | | Def_CalcAttrFunc_PetSign:"宠物签到", Def_CalcAttrFunc_Dogz:"神兽", Def_CalcAttrFunc_DogzBattleSkill:"神兽技能", Def_CalcAttrFunc_DogzEquip:"神兽装备", |
| | | Def_CalcAttrFunc_DogzEquipPlus:"神兽强化", Def_CalcAttrFunc_Coat:"时装", Def_CalcAttrFunc_MagicWeapon1:"人族法宝属性", |
| | | Def_CalcAttrFunc_MagicWeapon2:"魔族法宝属性", Def_CalcAttrFunc_MagicWeapon3:"仙族法宝属性", Def_CalcAttrFunc_MagicWeapon4:"王者法宝属性", Def_CalcAttrFunc_HorseSkin:"坐骑觉醒", |
| | | Def_CalcAttrFunc_PetSkin:"灵宠觉醒", Def_CalcAttrFunc_HorseTarin:"坐骑培养", Def_CalcAttrFunc_PetTarin:"灵宠培养", Def_CalcAttrFunc_GuardTarin:"守护培养",
|
| | | Def_CalcAttrFunc_WingTarin:"翅膀培养", Def_CalcAttrFunc_PeerlessWeaponTrain:"灭世培养", Def_CalcAttrFunc_PeerlessWeapon2Train:"噬魂培养", Def_CalcAttrFunc_FaQi:"法器",
|
| | | Def_CalcAttrFunc_LoveRing:"情戒基础", Def_CalcAttrFunc_LoveRingCouple:"情戒仙侣", Def_CalcAttrFunc_Charm:"魅力", Def_CalcAttrFunc_LianTi:"炼体",
|
| | | Def_CalcAttrFunc_Enchant:"附魔", Def_CalcAttrFunc_LingQiEnchant:"灵器附魔", Def_CalcAttrFunc_Gubao:"古宝", Def_CalcAttrFunc_Shentong:"神通",
|
| | | Def_CalcAttrFunc_HorseStar:"坐骑星级", Def_CalcAttrFunc_PetStar:"宠物星级", Def_CalcAttrFunc_TitleStar:"称号星级", Def_CalcAttrFunc_FamilyZhenfa:"阵法",
|
| | | Def_CalcAttrFunc_GatherTheSoul:"聚魂新", Def_CalcAttrFunc_GubaoResonance:"古宝共鸣", Def_CalcAttrFunc_Face:"头像", Def_CalcAttrFunc_FacePic:"头像框", Def_CalcAttrFunc_ChatBox:"气泡框",
|
| | | }
|
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | | (
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 17 增加果实使用上限 #tagCMAddFruitUseLimit
|
| | |
|
| | | class tagCMAddFruitUseLimit(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ItemID", c_int), #果实物品ID
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x17
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x17
|
| | | self.ItemID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMAddFruitUseLimit)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 17 增加果实使用上限 //tagCMAddFruitUseLimit:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ItemID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ItemID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMAddFruitUseLimit=tagCMAddFruitUseLimit()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMAddFruitUseLimit.Cmd,m_NAtagCMAddFruitUseLimit.SubCmd))] = m_NAtagCMAddFruitUseLimit
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 10 购买商城物品 #tagCMBuyItem
|
| | |
|
| | | class tagCMBuyItem(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 2A 回收魂石 #tagCMRecycleAttrFruit
|
| | |
|
| | | class tagCMRecycleAttrFruit(Structure):
|
| | | Head = tagHead()
|
| | | IndexCount = 0 #(BYTE IndexCount)//索引个数
|
| | | IndexList = list() #(vector<BYTE> IndexList)//物品在背包中索引列表
|
| | | RecycleCountList = list() #(vector<WORD> RecycleCountList)//索引对应回收个数列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x2A
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.IndexCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.IndexCount):
|
| | | value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
|
| | | self.IndexList.append(value)
|
| | | for i in range(self.IndexCount):
|
| | | value,_pos=CommFunc.ReadWORD(_lpData,_pos)
|
| | | self.RecycleCountList.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x2A
|
| | | self.IndexCount = 0
|
| | | self.IndexList = list()
|
| | | self.RecycleCountList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1 * self.IndexCount
|
| | | length += 2 * self.IndexCount
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.IndexCount)
|
| | | for i in range(self.IndexCount):
|
| | | data = CommFunc.WriteBYTE(data, self.IndexList[i])
|
| | | for i in range(self.IndexCount):
|
| | | data = CommFunc.WriteWORD(data, self.RecycleCountList[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | IndexCount:%d,
|
| | | IndexList:%s,
|
| | | RecycleCountList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.IndexCount,
|
| | | "...",
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMRecycleAttrFruit=tagCMRecycleAttrFruit()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRecycleAttrFruit.Head.Cmd,m_NAtagCMRecycleAttrFruit.Head.SubCmd))] = m_NAtagCMRecycleAttrFruit
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A3 03 物品合成 #tagCMItemCompound
|
| | |
|
| | | class tagCMItemCompound(Structure):
|
| | |
| | |
|
| | | m_NAtagCMTrialExchange=tagCMTrialExchange()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMTrialExchange.Cmd,m_NAtagCMTrialExchange.SubCmd))] = m_NAtagCMTrialExchange
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 2B 一键使用属性果实 #tagCMUseAllAttrFruit
|
| | |
|
| | | class tagCMUseAllAttrFruit(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("FuncIndex", c_ubyte), #功能索引
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x2B
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x2B
|
| | | self.FuncIndex = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMUseAllAttrFruit)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 2B 一键使用属性果实 //tagCMUseAllAttrFruit:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | FuncIndex:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.FuncIndex
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMUseAllAttrFruit=tagCMUseAllAttrFruit()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMUseAllAttrFruit.Cmd,m_NAtagCMUseAllAttrFruit.SubCmd))] = m_NAtagCMUseAllAttrFruit
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 39 玩家属性果实已使用个数信息#tagMCAttrFruitEatCntList
|
| | |
|
| | | class tagMCAttrFruitEatCnt(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemID", c_int), #果实物品ID
|
| | | ("EatCnt", c_int), #已使用个数
|
| | | ("ItemAddCnt", c_int), #增幅丹增加上限
|
| | | ("ItemBreakCnt", c_int), #增幅丹突破次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.ItemID = 0
|
| | | self.EatCnt = 0
|
| | | self.ItemAddCnt = 0
|
| | | self.ItemBreakCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCAttrFruitEatCnt)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 39 玩家属性果实已使用个数信息//tagMCAttrFruitEatCntList:
|
| | | ItemID:%d,
|
| | | EatCnt:%d,
|
| | | ItemAddCnt:%d,
|
| | | ItemBreakCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.EatCnt,
|
| | | self.ItemAddCnt,
|
| | | self.ItemBreakCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCAttrFruitEatCntList(Structure):
|
| | | Head = tagHead()
|
| | | count = 0 #(BYTE count)//信息个数
|
| | | EatCntList = list() #(vector<tagMCAttrFruitEatCnt> EatCntList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x39
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.count):
|
| | | temEatCntList = tagMCAttrFruitEatCnt()
|
| | | _pos = temEatCntList.ReadData(_lpData, _pos)
|
| | | self.EatCntList.append(temEatCntList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x39
|
| | | self.count = 0
|
| | | self.EatCntList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.count):
|
| | | length += self.EatCntList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.count)
|
| | | for i in range(self.count):
|
| | | data = CommFunc.WriteString(data, self.EatCntList[i].GetLength(), self.EatCntList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | count:%d,
|
| | | EatCntList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCAttrFruitEatCntList=tagMCAttrFruitEatCntList()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCAttrFruitEatCntList.Head.Cmd,m_NAtagMCAttrFruitEatCntList.Head.SubCmd))] = m_NAtagMCAttrFruitEatCntList
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A3 B7 当日累计攻击boss次数 #tagMCBOSSAttactCnt
|
| | |
|
| | | class tagMCBossCntInfo(Structure):
|
| | |
| | | import ShareDefine
|
| | | import IpyGameDataPY
|
| | | import PlayerControl
|
| | | import PlayerOnline
|
| | | import GameWorld
|
| | | import ChConfig
|
| | |
|
| | |
| | | GameWorld.DebugAnswer(curPlayer, "新增武将: MakeItemCount 英雄ID [个数]")
|
| | | return
|
| | |
|
| | | PlayerOnline.GetOnlinePlayer(curPlayer).RefreshRoleAttr()
|
| | | |
| | | value = msgList[0]
|
| | | value2 = msgList[1] if len(msgList) > 1 else 0
|
| | |
|
| | |
| | | #
|
| | | ##@package GM.Commands.PrintFightPower
|
| | | #
|
| | | # @todo:显示战力明细
|
| | | # @todo:输出阵容战力
|
| | | # @author hxp
|
| | | # @date 2018-01-31
|
| | | # @date 2025-07-21
|
| | | # @version 1.0
|
| | | #
|
| | | # 详细描述: 显示战力明细
|
| | | # 详细描述: 输出阵容战力
|
| | | #
|
| | | #-------------------------------------------------------------------------------
|
| | | #"""Version = 2018-01-31 20:00"""
|
| | | #"""Version = 2025-07-21 14:30"""
|
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | | import ChConfig
|
| | | import GameWorld
|
| | | import PlayerControl
|
| | |
|
| | | import PlayerOnline
|
| | | import ShareDefine
|
| | | import ChConfig
|
| | |
|
| | | #逻辑实现
|
| | | ## GM命令执行入口
|
| | |
| | | # @return None
|
| | | # @remarks 函数详细说明.
|
| | | def OnExec(curPlayer, msgList):
|
| | | mfpTypeName = ChConfig.MFPTypeName
|
| | |
|
| | | funcIndexName = ChConfig.FuncIndexName
|
| | | olPlayer = PlayerOnline.GetOnlinePlayer(curPlayer)
|
| | |
|
| | | GameWorld.DebugAnswer(curPlayer, "PrintFightPower 模块类型(可选)")
|
| | | |
| | | if msgList:
|
| | | mfpType = msgList[0]
|
| | | if mfpType not in mfpTypeName:
|
| | | return
|
| | | fightPower = PlayerControl.GetMFPFightPower(curPlayer, mfpType)
|
| | | GameWorld.DebugAnswer(curPlayer, "--- %s战力(%s): %s" % (mfpTypeName[mfpType], mfpType, fightPower))
|
| | | for funcIndex in ChConfig.MFPTypeAttrFuncIndexDict[mfpType]:
|
| | | funcName = funcIndexName.get(funcIndex, "属性(%s)" % funcIndex)
|
| | | attrInfo, insidePerAttrDict, customAttrDict = PlayerControl.GetCalcAttrListValue(curPlayer, funcIndex)
|
| | | GameWorld.DebugAnswer(curPlayer, "%s:%s" % (funcName, attrInfo))
|
| | | if insidePerAttrDict:
|
| | | GameWorld.DebugAnswer(curPlayer, "%s内部加成:%s" % (funcName, insidePerAttrDict))
|
| | | if customAttrDict:
|
| | | GameWorld.DebugAnswer(curPlayer, "%s自定义属性:%s" % (funcName, customAttrDict))
|
| | | if not msgList:
|
| | | GameWorld.DebugAnswer(curPlayer, "PrintFightPower [阵容ID]")
|
| | | GameWorld.DebugAnswer(curPlayer, "主公战力: %s" % PlayerControl.GetFightPower(curPlayer))
|
| | | for lineupID in ShareDefine.LineupList:
|
| | | lineup = olPlayer.GetLineup(lineupID)
|
| | | GameWorld.DebugAnswer(curPlayer, "阵容(%s)总战力: %s" % (lineupID, lineup.fightPower))
|
| | | return
|
| | |
|
| | | GameWorld.DebugAnswer(curPlayer, "===== 总战力: %s" % PlayerControl.GetFightPower(curPlayer))
|
| | | for mfpType in ChConfig.MFPTypeAttrFuncIndexDict.keys():
|
| | | fightPower = PlayerControl.GetMFPFightPower(curPlayer, mfpType)
|
| | | mfpSkillFP = PlayerControl.GetMFPSkillFightPower(curPlayer, mfpType)
|
| | | mfpEx = PlayerControl.GetMFPExFightPower(curPlayer, mfpType)
|
| | | name = mfpTypeName.get(mfpType, "模块%s" % mfpType)
|
| | | if mfpSkillFP or mfpEx:
|
| | | GameWorld.DebugAnswer(curPlayer, "%s战力(%s): %s,技能:%s, Ex=%s" % (name, mfpType, fightPower, mfpSkillFP, mfpEx))
|
| | | else:
|
| | | GameWorld.DebugAnswer(curPlayer, "%s战力(%s): %s" % (name, mfpType, fightPower))
|
| | | |
| | | lineupID = msgList[0]
|
| | | if lineupID not in ShareDefine.LineupList:
|
| | | GameWorld.DebugAnswer(curPlayer, "阵容(%s)不存在.")
|
| | | return
|
| | |
|
| | | GameWorld.DebugAnswer(curPlayer, "-------------------")
|
| | | lineup = olPlayer.GetLineup(lineupID) |
| | | GameWorld.DebugAnswer(curPlayer, "【阵容 - %s】明细总战力: %s" % (lineupID, lineup.fightPower))
|
| | | |
| | | for calcIndex in ChConfig.Def_CalcAttrList:
|
| | | calcName = ChConfig.CalcAttrName.get(calcIndex, "%s" % calcIndex)
|
| | | attrDict = olPlayer.GetCalcAttr(calcIndex)
|
| | | attrInfo = ""
|
| | | for attrID in ChConfig.AttrIDList:
|
| | | attrValue = attrDict.get(attrID, 0)
|
| | | if not attrValue:
|
| | | continue
|
| | | if attrInfo:
|
| | | attrInfo += "; "
|
| | | attrInfo += "%s-%s" % (attrID, attrValue)
|
| | | GameWorld.DebugAnswer(curPlayer, "%s:%s" % (calcName, attrInfo))
|
| | | |
| | | posNumList = lineup.lineupHeroDict.keys()
|
| | | posNumList.sort()
|
| | | for posNum in posNumList:
|
| | | lineupHero = lineup.GetLineupHero(posNum)
|
| | | GameWorld.DebugAnswer(curPlayer, "---位置:%s,武将(%s) 战力: %s" % (posNum, lineupHero.heroID, lineupHero.fightPower))
|
| | | GameWorld.DebugAnswer(curPlayer, "技能:%s,战力:%s" % (lineupHero.heroSkillIDList, lineupHero.skillFightPower))
|
| | | attrInfo = ""
|
| | | for attrID in ChConfig.AttrIDList:
|
| | | attrValue = lineupHero.heroBatAttrDict.get(attrID, 0)
|
| | | if not attrValue:
|
| | | continue
|
| | | if attrInfo:
|
| | | attrInfo += "; "
|
| | | attrInfo += "%s-%s" % (attrID, attrValue)
|
| | | GameWorld.DebugAnswer(curPlayer, "属性:%s" % attrInfo)
|
| | | |
| | | return
|
| | |
| | | import ReadChConfig
|
| | | import OperControlManager
|
| | | import ShareDefine
|
| | | import PlayerAttrFruit
|
| | | import DataRecordPack
|
| | | import ChPyNetSendPack
|
| | | import NetPackCommon
|
| | |
| | | # @return None or True
|
| | | # @remarks 函数详细说明.
|
| | | def __DealWith_SpecialItem(curPlayer, curItem, tick, useCnt, exData):
|
| | | #果实物品
|
| | | useFruitResult = PlayerAttrFruit.DoPlayerEatFruitItem(curPlayer, curItem, useCnt)
|
| | | if useFruitResult != -1:
|
| | | return useFruitResult
|
| | |
|
| | | #------------------------获得物品相关属性
|
| | | itemTypeID = curItem.GetItemTypeID() #物品类型id
|
| | |
| | | heroAttrDict = {}
|
| | | if lineupPlayerID:
|
| | | heroAttrDict.update({
|
| | | ShareDefine.Def_Effect_Atk:500000000,
|
| | | ShareDefine.Def_Effect_Def:50000000,
|
| | | ShareDefine.Def_Effect_MaxHP:3000000000,
|
| | | ChConfig.AttrID_Atk:500000000,
|
| | | ChConfig.AttrID_Def:50000000,
|
| | | ChConfig.AttrID_MaxHP:3000000000,
|
| | | })
|
| | | else:
|
| | | npcDataEx = GetNPCDataEx(curNPC.GetNPCID())
|
| | | if not npcDataEx:
|
| | | return
|
| | | heroAttrDict.update({
|
| | | ShareDefine.Def_Effect_Atk:npcDataEx.GetAtk(),
|
| | | ShareDefine.Def_Effect_Def:npcDataEx.GetDef(),
|
| | | ShareDefine.Def_Effect_MaxHP:npcDataEx.GetMaxHP(),
|
| | | ChConfig.AttrID_Atk:npcDataEx.GetAtk(),
|
| | | ChConfig.AttrID_Def:npcDataEx.GetDef(),
|
| | | ChConfig.AttrID_MaxHP:npcDataEx.GetMaxHP(),
|
| | | })
|
| | |
|
| | | GameWorld.DebugLog("heroAttrDict: ID:%s,NPCID:%s,%s" % (curNPC.GetID(), curNPC.GetNPCID(), heroAttrDict))
|
| | |
| | | curNPC.ResetNPCBattleState()
|
| | |
|
| | | # 设置属性
|
| | | curNPC.SetMinAtk(heroAttrDict.get(ShareDefine.Def_Effect_Atk, 1))
|
| | | curNPC.SetMaxAtk(heroAttrDict.get(ShareDefine.Def_Effect_Atk, 1))
|
| | | curNPC.SetDef(heroAttrDict.get(ShareDefine.Def_Effect_Def, 1))
|
| | | GameObj.SetMaxHP(curNPC, heroAttrDict.get(ShareDefine.Def_Effect_MaxHP, 1))
|
| | | curNPC.SetMinAtk(heroAttrDict.get(ChConfig.AttrID_Atk, 1))
|
| | | curNPC.SetMaxAtk(heroAttrDict.get(ChConfig.AttrID_Atk, 1))
|
| | | curNPC.SetDef(heroAttrDict.get(ChConfig.AttrID_Def, 1))
|
| | | GameObj.SetMaxHP(curNPC, heroAttrDict.get(ChConfig.AttrID_MaxHP, 1))
|
| | | return
|
| | |
|
| | | ## 刷新NPC属性
|
| | |
| | | import FBCommon
|
| | | import BossHurtMng
|
| | | import PlayerWishingWell
|
| | | import PlayerAttrFruit
|
| | | import PlayerSuccess
|
| | | import PlayerDienstgrad
|
| | | import PlayerFreeGoods
|
| | |
| | |
|
| | | # 投资理财
|
| | | PlayerGoldInvest.OnLogin(curPlayer)
|
| | | |
| | | #属性果实使用情况
|
| | | PlayerAttrFruit.AttrFruitOnLogin(curPlayer)
|
| | |
|
| | | #成就
|
| | | PlayerSuccess.SuccOnLogin(curPlayer)
|
| | |
| | | errCount = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_Captcha_ErrCount)
|
| | |
|
| | | #文件加密
|
| | | captchaMsg = GotoHeaven(captchaMsg, ShareDefine.Def_Effect_PHY)
|
| | | captchaMsg = GotoHeaven(captchaMsg, 3)
|
| | | msgContent = ShareDefine.Def_CaptchaS_SendMsg%(captchaType, errCount, captchaMsg)
|
| | | sendMsg = ShareDefine.Def_AutoCheck_SendMsg%(ShareDefine.Def_AutoCheck_Captcha, msgContent)
|
| | |
|
| | |
| | | CrossPlayerData.ClearCrossSyncDataCache(curPlayer)
|
| | | PyGameData.g_fbBuyBuffTimeDict.pop(playerID, None)
|
| | | #清除地图玩家缓存
|
| | | PyGameData.g_playerFuncAttrDict.pop(playerID, None)
|
| | | PyGameData.g_playerEquipPartAttrDict.pop(playerID, None)
|
| | | PyGameData.g_playerReqEnterFBEx.pop(playerID, None)
|
| | | NPCCommon.ClearPriWoodPile(curPlayer)
|
| | | #移除地图缓存的境界难度玩家ID信息
|
| | |
| | | # @param allAttrList 属性列表
|
| | | # @return None
|
| | | def CalcAttrDict_Type(attrType, value, allAttrList):
|
| | | if value == 0:
|
| | | return
|
| | | |
| | | #[属性索引, 是否基础属性,(非)线性]
|
| | | attrInfo = ChConfig.ItemEffect_AttrDict.get(attrType, [])
|
| | | if attrInfo == []:
|
| | | return
|
| | | |
| | | index = ChConfig.Def_CalcAttrIndexDict[(attrInfo[1], attrInfo[2])]
|
| | | |
| | | attrDict = allAttrList[index]
|
| | | for i in attrInfo[0]:
|
| | | GameWorld.AddDictValue(attrDict, {i:value})
|
| | | return
|
| | |
|
| | | def CalcAttrDict_TypeEx(attrType, value, allAttrDict):
|
| | | ## 统计玩家属性,累加
|
| | | if value == 0:
|
| | | return
|
| | | |
| | | #[属性索引, 是否基础属性,(非)线性]
|
| | | attrInfo = ChConfig.ItemEffect_AttrDict.get(attrType, [])
|
| | | if attrInfo == []:
|
| | | return
|
| | | for i in attrInfo[0]:
|
| | | GameWorld.AddDictValue(allAttrDict, {i:value})
|
| | | return
|
| | |
|
| | | ## 培养境界等级
|
| | |
| | |
|
| | | ## 设置保存功能事先计算好的属性值
|
| | | def SetCalcAttrListValue(curPlayer, funcIndex, allAttrList, insidePerAttrDict=None, customAttrDict=None):
|
| | | # 设置值之前先清空重置
|
| | | # @param customAttrDict: 自定义的属性信息,必须是格式 {"自定义属性描述名key":属性信息, ...} 自定义属性描述名key - 建议不同功能点之间不要重复
|
| | | ClearCalcAttrListValue(curPlayer, funcIndex)
|
| | | if insidePerAttrDict == None:
|
| | | insidePerAttrDict = {}
|
| | | if customAttrDict == None:
|
| | | customAttrDict = {}
|
| | | |
| | | battleAttrDict = allAttrList[ChConfig.CalcAttr_Battle]
|
| | | if ChConfig.TYPE_Calc_PerLVAtk in battleAttrDict:
|
| | | # 每1级加的攻击力不一定满1点,所以这里按万分率来算,支持小数算法
|
| | | addAtk = int(curPlayer.GetLV() * battleAttrDict[ChConfig.TYPE_Calc_PerLVAtk] / float(ShareDefine.Def_MaxRateValue))
|
| | | battleAttrDict[ChConfig.TYPE_Calc_AttrATKMin] = battleAttrDict.get(ChConfig.TYPE_Calc_AttrATKMin, 0) + addAtk
|
| | | battleAttrDict[ChConfig.TYPE_Calc_AttrATKMax] = battleAttrDict.get(ChConfig.TYPE_Calc_AttrATKMax, 0) + addAtk
|
| | | |
| | | if ChConfig.TYPE_Calc_PerLVMaxHP in battleAttrDict:
|
| | | # 每1级加的生命值不会少于1点,所以直接乘
|
| | | addMaxHP = curPlayer.GetLV() * battleAttrDict[ChConfig.TYPE_Calc_PerLVMaxHP]
|
| | | battleAttrDict[ChConfig.TYPE_Calc_AttrMaxHP] = battleAttrDict.get(ChConfig.TYPE_Calc_AttrMaxHP, 0) + addMaxHP
|
| | | |
| | | playerID = curPlayer.GetPlayerID()
|
| | | if playerID not in PyGameData.g_playerFuncAttrDict:
|
| | | PyGameData.g_playerFuncAttrDict[playerID] = {}
|
| | | funcAttrDict = PyGameData.g_playerFuncAttrDict[playerID]
|
| | | funcAttrDict[funcIndex] = [allAttrList, insidePerAttrDict, customAttrDict]
|
| | | #GameWorld.DebugLog("保存功能点属性: funcIndex=%s, %s, %s" % (funcIndex, allAttrList, insidePerAttrDict))
|
| | | return
|
| | |
|
| | | def GetCalcAttrListValue(curPlayer, funcIndex):
|
| | |
| | | attrList = [{} for _ in range(4)]
|
| | | insidePerAttrDict = {}
|
| | | customAttrDict = {}
|
| | | if isinstance(funcIndex, int):
|
| | | funcIndexList = [funcIndex]
|
| | | elif isinstance(funcIndex, list):
|
| | | funcIndexList = funcIndex
|
| | | else:
|
| | | return attrList, insidePerAttrDict, customAttrDict
|
| | | |
| | | playerID = curPlayer.GetPlayerID()
|
| | | if playerID not in PyGameData.g_playerFuncAttrDict:
|
| | | return attrList, insidePerAttrDict, customAttrDict
|
| | | funcAttrDict = PyGameData.g_playerFuncAttrDict[playerID]
|
| | | for funcIndex in funcIndexList:
|
| | | if funcIndex not in funcAttrDict:
|
| | | continue
|
| | | funcAttrList, funcInsidePerAttrDict, funcCustomAttrDict = funcAttrDict[funcIndex]
|
| | | for i, attrDict in enumerate(attrList):
|
| | | curAttrDict = funcAttrList[i]
|
| | | AddAttrDictValue(attrDict, curAttrDict)
|
| | | customAttrDict.update(funcCustomAttrDict)
|
| | | AddAttrDictValue(insidePerAttrDict, funcInsidePerAttrDict)
|
| | | return attrList, insidePerAttrDict, customAttrDict
|
| | |
|
| | | ## 重置缓存
|
| | | def ClearCalcAttrListValue(curPlayer, funcIndex):
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | if playerID not in PyGameData.g_playerFuncAttrDict:
|
| | | return
|
| | | funcAttrDict = PyGameData.g_playerFuncAttrDict[playerID]
|
| | | funcAttrDict.pop(funcIndex, None)
|
| | | return
|
| | |
|
| | | def AddAttrListValue(attrList):
|
| | | addAttrList = [{} for _ in range(4)]
|
| | | for aList in attrList:
|
| | | for i in ChConfig.CalcAttrIndexList:
|
| | | AddAttrDictValue(addAttrList[i], aList[i])
|
| | | return addAttrList
|
| | |
|
| | | ## 属性值字典累加
|
| | | def AddAttrDictValue(dict1, dict2):
|
| | | for key, value in dict2.items():
|
| | | if key not in dict1:
|
| | | dict1[key] = value
|
| | | else:
|
| | | aValue = dict1[key]
|
| | | if key in ChConfig.TYPE_Calc_DeclineList:
|
| | | # 这种算法的属性一般是万分率的,最大不超过百分百,故暂默认万分率, 若有不是万分率的属性再做处理
|
| | | dict1[key] = 10000 - (10000 - aValue) * (10000 - value)
|
| | | else:
|
| | | dict1[key] = aValue + value
|
| | | return
|
| | |
|
| | | def GetLordAttr(curPlayer):
|
| | | ## 获取主公属性汇总
|
| | |
| | | import PlayerControl
|
| | | import ChConfig
|
| | | import OperControlManager
|
| | | import OpenServerCampaign
|
| | | import ItemCommon
|
| | | import ChEquip
|
| | | import ShareDefine
|
| | |
| | | import ItemControler
|
| | | import NetPackCommon
|
| | | import PlayerBillboard
|
| | | import PlayerAttrFruit
|
| | | import GameFuncComm
|
| | | import IpyGameDataPY
|
| | | import CrossPlayerData
|
| | |
| | |
|
| | | def CalcHorseAttrEx(curPlayer):
|
| | | ## 计算马匹属性
|
| | | if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Horse):
|
| | | return
|
| | | |
| | | allAttrList = [{} for _ in range(4)]
|
| | | allAttrListHorseSoul = [{} for _ in range(4)]
|
| | | allAttrListSkin = [{} for _ in range(4)]
|
| | | allAttrListTrain = [{} for _ in range(4)]
|
| | | allAttrListStar = [{} for _ in range(4)]
|
| | | |
| | | customAttrDictHorse = {}
|
| | | customAttrDictSkin = {}
|
| | | |
| | | horseSpeed = 0 # 坐骑功能增加的速度值,骑乘时才有效果
|
| | | horseLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorserLV)
|
| | | # 等阶培养属性
|
| | | #totalItemCount = 0
|
| | | horseBaseAttrInfo = {}
|
| | | ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | | for index in xrange(ipyDataMgr.GetHorseLVUpCount()):
|
| | | horseIpyData = ipyDataMgr.GetHorseLVUpByIndex(index)
|
| | | dataHorseLV = horseIpyData.GetHorseLV()
|
| | | if dataHorseLV > horseLV:
|
| | | break
|
| | | elif dataHorseLV == horseLV:
|
| | | upItemCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorserEatItemCount)
|
| | | else:
|
| | | upItemCount = horseIpyData.GetNeedEatCount()
|
| | | |
| | | # 等阶额外属性
|
| | | lvAttrTypeList = horseIpyData.GetLVAttrType()
|
| | | lvAttrValueList = horseIpyData.GetLVAttrValue()
|
| | | for i, attrID in enumerate(lvAttrTypeList):
|
| | | attrValue = lvAttrValueList[i]
|
| | | if attrID == ShareDefine.Def_Effect_Speed:
|
| | | horseSpeed += attrValue
|
| | | continue
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrList)
|
| | | horseBaseAttrInfo[attrID] = horseBaseAttrInfo.get(attrID, 0) + attrValue
|
| | | |
| | | # 培养丹增加属性
|
| | | upItemPerCount = horseIpyData.GetUpEatItemPerCount()
|
| | | if upItemCount and upItemPerCount:
|
| | | upItemAttrTypeList = horseIpyData.GetUpItemAttrType()
|
| | | upItemAttrValueList = horseIpyData.GetUpItemAttrValue()
|
| | | attrMultiple = upItemCount / upItemPerCount
|
| | | for i, attrID in enumerate(upItemAttrTypeList):
|
| | | attrValue = upItemAttrValueList[i]
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue * attrMultiple, allAttrList)
|
| | | horseBaseAttrInfo[attrID] = horseBaseAttrInfo.get(attrID, 0) + attrValue * attrMultiple
|
| | | |
| | | customAttrDictHorse["horseBaseAttrInfo"] = horseBaseAttrInfo
|
| | | |
| | | # # 等阶培养丹累加个数属性
|
| | | # eatItemAttrInfo = IpyGameDataPY.GetFuncCfg("HorseUpItem", 3)
|
| | | # for attrID, attrValue in eatItemAttrInfo:
|
| | | # PlayerControl.CalcAttrDict_Type(attrID, attrValue * totalItemCount, allAttrList)
|
| | | |
| | | # 幻化属性
|
| | | initFPAdd = 0 #初始战力
|
| | | horseSkinQualityAttrInfo = {}
|
| | | for index in xrange(ipyDataMgr.GetHorseSkinPlusCount()):
|
| | | skinPlusIpyData = ipyDataMgr.GetHorseSkinPlusByIndex(index)
|
| | | if not CheckHorseSkinState(curPlayer, skinPlusIpyData):
|
| | | continue
|
| | | initFPAdd += skinPlusIpyData.GetInitFightPower()
|
| | | attrTypeList = skinPlusIpyData.GetAttrType()
|
| | | attrValueList = skinPlusIpyData.GetAttrValue()
|
| | | for i, attrID in enumerate(attrTypeList):
|
| | | attrValue = attrValueList[i]
|
| | | if attrID == ShareDefine.Def_Effect_Speed:
|
| | | horseSpeed += attrValue
|
| | | continue
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrListSkin)
|
| | | |
| | | #觉醒战力
|
| | | skintype = 1
|
| | | horseID = skinPlusIpyData.GetHorseID()
|
| | | skinData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorsePetSkinData % (skintype, horseID))
|
| | | skinIpyData = IpyGameDataPY.GetIpyGameDataNotLog('HorsePetSkin', skintype, horseID, skinData / 100)
|
| | | if skinIpyData:
|
| | | for attrID, attrValue in skinIpyData.GetAttrInfo().items():
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrListSkin)
|
| | | |
| | | hIpyData = IpyGameDataPY.GetIpyGameData("Horse", horseID)
|
| | | if hIpyData:
|
| | | quality = hIpyData.GetQuality()
|
| | | if quality not in horseSkinQualityAttrInfo:
|
| | | horseSkinQualityAttrInfo[quality] = {}
|
| | | qualityAttrDict = horseSkinQualityAttrInfo[quality]
|
| | | for i, attrID in enumerate(attrTypeList):
|
| | | attrValue = attrValueList[i]
|
| | | qualityAttrDict[attrID] = qualityAttrDict.get(attrID, 0) + attrValue
|
| | | |
| | | #星级
|
| | | horseStar = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorserStar % horseID)
|
| | | starIpyData = IpyGameDataPY.GetIpyGameDataNotLog("HorseStarUp", horseID, horseStar)
|
| | | if starIpyData:
|
| | | starAttrType = starIpyData.GetStarAttrType()
|
| | | starAttrValue = starIpyData.GetStarAttrValue()
|
| | | for i, attrID in enumerate(starAttrType):
|
| | | attrValue = starAttrValue[i]
|
| | | if attrID == ShareDefine.Def_Effect_Speed:
|
| | | horseSpeed += attrValue
|
| | | continue
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrListStar)
|
| | | |
| | | customAttrDictSkin["horseSkinQualityAttrInfo"] = horseSkinQualityAttrInfo
|
| | | |
| | | # 新培养属性
|
| | | for index in xrange(ipyDataMgr.GetHorseTrainCount()):
|
| | | trainIpyData = ipyDataMgr.GetHorseTrainByIndex(index)
|
| | | trainType = trainIpyData.GetTrainType()
|
| | | dataTrainLV = trainIpyData.GetTrainLV()
|
| | | trainLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorserTrainLV % trainType)
|
| | | |
| | | if dataTrainLV > trainLV:
|
| | | continue
|
| | | elif dataTrainLV == trainLV:
|
| | | trainItemCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorserTrainItemCount % trainType)
|
| | | else:
|
| | | trainItemCount = trainIpyData.GetEatCntTotal()
|
| | | |
| | | # 等阶额外属性
|
| | | lvAttrTypeList = trainIpyData.GetLVAttrTypeList()
|
| | | lvAttrValueList = trainIpyData.GetLVAttrValueList()
|
| | | for i, attrID in enumerate(lvAttrTypeList):
|
| | | attrValue = lvAttrValueList[i]
|
| | | if attrID == ShareDefine.Def_Effect_Speed:
|
| | | horseSpeed += attrValue
|
| | | continue
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrListTrain)
|
| | | |
| | | # 培养丹增加属性
|
| | | eatCntEverytime = trainIpyData.GetEatCntEverytime()
|
| | | if trainItemCount and eatCntEverytime:
|
| | | eatItemAttrTypeList = trainIpyData.GetEatItemAttrTypeList()
|
| | | eatItemAttrValueList = trainIpyData.GetEatItemAttrValueList()
|
| | | attrMultiple = trainItemCount / eatCntEverytime
|
| | | for i, attrID in enumerate(eatItemAttrTypeList):
|
| | | attrValue = eatItemAttrValueList[i]
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue * attrMultiple, allAttrListTrain)
|
| | | |
| | | PlayerControl.SetMFPExFightPower(curPlayer, ShareDefine.Def_MFPType_Horse, initFPAdd)
|
| | | |
| | | #GameWorld.DebugLog("坐骑功能属性: horseLV=%s,horseSpeed=%s,totalItemCount=%s,initFPAdd=%s" % (horseLV, horseSpeed, totalItemCount, initFPAdd))
|
| | | |
| | | # 先缓存值,骑乘状态时进行附加
|
| | | curPlayer.SetDict(ChConfig.Def_PlayerKey_SpeedHorse, horseSpeed)
|
| | | |
| | | # 果实对坐骑的加成, 魂石果实算附加属性层,单独计算
|
| | | fightPowerEx = PlayerAttrFruit.CalcAttrFruitAddAtrr(curPlayer, allAttrListHorseSoul, ShareDefine.Def_AttrFruitFunc_Horse)
|
| | | PlayerControl.SetMFPExFightPower(curPlayer, ShareDefine.Def_MFPType_HorseSoul, fightPowerEx)
|
| | | |
| | | # 保存计算值
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Horse, allAttrList, customAttrDict=customAttrDictHorse)
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_HorseSoul, allAttrListHorseSoul)
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_HorseSkin, allAttrListSkin, customAttrDict=customAttrDictSkin)
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_HorseTarin, allAttrListTrain)
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_HorseStar, allAttrListStar)
|
| | | return
|
| | | # if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Horse):
|
| | | # return
|
| | | # |
| | | # allAttrList = [{} for _ in range(4)]
|
| | | # allAttrListHorseSoul = [{} for _ in range(4)]
|
| | | # allAttrListSkin = [{} for _ in range(4)]
|
| | | # allAttrListTrain = [{} for _ in range(4)]
|
| | | # allAttrListStar = [{} for _ in range(4)]
|
| | | # |
| | | # customAttrDictHorse = {}
|
| | | # customAttrDictSkin = {}
|
| | | # |
| | | # horseSpeed = 0 # 坐骑功能增加的速度值,骑乘时才有效果
|
| | | # horseLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorserLV)
|
| | | # # 等阶培养属性
|
| | | # #totalItemCount = 0
|
| | | # horseBaseAttrInfo = {}
|
| | | # ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | | # for index in xrange(ipyDataMgr.GetHorseLVUpCount()):
|
| | | # horseIpyData = ipyDataMgr.GetHorseLVUpByIndex(index)
|
| | | # dataHorseLV = horseIpyData.GetHorseLV()
|
| | | # if dataHorseLV > horseLV:
|
| | | # break
|
| | | # elif dataHorseLV == horseLV:
|
| | | # upItemCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorserEatItemCount)
|
| | | # else:
|
| | | # upItemCount = horseIpyData.GetNeedEatCount()
|
| | | # |
| | | # # 等阶额外属性
|
| | | # lvAttrTypeList = horseIpyData.GetLVAttrType()
|
| | | # lvAttrValueList = horseIpyData.GetLVAttrValue()
|
| | | # for i, attrID in enumerate(lvAttrTypeList):
|
| | | # attrValue = lvAttrValueList[i]
|
| | | # if attrID == ShareDefine.Def_Effect_Speed:
|
| | | # horseSpeed += attrValue
|
| | | # continue
|
| | | # PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrList)
|
| | | # horseBaseAttrInfo[attrID] = horseBaseAttrInfo.get(attrID, 0) + attrValue
|
| | | # |
| | | # # 培养丹增加属性
|
| | | # upItemPerCount = horseIpyData.GetUpEatItemPerCount()
|
| | | # if upItemCount and upItemPerCount:
|
| | | # upItemAttrTypeList = horseIpyData.GetUpItemAttrType()
|
| | | # upItemAttrValueList = horseIpyData.GetUpItemAttrValue()
|
| | | # attrMultiple = upItemCount / upItemPerCount
|
| | | # for i, attrID in enumerate(upItemAttrTypeList):
|
| | | # attrValue = upItemAttrValueList[i]
|
| | | # PlayerControl.CalcAttrDict_Type(attrID, attrValue * attrMultiple, allAttrList)
|
| | | # horseBaseAttrInfo[attrID] = horseBaseAttrInfo.get(attrID, 0) + attrValue * attrMultiple
|
| | | # |
| | | # customAttrDictHorse["horseBaseAttrInfo"] = horseBaseAttrInfo
|
| | | # |
| | | ## # 等阶培养丹累加个数属性
|
| | | ## eatItemAttrInfo = IpyGameDataPY.GetFuncCfg("HorseUpItem", 3)
|
| | | ## for attrID, attrValue in eatItemAttrInfo:
|
| | | ## PlayerControl.CalcAttrDict_Type(attrID, attrValue * totalItemCount, allAttrList)
|
| | | # |
| | | # # 幻化属性
|
| | | # initFPAdd = 0 #初始战力
|
| | | # horseSkinQualityAttrInfo = {}
|
| | | # for index in xrange(ipyDataMgr.GetHorseSkinPlusCount()):
|
| | | # skinPlusIpyData = ipyDataMgr.GetHorseSkinPlusByIndex(index)
|
| | | # if not CheckHorseSkinState(curPlayer, skinPlusIpyData):
|
| | | # continue
|
| | | # initFPAdd += skinPlusIpyData.GetInitFightPower()
|
| | | # attrTypeList = skinPlusIpyData.GetAttrType()
|
| | | # attrValueList = skinPlusIpyData.GetAttrValue()
|
| | | # for i, attrID in enumerate(attrTypeList):
|
| | | # attrValue = attrValueList[i]
|
| | | # if attrID == ShareDefine.Def_Effect_Speed:
|
| | | # horseSpeed += attrValue
|
| | | # continue
|
| | | # PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrListSkin)
|
| | | # |
| | | # #觉醒战力
|
| | | # skintype = 1
|
| | | # horseID = skinPlusIpyData.GetHorseID()
|
| | | # skinData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorsePetSkinData % (skintype, horseID))
|
| | | # skinIpyData = IpyGameDataPY.GetIpyGameDataNotLog('HorsePetSkin', skintype, horseID, skinData / 100)
|
| | | # if skinIpyData:
|
| | | # for attrID, attrValue in skinIpyData.GetAttrInfo().items():
|
| | | # PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrListSkin)
|
| | | # |
| | | # hIpyData = IpyGameDataPY.GetIpyGameData("Horse", horseID)
|
| | | # if hIpyData:
|
| | | # quality = hIpyData.GetQuality()
|
| | | # if quality not in horseSkinQualityAttrInfo:
|
| | | # horseSkinQualityAttrInfo[quality] = {}
|
| | | # qualityAttrDict = horseSkinQualityAttrInfo[quality]
|
| | | # for i, attrID in enumerate(attrTypeList):
|
| | | # attrValue = attrValueList[i]
|
| | | # qualityAttrDict[attrID] = qualityAttrDict.get(attrID, 0) + attrValue
|
| | | # |
| | | # #星级
|
| | | # horseStar = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorserStar % horseID)
|
| | | # starIpyData = IpyGameDataPY.GetIpyGameDataNotLog("HorseStarUp", horseID, horseStar)
|
| | | # if starIpyData:
|
| | | # starAttrType = starIpyData.GetStarAttrType()
|
| | | # starAttrValue = starIpyData.GetStarAttrValue()
|
| | | # for i, attrID in enumerate(starAttrType):
|
| | | # attrValue = starAttrValue[i]
|
| | | # if attrID == ShareDefine.Def_Effect_Speed:
|
| | | # horseSpeed += attrValue
|
| | | # continue
|
| | | # PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrListStar)
|
| | | # |
| | | # customAttrDictSkin["horseSkinQualityAttrInfo"] = horseSkinQualityAttrInfo
|
| | | # |
| | | # # 新培养属性
|
| | | # for index in xrange(ipyDataMgr.GetHorseTrainCount()):
|
| | | # trainIpyData = ipyDataMgr.GetHorseTrainByIndex(index)
|
| | | # trainType = trainIpyData.GetTrainType()
|
| | | # dataTrainLV = trainIpyData.GetTrainLV()
|
| | | # trainLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorserTrainLV % trainType)
|
| | | # |
| | | # if dataTrainLV > trainLV:
|
| | | # continue
|
| | | # elif dataTrainLV == trainLV:
|
| | | # trainItemCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorserTrainItemCount % trainType)
|
| | | # else:
|
| | | # trainItemCount = trainIpyData.GetEatCntTotal()
|
| | | # |
| | | # # 等阶额外属性
|
| | | # lvAttrTypeList = trainIpyData.GetLVAttrTypeList()
|
| | | # lvAttrValueList = trainIpyData.GetLVAttrValueList()
|
| | | # for i, attrID in enumerate(lvAttrTypeList):
|
| | | # attrValue = lvAttrValueList[i]
|
| | | # if attrID == ShareDefine.Def_Effect_Speed:
|
| | | # horseSpeed += attrValue
|
| | | # continue
|
| | | # PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrListTrain)
|
| | | # |
| | | # # 培养丹增加属性
|
| | | # eatCntEverytime = trainIpyData.GetEatCntEverytime()
|
| | | # if trainItemCount and eatCntEverytime:
|
| | | # eatItemAttrTypeList = trainIpyData.GetEatItemAttrTypeList()
|
| | | # eatItemAttrValueList = trainIpyData.GetEatItemAttrValueList()
|
| | | # attrMultiple = trainItemCount / eatCntEverytime
|
| | | # for i, attrID in enumerate(eatItemAttrTypeList):
|
| | | # attrValue = eatItemAttrValueList[i]
|
| | | # PlayerControl.CalcAttrDict_Type(attrID, attrValue * attrMultiple, allAttrListTrain)
|
| | | # |
| | | # PlayerControl.SetMFPExFightPower(curPlayer, ShareDefine.Def_MFPType_Horse, initFPAdd)
|
| | | # |
| | | # #GameWorld.DebugLog("坐骑功能属性: horseLV=%s,horseSpeed=%s,totalItemCount=%s,initFPAdd=%s" % (horseLV, horseSpeed, totalItemCount, initFPAdd))
|
| | | # |
| | | # # 先缓存值,骑乘状态时进行附加
|
| | | # curPlayer.SetDict(ChConfig.Def_PlayerKey_SpeedHorse, horseSpeed)
|
| | | # |
| | | # # 果实对坐骑的加成, 魂石果实算附加属性层,单独计算
|
| | | # fightPowerEx = PlayerAttrFruit.CalcAttrFruitAddAtrr(curPlayer, allAttrListHorseSoul, ShareDefine.Def_AttrFruitFunc_Horse)
|
| | | # PlayerControl.SetMFPExFightPower(curPlayer, ShareDefine.Def_MFPType_HorseSoul, fightPowerEx)
|
| | | # |
| | | # # 保存计算值
|
| | | # PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Horse, allAttrList, customAttrDict=customAttrDictHorse)
|
| | | # PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_HorseSoul, allAttrListHorseSoul)
|
| | | # PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_HorseSkin, allAttrListSkin, customAttrDict=customAttrDictSkin)
|
| | | # PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_HorseTarin, allAttrListTrain)
|
| | | # PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_HorseStar, allAttrListStar)
|
| | | # return
|
| | |
|
| | | def GetHorseSkinActCount(curPlayer):
|
| | | horseSkinActCount = 0
|
| | |
| | | self.heroBatAttrDict = {} # 武将的最终战斗属性字典, {attrID:value, ...}
|
| | | self.heroSkillIDList = [] # 武将拥有的技能ID列表 [skillID, ...]
|
| | | self.fightPower = 0 # 武将最终战力
|
| | | self.skillFightPower = 0 # 技能战力
|
| | | return
|
| | |
|
| | | class Lineup():
|
| | |
| | | else:
|
| | | attrValue = FormulaControl.Eval("otherAttrFormula", otherAttrFormula, attrParamDict)
|
| | | #GameWorld.DebugLog(" attrID=%s,attrValue=%s,attrParamDict=%s" % (attrID, attrValue, attrParamDict))
|
| | | lineupHero.heroBatAttrDict[attrID] = attrValue
|
| | |
|
| | | attrIpyData = IpyGameDataPY.GetIpyGameData("PlayerAttr", attrID)
|
| | | attrName = attrIpyData.GetParameter() if attrIpyData else "%s" % attrID
|
| | | fightPowerParamDict[attrName] = attrValue
|
| | | if attrValue:
|
| | | lineupHero.heroBatAttrDict[attrID] = attrValue
|
| | | logAttrDict["%s-%s" % (attrID, attrName)] = attrValue
|
| | |
|
| | | # 计算战力
|
| | | fightPower = FormulaControl.Eval("fightPowerFormula", fightPowerFormula, fightPowerParamDict)
|
| | | skillFightPower = 0
|
| | | |
| | | GameWorld.DebugLog(" fightPower=%s,heroSkillIDList=%s" % (fightPower, lineupHero.heroSkillIDList))
|
| | | skillTypeIDDict = {}
|
| | | for skillID in lineupHero.heroSkillIDList:
|
| | | skillData = GameWorld.GetGameData().GetSkillBySkillID(skillID)
|
| | | if not skillData:
|
| | | continue
|
| | | skillTypeID = skillData.GetSkillTypeID()
|
| | | if skillTypeID not in skillTypeIDDict:
|
| | | skillTypeIDDict[skillTypeID] = skillData
|
| | | else:
|
| | | befSkillData = skillTypeIDDict[skillTypeID]
|
| | | befSkillID = befSkillData.GetSkillID()
|
| | | if befSkillID >= skillID:
|
| | | continue
|
| | | skillTypeIDDict[skillTypeID] = skillData
|
| | | |
| | | skillFightPower = 0
|
| | | lineupHero.heroSkillIDList = []
|
| | | for skillData in skillTypeIDDict.values():
|
| | | skillID = skillData.GetSkillID()
|
| | | lineupHero.heroSkillIDList.append(skillID)
|
| | | skillFightPower += skillData.GetFightPower()
|
| | | GameWorld.DebugLog(" skillFightPower=%s,heroSkillIDList=%s" % (skillFightPower, lineupHero.heroSkillIDList))
|
| | | |
| | | # 最终战力
|
| | | fightPowerTotal = fightPower + skillFightPower
|
| | | lineupHero.skillFightPower = skillFightPower
|
| | | lineupHero.fightPower = fightPowerTotal
|
| | | lineupFightPower += fightPowerTotal
|
| | |
|
| | |
| | | import PetControl
|
| | | import GameWorld
|
| | | import IpyGameDataPY
|
| | | import PlayerAttrFruit
|
| | | import GameMap
|
| | | import OpenServerCampaign
|
| | | import PlayerMagicWeapon
|
| | | import PlayerWeekParty
|
| | | import CalcNoLineEffect
|
| | | import PassiveBuffEffMng
|
| | |
| | | # @param curPlayer 玩家
|
| | | # @return None
|
| | | def CalcPetItemAddPlayerAttr(curPlayer):
|
| | | allAttrListPet = [{} for _ in range(4)]
|
| | | allAttrListPetSign = [{} for _ in range(4)] # 属性含 特殊的技能属性(因为签到技能属性成长,战力也是成长的,所以不能放技能中算战力,暂时放魂石中)
|
| | | allAttrListPetSoul = [{} for _ in range(4)]
|
| | | skillAttrList = [{} for _ in range(4)]
|
| | | allAttrListPetSkin = [{} for _ in range(4)]
|
| | | allAttrListTrain = [{} for _ in range(4)]
|
| | | allAttrListStar = [{} for _ in range(4)]
|
| | | customAttrDictPet = {}
|
| | | totalMinAtk, totalMaxAtk, qualityAttrInfo = GetPetAtkValue(curPlayer)
|
| | | customAttrDictPet["petQualityAttrInfo"] = qualityAttrInfo
|
| | | PlayerControl.CalcAttrDict_Type(ShareDefine.Def_Effect_PetMinAtk, totalMinAtk, allAttrListPet)
|
| | | PlayerControl.CalcAttrDict_Type(ShareDefine.Def_Effect_PetMaxAtk, totalMaxAtk, allAttrListPet)
|
| | | totalSignNum = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalSignNum) # 总签到天数
|
| | | # 果实给人物加属性, 魂石果实算附加属性层,单独计算
|
| | | fightPowerEx = PlayerAttrFruit.CalcAttrFruitAddAtrr(curPlayer, allAttrListPetSoul, ShareDefine.Def_AttrFruitFunc_Pet)
|
| | | PlayerControl.SetMFPExFightPower(curPlayer, ShareDefine.Def_MFPType_PetSoul, fightPowerEx)
|
| | | |
| | | #灵兽技能给人物加的属性
|
| | | learnSkillList, passiveSkillList = GetPetLearnSkill(curPlayer)
|
| | | #GameWorld.DebugLog("1刷技能属性: %s" % allAttrList)
|
| | | for skillID in passiveSkillList:
|
| | | curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
|
| | | if not curSkill:
|
| | | continue
|
| | | # 灵宠签到技能特殊处理
|
| | | if curSkill.GetSkillTypeID() == ChConfig.Def_SkillID_PetSignDay:
|
| | | for effectIndex in xrange(curSkill.GetEffectCount()):
|
| | | curEffect = curSkill.GetEffect(effectIndex)
|
| | | effID = curEffect.GetEffectID()
|
| | | effValue = curEffect.GetEffectValue(0)
|
| | | PlayerControl.CalcAttrDict_Type(effID, effValue * totalSignNum, allAttrListPetSign)
|
| | | |
| | | continue
|
| | | for effectIndex in xrange(curSkill.GetEffectCount()):
|
| | | curEffect = curSkill.GetEffect(effectIndex)
|
| | | if curEffect.GetEffectID() in ChConfig.Def_SkillEffs_Pet:
|
| | | # 给宠物加的不处理
|
| | | continue
|
| | | SkillShell.CalcBuffEffAttr(curPlayer, curEffect, skillAttrList)
|
| | | |
| | | # 新培养属性
|
| | | ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | | for index in xrange(ipyDataMgr.GetPetTrainCount()):
|
| | | trainIpyData = ipyDataMgr.GetPetTrainByIndex(index)
|
| | | trainType = trainIpyData.GetTrainType()
|
| | | dataTrainLV = trainIpyData.GetTrainLV()
|
| | | trainLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_PetTrainLV % trainType)
|
| | | |
| | | if dataTrainLV > trainLV:
|
| | | continue
|
| | | elif dataTrainLV == trainLV:
|
| | | trainItemCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_PetTrainItemCount % trainType)
|
| | | else:
|
| | | trainItemCount = trainIpyData.GetEatCntTotal()
|
| | | |
| | | # 等阶额外属性
|
| | | lvAttrTypeList = trainIpyData.GetLVAttrTypeList()
|
| | | lvAttrValueList = trainIpyData.GetLVAttrValueList()
|
| | | for i, attrID in enumerate(lvAttrTypeList):
|
| | | attrValue = lvAttrValueList[i]
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrListTrain)
|
| | | |
| | | # 培养丹增加属性
|
| | | eatCntEverytime = trainIpyData.GetEatCntEverytime()
|
| | | if trainItemCount and eatCntEverytime:
|
| | | eatItemAttrTypeList = trainIpyData.GetEatItemAttrTypeList()
|
| | | eatItemAttrValueList = trainIpyData.GetEatItemAttrValueList()
|
| | | attrMultiple = trainItemCount / eatCntEverytime
|
| | | for i, attrID in enumerate(eatItemAttrTypeList):
|
| | | attrValue = eatItemAttrValueList[i]
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue * attrMultiple, allAttrListTrain)
|
| | | |
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_PetTarin, allAttrListTrain)
|
| | | |
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Pet, allAttrListPet, customAttrDict=customAttrDictPet)
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_PetSoul, allAttrListPetSoul)
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_PetSign, allAttrListPetSign)
|
| | | |
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_PetSkill, skillAttrList)
|
| | | |
| | | #初始战力
|
| | | fpExTotal = 0
|
| | | petPackIndex = ShareDefine.rptPet
|
| | | petPack = curPlayer.GetItemManager().GetPack(petPackIndex)
|
| | | for i in range(petPack.GetCount()):
|
| | | petItem = petPack.GetAt(i)
|
| | | if petItem.IsEmpty():
|
| | | continue
|
| | | # 物品上的技能战力,主人上的另算
|
| | | for i in range(petItem.GetUserAttrCount(ShareDefine.Def_IudetPet_Skill)):
|
| | | skillID = petItem.GetUserAttrByIndex(ShareDefine.Def_IudetPet_Skill, i)
|
| | | curSkilData = GameWorld.GetGameData().GetSkillBySkillID(skillID)
|
| | | if not curSkilData:
|
| | | continue
|
| | | fpExTotal += curSkilData.GetFightPower()
|
| | | petItemNPCID = petItem.GetUserAttr(ShareDefine.Def_IudetPet_NPCID)
|
| | | petIpyData = GetPetIpydata(petItemNPCID)
|
| | | if not petIpyData:
|
| | | continue
|
| | | fpExTotal += petIpyData.GetInitFightPower() # 初始战力
|
| | | #觉醒战力
|
| | | skinData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorsePetSkinData % (2, petItemNPCID), 0)
|
| | | skinIpyData = IpyGameDataPY.GetIpyGameDataNotLog('HorsePetSkin', 2, petItemNPCID, skinData/100)
|
| | | if skinIpyData:
|
| | | for attrID, attrValue in skinIpyData.GetAttrInfo().items():
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrListPetSkin)
|
| | | |
| | | #星级
|
| | | curStar = petItem.GetUserAttr(ShareDefine.Def_IudetPet_Star)
|
| | | starIpyData = IpyGameDataPY.GetIpyGameDataNotLog("PetStarUp", petItemNPCID, curStar)
|
| | | if starIpyData:
|
| | | starAttrType = starIpyData.GetStarAttrType()
|
| | | starAttrValue = starIpyData.GetStarAttrValue()
|
| | | for i, attrID in enumerate(starAttrType):
|
| | | attrValue = starAttrValue[i]
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrListStar)
|
| | | |
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_PetSkin, allAttrListPetSkin)
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_PetStar, allAttrListStar)
|
| | | PlayerControl.SetMFPExFightPower(curPlayer, ShareDefine.Def_MFPType_Pet, fpExTotal)
|
| | | # GameWorld.DebugLog("宠物榜NPCID: %s, petDict=%s" % (billPetNPCID, str(billPetDict)))
|
| | | return
|
| | | # allAttrListPet = [{} for _ in range(4)]
|
| | | # allAttrListPetSign = [{} for _ in range(4)] # 属性含 特殊的技能属性(因为签到技能属性成长,战力也是成长的,所以不能放技能中算战力,暂时放魂石中)
|
| | | # allAttrListPetSoul = [{} for _ in range(4)]
|
| | | # skillAttrList = [{} for _ in range(4)]
|
| | | # allAttrListPetSkin = [{} for _ in range(4)]
|
| | | # allAttrListTrain = [{} for _ in range(4)]
|
| | | # allAttrListStar = [{} for _ in range(4)]
|
| | | # customAttrDictPet = {}
|
| | | # totalMinAtk, totalMaxAtk, qualityAttrInfo = GetPetAtkValue(curPlayer)
|
| | | # customAttrDictPet["petQualityAttrInfo"] = qualityAttrInfo
|
| | | # PlayerControl.CalcAttrDict_Type(ShareDefine.Def_Effect_PetMinAtk, totalMinAtk, allAttrListPet)
|
| | | # PlayerControl.CalcAttrDict_Type(ShareDefine.Def_Effect_PetMaxAtk, totalMaxAtk, allAttrListPet)
|
| | | # totalSignNum = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalSignNum) # 总签到天数
|
| | | # # 果实给人物加属性, 魂石果实算附加属性层,单独计算
|
| | | # fightPowerEx = PlayerAttrFruit.CalcAttrFruitAddAtrr(curPlayer, allAttrListPetSoul, ShareDefine.Def_AttrFruitFunc_Pet)
|
| | | # PlayerControl.SetMFPExFightPower(curPlayer, ShareDefine.Def_MFPType_PetSoul, fightPowerEx)
|
| | | # |
| | | # #灵兽技能给人物加的属性
|
| | | # learnSkillList, passiveSkillList = GetPetLearnSkill(curPlayer)
|
| | | # #GameWorld.DebugLog("1刷技能属性: %s" % allAttrList)
|
| | | # for skillID in passiveSkillList:
|
| | | # curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
|
| | | # if not curSkill:
|
| | | # continue
|
| | | # # 灵宠签到技能特殊处理
|
| | | # if curSkill.GetSkillTypeID() == ChConfig.Def_SkillID_PetSignDay:
|
| | | # for effectIndex in xrange(curSkill.GetEffectCount()):
|
| | | # curEffect = curSkill.GetEffect(effectIndex)
|
| | | # effID = curEffect.GetEffectID()
|
| | | # effValue = curEffect.GetEffectValue(0)
|
| | | # PlayerControl.CalcAttrDict_Type(effID, effValue * totalSignNum, allAttrListPetSign)
|
| | | # |
| | | # continue
|
| | | # for effectIndex in xrange(curSkill.GetEffectCount()):
|
| | | # curEffect = curSkill.GetEffect(effectIndex)
|
| | | # if curEffect.GetEffectID() in ChConfig.Def_SkillEffs_Pet:
|
| | | # # 给宠物加的不处理
|
| | | # continue
|
| | | # SkillShell.CalcBuffEffAttr(curPlayer, curEffect, skillAttrList)
|
| | | # |
| | | # # 新培养属性
|
| | | # ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | | # for index in xrange(ipyDataMgr.GetPetTrainCount()):
|
| | | # trainIpyData = ipyDataMgr.GetPetTrainByIndex(index)
|
| | | # trainType = trainIpyData.GetTrainType()
|
| | | # dataTrainLV = trainIpyData.GetTrainLV()
|
| | | # trainLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_PetTrainLV % trainType)
|
| | | # |
| | | # if dataTrainLV > trainLV:
|
| | | # continue
|
| | | # elif dataTrainLV == trainLV:
|
| | | # trainItemCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_PetTrainItemCount % trainType)
|
| | | # else:
|
| | | # trainItemCount = trainIpyData.GetEatCntTotal()
|
| | | # |
| | | # # 等阶额外属性
|
| | | # lvAttrTypeList = trainIpyData.GetLVAttrTypeList()
|
| | | # lvAttrValueList = trainIpyData.GetLVAttrValueList()
|
| | | # for i, attrID in enumerate(lvAttrTypeList):
|
| | | # attrValue = lvAttrValueList[i]
|
| | | # PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrListTrain)
|
| | | # |
| | | # # 培养丹增加属性
|
| | | # eatCntEverytime = trainIpyData.GetEatCntEverytime()
|
| | | # if trainItemCount and eatCntEverytime:
|
| | | # eatItemAttrTypeList = trainIpyData.GetEatItemAttrTypeList()
|
| | | # eatItemAttrValueList = trainIpyData.GetEatItemAttrValueList()
|
| | | # attrMultiple = trainItemCount / eatCntEverytime
|
| | | # for i, attrID in enumerate(eatItemAttrTypeList):
|
| | | # attrValue = eatItemAttrValueList[i]
|
| | | # PlayerControl.CalcAttrDict_Type(attrID, attrValue * attrMultiple, allAttrListTrain)
|
| | | # |
| | | # PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_PetTarin, allAttrListTrain)
|
| | | # |
| | | # PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Pet, allAttrListPet, customAttrDict=customAttrDictPet)
|
| | | # PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_PetSoul, allAttrListPetSoul)
|
| | | # PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_PetSign, allAttrListPetSign)
|
| | | # |
| | | # PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_PetSkill, skillAttrList)
|
| | | # |
| | | # #初始战力
|
| | | # fpExTotal = 0
|
| | | # petPackIndex = ShareDefine.rptPet
|
| | | # petPack = curPlayer.GetItemManager().GetPack(petPackIndex)
|
| | | # for i in range(petPack.GetCount()):
|
| | | # petItem = petPack.GetAt(i)
|
| | | # if petItem.IsEmpty():
|
| | | # continue
|
| | | # # 物品上的技能战力,主人上的另算
|
| | | # for i in range(petItem.GetUserAttrCount(ShareDefine.Def_IudetPet_Skill)):
|
| | | # skillID = petItem.GetUserAttrByIndex(ShareDefine.Def_IudetPet_Skill, i)
|
| | | # curSkilData = GameWorld.GetGameData().GetSkillBySkillID(skillID)
|
| | | # if not curSkilData:
|
| | | # continue
|
| | | # fpExTotal += curSkilData.GetFightPower()
|
| | | # petItemNPCID = petItem.GetUserAttr(ShareDefine.Def_IudetPet_NPCID)
|
| | | # petIpyData = GetPetIpydata(petItemNPCID)
|
| | | # if not petIpyData:
|
| | | # continue
|
| | | # fpExTotal += petIpyData.GetInitFightPower() # 初始战力
|
| | | # #觉醒战力
|
| | | # skinData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorsePetSkinData % (2, petItemNPCID), 0)
|
| | | # skinIpyData = IpyGameDataPY.GetIpyGameDataNotLog('HorsePetSkin', 2, petItemNPCID, skinData/100)
|
| | | # if skinIpyData:
|
| | | # for attrID, attrValue in skinIpyData.GetAttrInfo().items():
|
| | | # PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrListPetSkin)
|
| | | # |
| | | # #星级
|
| | | # curStar = petItem.GetUserAttr(ShareDefine.Def_IudetPet_Star)
|
| | | # starIpyData = IpyGameDataPY.GetIpyGameDataNotLog("PetStarUp", petItemNPCID, curStar)
|
| | | # if starIpyData:
|
| | | # starAttrType = starIpyData.GetStarAttrType()
|
| | | # starAttrValue = starIpyData.GetStarAttrValue()
|
| | | # for i, attrID in enumerate(starAttrType):
|
| | | # attrValue = starAttrValue[i]
|
| | | # PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrListStar)
|
| | | # |
| | | # PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_PetSkin, allAttrListPetSkin)
|
| | | # PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_PetStar, allAttrListStar)
|
| | | # PlayerControl.SetMFPExFightPower(curPlayer, ShareDefine.Def_MFPType_Pet, fpExTotal)
|
| | | ## GameWorld.DebugLog("宠物榜NPCID: %s, petDict=%s" % (billPetNPCID, str(billPetDict)))
|
| | | # return
|
| | |
|
| | | ## 获取灵兽出战时的攻击力
|
| | | def GetPetAtkValue(curPlayer):
|
| | | qualityAttrInfo = {}
|
| | | if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Pet):
|
| | | #GameWorld.DebugLog(' 宠物功能未开启')
|
| | | return 0, 0, qualityAttrInfo
|
| | | |
| | | classAddAtk = 0
|
| | | petPackIndex = ShareDefine.rptPet
|
| | | petPack = curPlayer.GetItemManager().GetPack(petPackIndex)
|
| | | for i in range(petPack.GetCount()):
|
| | | packItem = petPack.GetAt(i)
|
| | | if packItem.IsEmpty():
|
| | | continue
|
| | | petItemNPCID = packItem.GetUserAttr(ShareDefine.Def_IudetPet_NPCID)
|
| | | classlv = packItem.GetUserAttr(ShareDefine.Def_IudetPet_ClassLV)
|
| | | classIpyData = IpyGameDataPY.GetIpyGameData("PetClassCost", petItemNPCID, classlv + 1)
|
| | | atkAdd = classIpyData.GetAtkAdd() if classIpyData else 0
|
| | | classAddAtk += atkAdd
|
| | | |
| | | petIpyData = GetPetIpydata(petItemNPCID)
|
| | | if petIpyData:
|
| | | quality = petIpyData.GetQuality()
|
| | | if quality not in qualityAttrInfo:
|
| | | qualityAttrInfo[quality] = {}
|
| | | qualityAttrDict = qualityAttrInfo[quality]
|
| | | qualityAttrDict[ShareDefine.Def_Effect_PetAtk] = qualityAttrDict.get(ShareDefine.Def_Effect_PetAtk, 0) + atkAdd
|
| | | |
| | | totalMinAtk = classAddAtk
|
| | | totalMaxAtk = classAddAtk
|
| | | return totalMinAtk, totalMaxAtk, qualityAttrInfo
|
| | | # if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Pet):
|
| | | # #GameWorld.DebugLog(' 宠物功能未开启')
|
| | | # return 0, 0, qualityAttrInfo
|
| | | # |
| | | # classAddAtk = 0
|
| | | # petPackIndex = ShareDefine.rptPet
|
| | | # petPack = curPlayer.GetItemManager().GetPack(petPackIndex)
|
| | | # for i in range(petPack.GetCount()):
|
| | | # packItem = petPack.GetAt(i)
|
| | | # if packItem.IsEmpty():
|
| | | # continue
|
| | | # petItemNPCID = packItem.GetUserAttr(ShareDefine.Def_IudetPet_NPCID)
|
| | | # classlv = packItem.GetUserAttr(ShareDefine.Def_IudetPet_ClassLV)
|
| | | # classIpyData = IpyGameDataPY.GetIpyGameData("PetClassCost", petItemNPCID, classlv + 1)
|
| | | # atkAdd = classIpyData.GetAtkAdd() if classIpyData else 0
|
| | | # classAddAtk += atkAdd
|
| | | # |
| | | # petIpyData = GetPetIpydata(petItemNPCID)
|
| | | # if petIpyData:
|
| | | # quality = petIpyData.GetQuality()
|
| | | # if quality not in qualityAttrInfo:
|
| | | # qualityAttrInfo[quality] = {}
|
| | | # qualityAttrDict = qualityAttrInfo[quality]
|
| | | # qualityAttrDict[ShareDefine.Def_Effect_PetAtk] = qualityAttrDict.get(ShareDefine.Def_Effect_PetAtk, 0) + atkAdd
|
| | | # |
| | | # totalMinAtk = classAddAtk
|
| | | # totalMaxAtk = classAddAtk
|
| | | # return totalMinAtk, totalMaxAtk, qualityAttrInfo
|
| | |
|
| | | def OnPlayerPetLogin(curPlayer):
|
| | | ## 登录处理
|
| | |
| | | import ShareDefine
|
| | | import ItemCommon
|
| | | import PlayerSuccess
|
| | | import PlayerAttrFruit
|
| | | import IpyGameDataPY
|
| | | import PlayerActivity
|
| | | import PlayerFairyCeremony
|
| | | import PlayerNewFairyCeremony
|
| | | import PlayerActGarbageSorting
|
| | |
| | |
|
| | | def CalcStoveAttr(curPlayer):
|
| | | # 果实加成
|
| | | allAttrYaoList = [{} for _ in range(4)]
|
| | | fightPowerEx = PlayerAttrFruit.CalcAttrFruitAddAtrr(curPlayer, allAttrYaoList, ShareDefine.Def_AttrFruitFunc_Stove)
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_StoveYao, allAttrYaoList)
|
| | | PlayerControl.SetMFPExFightPower(curPlayer, ShareDefine.Def_MFPType_StoveYao, fightPowerEx)
|
| | | # allAttrYaoList = [{} for _ in range(4)]
|
| | | # fightPowerEx = PlayerAttrFruit.CalcAttrFruitAddAtrr(curPlayer, allAttrYaoList, ShareDefine.Def_AttrFruitFunc_Stove)
|
| | | # PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_StoveYao, allAttrYaoList)
|
| | | # PlayerControl.SetMFPExFightPower(curPlayer, ShareDefine.Def_MFPType_StoveYao, fightPowerEx)
|
| | | return
|
| | |
|
| | |
|
| | |
| | | # tagHead Head;
|
| | | #};
|
| | | def PlayerPrayElixir(index, clientPack, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | prayCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AlchemyPrayCnt)
|
| | | limitCnt = PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_PrayElixir)
|
| | | if prayCnt >= limitCnt:
|
| | | GameWorld.DebugLog('今日祈福丹药次数已满!prayCnt=%s' % prayCnt)
|
| | | return
|
| | | packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem, 1)
|
| | | if not packSpace:
|
| | | PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371")
|
| | | return
|
| | |
|
| | | alchemyItemList = IpyGameDataPY.GetFuncEvalCfg('GodAlchemy')
|
| | |
|
| | | newItemInfoList = []
|
| | | for itemInfo in alchemyItemList:
|
| | | itemID = itemInfo[1]
|
| | | # if not GetIsCanOutByAlchemyLV(curPlayer, itemID):
|
| | | # #GameWorld.DebugLog('祈福丹药,炼丹等级未达到,移除产出库!itemID=%s'%itemID)
|
| | | # curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | # prayCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AlchemyPrayCnt)
|
| | | # limitCnt = PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_PrayElixir)
|
| | | # if prayCnt >= limitCnt:
|
| | | # GameWorld.DebugLog('今日祈福丹药次数已满!prayCnt=%s' % prayCnt)
|
| | | # return
|
| | | # packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem, 1)
|
| | | # if not packSpace:
|
| | | # PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371")
|
| | | # return
|
| | | #
|
| | | # alchemyItemList = IpyGameDataPY.GetFuncEvalCfg('GodAlchemy')
|
| | | #
|
| | | # newItemInfoList = []
|
| | | # for itemInfo in alchemyItemList:
|
| | | # itemID = itemInfo[1]
|
| | | ## if not GetIsCanOutByAlchemyLV(curPlayer, itemID):
|
| | | ## #GameWorld.DebugLog('祈福丹药,炼丹等级未达到,移除产出库!itemID=%s'%itemID)
|
| | | ## continue
|
| | | # if PlayerAttrFruit.IsFruitEatFull(curPlayer, itemID):
|
| | | # #GameWorld.DebugLog('祈福丹药,使用次数已满,移除产出库!itemID=%s'%itemID)
|
| | | # continue
|
| | | if PlayerAttrFruit.IsFruitEatFull(curPlayer, itemID):
|
| | | #GameWorld.DebugLog('祈福丹药,使用次数已满,移除产出库!itemID=%s'%itemID)
|
| | | continue
|
| | | newItemInfoList.append(itemInfo)
|
| | | if not newItemInfoList:
|
| | | GameWorld.DebugLog('祈福丹药,没有丹药可产出!!')
|
| | | return
|
| | |
|
| | | makeItemInfo = GameWorld.GetResultByWeightList(newItemInfoList)
|
| | | if not makeItemInfo:
|
| | | GameWorld.DebugLog("祈福丹药, 结果错误!")
|
| | | return
|
| | |
|
| | | makeItemID, itemCount = makeItemInfo
|
| | | makeItemData = GameWorld.GetGameData().GetItemByTypeID(makeItemID)
|
| | | if not makeItemData:
|
| | | return
|
| | |
|
| | | costMoney = IpyGameDataPY.GetFuncCfg('GodAlchemy', 2)
|
| | | if not PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, costMoney, ChConfig.Def_Cost_AlchemyPray):
|
| | | return
|
| | | #给物品
|
| | | ItemControler.GivePlayerItem(curPlayer, makeItemID, itemCount, 0, [IPY_GameWorld.rptItem],
|
| | | event=[ChConfig.ItemGive_Refine, False, {}])
|
| | | #GameWorld.DebugLog('makeItemID=%s,newItemInfoList=%s'%(makeItemID, newItemInfoList))
|
| | |
|
| | | #紫色及以上全服广播
|
| | | notifyColor = IpyGameDataPY.GetFuncCfg("AlchemyNotify", 1)
|
| | | needNotifyItemIDList = IpyGameDataPY.GetFuncEvalCfg("AlchemyNotify", 2)
|
| | | notNotifyItemIDList = IpyGameDataPY.GetFuncEvalCfg("AlchemyNotify", 3)
|
| | | if makeItemID not in notNotifyItemIDList and (makeItemID in needNotifyItemIDList or makeItemData.GetItemColor() >= notifyColor):
|
| | | PlayerControl.WorldNotify(0, "BlastfurnaceBlessing", [curPlayer.GetPlayerName(), makeItemID])
|
| | |
|
| | | #更新次数
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_AlchemyPrayCnt, prayCnt + 1)
|
| | | Sycn_AlchemyPrayMsg(curPlayer, makeItemID)
|
| | | return
|
| | | # newItemInfoList.append(itemInfo)
|
| | | # if not newItemInfoList:
|
| | | # GameWorld.DebugLog('祈福丹药,没有丹药可产出!!')
|
| | | # return
|
| | | #
|
| | | # makeItemInfo = GameWorld.GetResultByWeightList(newItemInfoList)
|
| | | # if not makeItemInfo:
|
| | | # GameWorld.DebugLog("祈福丹药, 结果错误!")
|
| | | # return
|
| | | #
|
| | | # makeItemID, itemCount = makeItemInfo
|
| | | # makeItemData = GameWorld.GetGameData().GetItemByTypeID(makeItemID)
|
| | | # if not makeItemData:
|
| | | # return
|
| | | #
|
| | | # costMoney = IpyGameDataPY.GetFuncCfg('GodAlchemy', 2)
|
| | | # if not PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, costMoney, ChConfig.Def_Cost_AlchemyPray):
|
| | | # return
|
| | | # #给物品
|
| | | # ItemControler.GivePlayerItem(curPlayer, makeItemID, itemCount, 0, [IPY_GameWorld.rptItem],
|
| | | # event=[ChConfig.ItemGive_Refine, False, {}])
|
| | | # #GameWorld.DebugLog('makeItemID=%s,newItemInfoList=%s'%(makeItemID, newItemInfoList))
|
| | | #
|
| | | # #紫色及以上全服广播
|
| | | # notifyColor = IpyGameDataPY.GetFuncCfg("AlchemyNotify", 1)
|
| | | # needNotifyItemIDList = IpyGameDataPY.GetFuncEvalCfg("AlchemyNotify", 2)
|
| | | # notNotifyItemIDList = IpyGameDataPY.GetFuncEvalCfg("AlchemyNotify", 3)
|
| | | # if makeItemID not in notNotifyItemIDList and (makeItemID in needNotifyItemIDList or makeItemData.GetItemColor() >= notifyColor):
|
| | | # PlayerControl.WorldNotify(0, "BlastfurnaceBlessing", [curPlayer.GetPlayerName(), makeItemID])
|
| | | #
|
| | | # #更新次数
|
| | | # PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_AlchemyPrayCnt, prayCnt + 1)
|
| | | # Sycn_AlchemyPrayMsg(curPlayer, makeItemID)
|
| | | # return
|
| | |
|
| | |
|
| | | def Sycn_AlchemyPrayMsg(curPlayer, itemID=0):
|
| | |
| | | return
|
| | |
|
| | | def CalcVIPAttr(curPlayer):
|
| | | allAttrList = [{} for _ in range(4)]
|
| | | |
| | | # 属性需要判断是否过期
|
| | | #if GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_VIPKillNPCAddAtk):
|
| | | mwID = IpyGameDataPY.GetFuncCfg("VIPAddAtkEXP", 2) # VIP杀怪加属性所需激活法宝
|
| | | if PlayerMagicWeapon.GetIsActiveMagicWeapon(curPlayer, mwID):
|
| | | killLV = GetVIPKillNPCLV(curPlayer)
|
| | | killLVIpyData = IpyGameDataPY.GetIpyGameData("VIPKillNPC", killLV)
|
| | | if killLVIpyData:
|
| | | PlayerControl.CalcAttrDict_Type(ShareDefine.Def_Effect_MinAtk, killLVIpyData.GetAddMinAtk(), allAttrList)
|
| | | PlayerControl.CalcAttrDict_Type(ShareDefine.Def_Effect_MaxAtk, killLVIpyData.GetAddMaxAtk(), allAttrList)
|
| | | |
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_VIP, allAttrList)
|
| | | return
|
| | | # allAttrList = [{} for _ in range(4)]
|
| | | # |
| | | # # 属性需要判断是否过期
|
| | | # #if GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_VIPKillNPCAddAtk):
|
| | | # mwID = IpyGameDataPY.GetFuncCfg("VIPAddAtkEXP", 2) # VIP杀怪加属性所需激活法宝
|
| | | # if PlayerMagicWeapon.GetIsActiveMagicWeapon(curPlayer, mwID):
|
| | | # killLV = GetVIPKillNPCLV(curPlayer)
|
| | | # killLVIpyData = IpyGameDataPY.GetIpyGameData("VIPKillNPC", killLV)
|
| | | # if killLVIpyData:
|
| | | # PlayerControl.CalcAttrDict_Type(ShareDefine.Def_Effect_MinAtk, killLVIpyData.GetAddMinAtk(), allAttrList)
|
| | | # PlayerControl.CalcAttrDict_Type(ShareDefine.Def_Effect_MaxAtk, killLVIpyData.GetAddMaxAtk(), allAttrList)
|
| | | # |
| | | # PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_VIP, allAttrList)
|
| | | # return
|
| | |
|
| | | #// A8 05 VIP杀怪等级信息同步开关 #tagCMVIPKillNPCLVInfoSwitch
|
| | | #
|
| | |
| | | g_stoneLevelIDDict = {} # 宝石类型等级对应物品ID {(stoneEffType, stoneLevel):itemID, ...}
|
| | |
|
| | | g_refreshAttrBillboardFunc = [] # 刷属性后需要触发的同步排行榜函数列表
|
| | | g_playerFuncAttrDict = {} # 玩家功能点属性 {playerID:{funcIndex:属性列表, ...}, ...}
|
| | | g_playerEquipPartAttrDict = {} # 玩家装备位养成属性 {playerID:{阶:[强化属性列表, 宝石属性列表, 洗练属性列表], ...}, ...}
|
| | |
|
| | | g_filterEquipDict = {} # 按装备条件过滤的装备ID,不分职业 {"classLV_color_star":{(itemJob,itemPlace):itemID, ...}, ...}
|
| | |
|
| | |
| | |
|
| | | #---写死的技能ID---
|
| | |
|
| | | #---写死的物品属性效果ID---
|
| | | Def_Effect_FreePoint = 200 # 自由灵根,注意此属性ID不能在刷属性中加,只能在某个功能中一次性处理
|
| | | Def_Effect_Metal = 201 # 金
|
| | | Def_Effect_Wood = 202 # ľ
|
| | | Def_Effect_Water = 203 # ˮ
|
| | | Def_Effect_Fire = 204 # 火
|
| | | Def_Effect_Earth = 205 # 土
|
| | | #增加%d力量
|
| | | Def_Effect_STR = 2 |
| | | #增加%d真元
|
| | | Def_Effect_PNE = 5 |
| | | #增加%d筋骨
|
| | | Def_Effect_PHY = 3 |
| | | #增加%d体魄
|
| | | Def_Effect_CON = 4 |
| | | #增加HP
|
| | | Def_Effect_MaxHP = 6
|
| | | #增加%d伤害值(物理和魔法的最大/小),只用到a值
|
| | | Def_Effect_Atk = 7
|
| | | #增加%d防御值
|
| | | Def_Effect_Def = 8 |
| | | #命中(A值为具体值)
|
| | | Def_Effect_Hit = 9 |
| | | #闪避(A值为具体值)
|
| | | Def_Effect_Miss = 10 |
| | | #攻击速度(A值为具体值)
|
| | | Def_Effect_AtkSpeed = 11
|
| | | #暴击伤害(a值为固定值,直接加上)
|
| | | Def_Effect_SuperHit = 13 |
| | | #暴击伤害减少固定值
|
| | | Def_Effect_SuperHitReduce = 14
|
| | | #暴击率(A值为万分率, 永恒为具体数值)
|
| | | Def_Effect_SuperHitRate = 12 |
| | | # 会心一击概率
|
| | | Def_Effect_LuckyHitRate = 15
|
| | | # 会心一击固定伤害
|
| | | Def_Effect_LuckyHit = 16
|
| | | # 会心一击抗性(抗概率), a值为万分率
|
| | | Def_Effect_LuckyHitRateReduce = 17
|
| | | # 技能伤害加成 (用作伤害加成)其中a值为增加的万分率
|
| | | Def_Effect_SkillAtkRate = 18 |
| | | # PVP固定伤害
|
| | | Def_Effect_DamagePVP = 19
|
| | | # PVP固定减伤
|
| | | Def_Effect_DamagePVPReduce = 20
|
| | | #生命回复固定值(A值固定值)
|
| | | Def_Effect_HPRestore = 21
|
| | | #反伤百分比(A值固定值)
|
| | | Def_Effect_DamBackPer = 22 |
| | | #移动速度(A值固定值)
|
| | | Def_Effect_Speed = 23
|
| | | #宠物攻击(A值固定值)
|
| | | Def_Effect_PetAtk = 24
|
| | | #宠物伤害比例提升(A值万分率)
|
| | | Def_Effect_PetDamPer = 25
|
| | | #冰攻(A值为具体值) 真实伤害元素攻击, 无视防御, 只有元素防御可以减免伤害, 此项目用冰元素代替
|
| | | Def_Effect_IceAtk = 26
|
| | | #冰防(A值为具体值) 真实抵抗元素抵抗, 减免元素攻击造成的伤害, 此项目用冰元素代替
|
| | | Def_Effect_IceDef = 27
|
| | | #无视防御几率提升
|
| | | Def_Effect_IgnoreDefRate = 28 |
| | | #无视防御抗性, 受击时减少对方的无视防御属性
|
| | | Def_Effect_IgnoreDefRateReduce = 29
|
| | | #玩家每次被攻击有20%的几率减少伤害比率
|
| | | Def_Effect_DamChanceDef = 30
|
| | | #流血伤害
|
| | | Def_Effect_BleedDamage = 31
|
| | | #攻击回血, 每次攻击回复一定生命值, 固定值
|
| | | Def_Effect_AtkBackHP = 32
|
| | | #攻击时有几率使目标玩家眩晕0.5秒
|
| | | Def_Effect_FaintRate = 33
|
| | | #有几率使即将受到的眩晕效果不生效
|
| | | Def_Effect_FaintDefRate = 34
|
| | | # 附加伤害
|
| | | Def_Effect_FinalHurt = 35
|
| | | # 附加减伤
|
| | | Def_Effect_FinalHurtReduce = 36
|
| | | # PVP技能加成 百分比
|
| | | Def_Effect_DamagePerPVP = 37
|
| | | # PVP技能减免 百分比
|
| | | Def_Effect_DamagePerPVPReduce = 38
|
| | | # 连击几率(默认100%技能伤害)
|
| | | Def_Effect_ComboRate = 39
|
| | | # 连击伤害(A值万分率),外层
|
| | | Def_Effect_ComboDamPer = 40
|
| | | #基础攻击百分比(角色基础+装备基础+强化基础)
|
| | | Def_Effect_BaseAtkAddPer = 41
|
| | | #基础生命百分比(角色基础+装备基础+强化基础)
|
| | | Def_Effect_BaseMaxHPAddPer = 42
|
| | | #基础防御百分比(角色基础+装备基础+强化基础)
|
| | | Def_Effect_BaseDefAddPer = 43
|
| | | #命中/攻击成功率提升,A值填万分率
|
| | | Def_Effect_HitRate = 44 #20025
|
| | | #闪避/防御成功率提升,A值填万分率
|
| | | Def_Effect_MissRate = 45 #20026
|
| | | #杀怪经验百分比, 百分比增加基础杀怪经验(a值为万分率,直接加上)
|
| | | Def_Effect_FightExpRate = 46
|
| | | Def_Effect_SkillAtkRateReduce = 49 #20032
|
| | | #增加HP(A值填万分率)
|
| | | Def_Effect_MaxHPPer = 50 #20023
|
| | | #按比率增加物理攻击力,其中a值为增加的万分率
|
| | | Def_Effect_AddAtkByPer = 51 #20018
|
| | | #每1级+%s攻击, 数值取万分率,支持小数算法
|
| | | Def_Effect_PerLVAtk = 52
|
| | | #每1级+%s生命, 数值为固定值
|
| | | Def_Effect_PerLVMaxHP = 53
|
| | | #装备掉率, (a值为万分率,直接加上)
|
| | | Def_Effect_DropEquipPer = 54
|
| | | #金币掉率, (a值为万分率,直接加上)
|
| | | Def_Effect_DropMoneyPer = 55
|
| | | #神兵生命百分比
|
| | | Def_Effect_GodWeaponMaxHPPer = 56
|
| | | #神兵攻击百分比
|
| | | Def_Effect_GodWeaponAtkPer = 57
|
| | | #宝石生命百分比
|
| | | Def_Effect_StoneMaxHPPer = 58
|
| | | #宝石攻击百分比
|
| | | Def_Effect_StoneAtkPer = 59
|
| | | #装备基础百分比 - 含特殊装备位
|
| | | Def_Effect_EquipBaseAddPer = 60
|
| | | #基础装备百分比
|
| | | Def_Effect_BaseEquipAddPer = 64
|
| | | #冰攻百分比(A值为万分率)
|
| | | Def_Effect_IceAtkPer = 61
|
| | | #冰防百分比(A值为万分率)
|
| | | Def_Effect_IceDefPer = 62
|
| | | #基础装备生命百分比
|
| | | Def_Effect_BaseEquipMaxHPAddPer = 63
|
| | | #基础装备攻击百分比
|
| | | Def_Effect_BaseEquipAtkAddPer = 65
|
| | | #防具防御百分比 - 废弃
|
| | | Def_Effect_ArmorDefAddPer = 66
|
| | | #主手基础属性值 百分比
|
| | | Def_Effect_WeaponAddPer = 121
|
| | | #副手基础属性值 百分比
|
| | | Def_Effect_Weapon2AddPer = 122
|
| | | #腰带基础属性值 百分比
|
| | | Def_Effect_BeltAddPer = 123
|
| | | #手套基础属性值 百分比
|
| | | Def_Effect_GloveAddPer = 124
|
| | | #衣袍基础属性值 百分比
|
| | | Def_Effect_ClothesAddPer = 125
|
| | | #帽子基础属性值 百分比
|
| | | Def_Effect_HatAddPer = 126
|
| | | #下装基础属性值 百分比
|
| | | Def_Effect_TrousersAddPer = 127
|
| | | #鞋履基础属性值 百分比
|
| | | Def_Effect_ShoesAddPer = 128
|
| | | #仙器A基础属性值 百分比
|
| | | Def_Effect_ShawlAddPer = 129
|
| | | #仙器B基础属性值 百分比
|
| | | Def_Effect_RingAddPer = 130
|
| | | #仙绳基础属性值 百分比
|
| | | Def_Effect_NeckAddPer = 131
|
| | | #莲台基础属性值 百分比
|
| | | Def_Effect_AmuletAddPer = 132
|
| | |
|
| | | Def_Effect_MinAtk = 67 # 最小攻击
|
| | | Def_Effect_MaxAtk = 68 # 最大攻击
|
| | |
|
| | | #增加%d防御值(A值填万分率)
|
| | | Def_Effect_DefPer = 69 |
| | | #暴击伤害倍率(a值为万分率,直接加上)
|
| | | Def_Effect_SuperHitPer = 70
|
| | | #移动速度百分比(A值万分率)
|
| | | Def_Effect_SpeedPer = 71
|
| | | #防护值(A值为具体值)
|
| | | Def_Effect_MaxProDef = 72
|
| | | #生命上限换算为防护值的百分比(A值为万分率)
|
| | | Def_Effect_ProDefHPPer = 73
|
| | | #防护值吸收伤害比率(A值为具体值)
|
| | | Def_Effect_ProDefAbsorb = 74
|
| | | #基础命中百分比(角色基础+装备基础+强化基础)
|
| | | Def_Effect_BaseHitAddPer = 75
|
| | | #基础闪避百分比(角色基础+装备基础+强化基础)
|
| | | Def_Effect_BaseMissAddPer = 76
|
| | | Def_Effect_PetMinAtk = 77
|
| | | Def_Effect_PetMaxAtk = 78
|
| | | Def_Effect_OnlyFinalHurt = 79 # 绝版 额外输出伤害
|
| | | Def_Effect_PVPAtkBackHP = 80 # 绝版 PVP攻击回血
|
| | |
|
| | | Def_Effect_HorseAtkPer = 82 # 坐骑攻击百分比
|
| | | Def_Effect_StoneBasePer = 83 # 宝石基础属性百分比
|
| | | Def_Effect_RealmBasePer = 84 # 境界基础属性百分比
|
| | | Def_Effect_PetSkillAtkRate = 85 # 宠物技能伤害比例
|
| | | Def_Effect_WingHPPer = 86 # 翅膀生命百分比
|
| | | Def_Effect_SuiteBasePer = 87 # 套装基础属性百分比
|
| | | Def_Effect_PlusBaseAtkPer = 88 # 强化基础攻击百分比
|
| | |
|
| | | Def_Effect_NPCHurtAddPer = 89 # 对怪物伤害加成
|
| | |
|
| | | Def_Effect_JobAHurtAddPer = 90 # 对目标战士伤害加成
|
| | | Def_Effect_JobBHurtAddPer = 91 # 对目标法师伤害加成
|
| | | Def_Effect_JobCHurtAddPer = 92 # 对目标弓箭伤害加成
|
| | | Def_Effect_JobAAtkReducePer = 93 # 战士攻击伤害减免
|
| | | Def_Effect_JobBAtkReducePer = 94 # 法师攻击伤害减免
|
| | | Def_Effect_JobCAtkReducePer = 95 # 弓箭攻击伤害减免
|
| | |
|
| | | Def_Effect_SkillAddPer1 = 102 # 技能伤害增强1
|
| | | Def_Effect_SkillAddPer2 = 103 # 技能伤害增强2
|
| | | Def_Effect_SkillAddPer3 = 104 # 技能伤害增强3
|
| | | Def_Effect_SkillAddPer4 = 105 # 技能伤害增强4
|
| | | Def_Effect_SkillAddPer5 = 106 # 技能伤害增强5
|
| | | Def_Effect_SkillAddPer6 = 107 # 技能伤害增强6
|
| | | Def_Effect_SkillAddPer7 = 108 # 技能伤害增强7
|
| | |
|
| | | Def_Effect_SkillReducePer1 = 109 # 受到技能伤害减少1
|
| | | Def_Effect_SkillReducePer2 = 110 # 受到技能伤害减少2
|
| | | Def_Effect_SkillReducePer3 = 111 # 受到技能伤害减少3
|
| | | Def_Effect_SkillReducePer4 = 112 # 受到技能伤害减少4
|
| | | Def_Effect_SkillReducePer5 = 113 # 受到技能伤害减少5
|
| | | Def_Effect_SkillReducePer6 = 114 # 受到技能伤害减少6
|
| | | Def_Effect_SkillReducePer7 = 115 # 受到技能伤害减少7
|
| | |
|
| | | ## 技能伤害百分比增加的 属性ID 列表
|
| | | SkillAddPerAttrIDList = [Def_Effect_SkillAddPer1, Def_Effect_SkillAddPer2, Def_Effect_SkillAddPer3, Def_Effect_SkillAddPer4, |
| | | Def_Effect_SkillAddPer5, Def_Effect_SkillAddPer6, Def_Effect_SkillAddPer7]
|
| | | ## 技能伤害百分比减少的 属性ID 列表
|
| | | SkillReducePerAttrIDList = [Def_Effect_SkillReducePer1, Def_Effect_SkillReducePer2, Def_Effect_SkillReducePer3, Def_Effect_SkillReducePer4, |
| | | Def_Effect_SkillReducePer5, Def_Effect_SkillReducePer6, Def_Effect_SkillReducePer7]
|
| | | |
| | | Def_Effect_Luck = 120 # 气运
|
| | | Def_Effect_LuckPer = 133 # 气运百分率
|
| | |
|
| | | Def_Effect_NormalHurt = 134 # 普通攻击增伤 |
| | | Def_Effect_NormalHurtPer = 135 # 普通攻击加成 |
| | | Def_Effect_FabaoHurt = 136 # 法宝技能增伤 |
| | | Def_Effect_FabaoHurtPer = 137 # 法宝技能加成 |
| | |
|
| | | Def_Effect_SuperHitRateReduce = 138 # 暴击概率抗性
|
| | | Def_Effect_LuckyHitReduce = 139 # 会心一击伤害固定减伤
|
| | | Def_Effect_LuckyHitPer = 140 # 会心一击伤害百分比
|
| | | Def_Effect_DamagePVE = 141 # PVE固定伤害
|
| | | Def_Effect_FinalHurtPer = 142 # 最终伤害万分率
|
| | | Def_Effect_FinalHurtReducePer = 143 # 最终伤害减少万分
|
| | | Def_Effect_YinjiTime = 144 # 每X毫秒自动消失一个印记
|
| | | Def_Effect_TheFBSkillsCD = 145 # 减少指定技能组CD XX%
|
| | | Def_Effect_BurnValue = 146 # 灼烧固定伤害
|
| | | Def_Effect_BurnTimePer = 147 # 延长灼烧时间百分比
|
| | | Def_Effect_SubSpeedPer = 148 # 减移动速度百分比
|
| | |
|
| | | Def_Effect_ReduceSkillCDPer = 149 # 减少技能CD, a值为万分率
|
| | |
|
| | | Def_Effect_ZhuXianRate = 150 # 诛仙一击: 概率直接减少BOSS当前10%血量
|
| | | Def_Effect_ZhuXianReducePer = 151 # 诛仙护体: 受到BOSS伤害减免 万分率
|
| | |
|
| | | Def_Effect_HorseMaxHPPer = 152 # 坐骑生命加成
|
| | | Def_Effect_PetAtkPer = 153 # 灵宠攻击加成
|
| | | Def_Effect_HorseTrainAttrPer = 154 # 坐骑培养属性加成(攻防血)
|
| | | Def_Effect_PetTrainAttrPer = 155 # 灵宠培养属性加成(攻防血)
|
| | | Def_Effect_GuardTrainAttrPer = 156 # 守护培养属性加成(攻防血)
|
| | | Def_Effect_WingTrainAttrPer = 157 # 翅膀培养属性加成(攻防血)
|
| | | Def_Effect_PeerlessWeaponTrainAttrPer = 158 # 灭世培养属性加成(攻防血)
|
| | | Def_Effect_PeerlessWeapon2TrainAttrPer = 159 # 弑神培养属性加成(攻防血)
|
| | | Def_Effect_LianTiAttrPer = 160 # 炼体属性百分比(攻防血)
|
| | |
|
| | | Def_Effect_AffairSpeedPer = 161 # 仙盟事务速度加成
|
| | | Def_Effect_FamilyBossHurtPer = 162 # 仙盟BOSS伤害加成
|
| | | Def_Effect_FamilyWarHPPer = 163 # 仙盟联赛生命加成
|
| | | Def_Effect_FamilyWarAtkPer = 164 # 仙盟联赛攻击加成
|
| | | Def_Effect_FamilySitExpPer = 165 # 仙盟打坐经验加成
|
| | |
|
| | | Def_Effect_BossFinalHurtPer = 166 # Boss最终伤害万分率
|
| | |
|
| | | #法器生命百分比
|
| | | Def_Effect_FaQiMaxHPPer = 167
|
| | | #法器攻击百分比
|
| | | Def_Effect_FaQiAtkPer = 168
|
| | | #法器防御百分比
|
| | | Def_Effect_FaQiDefPer = 169
|
| | |
|
| | | #坐骑幻化生命加成
|
| | | Def_Effect_HorseSkinMaxHPPer = 170 # 坐骑幻化生命加成
|
| | | #坐骑幻化攻击加成
|
| | | Def_Effect_HorseSkinAtkPer = 171 # 坐骑幻化攻击加成
|
| | | #坐骑幻化防御加成
|
| | | Def_Effect_HorseSkinDefPer = 172 # 坐骑幻化防御加成
|
| | |
|
| | | #称号生命加成
|
| | | Def_Effect_TitleMaxHPPer = 173 # 称号生命加成
|
| | | #称号攻击加成
|
| | | Def_Effect_TitleAtkPer = 174 # 称号攻击加成
|
| | | #称号防御加成
|
| | | Def_Effect_TitleDefPer = 175 # 称号防御加成
|
| | |
|
| | | #头像生命加成
|
| | | Def_Effect_FaceMaxHPPer = 176 # 头像生命加成
|
| | | #头像攻击加成
|
| | | Def_Effect_FaceAtkPer = 177 # 头像攻击加成
|
| | | #头像防御加成
|
| | | Def_Effect_FaceDefPer = 178 # 头像防御加成
|
| | |
|
| | | #头像框生命加成
|
| | | Def_Effect_FacePicMaxHPPer = 179 # 头像框生命加成
|
| | | #头像框攻击加成
|
| | | Def_Effect_FacePicAtkPer = 180 # 头像框攻击加成
|
| | | #头像框防御加成
|
| | | Def_Effect_FacePicDefPer = 181 # 头像框防御加成
|
| | |
|
| | | Def_Effect_ComboDefRate = 210 # 抗连击概率
|
| | | Def_Effect_AtkBackRate = 211 # 反击概率
|
| | | Def_Effect_AtkBackDefRate = 212 # 抗反击概率
|
| | | Def_Effect_SuckHPPer = 213 # 吸血比率
|
| | | Def_Effect_SuckHPDefPer = 214 # 抗吸血比率
|
| | | Def_Effect_CurePer = 215 # 强化治疗
|
| | | Def_Effect_CureDefPer = 216 # 弱化治疗
|
| | | Def_Effect_PetStrengthenPer = 217 # 强化灵兽
|
| | | Def_Effect_PetWeakenPer = 218 # 弱化灵兽
|
| | | Def_Effect_SuperHitHurtPer = 219 # 强化暴伤
|
| | | Def_Effect_SuperHitHurtDefPer = 220 # 弱化暴伤
|
| | | Def_Effect_DamBlockRate = 221 # 格挡概率
|
| | | Def_Effect_DamBlockDefRate = 222 # 抗格挡概率
|
| | |
|
| | | #增加%d物理伤害值,其中a值为伤害值
|
| | | Def_Effect_AddAtk = 1005
|
| | | #增加%d魔法伤害值,其中a值为伤害值
|
| | | Def_Effect_AddMAtk = 20020
|
| | | #增加内防
|
| | | Def_Effect_MagicDef = 20001
|
| | | #减技能CD(A值固定值)
|
| | | Def_Effect_ReduceSkillCD = 20031
|
| | | # 卓越一击倍数(a值为万分率,直接加上)
|
| | | Def_Effect_GreatHit = 20029
|
| | |
|
| | | #内力上限(A值为具体值)
|
| | | Def_Effect_MaxMP = 20015
|
| | |
|
| | | #按比率增加魔法攻击力,其中a值为增加的万分率
|
| | | Def_Effect_AddMAtkByPer = 20017
|
| | | #火功(A值为具体值)
|
| | | Def_Effect_FireAtk = 20003
|
| | | #火防(A值为具体值)
|
| | | Def_Effect_FireDef = 20008
|
| | |
|
| | | #风功(A值为具体值)
|
| | | Def_Effect_WindAtk = 20002
|
| | | #风防(A值为具体值)
|
| | | Def_Effect_WindDef = 20007
|
| | |
|
| | | #雷功(A值为具体值)
|
| | | Def_Effect_ThunderAtk = 20004
|
| | | #雷防(A值为具体值)
|
| | | Def_Effect_ThunderDef = 20009
|
| | |
|
| | | #毒功(A值为具体值)
|
| | | Def_Effect_ToxinAtk = 20006
|
| | | #毒防(A值为具体值)
|
| | | Def_Effect_ToxinDef = 20011
|
| | |
|
| | | #翅膀效果id(a值为效果类型)
|
| | | Def_Effect_WingType = 2801
|
| | |
|
| | | #增加宠物属性
|
| | | Def_PetEffect_AddSTR = 5041 #加力量
|
| | | Def_PetEffect_AddPNE = 5042 #加真元
|
| | | Def_PetEffect_AddPHY = 5043 #加筋骨
|
| | | Def_PetEffect_AddCON = 5044 #加体魄
|
| | | Def_PetEffect_AddATK = 5045 #加伤害值
|
| | | Def_PetEffect_AddDEF = 5046 #加外防
|
| | | Def_PetEffect_AddMDEF = 5047 #加内防
|
| | | Def_PetEffect_AddMaxHP = 5052 #加气血
|
| | | Def_PetEffect_AddMaxHPBySelf = 5048 #宠物的气血上限值的百分比加成到主人身上,A值为百分比的值
|
| | | Def_PetEffect_AddATKBySelf = 5049 #宠物的外攻上限值的百分比加成到主人身上,A值为百分比的值 |
| | | Def_PetEffect_AddDEFBySelf = 5050 #宠物的外防上限值的百分比加成到主人身上,A值为百分比的值 |
| | | Def_PetEffect_AddMATKBySelf = 5051 #宠物的内攻上限值的百分比加成到主人身上,A值为百分比的值 |
| | |
|
| | | # 属性果实功能索引定义
|
| | | Def_AttrFruitFuncList = (
|
| | | Def_AttrFruitFunc_Pet, # 宠物
|
| | | Def_AttrFruitFunc_Horse, # 坐骑
|
| | | Def_AttrFruitFunc_Stove, # 丹药
|
| | | ) = range(3)
|
| | |
|
| | | #---排行榜---
|
| | | #排行榜类型BillboardType
|
| | |
| | | # @return None
|
| | | def OnCalcBuffEx(defender, curEffect, calcDict, curBuff):
|
| | |
|
| | | totalHP = 0
|
| | | equipPack = defender.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | | for i in xrange(equipPack.GetCount()):
|
| | | curEquip = equipPack.GetAt(i)
|
| | | |
| | | if curEquip.IsEmpty():
|
| | | continue
|
| | | if i not in ChConfig.EquipPlace_BaseArmor:
|
| | | continue
|
| | | if not curEquip.GetItemQuality():
|
| | | continue
|
| | | #基础属性效果
|
| | | for i in range(0, curEquip.GetEffectCount()):
|
| | | equipEffect = curEquip.GetEffectByIndex(i)
|
| | | if not equipEffect:
|
| | | break
|
| | | |
| | | effectID = equipEffect.GetEffectID()
|
| | | if effectID == 0:
|
| | | #最后一个
|
| | | break
|
| | | if effectID != ShareDefine.Def_Effect_MaxHP:
|
| | | continue
|
| | | totalHP += equipEffect.GetEffectValue(0)
|
| | | |
| | | totalHP = int(totalHP*float(curEffect.GetEffectValue(0))/ChConfig.Def_MaxRateValue)
|
| | | |
| | | calcDict[ChConfig.TYPE_Calc_AttrMaxHP] = calcDict.get(ChConfig.TYPE_Calc_AttrMaxHP, 0) + totalHP
|
| | | # totalHP = 0
|
| | | # equipPack = defender.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | | # for i in xrange(equipPack.GetCount()):
|
| | | # curEquip = equipPack.GetAt(i)
|
| | | # |
| | | # if curEquip.IsEmpty():
|
| | | # continue
|
| | | # if i not in ChConfig.EquipPlace_BaseArmor:
|
| | | # continue
|
| | | # if not curEquip.GetItemQuality():
|
| | | # continue
|
| | | # #基础属性效果
|
| | | # for i in range(0, curEquip.GetEffectCount()):
|
| | | # equipEffect = curEquip.GetEffectByIndex(i)
|
| | | # if not equipEffect:
|
| | | # break
|
| | | # |
| | | # effectID = equipEffect.GetEffectID()
|
| | | # if effectID == 0:
|
| | | # #最后一个
|
| | | # break
|
| | | # if effectID != ShareDefine.Def_Effect_MaxHP:
|
| | | # continue
|
| | | # totalHP += equipEffect.GetEffectValue(0)
|
| | | # |
| | | # totalHP = int(totalHP*float(curEffect.GetEffectValue(0))/ChConfig.Def_MaxRateValue)
|
| | | # |
| | | # calcDict[ChConfig.TYPE_Calc_AttrMaxHP] = calcDict.get(ChConfig.TYPE_Calc_AttrMaxHP, 0) + totalHP
|
| | | return
|
| | |
|
| | |
|
| | |
| | | def GetSkillAddPerByID(curPlayer, skillTypeID):
|
| | | ## 获取技能伤害百分比提升值
|
| | | # @param skillTypeID: 技能TypeID
|
| | | SkillAddPerAttrIDDict = IpyGameDataPY.GetConfigEx("SkillAddPerAttrIDDict")
|
| | | if not SkillAddPerAttrIDDict:
|
| | | SkillAddPerAttrIDDict = {}
|
| | | skillPlusAttrIDDict = IpyGameDataPY.GetFuncEvalCfg("SkillPlusAttrID", 2, {})
|
| | | for attrIDStr, skillTypeIDList in skillPlusAttrIDDict.items():
|
| | | attrID = int(attrIDStr)
|
| | | if attrID not in ShareDefine.SkillAddPerAttrIDList:
|
| | | continue
|
| | | for cfgSkillTypeID in skillTypeIDList:
|
| | | SkillAddPerAttrIDDict[cfgSkillTypeID] = attrID
|
| | | IpyGameDataPY.SetConfigEx("SkillAddPerAttrIDDict", SkillAddPerAttrIDDict)
|
| | | |
| | | if skillTypeID not in SkillAddPerAttrIDDict:
|
| | | return 0
|
| | | curAttrID = SkillAddPerAttrIDDict[skillTypeID]
|
| | | attrInfo = ChConfig.ItemEffect_AttrDict.get(curAttrID, [])
|
| | | if attrInfo == []:
|
| | | return 0
|
| | | effIndex = attrInfo[0][0]
|
| | | return EffGetSet.GetValueByEffIndex(curPlayer, effIndex)
|
| | | # SkillAddPerAttrIDDict = IpyGameDataPY.GetConfigEx("SkillAddPerAttrIDDict")
|
| | | # if not SkillAddPerAttrIDDict:
|
| | | # SkillAddPerAttrIDDict = {}
|
| | | # skillPlusAttrIDDict = IpyGameDataPY.GetFuncEvalCfg("SkillPlusAttrID", 2, {})
|
| | | # for attrIDStr, skillTypeIDList in skillPlusAttrIDDict.items():
|
| | | # attrID = int(attrIDStr)
|
| | | # if attrID not in ShareDefine.SkillAddPerAttrIDList:
|
| | | # continue
|
| | | # for cfgSkillTypeID in skillTypeIDList:
|
| | | # SkillAddPerAttrIDDict[cfgSkillTypeID] = attrID
|
| | | # IpyGameDataPY.SetConfigEx("SkillAddPerAttrIDDict", SkillAddPerAttrIDDict)
|
| | | # |
| | | # if skillTypeID not in SkillAddPerAttrIDDict:
|
| | | # return 0
|
| | | # curAttrID = SkillAddPerAttrIDDict[skillTypeID]
|
| | | # attrInfo = ChConfig.ItemEffect_AttrDict.get(curAttrID, [])
|
| | | # if attrInfo == []:
|
| | | # return 0
|
| | | # effIndex = attrInfo[0][0]
|
| | | # return EffGetSet.GetValueByEffIndex(curPlayer, effIndex)
|
| | |
|
| | | def GetSkillReducePerByID(curPlayer, skillTypeID):
|
| | | ## 获取技能伤害百分比减伤值
|
| | | # @param skillTypeID: 技能TypeID
|
| | | SkillReducePerAttrIDDict = IpyGameDataPY.GetConfigEx("SkillReducePerAttrIDDict")
|
| | | if not SkillReducePerAttrIDDict:
|
| | | SkillReducePerAttrIDDict = {}
|
| | | skillPlusAttrIDDict = IpyGameDataPY.GetFuncEvalCfg("SkillPlusAttrID", 2, {})
|
| | | for attrIDStr, skillTypeIDList in skillPlusAttrIDDict.items():
|
| | | attrID = int(attrIDStr)
|
| | | if attrID not in ShareDefine.SkillReducePerAttrIDList:
|
| | | continue
|
| | | for cfgSkillTypeID in skillTypeIDList:
|
| | | SkillReducePerAttrIDDict[cfgSkillTypeID] = attrID
|
| | | IpyGameDataPY.SetConfigEx("SkillReducePerAttrIDDict", SkillReducePerAttrIDDict)
|
| | | |
| | | if skillTypeID not in SkillReducePerAttrIDDict:
|
| | | return 0
|
| | | curAttrID = SkillReducePerAttrIDDict[skillTypeID]
|
| | | attrInfo = ChConfig.ItemEffect_AttrDict.get(curAttrID, [])
|
| | | if attrInfo == []:
|
| | | return 0
|
| | | effIndex = attrInfo[0][0]
|
| | | return EffGetSet.GetValueByEffIndex(curPlayer, effIndex)
|
| | | # SkillReducePerAttrIDDict = IpyGameDataPY.GetConfigEx("SkillReducePerAttrIDDict")
|
| | | # if not SkillReducePerAttrIDDict:
|
| | | # SkillReducePerAttrIDDict = {}
|
| | | # skillPlusAttrIDDict = IpyGameDataPY.GetFuncEvalCfg("SkillPlusAttrID", 2, {})
|
| | | # for attrIDStr, skillTypeIDList in skillPlusAttrIDDict.items():
|
| | | # attrID = int(attrIDStr)
|
| | | # if attrID not in ShareDefine.SkillReducePerAttrIDList:
|
| | | # continue
|
| | | # for cfgSkillTypeID in skillTypeIDList:
|
| | | # SkillReducePerAttrIDDict[cfgSkillTypeID] = attrID
|
| | | # IpyGameDataPY.SetConfigEx("SkillReducePerAttrIDDict", SkillReducePerAttrIDDict)
|
| | | # |
| | | # if skillTypeID not in SkillReducePerAttrIDDict:
|
| | | # return 0
|
| | | # curAttrID = SkillReducePerAttrIDDict[skillTypeID]
|
| | | # attrInfo = ChConfig.ItemEffect_AttrDict.get(curAttrID, [])
|
| | | # if attrInfo == []:
|
| | | # return 0
|
| | | # effIndex = attrInfo[0][0]
|
| | | # return EffGetSet.GetValueByEffIndex(curPlayer, effIndex)
|
| | |
|
| | |
| | | needBaseAttrID, needBaseAttrValue = GetSkillUpNeedAttr(stateSkillLV)
|
| | | if needBaseAttrID and needBaseAttrValue:
|
| | | baseAttrDict = {
|
| | | ShareDefine.Def_Effect_Metal:PlayerControl.GetMetal(curPlayer),
|
| | | ShareDefine.Def_Effect_Wood:PlayerControl.GetWood(curPlayer),
|
| | | ShareDefine.Def_Effect_Water:PlayerControl.GetWater(curPlayer),
|
| | | ShareDefine.Def_Effect_Fire:PlayerControl.GetFire(curPlayer),
|
| | | ShareDefine.Def_Effect_Earth:PlayerControl.GetEarth(curPlayer),
|
| | | #ShareDefine.Def_Effect_Metal:PlayerControl.GetMetal(curPlayer),
|
| | | #ShareDefine.Def_Effect_Wood:PlayerControl.GetWood(curPlayer),
|
| | | #ShareDefine.Def_Effect_Water:PlayerControl.GetWater(curPlayer),
|
| | | #ShareDefine.Def_Effect_Fire:PlayerControl.GetFire(curPlayer),
|
| | | #ShareDefine.Def_Effect_Earth:PlayerControl.GetEarth(curPlayer),
|
| | | }
|
| | | if needBaseAttrID not in baseAttrDict:
|
| | | GameWorld.ErrLog(' 技能升级属性点条件配置错误,curSkillTypeID=%s,needBaseAttrID=%s'%(curSkillTypeID, needBaseAttrID))
|
| | |
| | | if skillTypeID not in PyGameData.g_elemntSkillDict:
|
| | | return isNotify, hasChangeLV
|
| | | baseAttrDict = {
|
| | | ShareDefine.Def_Effect_Metal:PlayerControl.GetMetal(curPlayer),
|
| | | ShareDefine.Def_Effect_Wood:PlayerControl.GetWood(curPlayer),
|
| | | ShareDefine.Def_Effect_Water:PlayerControl.GetWater(curPlayer),
|
| | | ShareDefine.Def_Effect_Fire:PlayerControl.GetFire(curPlayer),
|
| | | ShareDefine.Def_Effect_Earth:PlayerControl.GetEarth(curPlayer),
|
| | | #ShareDefine.Def_Effect_Metal:PlayerControl.GetMetal(curPlayer),
|
| | | #ShareDefine.Def_Effect_Wood:PlayerControl.GetWood(curPlayer),
|
| | | #ShareDefine.Def_Effect_Water:PlayerControl.GetWater(curPlayer),
|
| | | #ShareDefine.Def_Effect_Fire:PlayerControl.GetFire(curPlayer),
|
| | | #ShareDefine.Def_Effect_Earth:PlayerControl.GetEarth(curPlayer),
|
| | | }
|
| | | activeSkillLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_SkillElementLV % skillTypeID)
|
| | | limitInfoList = PyGameData.g_elemntSkillDict[skillTypeID]
|