Ejemplo n.º 1
0
        private void SetBossValues(ushort bossId, ushort experience, ushort gella)
        {
            var boss = EnemyCollection.GetMappedObject(bossId);

            boss.Xp    = experience;
            boss.Gella = gella;
        }
Ejemplo n.º 2
0
        private void DebuffSoloFights()
        {
            var ceciliaSoloFight = EnemyCollection.GetMappedObject(CeciliaSoloFightId);

            ceciliaSoloFight.Atp      = (ushort)(ceciliaSoloFight.Atp / 2);
            ceciliaSoloFight.Sor      = (ushort)(ceciliaSoloFight.Sor / 2);
            ceciliaSoloFight.Xp       = 20000;
            ceciliaSoloFight.Gella    = 20000;
            ceciliaSoloFight.DropId   = 124; //Necronomicon
            ceciliaSoloFight.DropRate = 100;

            var jackSoloFight = EnemyCollection.GetMappedObject(JackSoloFightId);

            jackSoloFight.Atp      = (ushort)(jackSoloFight.Atp / 2);
            jackSoloFight.Sor      = (ushort)(jackSoloFight.Sor / 2);
            jackSoloFight.Xp       = 20000;
            jackSoloFight.Gella    = 20000;
            jackSoloFight.DropId   = 59; //Juggernaut
            jackSoloFight.DropRate = 100;
        }
Ejemplo n.º 3
0
        private void AssignThreeOrbs()
        {
            var wingsBossId = BossOrbTierList.TieredBossIds[0][Agent.Rng.Next(0, BossOrbTierList.TieredBossIds[0].Count)];

            WingsArea = BossOrbTierList.IdToAreaName[wingsBossId];
            var armsBossId = BossOrbTierList.TieredBossIds[1][Agent.Rng.Next(0, BossOrbTierList.TieredBossIds[1].Count)];

            ArmsArea = BossOrbTierList.IdToAreaName[armsBossId];
            var fakeEyeBossId = BossOrbTierList.TieredBossIds[2][Agent.Rng.Next(0, BossOrbTierList.TieredBossIds[2].Count)];

            FakeEyeArea = BossOrbTierList.IdToAreaName[fakeEyeBossId];
            RealEyeArea = FakeEyeArea;

            var realEyeBossId = 0;

            while (RealEyeArea.Equals(FakeEyeArea))
            {
                realEyeBossId = BossOrbTierList.TieredBossIds[2][Agent.Rng.Next(0, BossOrbTierList.TieredBossIds[2].Count)];
                RealEyeArea   = BossOrbTierList.IdToAreaName[realEyeBossId];
            }

            var wingsBoss = EnemyCollection.GetMappedObject(wingsBossId);

            wingsBoss.DropId   = Wings;
            wingsBoss.DropRate = 100;

            var armsBoss = EnemyCollection.GetMappedObject(armsBossId);

            armsBoss.DropId   = Arms;
            armsBoss.DropRate = 100;

            var fakeEyeBoss = EnemyCollection.GetMappedObject(fakeEyeBossId);

            fakeEyeBoss.DropId   = FakeEye;
            fakeEyeBoss.DropRate = 100;

            var realEyeBoss = EnemyCollection.GetMappedObject(realEyeBossId);

            realEyeBoss.DropId   = RealEye;
            realEyeBoss.DropRate = 100;
        }
        private void ScaleEnemies(int oldTier, int newTier, int oldBossId, int newBossId)
        {
            if (newTier == oldTier)
            {
                return;
            }
            var oldBoss = EnemyCollection.GetMappedObject(oldBossId);
            var newBoss = EnemyCollection.GetMappedObject(newBossId);

            if (oldTier > newTier)
            {
                ScaleDownEnemy(oldBoss, newTier, oldTier);
                ScaleUpEnemy(newBoss, newTier, oldTier);
            }
            else
            {
                ScaleUpEnemy(oldBoss, oldTier, newTier);
                ScaleDownEnemy(newBoss, oldTier, newTier);
            }
            EnemyTierList.SwapTiers(oldBossId, newBossId);
        }
