Пример #1
0
        protected internal RedMoonEvil(MonsterInfo info) : base(info)
        {
            Direction = MirDirection.Up;

            ActionTime = Envir.Time + 300;
            AttackTime = Envir.Time + AttackSpeed;
        }
Пример #2
0
        public override void Spawned()
        {
            base.Spawned();

            if (BlockArray == null) return;

            MonsterInfo bInfo = new MonsterInfo
            {
                HP = this.HP,
                Image = Monster.EvilMirBody,
                CanTame = false,
                CanPush = false,
                AutoRev = false
            };        

            foreach (var block in BlockArray)
            {
                BlockingObject b = new BlockingObject(this, bInfo);
                BlockingObjects.Add(b);

                if (!b.Spawn(this.CurrentMap, new Point(this.CurrentLocation.X + block.X, this.CurrentLocation.Y + block.Y)))
                {
                    SMain.EnqueueDebugging(string.Format("CastleGate blocking mob not spawned at {0} {1}:{2}", CurrentMap.Info.FileName, block.X, block.Y));
                }
            }
        }
Пример #3
0
 protected internal IntelligentCreatureObject(MonsterInfo info)
     : base(info)
 {
     ActionTime = Envir.Time + 1000;
     petType = (IntelligentCreatureType)info.Effect;
     CustomName = info.Name;
 }
Пример #4
0
 protected internal TrapRock(MonsterInfo info)
     : base(info)
 {
     Visible = false;
     VisibleTime = Envir.Time + 2000;
     FirstAttack = true;
 }
Пример #5
0
        protected internal HellKeeper(MonsterInfo info) : base(info)
        {
            Direction = MirDirection.Up;

            ActionTime = Envir.Time + 300;
            AttackTime = Envir.Time + AttackSpeed;
        }
Пример #6
0
        protected internal MonsterObject(MonsterInfo info)
        {
            Info = info;

            Undead = !Info.CanTame;
            CoolEye = info.CoolEye > Envir.Random.Next(100);
            Direction = (MirDirection)Envir.Random.Next(8);

            AMode = AttackMode.All;
            PMode = PetMode.Both;

            RegenTime = Envir.Random.Next(RegenDelay) + Envir.Time;
            SearchTime = Envir.Random.Next(SearchDelay) + Envir.Time;
            RoamTime = Envir.Random.Next(RoamDelay) + Envir.Time;
        }
Пример #7
0
        protected internal Deer(MonsterInfo info)
            : base(info)
        {
            if (Info.AI != 2) return;

            RemainingSkinCount = 5;

            if (Envir.Random.Next(7) == 0)
            {
                _runAway = true;
                Quality = (short)(Envir.Random.Next(8) * 2000);
                MoveSpeed -= 300;
            }
            else
                Quality = (short)(Envir.Random.Next(4) * 1000);
        }
Пример #8
0
        protected internal SabukGate(MonsterInfo info)
            : base(info)
        {
            BlockArray = new Point[]
            {
                new Point(0, -1),
                new Point(0, -2),
                new Point(1, -1),
                new Point(1, -2),
                new Point(-1, 0),
                new Point(-2, 0),
                new Point(-1, -1),
                new Point(-1, 1)
            };

            Direction = MirDirection.Up;
        }
Пример #9
0
        private void FishingMobIndexComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ActiveControl != sender)
            {
                return;
            }

            MirDatabase.MonsterInfo mob = Envir.MonsterInfoList[FishingMobIndexComboBox.SelectedIndex];

            if (mob == null)
            {
                return;
            }

            Settings.FishingMonster = mob.Name;

            FishingChanged = true;
        }
Пример #10
0
        private void UpdateFishing()
        {
            FishingAttemptsTextBox.Text              = Settings.FishingAttempts.ToString();
            FishingSuccessRateStartTextBox.Text      = Settings.FishingSuccessStart.ToString();
            FishingSuccessRateMultiplierTextBox.Text = Settings.FishingSuccessMultiplier.ToString();
            FishingDelayTextBox.Text       = Settings.FishingDelay.ToString();
            MonsterSpawnChanceTextBox.Text = Settings.FishingMobSpawnChance.ToString();

            FishingMobIndexComboBox.Items.Clear();
            for (int i = 0; i < Envir.MonsterInfoList.Count; i++)
            {
                FishingMobIndexComboBox.Items.Add(Envir.MonsterInfoList[i]);
            }

            MirDatabase.MonsterInfo fishingMob = Envir.GetMonsterInfo(Settings.FishingMonster);

            if (fishingMob != null)
            {
                FishingMobIndexComboBox.SelectedIndex = Envir.GetMonsterInfo(Settings.FishingMonster).Index - 1;
            }
        }
