public override void DoAdditionalEffect(VisibleGameEntity target)
        {
            base.DoAdditionalEffect(target);
            if (PlayerOwner.Mp + this.ListLevel[Level].ListSkillInfo[0].Mp < 0)
                return;
            if (target != null)
            {
                SkillInfo skillInfo = ListLevel[Level].ListSkillInfo[0];

                if (GlobalVariables.GlobalRandom.Next(0, 100) < skillInfo.ChanceToCurse)
                {
                    ((Monster)target).Defense -= skillInfo.AmorReduce;
                    Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(7);
                    prjt.X = target.X;
                    prjt.Y = target.Y;
                    ((Monster)target).AdditionnalEffect.Add(prjt);
                    ((Monster)target).StateOwner._displayMessageLayer.MessageArray.Add(new DisplayMessageLayer.Message
                    {
                        X = ((Monster)target).X,
                        Y = ((Monster)target).Y - 2 * GlobalVariables.MapCollisionDim,
                        Owner = this,
                        DeltaY = -1,
                        LifeTime = 45,
                        MessageContent = (-skillInfo.AmorReduce).ToString() + " Amor",
                        TextColor = Color.Yellow,
                        MinY = (int)((Monster)target).Y - 2 * GlobalVariables.MapCollisionDim - 30,
                    }
                );
                }

            }
            PlayerOwner.Mp += this.ListLevel[Level].ListSkillInfo[0].Mp;
        }
Ejemplo n.º 2
0
        public override void DoEffect(VisibleGameEntity _object)
        {
            base.DoEffect(_object);
            Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(3);

            prjt.X             = _object.X;
            prjt.Y             = _object.Y;
            prjt.CollisionRect = new Rectangle(prjt.CollisionRect.X + 3 * GlobalVariables.MapCollisionDim / 8, prjt.CollisionRect.Y + 3 * GlobalVariables.MapCollisionDim / 8, GlobalVariables.MapCollisionDim / 4, GlobalVariables.MapCollisionDim / 4);

            prjt.MinDamage = PlayerOwner.MinDamage + PlayerOwner.MinDamage * ListLevel[Level].ListSkillInfo[0].PercentDamage / 100;
            prjt.MaxDamage = PlayerOwner.MaxDamage + PlayerOwner.MaxDamage * ListLevel[Level].ListSkillInfo[0].PercentDamage / 100;
            if (GlobalVariables.GlobalRandom.Next(0, 100) < PlayerOwner.CriticalRate)
            {
                prjt.MinDamage *= 2;
                prjt.MaxDamage *= 2;
            }
            prjt.SkillOwner = this;
            PlayerOwner.StateOwner._listProjectile.Add(prjt);
            PlayerOwner.Hp += this.ListLevel[Level].ListSkillInfo[0].Hp;

            prjt   = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(5);
            prjt.X = PlayerOwner.X;
            prjt.Y = PlayerOwner.Y;
            PlayerOwner.AdditionnalEffect.Add(prjt);
        }
        public override void DoEffect(VisibleGameEntity _object)
        {
            base.DoEffect(_object);
            for (int i = 0; i < ListLevel[Level].ListSkillInfo[0].NumOfBee; ++i)
            {
                Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(ListLevel[Level].ListSkillInfo[0].ProjectileType);
                prjt.X = GlobalVariables.GlobalRandom.Next((int)PlayerOwner.X - 100, (int)PlayerOwner.X + 100);
                prjt.Y = GlobalVariables.GlobalRandom.Next((int)PlayerOwner.Y - 100, (int)PlayerOwner.Y + 100);
                //prjt.X = PlayerOwner.X;
                //prjt.Y = PlayerOwner.Y;
                prjt.MaxDamage = ListLevel[Level].ListSkillInfo[0].MaxDamage;
                prjt.MinDamage = ListLevel[Level].ListSkillInfo[0].MinDamage;
                prjt.ProjectileController = new InsectFlyingController();
                prjt.ProjectileController.Owner = prjt;
                prjt.IsRemoveAfterEffect = false;
                prjt.SkillOwner = this;
                prjt.LifeTime = ListLevel[Level].ListSkillInfo[0].BeeLifeTime;
                ((InsectFlyingController)prjt.ProjectileController).Rad = MathHelper.ToRadians(GlobalVariables.GlobalRandom.Next(0, 360));
                ((InsectFlyingController)prjt.ProjectileController).MaxA = 150;
                ((InsectFlyingController)prjt.ProjectileController).MaxB = 100;
                ((InsectFlyingController)prjt.ProjectileController).CenterX = prjt.X;
                ((InsectFlyingController)prjt.ProjectileController).CenterY = prjt.Y;
                PlayerOwner.StateOwner._listProjectile.Add(prjt);
            }

            PlayerOwner.Mp += this.ListLevel[Level].ListSkillInfo[0].Mp;
        }
 public override void DoAdditionalEffect(VisibleGameEntity target)
 {
     base.DoAdditionalEffect(target);
     int _hpRestore = -((Monster)target).RecentHPLost * ListLevel[Level].ListSkillInfo[0].PercentLifeSteal / 100;
     PlayerOwner.Hp += _hpRestore;
     //Projectile prjt = (Projectile)PlayerOwner.Owner._objectManagerArray[6].CreateObject(4);
     //prjt.X = PlayerOwner.X;
     //prjt.Y = PlayerOwner.Y;
     //PlayerOwner.Owner._listProjectile.Add(prjt);
     Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(5);
     prjt.X = ((Monster)target).X;
     prjt.Y = ((Monster)target).Y;
     ((Monster)target).AdditionnalEffect.Add(prjt);
     PlayerOwner.StateOwner._displayMessageLayer.MessageArray.Add(new DisplayMessageLayer.Message
     {
         X = PlayerOwner.X,
         Y = PlayerOwner.Y - 2 * GlobalVariables.MapCollisionDim,
         Owner = this,
         DeltaY = -1,
         LifeTime = 45,
         MessageContent = "+ " + _hpRestore.ToString(),
         TextColor = Color.LightGreen,
         DelayTime = 10,
         MinY = (int)PlayerOwner.Y - 2 * GlobalVariables.MapCollisionDim - 30,
     });
 }
        public override void DoAdditionalEffect(VisibleGameEntity target)
        {
            base.DoAdditionalEffect(target);
            if (PlayerOwner.Mp + this.ListLevel[Level].ListSkillInfo[0].Mp < 0)
            {
                return;
            }
            if (target != null)
            {
                SkillInfo skillInfo = ListLevel[Level].ListSkillInfo[0];


                if (GlobalVariables.GlobalRandom.Next(0, 100) < skillInfo.ChanceToCurse)
                {
                    ((Monster)target).Defense -= skillInfo.AmorReduce;
                    Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(7);
                    prjt.X = target.X;
                    prjt.Y = target.Y;
                    ((Monster)target).AdditionnalEffect.Add(prjt);
                    ((Monster)target).StateOwner._displayMessageLayer.MessageArray.Add(new DisplayMessageLayer.Message
                    {
                        X              = ((Monster)target).X,
                        Y              = ((Monster)target).Y - 2 * GlobalVariables.MapCollisionDim,
                        Owner          = this,
                        DeltaY         = -1,
                        LifeTime       = 45,
                        MessageContent = (-skillInfo.AmorReduce).ToString() + " Amor",
                        TextColor      = Color.Yellow,
                        MinY           = (int)((Monster)target).Y - 2 * GlobalVariables.MapCollisionDim - 30,
                    }
                                                                                       );
                }
            }
            PlayerOwner.Mp += this.ListLevel[Level].ListSkillInfo[0].Mp;
        }
