Beispiel #1
0
        public void Reset()
        {
            s_seed = (0 == COMMAND_LINE_SEED ? (int)DateTime.UtcNow.TimeOfDay.Ticks : COMMAND_LINE_SEED);
#if DEBUG
            Logger.WriteLine(Logger.Stage.RUN_MAIN, "Seed: " + s_seed.ToString());
#endif
            RogueGame.Reset();
            m_Scoring = new Scoring();
            var city_size = RogueGame.Options.CitySize;
            World = new World(city_size);
            LastTurnPlayerActed = 0;
            m_Event_Raids       = new int[(int)RaidType._COUNT, city_size, city_size];
            for (int index1 = 0; index1 < (int)RaidType._COUNT; ++index1)
            {
                for (int index2 = 0; index2 < city_size; ++index2)
                {
                    for (int index3 = 0; index3 < city_size; ++index3)
                    {
                        m_Event_Raids[index1, index2, index3] = -1;
                    }
                }
            }
            PlayerKnows_CHARUndergroundFacilityLocation = false;
            ScriptStage_PoliceStationPrisoner           = 0;
            ScriptStage_PoliceCHARrelations             = 0;
            ScriptStage_HospitalPowerup = 0;
            UniqueActors = new UniqueActors();
            UniqueItems  = new UniqueItems();
            UniqueMaps   = new UniqueMaps();
            m_PoliceItemMemory.Clear();
            m_PoliceThreatTracking.Clear();
        }
 // alpha10
 public UniqueActor ActorToUniqueActor(Actor a)
 {
     if (!a.IsUnique)
     {
         throw new ArgumentException("actor is not unique");
     }
     foreach (UniqueActor unique in UniqueActors.ToArray())
     {
         if (unique.TheActor == a)
         {
             return(unique);
         }
     }
     throw new ArgumentException("actor is flaged as unique but did not find it!");
 }