示例#1
0
文件: Role.cs 项目: r2d2m/Emotion
    public virtual void GetDamage(int damage)
    {
        float damageBase = 1f;

        foreach (Buff buff in buffManager.Buffs)
        {
            if (buff.name.Equals("脆弱"))
            {
                damageBase += 0.2f;
            }
        }

        int tmp = hpCurrent;

        tmp -= (int)(damage * damageBase);

        hpCurrent = tmp < 0 ? 0 : tmp;

        buffManager.BuffProcess(BuffType.GetHurt, this);
    }