Beispiel #1
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 4) == 1)
                    {
                        BaseWeapon blade = new RuneBlade();
                        blade.MinDamage            = blade.MinDamage + 4;
                        blade.MaxDamage            = blade.MaxDamage + 8;
                        blade.Attributes.BonusHits = 50;
                        blade.Name = "minotaur war blades";
                        c.DropItem(blade);
                    }
                }
            }
        }
Beispiel #2
0
        public async Task <IActionResult> AddPlayer(Player player)
        {
            PlayerColor.SetPlayerColor(player);
            var       gameId = HttpContext.Session.GetInt32("game");
            GameModel output = new GameModel();

            if (ModelState.IsValid)
            {
                await GetAddPlayer.AddPlayer(client, (int)gameId, player);

                output = await GetGameInfo.GetGame(client, (int)gameId);

                output.Player = new Player()
                {
                    Id = player.Id + 1
                };
            }
            else
            {
                output = await GetGameInfo.GetGame(client, (int)gameId);

                output.Player = new Player()
                {
                    Id = player.Id
                };
            }
            Log.Information($"GameID: {gameId} created a player named: {player.Name} with the color: {player.Color}(IP: {HttpContext.Connection.RemoteIpAddress.ToString()})");

            output.PlayerList = await GetPlayerInfo.GetPlayerPosition((int)gameId, output.NumberOfPlayers, client);

            return(View("Newgame", output));
        }
Beispiel #3
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && this.Body == 75 && Utility.RandomMinMax(1, 4) == 1)
                    {
                        BaseWeapon hammer = new WarHammer();
                        hammer.AccuracyLevel        = WeaponAccuracyLevel.Supremely;
                        hammer.MinDamage            = hammer.MinDamage + 6;
                        hammer.MaxDamage            = hammer.MaxDamage + 10;
                        hammer.Attributes.BonusHits = 50;
                        hammer.Name = "cyclops hammer";
                        c.DropItem(hammer);
                    }
                }
            }
        }
Beispiel #4
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 4) == 1)
                    {
                        BaseWeapon axe = new LargeBattleAxe();
                        axe.AccuracyLevel            = WeaponAccuracyLevel.Supremely;
                        axe.MinDamage                = axe.MinDamage + 5;
                        axe.MaxDamage                = axe.MaxDamage + 10;
                        axe.DurabilityLevel          = WeaponDurabilityLevel.Indestructible;
                        axe.AosElementDamages.Poison = 25;
                        axe.Name = "grathek battle axe";
                        c.DropItem(axe);
                    }
                }
            }
        }
Beispiel #5
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && this.Body == 757 && Utility.RandomMinMax(1, 4) == 1)
                    {
                        BaseWeapon hammer = new WarHammer();
                        hammer.AccuracyLevel                 = WeaponAccuracyLevel.Supremely;
                        hammer.MinDamage                     = hammer.MinDamage + 6;
                        hammer.MaxDamage                     = hammer.MaxDamage + 10;
                        hammer.DurabilityLevel               = WeaponDurabilityLevel.Indestructible;
                        hammer.Name                          = "magical cyclops hammer";
                        hammer.AosElementDamages.Energy      = 25;
                        hammer.AosElementDamages.Physical    = 75;
                        hammer.WeaponAttributes.HitLightning = 10;
                        c.DropItem(hammer);
                    }
                }
            }
        }
        }                                                                       // H

        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 4) == 1)
                    {
                        LootChest MyChest = new LootChest(Server.Misc.IntelligentAction.FameBasedLevel(this));
                        MyChest.ItemID   = Utility.RandomList(0x1248, 0x1264);
                        MyChest.GumpID   = 0x62;
                        MyChest.TrapType = TrapType.None;
                        MyChest.Locked   = false;
                        MyChest.Name     = "mountain giant sack";
                        MyChest.Hue      = 0x9C4;
                        c.DropItem(MyChest);
                    }
                }
            }
        }
Beispiel #7
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck))
                    {
                        if (Utility.RandomMinMax(1, 10) == 1)
                        {
                            CanopicJar jar = new CanopicJar();
                            c.DropItem(jar);
                        }
                        else
                        {
                            EmptyCanopicJar jars = new EmptyCanopicJar();
                            c.DropItem(jars);
                        }
                    }
                }
            }
        }
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer is BaseCreature)
            {
                killer = ((BaseCreature)killer).GetMaster();
            }

            if (killer is PlayerMobile)
            {
                if (GetPlayerInfo.LuckyKiller(killer.Luck) && Server.Misc.IntelligentAction.FameBasedEvent(this))
                {
                    LootChest MyChest = new LootChest(Server.Misc.IntelligentAction.FameBasedLevel(this));
                    Server.Misc.ContainerFunctions.MakeTomb(MyChest, this, 1);
                    c.DropItem(MyChest);
                }

                if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 100) == 1)
                {
                    DemonPrison shard = new DemonPrison();
                    c.DropItem(shard);
                }
            }
        }
