| | |
| | | # @return True or False 返回值为是否使用成功(外层通知特效)
|
| | | # @remarks 函数详细说明.
|
| | | def UseItem(curPlayer, curRoleItem, tick):
|
| | | if curPlayer.GetHP() <= 0 or curPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
|
| | | if GameObj.GetHP(curPlayer) <= 0 or curPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
|
| | | #死亡不回血
|
| | | return
|
| | |
|
| | |
| | | # @return 布尔值
|
| | | # @remarks 一次性回血物品逻辑处理
|
| | | def __DoLogic_AddHP_Once(curPlayer, curItem, effValueA, effValueB):
|
| | | curValue = curPlayer.GetHP()
|
| | | curMaxValue = curPlayer.GetMaxHP()
|
| | | setFunc = curPlayer.SetHP
|
| | | curValue = GameObj.GetHP(curPlayer)
|
| | | curMaxValue = GameObj.GetMaxHP(curPlayer)
|
| | | setFunc = "SetHP"
|
| | | sysMsgStr = 'GeRen_chenxin_21675'
|
| | |
|
| | | return __Add_HPorMP_Once(curPlayer, curItem, curValue, curMaxValue, setFunc, effValueA, effValueB, sysMsgStr)
|
| | |
| | | #回复效果 = 玩家当前生命(魔法) + 玩家最大生命(魔法)上限 * 效果A值 + 效果B值
|
| | | addTotalValue = int(curMaxValue * addPer / ChConfig.Def_MaxRateValue + addValue)
|
| | | #回复数值
|
| | | setFunc(min(curMaxValue, curValue + addTotalValue))
|
| | | if setFunc == "SetHP":
|
| | | GameObj.SetHP(curPlayer, min(curMaxValue, curValue + addTotalValue))
|
| | | else:
|
| | | setFunc(min(curMaxValue, curValue + addTotalValue))
|
| | | #扣除物品
|
| | | ItemCommon.DelItem(curPlayer, curItem, 1, True)
|
| | | return True
|
| | |
| | | # @return 布尔值
|
| | | # @remarks 多次回血物品逻辑处理
|
| | | def __DoLogic_AddHP_More(curPlayer, curItem, effValueA):
|
| | | curValue = curPlayer.GetHP()
|
| | | curMaxValue = curPlayer.GetMaxHP()
|
| | | curValue = GameObj.GetHP(curPlayer)
|
| | | curMaxValue = GameObj.GetMaxHP(curPlayer)
|
| | | setFunc = curPlayer.SetHP
|
| | | sysMsgStr = 'GeRen_chenxin_21675'
|
| | |
|
| | |
| | | # PlayerControl.NotifyCode(curPlayer, "Pet_liubo_381601", [curRoleItem.GetItemTypeID()])
|
| | | # return False
|
| | | #
|
| | | # curValue = fightPetObj.GetHP()
|
| | | # curMaxValue = fightPetObj.GetMaxHP()
|
| | | # curValue = GameObj.GetHP(fightPetObj)
|
| | | # curMaxValue = GameObj.GetMaxHP(fightPetObj)
|
| | | # #已经满值
|
| | | # if curValue == curMaxValue:
|
| | | # PlayerControl.NotifyCode(curPlayer, "Pet_liubo_493922")
|