Esempio n. 1
0
    static void ApplyBuffOnTarget(TroopScript Buffer, TroopScript Buffed , TypeOfBuff bufftype)
    {
        float strenght = BuffValue(Buffer);

        if (bufftype == TypeOfBuff.AttackCounter)
            Buffed.SetCounterAttackBuff(strenght);
        else if (bufftype == TypeOfBuff.AttackDirect)
            Buffed.SetDirectAttackBuff(strenght);
        else if (bufftype == TypeOfBuff.AttackTotal)
            Buffed.SetTotalAttackBuff(strenght*0.7f);
        else if (bufftype == TypeOfBuff.MatkCounter)
            Buffed.SetCounterMatkBuff(strenght);
        else if (bufftype == TypeOfBuff.MatkDirect)
            Buffed.SetDirectMatkBuff(strenght);
        else if (bufftype == TypeOfBuff.MatkTotal)
            Buffed.SetTotalMatkBuff(strenght*0.7f);
        else if (bufftype == TypeOfBuff.Defense)
            Buffed.SetDefenseBuff(strenght);
        else if (bufftype == TypeOfBuff.Mdef)
            Buffed.SetMdefBuff(strenght);
        else if (bufftype == TypeOfBuff.Speed)
            Buffed.SetSpeedBuff(strenght);
    }