Ejemplo n.º 6
0
 public virtual void DoEffect(VisibleGameEntity _object)
 {
     if (DelayTime == 0)
     {
         _skillOwner.DoEffect(_object);
     }
 }
        public override void DoEffect(VisibleGameEntity _object)
        {
            base.DoEffect(_object);
            for (int i = 0; i < ListLevel[Level].ListSkillInfo[0].NumOfBee; ++i)
            {
                Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(ListLevel[Level].ListSkillInfo[0].ProjectileType);
                prjt.X = GlobalVariables.GlobalRandom.Next((int)PlayerOwner.X - 100, (int)PlayerOwner.X + 100);
                prjt.Y = GlobalVariables.GlobalRandom.Next((int)PlayerOwner.Y - 100, (int)PlayerOwner.Y + 100);
                //prjt.X = PlayerOwner.X;
                //prjt.Y = PlayerOwner.Y;
                prjt.MaxDamage                  = ListLevel[Level].ListSkillInfo[0].MaxDamage;
                prjt.MinDamage                  = ListLevel[Level].ListSkillInfo[0].MinDamage;
                prjt.ProjectileController       = new InsectFlyingController();
                prjt.ProjectileController.Owner = prjt;
                prjt.IsRemoveAfterEffect        = false;
                prjt.SkillOwner                 = this;
                prjt.LifeTime = ListLevel[Level].ListSkillInfo[0].BeeLifeTime;
                ((InsectFlyingController)prjt.ProjectileController).Rad     = MathHelper.ToRadians(GlobalVariables.GlobalRandom.Next(0, 360));
                ((InsectFlyingController)prjt.ProjectileController).MaxA    = 150;
                ((InsectFlyingController)prjt.ProjectileController).MaxB    = 100;
                ((InsectFlyingController)prjt.ProjectileController).CenterX = prjt.X;
                ((InsectFlyingController)prjt.ProjectileController).CenterY = prjt.Y;
                PlayerOwner.StateOwner._listProjectile.Add(prjt);
            }

            PlayerOwner.Mp += this.ListLevel[Level].ListSkillInfo[0].Mp;
        }
        public override void DoAdditionalEffect(VisibleGameEntity target)
        {
            base.DoAdditionalEffect(target);
            int _hpRestore = -((Monster)target).RecentHPLost * ListLevel[Level].ListSkillInfo[0].PercentLifeSteal / 100;

            PlayerOwner.Hp += _hpRestore;
            //Projectile prjt = (Projectile)PlayerOwner.Owner._objectManagerArray[6].CreateObject(4);
            //prjt.X = PlayerOwner.X;
            //prjt.Y = PlayerOwner.Y;
            //PlayerOwner.Owner._listProjectile.Add(prjt);
            Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(5);

            prjt.X = ((Monster)target).X;
            prjt.Y = ((Monster)target).Y;
            ((Monster)target).AdditionnalEffect.Add(prjt);
            PlayerOwner.StateOwner._displayMessageLayer.MessageArray.Add(new DisplayMessageLayer.Message
            {
                X              = PlayerOwner.X,
                Y              = PlayerOwner.Y - 2 * GlobalVariables.MapCollisionDim,
                Owner          = this,
                DeltaY         = -1,
                LifeTime       = 45,
                MessageContent = "+ " + _hpRestore.ToString(),
                TextColor      = Color.LightGreen,
                DelayTime      = 10,
                MinY           = (int)PlayerOwner.Y - 2 * GlobalVariables.MapCollisionDim - 30,
            });
        }