Пример #11
0
 protected internal MonsterAI(MonsterInfo info) : base(info)
 {
     if (!uniqueAI.IgnorePets && uniqueAI.DamagePetsMore)    //Pet Damage
         DamageToPets = uniqueAI.PetAttackDamage;
     if (uniqueAI.UseSpecialAttack) // Special Damage
         SpecialAttackDamage = uniqueAI.SpecialAttackDamage;
     if (uniqueAI.UseMassAttack) // Mass Damage
         MassAttackDamage = uniqueAI.MassAttackDamage;
     if (uniqueAI.UseMeleeAttack) // Melee Damage
         MeleeAttackDamage = uniqueAI.MeleeAttackDamage;
     if (uniqueAI.UseRangeAttack) // Range Damage
         RangeAttackDamage = uniqueAI.RangeAttackDamage;
     if (uniqueAI.UseMagicAttack) // Magic Damage
         MagicAttackDamage = uniqueAI.MagicAttackDamage;
     if (uniqueAI.Target) // Damage to specific Target(s)
     {
         AttackClass = (MirClass)uniqueAI.TargetClass;
         TargetedDamage = uniqueAI.TargetAttackDamage;
     }
     uniqueAI.Alive = true;
     if (!uniqueAI.Save(uniqueAI))
         SMain.Enqueue("ERROR saving status");
 }
Пример #12
0
 protected internal CaveMaggot(MonsterInfo info)
     : base(info)
 {
 }
Пример #13
0
 protected internal BlockingObject(MonsterObject parent, MonsterInfo info) : base(info)
 {
     Parent = parent;
     Visible = true;
 }
Пример #14
0
 protected internal ManectricClaw(MonsterInfo info)
     : base(info)
 {
 }
Пример #15
0
 protected internal RedFoxman(MonsterInfo info)
     : base(info)
 {
 }
Пример #16
0
 protected internal Yimoogi(MonsterInfo info)
     : base(info)
 {
     SpawnTime = Envir.Time + 4000;
     NoAttack = true;
 }
Пример #17
0
 protected internal Tree(MonsterInfo info)
     : base(info)
 {
     Direction = MirDirection.Up;
 }
Пример #18
0
 public void Remove(MonsterInfo info)
 {
     MonsterInfoList.Remove(info);
     //Desync all objects\
 }
Пример #19
0
 protected internal GuardianRock(MonsterInfo info)
     : base(info)
 {
     Direction = MirDirection.Up;
 }
Пример #20
0
 protected internal Trainer(MonsterInfo info)
     : base(info)
 {
 }
Пример #21
0
 protected internal HedgeKekTal(MonsterInfo info)
     : base(info)
 {
 }
Пример #22
0
 protected internal RevivingZombie(MonsterInfo info)
     : base(info)
 {
     RevivalCount = 0;
     LifeCount = Envir.Random.Next(3);
 }
Пример #23
0
        public MapRespawn(RespawnInfo info)
        {
            Info = info;
            Monster = SMain.Envir.GetMonsterInfo(info.MonsterIndex);

            LoadRoutes();
        }
Пример #24
0
 protected internal WhiteFoxman(MonsterInfo info)
     : base(info)
 {
 }
Пример #25
0
 protected internal DarkDevourer(MonsterInfo info)
     : base(info)
 {
 }
Пример #26
0
        public static void FromText(string text)
        {
            string[] data = text.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);

            if (data.Length < 25) return; //28

            MonsterInfo info = new MonsterInfo {Name = data[0]};
            ushort image;
            if (!ushort.TryParse(data[1], out image)) return;
            info.Image = (Monster) image;

            if (!byte.TryParse(data[2], out info.AI)) return;
            if (!byte.TryParse(data[3], out info.Effect)) return;
            if (!byte.TryParse(data[4], out info.Level)) return;
            if (!byte.TryParse(data[5], out info.ViewRange)) return;

            if (!uint.TryParse(data[6], out info.HP)) return;

            if (!byte.TryParse(data[7], out info.MinAC)) return;
            if (!byte.TryParse(data[8], out info.MaxAC)) return;
            if (!byte.TryParse(data[9], out info.MinMAC)) return;
            if (!byte.TryParse(data[10], out info.MaxMAC)) return;
            if (!byte.TryParse(data[11], out info.MinDC)) return;
            if (!byte.TryParse(data[12], out info.MaxDC)) return;
            if (!byte.TryParse(data[13], out info.MinMC)) return;
            if (!byte.TryParse(data[14], out info.MaxMC)) return;
            if (!byte.TryParse(data[15], out info.MinSC)) return;
            if (!byte.TryParse(data[16], out info.MaxSC)) return;
            if (!byte.TryParse(data[17], out info.Accuracy)) return;
            if (!byte.TryParse(data[18], out info.Agility)) return;
            if (!byte.TryParse(data[19], out info.Light)) return;

            if (!ushort.TryParse(data[20], out info.AttackSpeed)) return;
            if (!ushort.TryParse(data[21], out info.MoveSpeed)) return;

            if (!uint.TryParse(data[22], out info.Experience)) return;

            if (!bool.TryParse(data[23], out info.CanTame)) return;
            if (!bool.TryParse(data[24], out info.CanPush)) return;

            //int count;

            //if (!int.TryParse(data[27], out count)) return;

            //if (28 + count * 3 > data.Length) return;

            info.Index = ++SMain.EditEnvir.MonsterIndex;
            SMain.EditEnvir.MonsterInfoList.Add(info);
        }
