Esempio n. 1
0
    public virtual void takeGeneralDamage(Damage damage, Ability.IAbility  ability, IBattleCharacter source)
    {
        if (ability.getStatusEffectTypes() != null)
        {
            addStatusEffect(ability.getStatusEffectTypes());
        }

        if (this.getCharStats().targetCurHP <= 0)
            return;

        float modifier = UnityEngine.Random.Range(0.9f, 1.1f);
        damage.actualDamage = (int)((float)playerStats.calculateDamageTaken(damage.baseDamage, ability.getAbilityClass()) * modifier);
        takeDamage(damage, ability.show0Damage(), ability.timeToDamage());
    }