Ejemplo n.º 9
0
 public virtual void DoEffect(VisibleGameEntity _object)
 {
     _checkCoolDown = ListLevel[Level].ListSkillInfo[0].CoolDown;
     _coolDownTime  = _checkCoolDown;
     if (SoundName != null && SoundName.Length > 0)
     {
         GlobalVariables.PlayEffectSound(SoundName);
     }
 }
        public override void DoAdditionalEffect(VisibleGameEntity target)
        {
            base.DoAdditionalEffect(target);

                if (target != null)
                {
                    if (!_listMonster.Contains((Monster)target))
                        _listMonster.Add((Monster)target);
                }
        }
 public bool IsCollisionWith(VisibleGameEntity other)
 {
     //if (other == null)
     //    return false;
     //if (Math.Abs(other.X - this.X) < GlobalVariables.MapCollisionDim * 1 && Math.Abs(other.Y - this.Y) < GlobalVariables.MapCollisionDim * 1)
     //    return true;
     //return false;
     if (other != null)
         return this.CollisionRect.Intersects(other.CollisionRect);
     return false;
 }
        public override void DoAdditionalEffect(VisibleGameEntity target)
        {
            base.DoAdditionalEffect(target);

            if (target != null)
            {
                if (!_listMonster.Contains((Monster)target))
                {
                    _listMonster.Add((Monster)target);
                }
            }
        }
 public bool IsCollisionWith(VisibleGameEntity other)
 {
     //if (other == null)
     //    return false;
     //if (Math.Abs(other.X - this.X) < GlobalVariables.MapCollisionDim * 1 && Math.Abs(other.Y - this.Y) < GlobalVariables.MapCollisionDim * 1)
     //    return true;
     //return false;
     if (other != null)
     {
         return(this.CollisionRect.Intersects(other.CollisionRect));
     }
     return(false);
 }
        public override void DoEffect(VisibleGameEntity _object)
        {
            base.DoEffect(_object);
            Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(ListLevel[Level].ListSkillInfo[0].ProjectileType);
            prjt.X = PlayerOwner.TargetSkillX;
            prjt.Y = PlayerOwner.TargetSkillY;
            prjt.MinDamage = ListLevel[Level].ListSkillInfo[0].MinDamage;
            prjt.MaxDamage = ListLevel[Level].ListSkillInfo[0].MaxDamage;
            prjt.SkillOwner = this;
            EarthShakeController esc = new EarthShakeController();
            esc.Owner = prjt;
            prjt.ProjectileController = esc;
            PlayerOwner.StateOwner._listProjectile.Add(prjt);

            PlayerOwner.Mp += ListLevel[Level].ListSkillInfo[0].Mp;
        }
        public override void DoEffect(VisibleGameEntity _object)
        {
            base.DoEffect(_object);
            Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(ListLevel[Level].ListSkillInfo[0].ProjectileType);

            prjt.X          = PlayerOwner.TargetSkillX;
            prjt.Y          = PlayerOwner.TargetSkillY;
            prjt.MinDamage  = ListLevel[Level].ListSkillInfo[0].MinDamage;
            prjt.MaxDamage  = ListLevel[Level].ListSkillInfo[0].MaxDamage;
            prjt.SkillOwner = this;
            EarthShakeController esc = new EarthShakeController();

            esc.Owner = prjt;
            prjt.ProjectileController = esc;
            PlayerOwner.StateOwner._listProjectile.Add(prjt);

            PlayerOwner.Mp += ListLevel[Level].ListSkillInfo[0].Mp;
        }
