Esempio n. 1
0
        public override bool DoMountAbility(int damage, Mobile attacker)
        {
            if (Rider == null || attacker == null)              //sanity
            {
                return(false);
            }

            if (Rider.Poisoned && ((Rider.Hits - damage) < 40))
            {
                Poison p = Rider.Poison;

                if (p != null)
                {
                    int chanceToCure = 10000 + (int)(this.Skills[SkillName.Magery].Value * 75) - ((p.Level + 1) * (Core.SE ? (p.Level < 4 ? 3300 : 3100) : 1750));
                    chanceToCure /= 100;

                    if (chanceToCure > Utility.Random(100))
                    {
                        if (Rider.CurePoison(this))                             //TODO: Confirm if mount is the one flagged for curing it or the rider is
                        {
                            Rider.LocalOverheadMessage(Server.Network.MessageType.Regular, 0x3B2, true, "Your mount senses you are in danger and aids you with magic.");
                            Rider.FixedParticles(0x373A, 10, 15, 5012, EffectLayer.Waist);
                            Rider.PlaySound(0x1E0);                                     // Cure spell effect.
                            Rider.PlaySound(0xA9);                                      // Unicorn's whinny.

                            return(true);
                        }
                    }
                }
            }

            return(false);
        }
Esempio n. 2
0
        public override bool DoMountAbility(int damage, Mobile attacker)
        {
            if (Rider == null || attacker == null) // sanity
            {
                return(false);
            }

            // Range and map checked here instead of other base fuction because of abiliites that don't need to check this
            if (Rider.Hits - damage < 30 && Rider.Map == attacker.Map && Rider.InRange(attacker, 18))
            {
                attacker.BoltEffect(0);
                // 35~100 damage, unresistable, by the Ki-rin.
                // Don't inform mount about this damage, Still unsure wether or not it's flagged as the mount doing damage or the player.
                // If changed to player, without the extra bool it'd be an infinite loop
                attacker.Damage(Utility.RandomMinMax(35, 100), this, false);

                // Your mount calls down the forces of nature on your opponent.
                Rider.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1042534);
                Rider.FixedParticles(0, 0, 0, 0x13A7, EffectLayer.Waist);
                Rider.PlaySound(0xA9); // Ki-rin's whinny.
                return(true);
            }

            return(false);
        }