| | |
| | | import PlayerHorse
|
| | | import FBCommon
|
| | | import NPCCommon
|
| | | import GameObj
|
| | |
|
| | | import math
|
| | | import time
|
| | |
| | | def ConditionType_Get_Hp_Percent(curPlayer, curMission, curConditionNode):
|
| | | conditionValue = int(curConditionNode.GetAttribute("value"))
|
| | | conditionType = curConditionNode.GetAttribute("type")
|
| | | curPlayerHP = curPlayer.GetHP()
|
| | | conditionHP = curPlayer.GetMaxHP() * conditionValue / 100
|
| | | curPlayerHP = GameObj.GetHP(curPlayer)
|
| | | conditionHP = GameObj.GetMaxHP(curPlayer) * conditionValue / 100
|
| | |
|
| | |
|
| | | return QuestRunnerValue.GetEval(conditionType, curPlayerHP, conditionHP)
|
| | |
| | | def DoType_Set_Hp_Percent(curPlayer, curMission, curActionNode):
|
| | | value = GameWorld.ToIntDef(curActionNode.GetAttribute("value"))
|
| | |
|
| | | maxHP = curPlayer.GetMaxHP()
|
| | | maxHP = GameObj.GetMaxHP(curPlayer)
|
| | | playerHP = maxHP * value / ShareDefine.Def_Percentage
|
| | |
|
| | | smallHP = 1
|
| | |
| | | #防范纠错 最少1点血,最多满血
|
| | | playerHP = GameWorld.ToIntArea(playerHP, smallHP, maxHP)
|
| | |
|
| | | curPlayer.SetHP(playerHP)
|
| | | GameObj.SetHP(curPlayer, playerHP)
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ##设置人物法量百分比
|