Ejemplo n.º 16
0
        public override void DoEffect(VisibleGameEntity _object)
        {
            base.DoEffect(_object);

            for (int i = 0; i < ListLevel[Level].ListSkillInfo[0].NumberOfStar; ++i)
            {
                Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(ListLevel[Level].ListSkillInfo[0].ProjectileType);
                prjt.X          = GlobalVariables.GlobalRandom.Next((int)PlayerOwner.X - 200, (int)PlayerOwner.X + 200);
                prjt.Y          = GlobalVariables.GlobalRandom.Next((int)PlayerOwner.Y - 100, (int)PlayerOwner.Y + 100);
                prjt.MinDamage  = ListLevel[Level].ListSkillInfo[0].MinDamage;
                prjt.MaxDamage  = ListLevel[Level].ListSkillInfo[0].MaxDamage;
                prjt.SkillOwner = this;
                LightningProjectileController lpc = new LightningProjectileController();
                lpc.Owner = prjt;
                prjt.ProjectileController = lpc;
                prjt.DelayTime            = GlobalVariables.GlobalRandom.Next(0, ListLevel[Level].ListSkillInfo[0].Duration * 60);
                PlayerOwner.StateOwner._listProjectile.Add(prjt);
            }
        }
        public override void DoEffect(VisibleGameEntity _object)
        {
            base.DoEffect(_object);
            Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(3);
            prjt.X = _object.X;
            prjt.Y = _object.Y;
            prjt.CollisionRect = new Rectangle(prjt.CollisionRect.X + 3 * GlobalVariables.MapCollisionDim / 8, prjt.CollisionRect.Y + 3 * GlobalVariables.MapCollisionDim / 8, GlobalVariables.MapCollisionDim / 4, GlobalVariables.MapCollisionDim / 4);

            prjt.MinDamage = PlayerOwner.MinDamage + PlayerOwner.MinDamage * ListLevel[Level].ListSkillInfo[0].PercentDamage / 100;
            prjt.MaxDamage = PlayerOwner.MaxDamage + PlayerOwner.MaxDamage * ListLevel[Level].ListSkillInfo[0].PercentDamage / 100;
            if (GlobalVariables.GlobalRandom.Next(0, 100) < PlayerOwner.CriticalRate)
            {
                prjt.MinDamage *= 2;
                prjt.MaxDamage *= 2;
            }
            prjt.SkillOwner = this;
            PlayerOwner.StateOwner._listProjectile.Add(prjt);
            PlayerOwner.Mp += ListLevel[Level].ListSkillInfo[0].Mp;
        }
 public override void DoEffect(VisibleGameEntity _object)
 {
     base.DoEffect(_object);
     Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(17);
     prjt.X = PlayerOwner.X;
     prjt.Y = PlayerOwner.Y;
     prjt.MinDamage = PlayerOwner.MinDamage / 5;
     prjt.MaxDamage = PlayerOwner.MaxDamage ;
     prjt.IsRemoveAfterEffect = false;
     prjt.LifeTime = 100;
     prjt.SkillOwner = this;
     LightningStrikeProjectileController lspc = new LightningStrikeProjectileController();
     lspc.Owner = prjt;
     lspc.FlyingDirection = new Vector2(PlayerOwner.TargetSkillX - PlayerOwner.X, PlayerOwner.TargetSkillY - PlayerOwner.Y);
     float maxDim = Math.Abs(lspc.FlyingDirection.X) > Math.Abs(lspc.FlyingDirection.Y) ? Math.Abs(lspc.FlyingDirection.X): Math.Abs(lspc.FlyingDirection.Y);
     lspc.FlyingDirection = new Vector2(lspc.FlyingDirection.X / maxDim, lspc.FlyingDirection.Y / maxDim);
     prjt.ProjectileController = lspc;
     PlayerOwner.StateOwner._listProjectile.Add(prjt);
 }
        public override void DoEffect(VisibleGameEntity _object)
        {
            base.DoEffect(_object);

            for (int i = 0; i < ListLevel[Level].ListSkillInfo[0].NumberOfStar; ++i)
            {
                Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(ListLevel[Level].ListSkillInfo[0].ProjectileType);
                prjt.X = GlobalVariables.GlobalRandom.Next((int)PlayerOwner.X - 200, (int)PlayerOwner.X + 200);
                prjt.Y = GlobalVariables.GlobalRandom.Next((int)PlayerOwner.Y - 100, (int)PlayerOwner.Y + 100);
                prjt.MinDamage = ListLevel[Level].ListSkillInfo[0].MinDamage;
                prjt.MaxDamage = ListLevel[Level].ListSkillInfo[0].MaxDamage;
                prjt.SkillOwner = this;
                LightningProjectileController lpc = new LightningProjectileController();
                lpc.Owner = prjt;
                prjt.ProjectileController = lpc;
                prjt.DelayTime = GlobalVariables.GlobalRandom.Next(0, ListLevel[Level].ListSkillInfo[0].Duration * 60);
                PlayerOwner.StateOwner._listProjectile.Add(prjt);

            }
        }
        public override void DoEffect(VisibleGameEntity _object)
        {
            base.DoEffect(_object);
            Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(ListLevel[Level].ListSkillInfo[0].ProjectileType);
            prjt.X = ((Monster)_object).X;
            prjt.Y = ((Monster)_object).Y;

            prjt.MinDamage = PlayerOwner.MinDamage + PlayerOwner.MinDamage * ListLevel[Level].ListSkillInfo[0].PercentDamage / 100;
            prjt.MaxDamage = PlayerOwner.MaxDamage + PlayerOwner.MaxDamage * ListLevel[Level].ListSkillInfo[0].PercentDamage / 100;

            if (GlobalVariables.GlobalRandom.Next(0, 100) < PlayerOwner.CriticalRate)
            {
                prjt.MinDamage *= 2;
                prjt.MaxDamage *= 2;
            }

            prjt.SkillOwner = this;
            PlayerOwner.StateOwner._listProjectile.Add(prjt);
            PlayerOwner.Mp += this.ListLevel[Level].ListSkillInfo[0].Mp;
        }
        public override void DoEffect(VisibleGameEntity _object)
        {
            base.DoEffect(_object);
            //IsEffected = true;

            if (!PlayerOwner.IsWaveForm)
            {
                PlayerOwner.Mp += ListLevel[Level].ListSkillInfo[0].Mp;
            }
            Vector2 vector = new Vector2(PlayerOwner.TargetSkillX - PlayerOwner.X, PlayerOwner.TargetSkillY - PlayerOwner.Y);

            vector.Normalize();
            if (Math.Abs(PlayerOwner.X - PlayerOwner.TargetSkillX) > 5 || Math.Abs(PlayerOwner.Y - PlayerOwner.TargetSkillY) > 5)
            {
                PlayerOwner.X        += vector.X * 10;
                PlayerOwner.Y        += vector.Y * 10;
                PlayerOwner.DestPoint = new Point((int)PlayerOwner.X, (int)PlayerOwner.Y);

                PlayerOwner.IsWaveForm = true;
                PlayerOwner.CellToMove = new List <Point>();
                if (Check == 0)
                {
                    Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(ListLevel[Level].ListSkillInfo[0].ProjectileType);
                    prjt.X          = PlayerOwner.X;
                    prjt.Y          = PlayerOwner.Y;
                    prjt.MinDamage  = ListLevel[Level].ListSkillInfo[0].MinDamage;
                    prjt.MaxDamage  = ListLevel[Level].ListSkillInfo[0].MaxDamage;
                    prjt.SkillOwner = this;
                    PlayerOwner.StateOwner._listProjectile.Add(prjt);
                    Check = ReleaseProjectileDelay;
                }
                else
                {
                    Check -= 1;
                }
            }
            else
            {
                PlayerOwner.IsWaveForm = false;
            }
        }
        public override void DoEffect(VisibleGameEntity _object)
        {
            base.DoEffect(_object);
            Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(ListLevel[Level].ListSkillInfo[0].ProjectileType);

            prjt.X = ((Monster)_object).X;
            prjt.Y = ((Monster)_object).Y;


            prjt.MinDamage = PlayerOwner.MinDamage + PlayerOwner.MinDamage * ListLevel[Level].ListSkillInfo[0].PercentDamage / 100;
            prjt.MaxDamage = PlayerOwner.MaxDamage + PlayerOwner.MaxDamage * ListLevel[Level].ListSkillInfo[0].PercentDamage / 100;

            if (GlobalVariables.GlobalRandom.Next(0, 100) < PlayerOwner.CriticalRate)
            {
                prjt.MinDamage *= 2;
                prjt.MaxDamage *= 2;
            }

            prjt.SkillOwner = this;
            PlayerOwner.StateOwner._listProjectile.Add(prjt);
            PlayerOwner.Mp += this.ListLevel[Level].ListSkillInfo[0].Mp;
        }
        public override void DoEffect(VisibleGameEntity _object)
        {
            base.DoEffect(_object);
            Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(17);

            prjt.X                   = PlayerOwner.X;
            prjt.Y                   = PlayerOwner.Y;
            prjt.MinDamage           = PlayerOwner.MinDamage / 5;
            prjt.MaxDamage           = PlayerOwner.MaxDamage;
            prjt.IsRemoveAfterEffect = false;
            prjt.LifeTime            = 100;
            prjt.SkillOwner          = this;
            LightningStrikeProjectileController lspc = new LightningStrikeProjectileController();

            lspc.Owner           = prjt;
            lspc.FlyingDirection = new Vector2(PlayerOwner.TargetSkillX - PlayerOwner.X, PlayerOwner.TargetSkillY - PlayerOwner.Y);
            float maxDim = Math.Abs(lspc.FlyingDirection.X) > Math.Abs(lspc.FlyingDirection.Y) ? Math.Abs(lspc.FlyingDirection.X): Math.Abs(lspc.FlyingDirection.Y);

            lspc.FlyingDirection      = new Vector2(lspc.FlyingDirection.X / maxDim, lspc.FlyingDirection.Y / maxDim);
            prjt.ProjectileController = lspc;
            PlayerOwner.StateOwner._listProjectile.Add(prjt);
        }
        public override void DoEffect(VisibleGameEntity _object)
        {
            base.DoEffect(_object);
            //IsEffected = true;

            if (!PlayerOwner.IsWaveForm)
            {
                PlayerOwner.Mp += ListLevel[Level].ListSkillInfo[0].Mp;
            }
            Vector2 vector = new Vector2(PlayerOwner.TargetSkillX - PlayerOwner.X, PlayerOwner.TargetSkillY - PlayerOwner.Y);
            vector.Normalize();
            if (Math.Abs(PlayerOwner.X - PlayerOwner.TargetSkillX) > 5 || Math.Abs(PlayerOwner.Y - PlayerOwner.TargetSkillY) > 5)
            {
                PlayerOwner.X += vector.X * 10;
                PlayerOwner.Y += vector.Y * 10;
                PlayerOwner.DestPoint = new Point((int)PlayerOwner.X, (int)PlayerOwner.Y);

                PlayerOwner.IsWaveForm = true;
                PlayerOwner.CellToMove = new List<Point>();
                if (Check == 0)
                {
                    Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(ListLevel[Level].ListSkillInfo[0].ProjectileType);
                    prjt.X = PlayerOwner.X;
                    prjt.Y = PlayerOwner.Y;
                    prjt.MinDamage = ListLevel[Level].ListSkillInfo[0].MinDamage;
                    prjt.MaxDamage = ListLevel[Level].ListSkillInfo[0].MaxDamage;
                    prjt.SkillOwner = this;
                    PlayerOwner.StateOwner._listProjectile.Add(prjt);
                    Check = ReleaseProjectileDelay;
                }
                else
                    Check -= 1;
            }
            else
            {
                PlayerOwner.IsWaveForm = false;
            }
        }