Beispiel #9
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 4) == 1)
                    {
                        BaseWeapon weapon = new Club();
                        weapon.MinDamage            = weapon.MinDamage + 10;
                        weapon.MaxDamage            = weapon.MaxDamage + 18;
                        weapon.Attributes.BonusHits = 100;
                        weapon.Hue  = 0x497;
                        weapon.Name = "abysmal ogre club";
                        c.DropItem(weapon);
                    }
                }
            }
        }
Beispiel #10
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 4) == 1)
                    {
                        switch (Utility.RandomMinMax(0, 5))
                        {
                        case 0: MagicBoneLegs leg = new MagicBoneLegs();                BaseRunicTool.ApplyAttributesTo((BaseArmor)leg, false, 1000, 5, 25, 100);     c.DropItem(leg);              break;

                        case 1: MagicBoneGloves glv = new MagicBoneGloves();    BaseRunicTool.ApplyAttributesTo((BaseArmor)glv, false, 1000, 5, 25, 100);     c.DropItem(glv);              break;

                        case 2: MagicBoneArms arm = new MagicBoneArms();                BaseRunicTool.ApplyAttributesTo((BaseArmor)arm, false, 1000, 5, 25, 100);     c.DropItem(arm);              break;

                        case 3: MagicBoneChest tun = new MagicBoneChest();              BaseRunicTool.ApplyAttributesTo((BaseArmor)tun, false, 1000, 5, 25, 100);     c.DropItem(tun);              break;

                        case 4: MagicBoneHelm hlm = new MagicBoneHelm();                BaseRunicTool.ApplyAttributesTo((BaseArmor)hlm, false, 1000, 5, 25, 100);     c.DropItem(hlm);              break;

                        case 5: MagicBoneSkirt skt = new MagicBoneSkirt();              BaseRunicTool.ApplyAttributesTo((BaseArmor)skt, false, 1000, 5, 25, 100);     c.DropItem(skt);              break;
                        }
                    }
                }
            }
        }
Beispiel #11
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 4) == 1)
                    {
                        BaseWeapon weapon = new Club();
                        weapon.MinDamage       = weapon.MinDamage + 8;
                        weapon.MaxDamage       = weapon.MaxDamage + 16;
                        weapon.DurabilityLevel = WeaponDurabilityLevel.Indestructible;
                        weapon.Name            = "ogre lord club";
                        c.DropItem(weapon);
                    }
                }
            }
        }
 /// <summary>
 /// 获取玩家信息的处理方法
 /// </summary>
 /// <param name="session"></param>
 /// <param name="data"></param>
 private void _onGetPlayerInfo(Session session, GetPlayerInfo data)
 {
     if (!LoginFilter(session, "获取玩家信息"))
     {
         return;
     }
     if (_dataBaseAccess.TryQueryPlayerInfo(data.PlayerID, out DBAcess.PNGDBRecord record))
     {
         NetConnector.MsgType.PlayerInfo playerInfo = new NetConnector.MsgType.PlayerInfo
         {
             Escape   = record.Escape,
             Fail     = record.Fail,
             Grade    = record.Grade,
             NickName = record.Nickname,
             PlayerID = record.ID,
             Score    = record.Score,
             Win      = record.Win
         };
         _connector.SendDataAsync(session, playerInfo);
     }
     else
     {
         _connector.SendDataAsync(session, new GetquestError()
         {
             ClientMsgType = "GetPlayerInfo", ErrorInfo = "找不到玩家信息"
         });
     }
 }
Beispiel #13
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck))
                    {
                        c.DropItem(new IvoryTusk());
                    }
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 2) == 1)
                    {
                        c.DropItem(new IvoryTusk());
                    }
                }
            }
        }
Beispiel #14
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 4) == 1)
                    {
                        BaseWeapon hammer = new WarHammer();
                        hammer.MinDamage       = hammer.MinDamage + 4;
                        hammer.MaxDamage       = hammer.MaxDamage + 8;
                        hammer.DurabilityLevel = WeaponDurabilityLevel.Indestructible;
                        hammer.Name            = "minotaur war hammer";
                        c.DropItem(hammer);
                    }
                }
            }
        }
