Ejemplo n.º 1
0
    //When you use damaging ability- comes here
    public void CallBack(List <bool> CanAttack, float Damage, float DamageOverTime, float Mod, float StunL, float SlowL, float SlowS, TypeOfDamage DamageType, bool AoE, EnemyOrNo HeroOrEnemy)
    {
        check        = 0;
        CurDamage    = Damage;
        CurMod       = Mod;
        CurSlowL     = SlowL;
        CurSlowS     = SlowS;
        CurStunL     = StunL;
        TypeOfDamage = DamageType;

        EnemyOrNo = HeroOrEnemy;

        CurDoT = DamageOverTime;
        if (AoE == true)
        {
            Turns[CurrentTurn].AnimateAbility();
            if (HeroOrEnemy == EnemyOrNo.Hero)
            {
                for (int i = 0; i < EnemiesNumber; i++)
                {
                    if (CanAttack[i] && Stat[i + 3].GetComponent <Stats>().curHealth > 0)
                    {
                        if (TypeOfDamage == TypeOfDamage.Phisical)
                        {
                            WhoIsAttacked = i + 3;
                            Stat[i + 3].DamagedPhis(CurDamage, CurDoT, CurMod, CurStunL, CurSlowL, CurSlowS);
                        }
                        else
                        {
                            WhoIsAttacked = i + 3;
                            Stat[i + 3].DamagedMagical(CurDamage, CurDoT, CurMod, CurStunL, CurSlowL, CurSlowS);
                        }
                    }
                    else
                    {
                        check++;
                    }
                }
            }
            else
            {
                for (int i = 0; i < 3; i++)
                {
                    if (CanAttack[i] && Stat[i].GetComponent <Stats>().curHealth > 0)
                    {
                        if (TypeOfDamage == TypeOfDamage.Phisical)
                        {
                            WhoIsAttacked = i;
                            Stat[i].DamagedPhis(CurDamage, CurDoT, CurMod, CurStunL, CurSlowL, CurSlowS);
                        }
                        else
                        {
                            WhoIsAttacked = i;
                            Stat[i].DamagedMagical(CurDamage, CurDoT, CurMod, CurStunL, CurSlowL, CurSlowS);
                        }
                    }
                    else
                    {
                        check++;
                    }
                }
            }
            SwitchingTurns();
        }
        else
        {
            if (HeroOrEnemy == EnemyOrNo.Hero)
            {
                for (int i = 0; i < EnemiesNumber; i++)
                {
                    if (CanAttack[i] && Stat[i + 3].GetComponent <Stats>().curHealth > 0)
                    {
                        Targets[i + 3].GetComponent <SpriteRenderer>().sprite = CircleRed;
                        Targets[i + 3].GetComponent <Presser>().IsDamaging    = true;
                        Targets[i].GetComponent <Presser>().Ressurect         = false;
                        Targets[i + 3].SetActive(true);
                    }
                    else
                    {
                        check++;
                    }
                }
            }
            else
            {
                for (int i = 0; i < 3; i++)
                {
                    if (CanAttack[i] && Stat[i].GetComponent <Stats>().curHealth > 0)
                    {
                        Targets[i].GetComponent <SpriteRenderer>().sprite = CircleRed;
                        Targets[i].GetComponent <Presser>().IsDamaging    = true;
                        Targets[i].GetComponent <Presser>().Ressurect     = false;
                        Targets[i].SetActive(true);
                    }
                    else
                    {
                        check++;
                    }
                }
            }
            if (check >= 3)
            {
                SwitchingTurns();
            }
        }
    }