Ejemplo n.º 25
0
 public override void DoEffect(VisibleGameEntity _object)
 {
     base.DoEffect(_object);
     for (int i = 0; i < 360; i += 360 / ListLevel[Level].ListSkillInfo[0].NumOfSoul)
     {
         SoulMovingController lmc = new SoulMovingController();
         lmc.Rad  = MathHelper.ToRadians(i);
         lmc.MaxA = 300;
         lmc.MaxB = 200;
         Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(ListLevel[Level].ListSkillInfo[0].ProjectileType);
         prjt.X = PlayerOwner.X;
         prjt.Y = PlayerOwner.Y;
         prjt.IsRemoveAfterEffect = false;
         prjt.MaxDamage           = ListLevel[Level].ListSkillInfo[0].MaxDamage;
         prjt.MinDamage           = ListLevel[Level].ListSkillInfo[0].MinDamage;
         prjt.SkillOwner          = this;
         lmc.Owner = prjt;
         prjt.ProjectileController = lmc;
         prjt.LifeTime             = int.MaxValue;
         PlayerOwner.StateOwner._listProjectile.Add(prjt);
     }
     PlayerOwner.Mp += ListLevel[Level].ListSkillInfo[0].Mp;
 }
 public override void DoAdditionalEffect(VisibleGameEntity target)
 {
     base.DoAdditionalEffect(target);
     if (GlobalVariables.GlobalRandom.Next(0, 100) < ListLevel[Level].ListSkillInfo[0].ChanceToBash)
     {
         ((Monster)target).BashTime = ListLevel[Level].ListSkillInfo[0].BashTime;
         Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(6);
         prjt.X = target.X;
         prjt.Y = target.Y;
         ((Monster)target).AdditionnalEffect.Add(prjt);
         ((Monster)target).StateOwner._displayMessageLayer.MessageArray.Add(new DisplayMessageLayer.Message
             {
                 X = ((Monster)target).X,
                 Y = ((Monster)target).Y - 2 * GlobalVariables.MapCollisionDim,
                 Owner = this,
                 DeltaY = -1,
                 LifeTime = 45,
                 MessageContent = "Bash " + (ListLevel[Level].ListSkillInfo[0].BashTime / 60).ToString() + "s",
                 TextColor = Color.Gray,
                 DelayTime = 10,
                 MinY = (int)((Monster)target).Y - 2 * GlobalVariables.MapCollisionDim - 30,
             });
     }
 }
 public override void DoAdditionalEffect(VisibleGameEntity target)
 {
     base.DoAdditionalEffect(target);
     if (GlobalVariables.GlobalRandom.Next(0, 100) < ListLevel[Level].ListSkillInfo[0].ChanceToBash)
     {
         ((Monster)target).BashTime = ListLevel[Level].ListSkillInfo[0].BashTime;
         Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(6);
         prjt.X = target.X;
         prjt.Y = target.Y;
         ((Monster)target).AdditionnalEffect.Add(prjt);
         ((Monster)target).StateOwner._displayMessageLayer.MessageArray.Add(new DisplayMessageLayer.Message
         {
             X              = ((Monster)target).X,
             Y              = ((Monster)target).Y - 2 * GlobalVariables.MapCollisionDim,
             Owner          = this,
             DeltaY         = -1,
             LifeTime       = 45,
             MessageContent = "Bash " + (ListLevel[Level].ListSkillInfo[0].BashTime / 60).ToString() + "s",
             TextColor      = Color.Gray,
             DelayTime      = 10,
             MinY           = (int)((Monster)target).Y - 2 * GlobalVariables.MapCollisionDim - 30,
         });
     }
 }
