public static int Handle_Notoriety(Mobile from, Mobile target)
        {
            if (from is PlayerMobile && target is PlayerMobile)
            {
                if (Duel_Config.InADuel((PlayerMobile)from) && Duel_Config.InADuel((PlayerMobile)target))
                {
                    if (!Duel_Config.DuelStarted((PlayerMobile)from))
                    {
                        return(NotorietyHandlers.MobileNotoriety2(from, target));
                    }

                    if (Duel_Config.IsAlly((PlayerMobile)from, (PlayerMobile)target))
                    {
                        return(Notoriety.Ally);
                    }
                    if (Duel_Config.IsEnemy((PlayerMobile)from, (PlayerMobile)target))
                    {
                        return(Notoriety.Enemy);
                    }
                }
                else if (Duel_Config.InADuel((PlayerMobile)from) || Duel_Config.InADuel((PlayerMobile)target))
                {
                    return(NotorietyHandlers.MobileNotoriety2(from, target));
                }
            }

            return(NotorietyHandlers.MobileNotoriety2(from, target));
        }
Beispiel #2
0
        public override bool OnMoveInto(Mobile m, Direction d, Point3D newLocation, Point3D oldLocation)
        {
            if (!Controller.InUse)
            {
                return(false);
            }

            if (m is PlayerMobile)
            {
            }
            else
            {
                return(false);
            }

            if (!Duel_Config.InADuel((PlayerMobile)m))
            {
                return(false);
            }

            return(base.OnMoveInto(m, d, newLocation, oldLocation));
        }
Beispiel #3
0
        public bool CanTarget(Mobile from, object o)
        {
            PlayerMobile pm = (PlayerMobile)from;
            PlayerMobile target;

            if (o is PlayerMobile)
            {
                target = (PlayerMobile)o;
            }
            else
            {
                pm.SendMessage("You must target another player.");
                return(false);
            }

            if (target.Criminal)
            {
                //pm.SendMessage("They are criminal and cannot participate in a duel.");
                //return false;
            }

            if (target.Combatant != null)
            {
                pm.SendMessage("They are in combat and cannot participate.");
                return(false);
            }

            if (target.Aggressed.Count > 0 || target.Aggressors.Count > 0)
            {
                //pm.SendMessage("They have been in combat recently and cannot participate.");
                //return false;
            }

            if (!target.Alive)
            {
                pm.SendMessage("Only living players can participate in a duel.");
                return(false);
            }

            if (Duel_Config.InADuel(target) || Field_Config.InAField(target))
            {
                pm.SendMessage("They are already in a duel.");
                return(false);
            }

            if (!Duel_Config.AllowSameIPDuels && SameIP(pm, (PlayerMobile)target))
            {
                pm.SendMessage("You cannot duel them as there account is sharing the same ip as yours.");
                return(false);
            }

            if (!Duel_Config.AllowFactionersToDuel)
            {
                if (Faction.Find(target) != null)
                {
                    pm.SendMessage("Factioners cannot duel.");
                    return(false);
                }
            }

            return(true);
        }