Пример #1
0
    public void Heal(int healAmount)
    {
        foreach (string ability in card.abilities)
        {
            string[] splitString = ability.Split(stringSeparator, System.StringSplitOptions.None);

            if (splitString[0] == "regen")
            {
                healAmount += AbilityScript.Regen(System.Convert.ToInt32(splitString[1]));
            }
        }

        card.hp += healAmount;

        if (card.hp > card.GetCurrentStats().maxHp)
        {
            card.hp = card.GetCurrentStats().maxHp;
        }
    }