Exemplo n.º 1
0
    /// <summary>
    /// 技能附加效果
    /// </summary>
    public static void AttachExtension(FightUnit attacker, FightUnit target, int hurtNum, SkillAttach attachType, JsonData param)
    {
        if (attachType == SkillAttach.None)
        {
            return;
        }
        switch (attachType)
        {
        case SkillAttach.Beatback:
            Beatback(attacker, target, int.Parse(param[0].ToString()), float.Parse(param[1].ToString()));
            break;

        case SkillAttach.ManaRecover:
            target.mana += int.Parse(param[0].ToString());
            /* -- 特效 -- */
            break;

        case SkillAttach.EnegyRecover:
            FightEnergy.instance.EnergyVal += int.Parse(param[0].ToString());
            /* -- 特效 -- */
            break;

        case SkillAttach.Taunt:
            target.attack.StopCurrent();
            target.targetUnit = attacker;
            /* -- 特效 -- */
            break;

        case SkillAttach.Dispel:
            target.ClearAllDebuff();
            /* -- 特效 -- */
            break;

        case SkillAttach.CallTotem:
            /* -- 图腾功能 -- */
            break;

        case SkillAttach.GetBlood:
            float rate = float.Parse(param[0].ToString());
            XixueCure(Mathf.RoundToInt(hurtNum * rate), attacker);
            /* -- 特效 -- */
            break;

        case SkillAttach.LoseMana:
            int manalose = int.Parse(param[0].ToString());
            target.mana -= manalose;
            /* -- 特效 -- */
            break;
        }
    }