IEnumerator Blizzard()
    {
        int count = (int)skill1.arg3;

        for (int i = 0; i < count; i++)
        {
            BaseUnit unit = troop.GetRandEnemy();
            if (!unit)
            {
                return(false);
            }
            GameObject eff = Instantiate(BattleManager.Instance.GetEffect("12361")) as GameObject;
            eff.transform.position = unit.transform.position + Vector3.up * 10;
            iTween.MoveTo(eff, iTween.Hash("position", unit.transform.position, "easeType", "linear", "time", 0.45f));
            yield return(new WaitForSeconds(0.6f));

            float dmg = CalcDamage() + skill1.arg1;
            unit.Damage(dmg, this);
            int percentage = (skill1.level - unit.level) * 20 + 100;
            if (Helper.Rand100Hit(percentage))
            {
                Dot dot = new Dot();
                dot.type     = DotType.freeze;
                dot.duration = skill1.arg4;
                dot.unit     = this;
                unit.AddDot(dot);
            }
        }
    }
 private void FinishFlying(GameObject arrow)
 {
     if (skill2 != null && normalAttackCount == (int)skill2.arg3)
     {
         normalAttackCount = 0;
         float dmg = CalcDamage() + skill2.arg1;
         dmg /= skill2.arg4;
         Dot dot = new Dot();
         dot.type     = DotType.burning;
         dot.num      = dmg;
         dot.duration = skill2.arg4;
         dot.unit     = this;
         aim.AddDot(dot);
     }
     else
     {
         base.DoNormalAttack(aim);
     }
     Destroy(arrow);
 }