Esempio n. 1
0
    public bool Activate(params Constants.AbilityActivationCondition[] conditions)
    {
        if (HandleActivationConditions(conditions) == false)
        {
            //Debug.Log(abilityName + " failed an activation condition");
            return(false);
        }

        if (procChance < 1f && ProcRoll() == false)
        {
            //Debug.Log(abilityName + " failed a procroll");
            return(false);
        }

        if (sequencedAbilities.Count < 1)
        {
            //Debug.Log(abilityName + " has no sequences and is activating");
            EffectManager.ActivateAllEffects();
        }
        else
        {
            //Debug.Log("activating " + sequencedAbilities[sequenceIndex].abilityName + " with index of " + sequenceIndex);
            if (sequencedAbilities[sequenceIndex].Activate())
            {
                //Debug.Log(sequencedAbilities[sequenceIndex].abilityName + "activated successfully");
                sequenceTimer.ResetTimer();
            }
        }



        if (UseDuration > 0)
        {
            InUse = true;
        }

        if (sequencedAbilities.Count < 1)
        {
            Debug.Log(abilityName + " has been activated");
        }

        targets.Clear();

        return(true);
    }
Esempio n. 2
0
    public bool Activate(params Constants.AbilityActivationCondition[] conditions)
    {
        if (HandleActivationConditions(conditions) == false)
        {
            return(false);
        }

        if (procChance < 1f && ProcRoll() == false)
        {
            return(false);
        }

        EffectManager.ActivateAllEffects();
        InUse = true;
        Debug.Log(abilityName + " has been activated");

        return(true);
    }