public OverworldEnemyRandomizer(RomData romData, Random rand, SpriteGroupCollection spriteGroupCollection, SpriteRequirementCollection spriteRequirementCollection)
        {
            this.romData = romData;
            this.rand    = rand;
            this.spriteGroupCollection       = spriteGroupCollection;
            this.spriteRequirementCollection = spriteRequirementCollection;

            areas = new OverworldAreaCollection(romData, rand, spriteGroupCollection, spriteRequirementCollection);
        }
Exemple #2
0
 void SetOverworldEnemy(OverworldAreaCollection owa)
 {
     foreach (var o in owa.OverworldAreas)
     {
         foreach (var s in o.Sprites)
         {
             if (false == dontModifySprites.Contains(s.SpriteId))
             {
                 s.SpriteId        = optionFlags.DebugForceEnemyId;
                 o.GraphicsBlockId = 7;
             }
         }
         o.BushSpriteId = optionFlags.DebugForceEnemyId;
     }
 }
Exemple #3
0
        public void SetDebugMode()
        {
            var rand = new Random();
            var sr   = new SpriteRequirementCollection();
            var sg   = new SpriteGroupCollection(romData, rand, sr);

            sg.LoadSpriteGroups();
            var rc  = new RoomCollection(romData, rand, sg, sr);
            var owa = new OverworldAreaCollection(romData, rand, sg, sr);

            rc.LoadRooms();

            if (optionFlags.DebugForceBoss)
            {
                // this is set in the boss randomizer because there is too much to do after picking a boss
            }
            if (optionFlags.DebugForceEnemy)
            {
                SetDungeonEnemy(rc);
                SetOverworldEnemy(owa);
                SetSpriteGroups(sg, sr);
            }
            if (optionFlags.DebugOpenShutterDoors)
            {
                RemoveKillRooms(rc);
            }
            if (optionFlags.DebugForceEnemyDamageZero)
            {
                SetEnemyDamageZero();
            }

            if (optionFlags.DebugShowRoomIdInRupeeCounter)
            {
                // put the room id in the rupee slot
                this.romData[0x1017A9]     = 0xA0;
                this.romData[0x1017A9 + 1] = 0x00;
                this.romData[0x1017A9 + 2] = 0x7E;
            }

            rc.UpdateRom();
            owa.UpdateRom();
            sg.UpdateRom();
        }