| | |
| | | #
|
| | | ##@package
|
| | | #
|
| | | # @todo: 神兵生命转换为血盾
|
| | | # @todo: 神兵生命转换为血盾, A值为百分比
|
| | | #
|
| | | # @author: Alee
|
| | | # @date 2018-4-23 下午02:04:06
|
| | |
| | |
|
| | | import GameWorld
|
| | | import ChConfig
|
| | | import GameObj
|
| | | import SkillShell
|
| | | import PlayerControl
|
| | |
|
| | |
|
| | |
|
| | | def CalcBuffValue(attacker, defender, curSkill, changeBuffValueDict):
|
| | | attrList = PlayerControl.GetCalcAttrListValue(attacker, ChConfig.Def_CalcAttrFunc_GodWeapon)
|
| | | |
| | | hp = attrList[2].get(ChConfig.TYPE_Calc_AttrMaxHP, 0)
|
| | | |
| | | curEffect = curSkill.GetEffect(0)
|
| | | return [int(float(curEffect.GetEffectValue(0))/ChConfig.Def_MaxRateValue*GameObj.GetMaxHP(attacker))]
|
| | | return [hp*curEffect.GetEffectValue(0)/ChConfig.Def_MaxRateValue]
|
| | |
|
| | | def OnBuffDisappear(curObj, curSkill, curBuff, curEffect, tick):
|
| | | if curEffect.GetEffectValue(1) == 0:
|
| | | return
|
| | | boomValue = curBuff.GetValue()
|
| | | # 剩余护盾值用于爆炸
|
| | | if boomValue == 0:
|
| | | return
|
| | | |
| | | boomValue = int(boomValue*float(curEffect.GetEffectValue(1))/ChConfig.Def_MaxRateValue)
|
| | | #效果值 第三个值为技能ID
|
| | | boomID = curEffect.GetEffectValue(2)
|
| | | skillData = GameWorld.GetGameData().GetSkillBySkillID(boomID)
|
| | | if not skillData:
|
| | | return
|
| | | |
| | | # 存储起来用于伤害
|
| | | curObj.SetDict(ChConfig.Def_PlayerKey_MoreHurtValue, boomValue)
|
| | | |
| | | SkillShell.Trigger_UseSkill(curObj, None, skillData, tick, curObj.GetPosX(), curObj.GetPosY())
|
| | | curObj.SetDict(ChConfig.Def_PlayerKey_MoreHurtValue, 0)
|
| | |
|
| | | return |