Ejemplo n.º 28
0
 public virtual void DoAdditionalEffect(VisibleGameEntity target)
 {
 }
Ejemplo n.º 29
0
 public virtual void DoAdditionalEffect(VisibleGameEntity target)
 {
 }
        public override void DoEffect(VisibleGameEntity _object)
        {
            base.DoEffect(_object);

            List<Point> _listProjectileTarget = new List<Point>();
            int _dir = PlayerOwner.Dir % 8;
            switch (_dir)
            {
                case 0:
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y)));
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                    break;
                case 1:
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + 2 * GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y)));
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X), (int)(PlayerOwner.Y - 2 * GlobalVariables.MapCollisionDim)));
                    break;
                case 2:
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                    break;
                case 3:
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X), (int)(PlayerOwner.Y - 2 * GlobalVariables.MapCollisionDim)));
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - 2 * GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y)));
                    break;
                case 4:
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y)));
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                    break;
                case 5:
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - 2 * GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y)));
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X), (int)(PlayerOwner.Y + 2 * GlobalVariables.MapCollisionDim)));
                    break;
                case 6:
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                    break;
                case 7:
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X), (int)(PlayerOwner.Y + 2 * GlobalVariables.MapCollisionDim)));
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + 2 * GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y)));
                    break;
                //case 0:
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)PlayerOwner.Y));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                //    break;
                //case 1:
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim / sqrt2), (int)((PlayerOwner.Y - 2 * GlobalVariables.MapCollisionDim) / sqrt2)));
                //    _listProjectileTarget.Add(new Point((int)((PlayerOwner.X + GlobalVariables.MapCollisionDim) / sqrt2), (int)((PlayerOwner.Y - GlobalVariables.MapCollisionDim) / sqrt2)));
                //    _listProjectileTarget.Add(new Point((int)((PlayerOwner.X + 2 * GlobalVariables.MapCollisionDim) / sqrt2), (int)((PlayerOwner.Y) / sqrt2)));
                //    break;
                //case 2:
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                //    break;
                //case 3:
                //    _listProjectileTarget.Add(new Point((int)((PlayerOwner.X - 2 * GlobalVariables.MapCollisionDim) / sqrt2), (int)PlayerOwner.Y));
                //    _listProjectileTarget.Add(new Point((int)((PlayerOwner.X + GlobalVariables.MapCollisionDim) / sqrt2), (int)((PlayerOwner.Y - GlobalVariables.MapCollisionDim) / sqrt2)));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X / sqrt2), (int)((PlayerOwner.Y - 2 * GlobalVariables.MapCollisionDim) / sqrt2)));
                //    break;
                //case 4:
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y)));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                //    break;
                //case 5:
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X / sqrt2), (int)((PlayerOwner.Y + 2 * GlobalVariables.MapCollisionDim) / sqrt2)));
                //    _listProjectileTarget.Add(new Point((int)((PlayerOwner.X + GlobalVariables.MapCollisionDim) / sqrt2), (int)((PlayerOwner.Y - GlobalVariables.MapCollisionDim) / sqrt2)));
                //    _listProjectileTarget.Add(new Point((int)((PlayerOwner.X - 2 * GlobalVariables.MapCollisionDim) / sqrt2), (int)((PlayerOwner.Y) / sqrt2)));
                //    break;
                //case 6:
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                //    break;
                //case 7:
                //    _listProjectileTarget.Add(new Point((int)((PlayerOwner.X + 2 * GlobalVariables.MapCollisionDim) / sqrt2), (int)PlayerOwner.Y));
                //    _listProjectileTarget.Add(new Point((int)((PlayerOwner.X + GlobalVariables.MapCollisionDim) / sqrt2), (int)((PlayerOwner.Y - GlobalVariables.MapCollisionDim) / sqrt2)));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X / sqrt2), (int)((PlayerOwner.Y + 2 * GlobalVariables.MapCollisionDim) / sqrt2)));
                //    break;
            }

            for (int i = 0; i < _listProjectileTarget.Count; ++i)
            {
                Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(ListLevel[Level].ListSkillInfo[0].ProjectileType);
                prjt.X = _listProjectileTarget[i].X;
                prjt.Y = _listProjectileTarget[i].Y;

                prjt.MinDamage = PlayerOwner.MinDamage + PlayerOwner.MinDamage * ListLevel[Level].ListSkillInfo[0].PercentDamage / 100;
                prjt.MaxDamage = PlayerOwner.MaxDamage + PlayerOwner.MaxDamage * ListLevel[Level].ListSkillInfo[0].PercentDamage / 100;
                if (GlobalVariables.GlobalRandom.Next(0, 100) < PlayerOwner.CriticalRate)
                {
                    prjt.MinDamage *= 2;
                    prjt.MaxDamage *= 2;
                }

                prjt.SkillOwner = this;
                PlayerOwner.StateOwner._listProjectile.Add(prjt);

            }
            PlayerOwner.Mp += this.ListLevel[Level].ListSkillInfo[0].Mp;
        }