Beispiel #15
0
        public override void Open(Mobile from)
        {
            if (this.Weight > 50)
            {
                int FillMeUpLevel = Utility.RandomList(5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1);

                if (GetPlayerInfo.LuckyPlayer(from.Luck))
                {
                    FillMeUpLevel = FillMeUpLevel + Utility.RandomMinMax(1, 2);
                }

                if (Utility.RandomBool())
                {
                    int[] list = new int[]
                    {
                        0xECA, 0xECB, 0xECC, 0xECD, 0xECE, 0xECF, 0xED0,
                        0xED1, 0xED2, 0x1B09, 0x1B0A, 0x1B0B, 0x1B0C,
                        0x1B0D, 0x1B0E, 0x1B0F, 0x1B10,
                    };

                    Item bones = new BodyPart(Utility.RandomList(list));
                    bones.Name = ContainerFunctions.GetOwner("BodySailor");
                    this.DropItem(bones);
                }

                ContainerFunctions.FillTheContainer(FillMeUpLevel, this, from);

                this.Weight = 5.0;
            }

            base.Open(from);

            Server.Items.CharacterDatabase.LootContainer(from, this);
        }
Beispiel #16
0
        public BuriedBody(int level, string who, Mobile digger) : base(0xe40)
        {
            string sCorpse = ContainerFunctions.GetOwner("Body");

            if (who != "" && who != null)
            {
                sCorpse = "bones";
                switch (Utility.RandomMinMax(0, 3))
                {
                case 0: sCorpse = "bones"; break;

                case 1: sCorpse = "body"; break;

                case 2: sCorpse = "skeletal remains"; break;

                case 3: sCorpse = "skeletal bones"; break;
                }
                sCorpse = "The " + sCorpse + " of " + who;
            }

            Name    = sCorpse;
            Movable = true;
            Weight  = 5;
            GumpID  = 9;
            ItemID  = 3786 + Utility.Random(8);

            ContainerFunctions.FillTheContainer(level, this, digger);

            if (level > 4)
            {
                ContainerFunctions.FillTheContainer(level, this, digger);
            }
            if (level > 8)
            {
                ContainerFunctions.FillTheContainer(level, this, digger);
            }
            if (GetPlayerInfo.LuckyPlayer(digger.Luck))
            {
                ContainerFunctions.FillTheContainer(level, this, digger);
            }

            int xTraCash = Utility.RandomMinMax((level * 300), (level * 500));

            ContainerFunctions.AddGoldToContainer(xTraCash, this, 0, digger);

            if (Utility.RandomMinMax(0, 500) < (level))
            {
                Item arty = ArtifactBuilder.CreateArtifact("random");
                DropItem(arty);
                BaseContainer.DropItemFix(arty, digger, ItemID, GumpID);
            }

            TrapType      = TrapType.None;
            TrapPower     = 0;
            TrapLevel     = 0;
            Locked        = false;
            LockLevel     = 0;
            MaxLockLevel  = 0;
            RequiredSkill = 0;
        }
Beispiel #17
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Item scale = new HardScales(Utility.RandomMinMax(15, 20), "marble scales");

            c.DropItem(scale);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 25) == 1)
                    {
                        DragonLamp lamp = new DragonLamp();
                        lamp.Hue       = this.Hue;
                        lamp.LampName  = "";
                        lamp.LampColor = "Stone";
                        c.DropItem(lamp);
                    }
                }
            }
        }
Beispiel #18
0
        public override void Open(Mobile from)
        {
            if (this.Weight > 20)
            {
                int FillMeUpLevel = Utility.RandomList(5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1);

                if (GetPlayerInfo.LuckyPlayer(from.Luck))
                {
                    FillMeUpLevel = FillMeUpLevel + Utility.RandomMinMax(1, 2);
                }

                ContainerFunctions.FillTheContainer(FillMeUpLevel, this, from);

                this.Weight = 5.0;
                if (isBody(this.ItemID))
                {
                    LoggingFunctions.LogLoot(from, this.Name, "corpse");
                }
                else
                {
                    ContainerFunctions.FillTheContainer(FillMeUpLevel, this, from); LoggingFunctions.LogLoot(from, this.Name, "wagon");
                }
            }

            base.Open(from);

            Server.Items.CharacterDatabase.LootContainer(from, this);
        }
