Exemple #1
0
    // runs debuff & buffs
    IEnumerator RunAbilityEffects(AbilityEffects effects, Piece source, Piece target, AbilityTarget abilityTarget)
    {
        //stat boosting
        if (effects.Boosts != null)
        {
            if (abilityTarget == AbilityTarget.Self)
            {
                source.ApplyBoost(effects.Boosts);
            }
            else
            {
                target.ApplyBoost(effects.Boosts);
            }
        }

        // cheecks to see what type of status condtion effect
        if (effects.Status != ConditionID.none)
        {
            target.SetStatus(effects.Status);
        }

        // cheecks to see what type of volatile status condtion effect
        if (effects.VolatileStatus != ConditionID.none)
        {
            target.SetVolatileStatus(effects.VolatileStatus);
        }

        //calls function to show after applying stat
        yield return(ShowStatusChanges(source));

        yield return(ShowStatusChanges(target));
    }