Exemplo n.º 1
0
        protected override void ExcuteActiveSkillLogic(BattleAgentController self, BattleAgentController enemy)
        {
            int hurt = fixHurt + hurtBase * skillLevel;

            enemy.AddHurtAndShow(hurt, HurtType.Physical, self.towards);


            enemy.PlayShakeAnim();

            enemy.SetEffectAnim(enemyEffectAnimName);


            float roleAnimScaler = enemy.GetRoleAnimTimeScaler();

            roleAnimScaler *= (1 - attackSpeedDecreaseScalerBase);

            if (roleAnimScaler < 0.6f)
            {
                return;
            }
            else
            {
                // 敌方行动速度减慢
                enemy.SetRoleAnimTimeScale(roleAnimScaler);
                enemy.SetEffectAnim(CommonData.paralyzedEffectName, null, 0, 0);
            }
        }
Exemplo n.º 2
0
        protected override void ExcuteActiveSkillLogic(BattleAgentController self, BattleAgentController enemy)
        {
            int hurt = self.agent.magicAttack + fixHurt + hurtBase * skillLevel;

            int magicResistCal = enemy.agent.magicResist - self.agent.magicResistDecrease / 2;

            if (magicResistCal < -50)
            {
                magicResistCal = -50;
            }

            hurt = Mathf.RoundToInt(hurt / (magicResistCal / 100f + 1));

            if (hurt < 0)
            {
                hurt = 0;
            }

            // 伤害生效并显示
            enemy.AddHurtAndShow(hurt, HurtType.Magical, self.towards);

            enemy.SetEffectAnim(enemyEffectAnimName);

            // 敌方被击中后退
            enemy.PlayShakeAnim();

            float roleAnimScaler = enemy.GetRoleAnimTimeScaler();

            roleAnimScaler *= (1 - attackSpeedDecreaseScalerBase);

            if (roleAnimScaler < 0.6f)
            {
                return;
            }
            else
            {
                // 敌方行动速度减慢
                enemy.SetRoleAnimTimeScale(roleAnimScaler);
                enemy.SetEffectAnim(CommonData.frozenEffectName, null, 0, 0);
            }
        }