Beispiel #19
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 4) == 1)
                    {
                        BaseWeapon weapon = new WarMace();
                        weapon.MinDamage            = weapon.MinDamage + 4;
                        weapon.MaxDamage            = weapon.MaxDamage + 8;
                        weapon.Attributes.BonusHits = 50;
                        weapon.Name = "bugbear mace";
                        c.DropItem(weapon);
                    }
                }
            }
        }
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 4) == 1)
                    {
                        switch (Utility.RandomMinMax(0, 5))
                        {
                        case 0: c.DropItem(new DeadSkinLegs()); break;

                        case 1: c.DropItem(new DeadSkinGloves()); break;

                        case 2: c.DropItem(new DeadSkinGorget()); break;

                        case 3: c.DropItem(new DeadSkinArms()); break;

                        case 4: c.DropItem(new DeadSkinChest()); break;

                        case 5: c.DropItem(new DeadSkinHelm()); break;
                        }
                    }

                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 4) == 1)
                    {
                        BaseWeapon harv = new BoneHarvester();
                        harv.AccuracyLevel            = WeaponAccuracyLevel.Supremely;
                        harv.MinDamage                = harv.MinDamage + 5;
                        harv.MaxDamage                = harv.MaxDamage + 10;
                        harv.DurabilityLevel          = WeaponDurabilityLevel.Indestructible;
                        harv.AosElementDamages.Poison = 50;
                        harv.Name = "dead giant's hand scythe";
                        harv.Hue  = 0xB98;
                        c.DropItem(harv);
                    }
                    else if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 4) == 1)
                    {
                        BaseWeapon axe = new Axe();
                        axe.AccuracyLevel            = WeaponAccuracyLevel.Supremely;
                        axe.MinDamage                = axe.MinDamage + 5;
                        axe.MaxDamage                = axe.MaxDamage + 10;
                        axe.DurabilityLevel          = WeaponDurabilityLevel.Indestructible;
                        axe.AosElementDamages.Poison = 50;
                        axe.Name = "dead giant's hand axe";
                        axe.Hue  = 0xB98;
                        c.DropItem(axe);
                    }
                }
            }
        }
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 4) == 1)
                    {
                        LootChest MyChest = new LootChest(Server.Misc.IntelligentAction.FameBasedLevel(this));
                        MyChest.Name = "cyclopean chest";
                        MyChest.Hue  = 0x9C4;
                        c.DropItem(MyChest);
                    }
                }
            }
        }
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 4) == 1)
                    {
                        GoldBracelet bands = new GoldBracelet();
                        bands.Name = "manacle of the sea devil";
                        bands.Hue  = 0x497;
                        bands.Resistances.Physical       = 15;
                        bands.Attributes.BonusStr        = 10;
                        bands.Attributes.BonusHits       = 25;
                        bands.Attributes.ReflectPhysical = 25;
                        c.DropItem(bands);
                    }
                }
            }
        }
Beispiel #23
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 10) == 1)
                    {
                        DragonLamp lamp = new DragonLamp();
                        lamp.Hue       = 0x4E8;
                        lamp.LampName  = this.Name + " " + this.Title;
                        lamp.LampColor = "Amber";
                        c.DropItem(lamp);
                    }
                }
            }
        }
Beispiel #24
0
        public async Task <IActionResult> MovePiece(GameModel htmlModel)
        {
            var gameId = HttpContext.Session.GetInt32("game");

            GameModel output = await GetGameInfo.GetGame(client, (int)gameId);

            output.MovePiece          = new MovePiece();
            output.WhosTurn           = counter;
            output.MovePiece.PlayerId = counter.WhosTurn;

            output.Player = await GetCurrentPlayer.GetPlayer(client, (int)gameId, counter);

            output.MovePiece.PieceId        = htmlModel.MovePiece.PieceId - 1;
            output.MovePiece.NumberOfFields = htmlModel.DiceThrow;
            await GetMovePiece.MovePiece(client, output.MovePiece, (int)gameId);

            output.PlayerList = await GetPlayerInfo.GetPlayerPosition((int)gameId, output.NumberOfPlayers, client);

            counter.UpdatePlayerTurn(output.NumberOfPlayers);

            output.Player = output.PlayerList[counter.WhosTurn];
            output.Winner = await GetWinner.GetPlayer(client, (int)gameId);

            if (output.Winner != null)
            {
                Log.Information($"{output.Winner.Name} won the game: {gameId}! (IP: {HttpContext.Connection.RemoteIpAddress.ToString()})");
            }
            ModifyPlayerStartPosition.SetStartPosition(output);

            return(View("Gameboard", output));
        }
