blob: 0b171d91a09ac7ee6a825bd013363f132e1a8327 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
using System;
using System.Xml;
using XUtliPoolLib;
namespace XMainClient
{
internal class AIRunTimeValueHP : AIRunTimeNodeCondition
{
private int _max_hp;
private int _min_hp;
public AIRunTimeValueHP(XmlElement node) : base(node)
{
this._max_hp = int.Parse(node.GetAttribute("MaxPercent"));
this._min_hp = int.Parse(node.GetAttribute("MinPercent"));
}
public override bool Update(XEntity entity)
{
return XSingleton<XAIGeneralMgr>.singleton.IsHPValue(entity.ID, this._min_hp, this._max_hp);
}
}
}
|