Exemple #1
0
        public void Cast()
        {
            if (!Character.IsAlive)
            {
                return;
            }
            if (IsCoolingDown)
            {
                return;
            }

            Character.Stats.Health -= CostHP;
            Character.Stats.Mana   -= CostMP;

            if (Cooldown > 0)
            {
                CooldownEnd = DateTime.Now.AddSeconds(Cooldown);
            }

            if (CostItem > 0)
            {
            }

            if (CostBullet > 0)
            {
            }

            if (CostMeso > 0)
            {
            }

            if (MapleID == (int)CharacterConstants.SkillNames.FirePoisonMage.PoisonMist)
            {
                Point mistMaxLT = new Point(-200, -150);
                Point mistMaxRB = new Point(200, 150);

                Rectangle boundingBox = new Rectangle(mistMaxLT + Character.Position, mistMaxRB + Character.Position);

                Mist poisonMist = new Mist(boundingBox, Character, this);
                //Mist.SpawnMist(Character.Client, poisonMist);
                //get damage ticks of poisoned mobs within bounds
            }

            if (MapleID == (int)CharacterConstants.SkillNames.FirePoisonWizard.PoisonBreath)
            {
                Mob victim = Character.ControlledMobs.FirstOrDefault();

                victim?.Buff(MobConstants.MobStatus.Poisoned, 1, this);
            }
        }
Exemple #2
0
        public void Cast()
        {
            if (this.IsCoolingDown)
            {
                return;
            }

            this.Character.Health -= this.CostHP;
            this.Character.Mana   -= this.CostMP;

            if (this.CostItem > 0)
            {
            }

            if (this.CostBullet > 0)
            {
            }

            if (this.CostMeso > 0)
            {
            }

            if (this.Cooldown > 0)
            {
                this.CooldownEnd = DateTime.Now.AddSeconds(this.Cooldown);
            }

            if (this.MapleID == (int)SkillNames.FirePoisonMage.PoisonMist)
            {
                Point mistMaxLT = new Point(-200, -150);
                Point mistMaxRB = new Point(200, 150);

                Rectangle boundingBox = new Rectangle(mistMaxLT + this.Character.Position, mistMaxRB + this.Character.Position);

                Mist poisonMist = new Mist(boundingBox, this.Character, this);
                //Mist.SpawnMist(this.Character.Client, poisonMist);
                //get damage ticks of poisoned mobs within bounds
            }

            if (this.MapleID == (int)SkillNames.FirePoisonWizard.PoisonBreath)
            {
                Mob victim = this.Character.ControlledMobs.FirstOrDefault();
                if (victim != null)
                {
                    victim.Buff(MobStatus.Poisoned, 1, this);
                }
            }
        }