Beispiel #25
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null && this.Body == 320)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 4) == 1)
                    {
                        BaseWeapon sword = new Longsword();
                        sword.AccuracyLevel          = WeaponAccuracyLevel.Supremely;
                        sword.MinDamage              = sword.MinDamage + 7;
                        sword.MaxDamage              = sword.MaxDamage + 12;
                        sword.Attributes.BonusHits   = 50;
                        sword.AosElementDamages.Fire = 50;
                        sword.Name   = "sword of " + this.Title;
                        sword.Slayer = SlayerName.Repond;
                        if (Utility.RandomMinMax(0, 100) > 50)
                        {
                            sword.WeaponAttributes.HitFireball = 25;
                        }
                        sword.Hue = 0x54B;
                        c.DropItem(sword);
                    }
                }
            }
        }
Beispiel #26
0
        public GraveChest(int level, Mobile digger) : base()
        {
            Name = "graveyard chest";
            ContainerFunctions.FillTheContainer(level, this, digger);
            if (GetPlayerInfo.LuckyPlayer(digger.Luck))
            {
                ContainerFunctions.FillTheContainer(level, this, digger);
            }

            ContainerFunctions.LockTheContainer(level, this, 1);

            Hue = Utility.RandomList(0x961, 0x962, 0x963, 0x964, 0x965, 0x966, 0x967, 0x968, 0x969, 0x96A, 0x96B, 0x96C, 0x973, 0x974, 0x975, 0x976, 0x977, 0x978, 0x497, 0x47E);

            string sBox = "coffin";

            switch (Utility.RandomMinMax(0, 3))
            {
            case 0: sBox = "casket";                        ItemID = Utility.RandomList(0x27E9, 0x27EA);                                  GumpID = 0x41D;                 Weight = 25.0;          break;

            case 1: sBox = "sarcophagus";           ItemID = Utility.RandomList(0x27E0, 0x280A, 0x2802, 0x2803);  GumpID = 0x1D;                  Weight = 100.0;         break;

            case 2: sBox = "coffin";                        ItemID = Utility.RandomList(0x2800, 0x2801);                                  GumpID = 0x41D;                 Weight = 25.0;          break;

            case 3: sBox = "chest"; break;
            }

            ContainerOwner  = ContainerFunctions.GetOwner(sBox);
            ContainerDigger = digger.Name;
        }
Beispiel #27
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Server.Misc.IntelligentAction.FameBasedEvent(this))
                    {
                        LootChest MyChest = new LootChest(Server.Misc.IntelligentAction.FameBasedLevel(this));
                        Server.Misc.ContainerFunctions.MakeDemonBox(MyChest, this);
                        MyChest.Hue = 0;
                        c.DropItem(MyChest);
                    }
                }
            }
        }
Beispiel #28
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 4) == 1)
                    {
                        BaseWeapon weapon = new Scimitar();
                        weapon.MinDamage            = weapon.MinDamage + 6;
                        weapon.MaxDamage            = weapon.MaxDamage + 10;
                        weapon.Attributes.BonusHits = 50;
                        weapon.Name = "gargoyle scimitar";
                        weapon.Hue  = 0xB80;
                        c.DropItem(weapon);
                    }
                }
            }
        }
Beispiel #29
0
 public override bool AllowHousing(Mobile from, Point3D p)
 {
     if (GetPlayerInfo.EvilPlayer(from))
     {
         return(true);
     }
     return(false);
 }
Beispiel #30
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Mobile killer = this.LastKiller;

            if (killer != null)
            {
                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile)
                {
                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 4) == 1)
                    {
                        switch (Utility.RandomMinMax(0, 5))
                        {
                        case 0: c.DropItem(new DeadSkinLegs()); break;

                        case 1: c.DropItem(new DeadSkinGloves()); break;

                        case 2: c.DropItem(new DeadSkinGorget()); break;

                        case 3: c.DropItem(new DeadSkinArms()); break;

                        case 4: c.DropItem(new DeadSkinChest()); break;

                        case 5: c.DropItem(new DeadSkinHelm()); break;
                        }
                    }

                    if (GetPlayerInfo.LuckyKiller(killer.Luck))
                    {
                        if (Utility.RandomMinMax(1, 2) == 1)
                        {
                            CanopicJar jar = new CanopicJar();
                            c.DropItem(jar);
                        }
                        else
                        {
                            EmptyCanopicJar jars = new EmptyCanopicJar();
                            c.DropItem(jars);
                        }
                    }

                    if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 4) == 1)
                    {
                        LootChest MyChest = new LootChest(Server.Misc.IntelligentAction.FameBasedLevel(this));
                        MyChest.ItemID = Utility.RandomList(0xE40, 0xE41);
                        MyChest.Name   = "pharaoh chest";
                        MyChest.Hue    = 0xB1B;
                        c.DropItem(MyChest);
                    }
                }
            }
        }