2683 子 天赋技能和新增双职业各两个技能 / 【后端】天赋技能 ----- 通用类
| | |
| | | Def_PPAct_BossHome, #boss之家 12
|
| | | Def_PPAct_VIPBoss, #vipBOSS 13
|
| | | ) = range(1, 13+1) |
| | |
|
| | | # 套装枚举,普通套装,强化套装
|
| | | (EquipSuitType_Normal,
|
| | | EquipSuitType_Plus,
|
| | | ) = range(1,3)
|
| | |
|
| | | EquipGroupType_Armor = '1' # 防具套装
|
| | | EquipGroupType_Relics = '2' # 仙器套装
|
| | |
| | | for suiteKey, cnt in suitCntDict.items():
|
| | | groupType,suiteType,suiteLV = suiteKey.split('_')
|
| | | suiteLV = int(suiteLV)
|
| | | job = 0 if groupType == '2' else myjob #仙器组合默认职业0
|
| | | job = 0 if groupType == ChConfig.EquipGroupType_Relics else myjob #仙器组合默认职业0
|
| | | ipyData = IpyGameDataPY.GetIpyGameData('EquipSuitAttr', int(groupType), int(suiteType), int(suiteLV), job)
|
| | | if not ipyData:
|
| | | continue
|
| | |
| | | paramList= [name, cnt, suiteLV, groupType, suiteType]
|
| | | notifyRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipPartSuiteNotify % (groupType, suiteType, cnt))
|
| | | if not notifyRecord & pow(2, suiteLV):
|
| | | if groupType == '1':
|
| | | if groupType == ChConfig.EquipGroupType_Armor:
|
| | | if cnt >=5:
|
| | | PlayerControl.WorldNotify(0, 'EquipSuit5', paramList)
|
| | | notifyRecord |= pow(2, suiteLV)
|
| | |
| | | break
|
| | | return findGroupType
|
| | |
|
| | | # 获取满套装化的最低阶数,如5件套,4件5级,1件3级,则返回3
|
| | | def GetEquipSuitsLVByType(curPlayer, suitType, groupType):
|
| | | suiteLV = 999
|
| | | equipSuitTypeDict = IpyGameDataPY.GetFuncEvalCfg('EquipSuitType')
|
| | | if groupType not in equipSuitTypeDict:
|
| | | return 0
|
| | | maxCnt = len(equipSuitTypeDict[groupType])
|
| | | cnt = 0
|
| | | for equipPlace in equipSuitTypeDict[groupType]:
|
| | | curSuiteLV = GetEquipPartSuiteLV(curPlayer, equipPlace, suitType)
|
| | | if curSuiteLV > 0:
|
| | | cnt += 1
|
| | | suiteLV = min(curSuiteLV, suiteLV)
|
| | | |
| | | if cnt != maxCnt:
|
| | | return 0
|
| | | return 0 if suiteLV == 999 else suiteLV
|
| | |
|
| | |
|
| | | ## 通知公共部位套装等级
|
| | | def NotifyEquipPartSuiteLV(curPlayer, index=None):
|
New file |
| | |
| | | #!/usr/bin/python
|
| | | # -*- coding: GBK -*-
|
| | | #
|
| | | ##@package
|
| | | #
|
| | | # @todo: 普通套装每一阶数提升属性百分比
|
| | | #
|
| | | # @author: Alee
|
| | | # @date 2018-11-5 下午04:38:39
|
| | | # @version 1.0
|
| | | #
|
| | | # @note: |
| | | #
|
| | | #---------------------------------------------------------------------
|
| | | #导入
|
| | | import ChConfig
|
| | | import PlayerControl
|
| | | import ChEquip
|
| | | import IPY_GameWorld
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | |
|
| | | def OnCalcBuffEx(defender, curEffect, calcDict, curBuff):
|
| | | if defender.GetGameObjType() != IPY_GameWorld.gotPlayer:
|
| | | return
|
| | | suitsLV = ChEquip.GetEquipSuitsLVByType(defender, ChConfig.EquipSuitType_Normal, ChConfig.EquipGroupType_Armor)
|
| | | if not suitsLV:
|
| | | return
|
| | | attrList = PlayerControl.GetCalcAttrListValue(defender, curEffect.GetEffectValue(2))
|
| | | attrType = curEffect.GetEffectValue(1)
|
| | | attrTypeList = [attrType]
|
| | | # 攻击力有最大最小 特殊处理
|
| | | if attrType in [ChConfig.TYPE_Calc_AttrATKMin, ChConfig.TYPE_Calc_AttrATKMax]:
|
| | | attrTypeList = [ChConfig.TYPE_Calc_AttrATKMin, ChConfig.TYPE_Calc_AttrATKMax]
|
| | | for tmpType in attrTypeList:
|
| | | value = int(attrList[2].get(tmpType, 0)*curEffect.GetEffectValue(0)*suitsLV*1.0/ChConfig.Def_MaxRateValue)
|
| | | calcDict[tmpType] = calcDict.get(tmpType, 0) + value
|
| | | |
| | | return
|
| | |
|
| | |
|
| | | ## 返回buff类型,线性与否
|
| | | # @param |
| | | # @return None
|
| | | # @remarks 函数详细说明. |
| | | def GetCalcType():
|
| | | return ChConfig.TYPE_Linear
|
| | |
|
| | |
|
| | |
|
New file |
| | |
| | | #!/usr/bin/python
|
| | | # -*- coding: GBK -*-
|
| | | #
|
| | | ##@package
|
| | | #
|
| | | # @todo: 强化套装每一阶数提升属性百分比
|
| | | #
|
| | | # @author: Alee
|
| | | # @date 2018-11-5 下午04:38:39
|
| | | # @version 1.0
|
| | | #
|
| | | # @note: |
| | | #
|
| | | #---------------------------------------------------------------------
|
| | | #导入
|
| | | import ChConfig
|
| | | import PlayerControl
|
| | | import ChEquip
|
| | | import IPY_GameWorld
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | |
|
| | | def OnCalcBuffEx(defender, curEffect, calcDict, curBuff):
|
| | | if defender.GetGameObjType() != IPY_GameWorld.gotPlayer:
|
| | | return
|
| | | suitsLV = ChEquip.GetEquipSuitsLVByType(defender, ChConfig.EquipSuitType_Plus, ChConfig.EquipGroupType_Armor)
|
| | | if not suitsLV:
|
| | | return
|
| | | attrList = PlayerControl.GetCalcAttrListValue(defender, curEffect.GetEffectValue(2))
|
| | | attrType = curEffect.GetEffectValue(1)
|
| | | attrTypeList = [attrType]
|
| | | # 攻击力有最大最小 特殊处理
|
| | | if attrType in [ChConfig.TYPE_Calc_AttrATKMin, ChConfig.TYPE_Calc_AttrATKMax]:
|
| | | attrTypeList = [ChConfig.TYPE_Calc_AttrATKMin, ChConfig.TYPE_Calc_AttrATKMax]
|
| | | for tmpType in attrTypeList:
|
| | | value = int(attrList[2].get(tmpType, 0)*curEffect.GetEffectValue(0)*suitsLV*1.0/ChConfig.Def_MaxRateValue)
|
| | | calcDict[tmpType] = calcDict.get(tmpType, 0) + value
|
| | | |
| | | return
|
| | |
|
| | |
|
| | | ## 返回buff类型,线性与否
|
| | | # @param |
| | | # @return None
|
| | | # @remarks 函数详细说明. |
| | | def GetCalcType():
|
| | | return ChConfig.TYPE_Linear
|
| | |
|
| | | import random
|
| | |
|
| | | random.seed()
|
| | |
|
New file |
| | |
| | | #!/usr/bin/python
|
| | | # -*- coding: GBK -*-
|
| | | #
|
| | | ##@package
|
| | | #
|
| | | # @todo: 仙器普通套装达到X阶激活属性
|
| | | #
|
| | | # @author: Alee
|
| | | # @date 2018-11-5 下午04:38:39
|
| | | # @version 1.0
|
| | | #
|
| | | # @note: |
| | | #
|
| | | #---------------------------------------------------------------------
|
| | | #导入
|
| | | import ChConfig
|
| | | import PlayerControl
|
| | | import ChEquip
|
| | | import IPY_GameWorld
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | |
|
| | | def OnCalcBuffEx(defender, curEffect, calcDict, curBuff):
|
| | | if defender.GetGameObjType() != IPY_GameWorld.gotPlayer:
|
| | | return
|
| | | suitsLV = ChEquip.GetEquipSuitsLVByType(defender, ChConfig.EquipSuitType_Normal, ChConfig.EquipGroupType_Relics)
|
| | |
|
| | | if suitsLV < curEffect.GetEffectValue(2):
|
| | | return
|
| | | |
| | | attrType = curEffect.GetEffectValue(1)
|
| | | attrTypeList = [attrType]
|
| | | # 攻击力有最大最小 特殊处理
|
| | | if attrType in [ChConfig.TYPE_Calc_AttrATKMin, ChConfig.TYPE_Calc_AttrATKMax]:
|
| | | attrTypeList = [ChConfig.TYPE_Calc_AttrATKMin, ChConfig.TYPE_Calc_AttrATKMax]
|
| | | for tmpType in attrTypeList:
|
| | | calcDict[tmpType] = calcDict.get(tmpType, 0) + curEffect.GetEffectValue(0)
|
| | | |
| | | return
|
| | |
|
| | |
|
| | | ## 返回buff类型,线性与否
|
| | | # @param |
| | | # @return None
|
| | | # @remarks 函数详细说明. |
| | | def GetCalcType():
|
| | | return ChConfig.TYPE_Linear
|
| | |
|
| | |
|
New file |
| | |
| | | #!/usr/bin/python
|
| | | # -*- coding: GBK -*-
|
| | | #
|
| | | ##@package
|
| | | #
|
| | | # @todo: 全身防具普通套装达到X阶,所有技能的伤害提升XXX%
|
| | | #
|
| | | # @author: Alee
|
| | | # @date 2018-11-6 下午03:26:05
|
| | | # @version 1.0
|
| | | #
|
| | | # @note: |
| | | #
|
| | | #---------------------------------------------------------------------
|
| | | #导入
|
| | | import ChConfig
|
| | | import PlayerControl
|
| | | import ChEquip
|
| | | import IPY_GameWorld
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | |
|
| | | def OnCalcBuffEx(defender, curEffect, calcDict, curBuff):
|
| | | if defender.GetGameObjType() != IPY_GameWorld.gotPlayer:
|
| | | return
|
| | | suitsLV = ChEquip.GetEquipSuitsLVByType(defender, ChConfig.EquipSuitType_Normal, ChConfig.EquipGroupType_Armor)
|
| | |
|
| | | if suitsLV < curEffect.GetEffectValue(2):
|
| | | return
|
| | | |
| | | attrType = curEffect.GetEffectValue(1)
|
| | | attrTypeList = [attrType]
|
| | | # 攻击力有最大最小 特殊处理
|
| | | if attrType in [ChConfig.TYPE_Calc_AttrATKMin, ChConfig.TYPE_Calc_AttrATKMax]:
|
| | | attrTypeList = [ChConfig.TYPE_Calc_AttrATKMin, ChConfig.TYPE_Calc_AttrATKMax]
|
| | | for tmpType in attrTypeList:
|
| | | calcDict[tmpType] = calcDict.get(tmpType, 0) + curEffect.GetEffectValue(0)
|
| | | |
| | | return
|
| | |
|
| | |
|
| | | ## 返回buff类型,线性与否
|
| | | # @param |
| | | # @return None
|
| | | # @remarks 函数详细说明. |
| | | def GetCalcType():
|
| | | return ChConfig.TYPE_Linear
|
| | |
|
| | |
|
New file |
| | |
| | | #!/usr/bin/python
|
| | | # -*- coding: GBK -*-
|
| | | #
|
| | | ##@package
|
| | | #
|
| | | # @todo: 每有属性值(如力量)达到多少点,提升属性百分比
|
| | | #
|
| | | # @author: Alee
|
| | | # @date 2018-11-6 下午03:26:05
|
| | | # @version 1.0
|
| | | #
|
| | | # @note: |
| | | #
|
| | | #---------------------------------------------------------------------
|
| | | #导入
|
| | | import ChConfig
|
| | | import EffGetSet
|
| | | import IPY_GameWorld
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | |
|
| | | def OnCalcBuffEx(defender, curEffect, calcDict, curBuff):
|
| | | if defender.GetGameObjType() != IPY_GameWorld.gotPlayer:
|
| | | return
|
| | | funcMark = curEffect.GetEffectValue(2)/1000000
|
| | | value = EffGetSet.GetValueByEffIndex(defender, funcMark)/(curEffect.GetEffectValue(2)%1000000)
|
| | | if value == 0:
|
| | | return
|
| | |
|
| | | attrType = curEffect.GetEffectValue(1)
|
| | | attrTypeList = [attrType]
|
| | | # 攻击力有最大最小 特殊处理
|
| | | if attrType in [ChConfig.TYPE_Calc_AttrATKMin, ChConfig.TYPE_Calc_AttrATKMax]:
|
| | | attrTypeList = [ChConfig.TYPE_Calc_AttrATKMin, ChConfig.TYPE_Calc_AttrATKMax]
|
| | | for tmpType in attrTypeList:
|
| | | calcDict[tmpType] = calcDict.get(tmpType, 0) + curEffect.GetEffectValue(0)
|
| | | |
| | | return
|
| | |
|
| | |
|
| | | ## 返回buff类型,线性与否
|
| | | # @param |
| | | # @return None
|
| | | # @remarks 函数详细说明. |
| | | def GetCalcType():
|
| | | return ChConfig.TYPE_NoLinear
|
| | |
|
| | |
|
New file |
| | |
| | | #!/usr/bin/python
|
| | | # -*- coding: GBK -*-
|
| | | #
|
| | | ##@package
|
| | | #
|
| | | # @todo: 每有属性值(如力量)达到多少点,提升属性固定值
|
| | | #
|
| | | # @author: Alee
|
| | | # @date 2018-11-6 下午03:26:05
|
| | | # @version 1.0
|
| | | #
|
| | | # @note: |
| | | #
|
| | | #---------------------------------------------------------------------
|
| | | #导入
|
| | | import ChConfig
|
| | | import EffGetSet
|
| | | import IPY_GameWorld
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | |
|
| | | def OnCalcBuffEx(defender, curEffect, calcDict, curBuff):
|
| | | if defender.GetGameObjType() != IPY_GameWorld.gotPlayer:
|
| | | return
|
| | | funcMark = curEffect.GetEffectValue(2)/1000000
|
| | | value = EffGetSet.GetValueByEffIndex(defender, funcMark)/(curEffect.GetEffectValue(2)%1000000)
|
| | | if value == 0:
|
| | | return
|
| | |
|
| | | attrType = curEffect.GetEffectValue(1)
|
| | | attrTypeList = [attrType]
|
| | | # 攻击力有最大最小 特殊处理
|
| | | if attrType in [ChConfig.TYPE_Calc_AttrATKMin, ChConfig.TYPE_Calc_AttrATKMax]:
|
| | | attrTypeList = [ChConfig.TYPE_Calc_AttrATKMin, ChConfig.TYPE_Calc_AttrATKMax]
|
| | | for tmpType in attrTypeList:
|
| | | calcDict[tmpType] = calcDict.get(tmpType, 0) + curEffect.GetEffectValue(0)
|
| | | |
| | | return
|
| | |
|
| | |
|
| | | ## 返回buff类型,线性与否
|
| | | # @param |
| | | # @return None
|
| | | # @remarks 函数详细说明. |
| | | def GetCalcType():
|
| | | return ChConfig.TYPE_Linear
|
| | |
|
| | |
|
New file |
| | |
| | | #!/usr/bin/python
|
| | | # -*- coding: GBK -*-
|
| | | #
|
| | | # @todo: 全身防具普通套装达到x阶,每攻击X次,下一次技能将提升百分XX%的技能伤害
|
| | | #
|
| | | # @author: Alee
|
| | | # @date 2018-1-9 下午09:39:37
|
| | | # @version 1.0
|
| | | #
|
| | | # @note: |
| | | #
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | | import ChConfig
|
| | | import GameWorld
|
| | | import GameObj
|
| | | import ChEquip
|
| | |
|
| | | def CheckCanHappen(attacker, defender, effect, curSkill): |
| | | suitsLV = ChEquip.GetEquipSuitsLVByType(defender, ChConfig.EquipSuitType_Normal, ChConfig.EquipGroupType_Armor)
|
| | | if suitsLV < effect.GetEffectValue(1):
|
| | | # 全身防具普通套装阶数判断
|
| | | return False
|
| | | |
| | | # 攻击次数判定
|
| | | attackCnt = curSkill.GetProficiency()
|
| | | # 外层有CD拦着,CD中不计数
|
| | | curSkill.SetProficiency(attackCnt + 1)
|
| | | |
| | | if attackCnt + 1 > effect.GetEffectValue(0):
|
| | | curSkill.SetProficiency(0)
|
| | | return True
|
| | |
|
| | | return False
|
| | | |
| | |
| | | 4058:ChConfig.TriggerType_AddBuffOver, # 添加buff之后触发技能 56
|
| | | 4059:ChConfig.TriggerType_StormAttackOneByOne, # 类剑刃风暴攻击1对1触发技能 57
|
| | | 4060:ChConfig.TriggerType_StormAttackOver, # 类剑刃风暴攻击后触发技能 57
|
| | | 4061:ChConfig.TriggerType_AttackOverPassive, # 攻击(对敌技能)后被动技能被触发在其他被动效果处理后调用,触发顺序原因
|
| | | }
|
| | | return tdict.get(effectID, -1)
|
| | | #===========================================================================
|