예제 #1
0
    /// <summary>
    /// 增加最大血量
    /// </summary>
    public virtual void AddMaxHp(int num)
    {
        maxHp += num;

        hp += num;

        Actions.Add(MaxHpChangeAction.GetAction(this.ID, num));
    }
예제 #2
0
    /// <summary>
    /// 减少最大血量
    /// </summary>
    public virtual void DeductMaxHp(int num)
    {
        maxHp -= num;
        if (hp > maxHp)
        {
            hp = maxHp;
        }

        Actions.Add(MaxHpChangeAction.GetAction(this.ID, -num));
    }