Пример #1
0
        public override void DoSkill(SkillDataSon skillDataSon, CharHandler charHandler, List <CharHandler> targets, int skillInstId)
        {
            List <SkillData> skillDatas = skillDataSon.GetSkillDataList();

            switch (skillDatas[0].m_eSkillSonType)
            {
            case SkillEnum.SkillSonType.SkillRelease:
                ReleaseSkill(skillDataSon, charHandler, targets);
                break;

            case SkillEnum.SkillSonType.CleanBuff:
                CleanBuff(skillDataSon, charHandler, targets);
                break;

            case SkillEnum.SkillSonType.CleanDebuff:
                CleanDebuff(skillDataSon, charHandler, targets);
                break;

            case SkillEnum.SkillSonType.CleanBuffDebuff:
                CleanBuffDebuff(skillDataSon, charHandler, targets);
                break;

            case SkillEnum.SkillSonType.ReviveHero:
                ReviveHero(skillDatas[0], charHandler, targets);
                break;

            default:
                break;
            }
        }
Пример #2
0
        public TickData(CharHandler charHandler, CharHandler aimCharHandler, SkillDataSon skillDataSon, int aimCharIndex, int skillInstId)
        {
            m_iInstanceID   = ++iTickDataInstanceID;
            _CharHandler    = charHandler;
            _AimCharHandler = aimCharHandler;
            m_SkillDataSon  = skillDataSon;
            m_eBuffType     = skillDataSon.GetSkillDataList()[0].m_eSkillSonType;
            _iAimCharIndex  = aimCharIndex;

            float fTotalSecOri;

            if (float.TryParse(m_SkillDataSon.m_sTimeLong, out fTotalSecOri))
            {
                m_fTotalSec = fTotalSecOri;
            }
            else
            {
                fTotalSecOri = Mathf.Ceil(BattleCalculate.ExcuteFormula(m_SkillDataSon.m_sTimeLong, m_SkillDataSon.m_sTimeMaxLong, charHandler, aimCharHandler));
                m_fTotalSec  = ChangeProperty.RatioCoefficient(fTotalSecOri, skillDataSon.m_Parent.m_eSkillKind, charHandler, aimCharHandler);
            }

            if (skillDataSon.m_bDeliver)
            {
                fTotalSecOri *= aimCharIndex + 1;
            }

            switch (m_eBuffType)
            {
            case SkillEnum.SkillSonType.Stun:
                m_fTotalSec = fTotalSecOri * (1 - aimCharHandler.m_CharData.StunDefRatio);                          //1 - 抗晕
                break;

            case SkillEnum.SkillSonType.SkillForbid:
                m_fTotalSec = fTotalSecOri * (1 - aimCharHandler.m_CharData.ForbidDefRatio);                            //1 - 抗封
                break;

            default:
                m_fTotalSec = fTotalSecOri;
                break;
            }

            if (m_fTotalSec > 0f)
            {
                m_fUnitSec = m_SkillDataSon.m_fTimeUnit;

                if (m_fUnitSec > 0f)
                {
                    m_fTotalSec = m_fTotalSec - m_fTotalSec % m_fUnitSec;
                }
                else
                {
                    m_fUnitSec = m_fTotalSec;
                }

                SetFunction(skillInstId);
            }
        }
Пример #3
0
        private void SetFunction(int skillInstId)
        {
            SetEffect();
            List <SkillData> lstSkillDatas = m_SkillDataSon.GetSkillDataList();;

            for (int i = 0, len = lstSkillDatas.Count; i < len; ++i)
            {
                ChangeProperty.Change(lstSkillDatas[i], _CharHandler, _AimCharHandler, _iAimCharIndex, this, skillInstId);
            }
        }
Пример #4
0
        public override void DoSkill(SkillDataSon skillDataSon, CharHandler charHandler, List <CharHandler> targets, int skillInstId)
        {
            List <SkillData> skillDatas = skillDataSon.GetSkillDataList();

            for (int i = 0; i < targets.Count; ++i)
            {
                CharHandler aimHandler = targets[i];
                BulletBase  bullet     = charHandler.m_CharEffect.GetSkillBulletObj(charHandler.m_CharData.m_iCurSkillID).GetComponent <BulletBase>();
                bullet.Shoot(charHandler, targets[i], () => { ChangeProperty.Change(skillDatas[0], charHandler, aimHandler, 0); });
            }
        }
Пример #5
0
        public override void DoSkill(SkillDataSon skillDataSon, CharHandler charHandler, List <CharHandler> targets, int skillInstId)
        {
            List <SkillData> skillDatas = skillDataSon.GetSkillDataList();

            for (int i = 0; i < targets.Count; ++i)
            {
                for (int j = 0; j < skillDatas.Count; ++j)
                {
                    ChangeProperty.Change(skillDatas[j], charHandler, targets[i], i);
                }
            }
        }