Ejemplo n.º 31
0
        public override void DoEffect(VisibleGameEntity _object)
        {
            base.DoEffect(_object);

            List <Point> _listProjectileTarget = new List <Point>();
            int          _dir = PlayerOwner.Dir % 8;

            switch (_dir)
            {
            case 0:
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y)));
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                break;

            case 1:
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + 2 * GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y)));
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X), (int)(PlayerOwner.Y - 2 * GlobalVariables.MapCollisionDim)));
                break;

            case 2:
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                break;

            case 3:
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X), (int)(PlayerOwner.Y - 2 * GlobalVariables.MapCollisionDim)));
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - 2 * GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y)));
                break;

            case 4:
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y)));
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                break;

            case 5:
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - 2 * GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y)));
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X), (int)(PlayerOwner.Y + 2 * GlobalVariables.MapCollisionDim)));
                break;

            case 6:
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                break;

            case 7:
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X), (int)(PlayerOwner.Y + 2 * GlobalVariables.MapCollisionDim)));
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + 2 * GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y)));
                break;
                //case 0:
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)PlayerOwner.Y));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                //    break;
                //case 1:
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim / sqrt2), (int)((PlayerOwner.Y - 2 * GlobalVariables.MapCollisionDim) / sqrt2)));
                //    _listProjectileTarget.Add(new Point((int)((PlayerOwner.X + GlobalVariables.MapCollisionDim) / sqrt2), (int)((PlayerOwner.Y - GlobalVariables.MapCollisionDim) / sqrt2)));
                //    _listProjectileTarget.Add(new Point((int)((PlayerOwner.X + 2 * GlobalVariables.MapCollisionDim) / sqrt2), (int)((PlayerOwner.Y) / sqrt2)));
                //    break;
                //case 2:
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                //    break;
                //case 3:
                //    _listProjectileTarget.Add(new Point((int)((PlayerOwner.X - 2 * GlobalVariables.MapCollisionDim) / sqrt2), (int)PlayerOwner.Y));
                //    _listProjectileTarget.Add(new Point((int)((PlayerOwner.X + GlobalVariables.MapCollisionDim) / sqrt2), (int)((PlayerOwner.Y - GlobalVariables.MapCollisionDim) / sqrt2)));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X / sqrt2), (int)((PlayerOwner.Y - 2 * GlobalVariables.MapCollisionDim) / sqrt2)));
                //    break;
                //case 4:
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y - GlobalVariables.MapCollisionDim)));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y)));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                //    break;
                //case 5:
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X / sqrt2), (int)((PlayerOwner.Y + 2 * GlobalVariables.MapCollisionDim) / sqrt2)));
                //    _listProjectileTarget.Add(new Point((int)((PlayerOwner.X + GlobalVariables.MapCollisionDim) / sqrt2), (int)((PlayerOwner.Y - GlobalVariables.MapCollisionDim) / sqrt2)));
                //    _listProjectileTarget.Add(new Point((int)((PlayerOwner.X - 2 * GlobalVariables.MapCollisionDim) / sqrt2), (int)((PlayerOwner.Y) / sqrt2)));
                //    break;
                //case 6:
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X - GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X + GlobalVariables.MapCollisionDim), (int)(PlayerOwner.Y + GlobalVariables.MapCollisionDim)));
                //    break;
                //case 7:
                //    _listProjectileTarget.Add(new Point((int)((PlayerOwner.X + 2 * GlobalVariables.MapCollisionDim) / sqrt2), (int)PlayerOwner.Y));
                //    _listProjectileTarget.Add(new Point((int)((PlayerOwner.X + GlobalVariables.MapCollisionDim) / sqrt2), (int)((PlayerOwner.Y - GlobalVariables.MapCollisionDim) / sqrt2)));
                //    _listProjectileTarget.Add(new Point((int)(PlayerOwner.X / sqrt2), (int)((PlayerOwner.Y + 2 * GlobalVariables.MapCollisionDim) / sqrt2)));
                //    break;
            }

            for (int i = 0; i < _listProjectileTarget.Count; ++i)
            {
                Projectile prjt = (Projectile)PlayerOwner.StateOwner._objectManagerArray[6].CreateObject(ListLevel[Level].ListSkillInfo[0].ProjectileType);
                prjt.X = _listProjectileTarget[i].X;
                prjt.Y = _listProjectileTarget[i].Y;


                prjt.MinDamage = PlayerOwner.MinDamage + PlayerOwner.MinDamage * ListLevel[Level].ListSkillInfo[0].PercentDamage / 100;
                prjt.MaxDamage = PlayerOwner.MaxDamage + PlayerOwner.MaxDamage * ListLevel[Level].ListSkillInfo[0].PercentDamage / 100;
                if (GlobalVariables.GlobalRandom.Next(0, 100) < PlayerOwner.CriticalRate)
                {
                    prjt.MinDamage *= 2;
                    prjt.MaxDamage *= 2;
                }

                prjt.SkillOwner = this;
                PlayerOwner.StateOwner._listProjectile.Add(prjt);
            }
            PlayerOwner.Mp += this.ListLevel[Level].ListSkillInfo[0].Mp;
        }
 public override void DoAdditionalEffect(VisibleGameEntity target)
 {
     base.DoAdditionalEffect(target);
 }
 public override void DoEffect(VisibleGameEntity _object)
 {
     base.DoEffect(_object);
 }
Ejemplo n.º 34
0
 public virtual void DoEffect(VisibleGameEntity _object)
 {
     _checkCoolDown = ListLevel[Level].ListSkillInfo[0].CoolDown;
     _coolDownTime = _checkCoolDown;
     if (SoundName != null && SoundName.Length > 0)
         GlobalVariables.PlayEffectSound(SoundName);
 }
 public override void DoEffect(VisibleGameEntity _object)
 {
     base.DoEffect(_object);
 }
 public override void DoAdditionalEffect(VisibleGameEntity target)
 {
     base.DoAdditionalEffect(target);
 }
 public virtual void DoEffect(VisibleGameEntity _object)
 {
     if (DelayTime == 0)
         _skillOwner.DoEffect(_object);
 }