예제 #1
0
        protected override void DoActivate(ZeldaCartridge cartridge, ISeededRandom random)
        {
            var min            = _minimumHitPointsParameter.GetEffectiveValue <int>();
            var max            = _maximumHitPointsParameter.GetEffectiveValue <int>();
            var includeEnemies = _includeEnemiesParameter.GetEffectiveValue <bool>();
            var includeBosses  = _includeBossesParameter.GetEffectiveValue <bool>();
            var includeGanon   = _includeGanonParameter.GetEffectiveValue <bool>();

            if (includeEnemies)
            {
                for (var i = 0x00; i < 0x19; i++)
                {
                    cartridge.HitPointTable[i] = random.GetInt(min, max + 1);
                }
            }

            if (includeBosses)
            {
                for (var i = 0x19; i < 0x25; i++)
                {
                    if (i != 0x1F)
                    {
                        cartridge.HitPointTable[i] = random.GetInt(min, max + 1);
                    }
                }
            }

            if (includeGanon)
            {
                cartridge.HitPointTable[0x1F] = random.GetInt(min, max + 1);
            }
        }
예제 #2
0
        protected override void DoActivate(ZeldaCartridge cartridge, ISeededRandom random)
        {
            var min = _minimumQuantityParameter.GetEffectiveValue <int>();
            var max = _maximumQuantityParameter.GetEffectiveValue <int>();

            foreach (var underworldLevel in cartridge.Underworld.Levels)
            {
                var underworldLength = underworldLevel.EnemyQuantities.Count;
                for (var i = 0; i < underworldLength; i++)
                {
                    underworldLevel.EnemyQuantities[i] = random.GetInt(min, max + 1);
                }
            }

            var overworldLevel  = cartridge.Overworld.Level;
            var overworldLength = overworldLevel.EnemyQuantities.Count;

            for (var i = 0; i < overworldLength; i++)
            {
                overworldLevel.EnemyQuantities[i] = random.GetInt(min, max + 1);
            }
        }