Ejemplo n.º 2
0
    //When you use healing ability- comes here
    public void HealingCallBack(List <bool> CanAttack, float Healing, float HMod, float SpBuff, float HpBuff, float MRBuff, float PRBuff, bool AoE, float Length, EnemyOrNo HeroOrEnemy)
    {
        check      = 0;
        CurHealing = Healing;
        CurHMod    = HMod;
        CurSpBuff  = SpBuff;
        CurHpBuff  = HpBuff;
        CurMRBuff  = MRBuff;
        CurPRBuff  = PRBuff;
        CurLength  = Length;

        EnemyOrNo = HeroOrEnemy;

        if (AoE == true)
        {
            Turns[CurrentTurn].AnimateAbility();
            if (HeroOrEnemy == EnemyOrNo.Hero)
            {
                for (int i = 0; i < 3; i++)
                {
                    if (CanAttack[i] && Stat[i].GetComponent <Stats>().curHealth > 0)
                    {
                        WhoIsAttacked = i;
                        Stat[i].Healed(CurHealing, CurHMod, CurSpBuff, CurHpBuff, CurMRBuff, CurPRBuff, Length);
                    }
                    else
                    {
                        check++;
                    }
                }
                if (check >= 3)
                {
                    SwitchingTurns();
                }
            }
            else
            {
                for (int i = 0; i < EnemiesNumber; i++)
                {
                    if (CanAttack[i] && Stat[i + 3].GetComponent <Stats>().curHealth > 0)
                    {
                        WhoIsAttacked = i + 3;
                        Stat[i + 3].Healed(CurHealing, CurHMod, CurSpBuff, CurHpBuff, CurMRBuff, CurPRBuff, Length);
                    }
                    else
                    {
                        check++;
                    }
                }
                if (check >= 3)
                {
                    SwitchingTurns();
                }
            }
            SwitchingTurns();
        }
        else
        {
            //check- beneath who you should draw this circle- enemies or heroes.
            if (HeroOrEnemy == EnemyOrNo.Hero)
            {
                for (int i = 0; i < 3; i++)
                {
                    if (CanAttack[i] && Stat[i + 3].GetComponent <Stats>().curHealth > 0)
                    {
                        Targets[i].GetComponent <SpriteRenderer>().sprite = CircleBlue;
                        Targets[i].GetComponent <Presser>().IsDamaging    = false;
                        Targets[i].GetComponent <Presser>().Ressurect     = false;
                        Targets[i].SetActive(true);
                    }
                    else
                    {
                        check++;
                    }
                }
            }
            else
            {
                for (int i = 0; i < EnemiesNumber; i++)
                {
                    if (CanAttack[i] && Stat[i + 3].GetComponent <Stats>().curHealth > 0)
                    {
                        Targets[i + 3].GetComponent <SpriteRenderer>().sprite = CircleBlue;
                        Targets[i + 3].GetComponent <Presser>().IsDamaging    = false;
                        Targets[i].GetComponent <Presser>().Ressurect         = false;
                        Targets[i + 3].SetActive(true);
                    }
                    else
                    {
                        check++;
                    }
                }
            }
            if (check >= 3)
            {
                SwitchingTurns();
            }
        }
    }
Ejemplo n.º 3
0
 public override void UseAbility(EnemyOrNo HeroOrEnemy)
 {
     GameIntel.Instance.Reviving(canAttack);
 }
Ejemplo n.º 4
0
 //Just passes a lot of elements.
 public override void UseAbility(EnemyOrNo HeroOrEnemy)
 {
     GameIntel.Instance.HealingCallBack(canAttack, Healing, Mod, BuffToSpeed, BuffToHP, BuffToMR, BuffToPR, AoE, Length, HeroOrEnemy);
 }
Ejemplo n.º 5
0
 //Just passes a lot of elements.
 public override void UseAbility(EnemyOrNo HeroOrEnemy)
 {
     GameIntel.Instance.CallBack(canAttack, Damage, DamageOverTime, Mod, StunLength, SlowLenght, SlowStrength, DamageType, AoE, HeroOrEnemy);
 }
Ejemplo n.º 6
0
 public virtual void UseAbility(EnemyOrNo HeroOrEnemy)
 {
 }