Пример #27
0
 protected internal HolyDeva(MonsterInfo info)
     : base(info)
 {
     Direction = MirDirection.DownLeft;
 }
Пример #28
0
 protected internal CharmedSnake(MonsterInfo info)
     : base(info)
 {
     ActionTime = Envir.Time + 1000;
 }
Пример #29
0
        public static MonsterObject GetMonster(MonsterInfo info)
        {
            if (info == null) return null;

            switch (info.AI)
            {
                case 1:
                case 2:
                    return new Deer(info);
                case 3:
                    return new Tree(info);
                case 4:
                    return new SpittingSpider(info); //Spider
                case 5:
                    return new CannibalPlant(info);
                case 6:
                    return new Guard(info);
                case 7:
                    return new CaveMaggot(info);
                case 8:
                    return new AxeSkeleton(info);
                case 9:
                    return new HarvestMonster(info);
                case 10:
                    return new FlamingWooma(info);
                case 11:
                    return new WoomaTaurus(info);
                case 12:
                    return new BugBagMaggot(info);
                case 13:
                    return new RedMoonEvil(info);
                case 14:
                    return new EvilCentipede(info);
                case 15:
                    return new ZumaMonster(info);
                case 16:
                    return new RedThunderZuma(info);
                case 17:
                    return new ZumaTaurus(info);
                case 18:
                    return new Shinsu(info);
                case 19:
                    return new KingScorpion(info);
                case 20:
                    return new DarkDevil(info);
                case 21:
                    return new IncarnatedGhoul(info);
                case 22:
                    return new IncarnatedZT(info);
                case 23:
                    return new BoneFamiliar(info);
                case 24:
                    return new DigOutZombie(info);
                case 25:
                    return new RevivingZombie(info);
                case 26:
                    return new ShamanZombie(info);
                case 27:
                    return new Khazard(info);
                case 28:
                    return new ToxicGhoul(info);
                case 29:
                    return new BoneSpearman(info);
                case 30:
                    return new BoneLord(info);
                case 31:
                    return new RightGuard(info);
                case 32:
                    return new LeftGuard(info);
                case 33:
                    return new MinotaurKing(info);
                case 34:
                    return new FrostTiger(info);
                case 35:
                    return new SandWorm(info);
                case 36:
                    return new Yimoogi(info);
                case 37:
                    return new CrystalSpider(info);
                case 38:
                    return new HolyDeva(info);
                case 39:
                    return new RootSpider(info);
                case 40:
                    return new BombSpider(info);
                case 41:
                case 42:
                    return new YinDevilNode(info);
                case 43:
                    return new OmaKing(info);
                case 44:
                    return new BlackFoxman(info);
                case 45:
                    return new RedFoxman(info);
                case 46:
                    return new WhiteFoxman(info);
                case 47:
                    return new TrapRock(info);
                case 48:
                    return new GuardianRock(info);
                case 49:
                    return new ThunderElement(info);
                case 50:
                    return new GreatFoxSpirit(info);
                case 51:
                    return new HedgeKekTal(info);
                case 52:
                    return new EvilMir(info);
                case 53:
                    return new EvilMirBody(info);
                case 54:
                    return new DragonStatue(info);
                case 55:
                    return new HumanWizard(info);
                case 56:
                    return new Trainer(info);
                case 57:
                    return new TownArcher(info);
                case 58:
                    return new Guard(info);
                case 59:
                    return new HumanAssassin(info);
                case 60:
                    return new VampireSpider(info);
                case 61:
                    return new SpittingToad(info);
                case 62:
                    return new SnakeTotem(info);
                case 63:
                    return new CharmedSnake(info);
                case 64:
                    return new IntelligentCreatureObject(info);
                case 65:
                    return new MutatedManworm(info);
                case 66:
                    return new CrazyManworm(info);
                case 67:
                    return new DarkDevourer(info);
                case 68:
                    return new Football(info);
                case 69:
                    return new Runaway(info);
                default:
                    return new MonsterObject(info);
            }
        }
Пример #30
0
 public bool NeedKill(MonsterInfo mInfo)
 {
     return Info.KillTasks.Where((task, i) => KillTaskCount[i] < task.Count && task.Monster == mInfo).Any();
 }
Пример #31
0
 protected internal BoneLord(MonsterInfo info)
     : base(info)
 {
 }
Пример #32
0
 protected internal YinDevilNode(MonsterInfo info)
     : base(info)
 {
 }