Ejemplo n.º 5
0
 private void AssignItemDrops()
 {
     foreach (var id in BossOrbTierList.TieredBossIds[0])
     {
         var boss = EnemyCollection.GetMappedObject(id);
         if (boss.DropId == Wings)
         {
             continue;
         }
         var potentialItemIds = new List <int>();
         potentialItemIds.AddRange(ItemTierList.TieredItemList[5]);
         potentialItemIds.AddRange(ItemTierList.TieredItemList[6]);
         potentialItemIds.AddRange(ItemTierList.TieredItemList[7]);
         var item = ItemCollection.GetMappedObject(0);
         while (item.EquipSlot == ItemMasks.EquipSlot.None)
         {
             item = ItemCollection.GetMappedObject(potentialItemIds[Agent.Rng.Next(0, potentialItemIds.Count)]);
         }
         boss.DropId   = (byte)item.Id;
         boss.DropRate = 100;
     }
     foreach (var id in BossOrbTierList.TieredBossIds[1])
     {
         var boss = EnemyCollection.GetMappedObject(id);
         if (boss.DropId == Arms)
         {
             continue;
         }
         var potentialItemIds = new List <int>();
         potentialItemIds.AddRange(ItemTierList.TieredItemList[8]);
         potentialItemIds.AddRange(ItemTierList.TieredItemList[9]);
         potentialItemIds.AddRange(ItemTierList.TieredItemList[10]);
         var item = ItemCollection.GetMappedObject(0);
         while (item.EquipSlot == ItemMasks.EquipSlot.None)
         {
             item = ItemCollection.GetMappedObject(potentialItemIds[Agent.Rng.Next(0, potentialItemIds.Count)]);
         }
         boss.DropId   = (byte)item.Id;
         boss.DropRate = 100;
     }
     foreach (var id in BossOrbTierList.TieredBossIds[2])
     {
         var boss = EnemyCollection.GetMappedObject(id);
         if (boss.DropId == RealEye || boss.DropId == FakeEye)
         {
             continue;
         }
         var potentialItemIds = new List <int>();
         potentialItemIds.AddRange(ItemTierList.TieredItemList[11]);
         potentialItemIds.AddRange(ItemTierList.TieredItemList[12]);
         potentialItemIds.AddRange(ItemTierList.TieredItemList[13]);
         potentialItemIds.AddRange(ItemTierList.TieredItemList[14]);
         var item = ItemCollection.GetMappedObject(0);
         while (item.EquipSlot == ItemMasks.EquipSlot.None)
         {
             item = ItemCollection.GetMappedObject(potentialItemIds[Agent.Rng.Next(0, potentialItemIds.Count)]);
         }
         boss.DropId   = (byte)item.Id;
         boss.DropRate = 100;
     }
 }
        public void ShuffleBossOrder()
        {
            var toSwap  = new List <Tuple <int, int> >();
            var swapped = new HashSet <int>();

            foreach (var bossId in EnemyTierList.BossIds)
            {
                //determine new tier rank
                var  swapBossId   = bossId;
                byte newTier      = 0;
                byte originalTier = 0;
                while (swapBossId == bossId)
                {
                    originalTier = EnemyTierList.GetBossTier(bossId);
                    newTier      = RandomFunctions.GenerateGaussianByte(Agent.Rng, originalTier, Agent.Probabilities.BossShuffleStandardDeviation, (byte)(EnemyTierList.TieredBossIds.Count - 1));
                    if (newTier < 0)
                    {
                        newTier = 0;
                    }
                    //determine what boss to swap with based on new rank
                    var randNum = Agent.Rng.Next(0, EnemyTierList.TieredBossIds[newTier].Count);
                    swapBossId = EnemyTierList.TieredBossIds[newTier][randNum];
                }
                swapped.Add(bossId);
                swapped.Add(swapBossId);
                ScaleEnemies(originalTier, newTier, bossId, swapBossId);
                toSwap.Add(new Tuple <int, int>(bossId, swapBossId));
            }
            EnemyCollection.WriteObjects(Agent.GeneralConfiguration.TempFile);

            foreach (var t in toSwap)
            {
                EnemyCollection.SwapMappedObjects(Agent.GeneralConfiguration.TempFile, EnemyCollection.GetMappedObject(t.Item1), EnemyCollection.GetMappedObject(t.Item2));
            }

            /*
             * foreach (var t in toSwap)
             * {
             *  var bossA = EnemyCollection.GetMappedObject(t.Item1);
             *  var bossB = EnemyCollection.GetMappedObject(t.Item2);
             *  bossA.WriteByte((byte)t.Item2, EnemyOffsets.Id);
             *  bossB.WriteByte((byte)t.Item1, EnemyOffsets.Id);
             * }*/
        }