示例#1
0
                static float DeltaDifficulty(ZupDays x)
                {
                    switch (x)
                    {
                    case ZupDays.ONE: return(0.5f);

                    case ZupDays.TWO: return(0.25f);

                    case ZupDays.FOUR: return(-0.1f);

                    case ZupDays.FIVE: return(-0.2f);

                    case ZupDays.SIX: return(-0.3f);

                    case ZupDays.SEVEN: return(-0.4f);

                    case ZupDays.OFF: return(-0.5f);

#if DEBUG
                    default: throw new InvalidProgramException("unhandled case");
#else
                    default: return(0.0f);
#endif
                    }
                }
示例#2
0
 public void ResetToDefaultValues()
 {
     m_DistrictSize                = DEFAULT_DISTRICT_SIZE;
     m_MaxCivilians                = DEFAULT_MAX_CIVILIANS;
     m_MaxUndeads                  = DEFAULT_MAX_UNDEADS;
     m_MaxDogs                     = DEFAULT_MAX_DOGS;
     m_PlayMusic                   = true;
     m_MusicVolume                 = 100;
     m_AnimDelay                   = true;
     m_ShowMinimap                 = true;
     m_ShowPlayerTagsOnMinimap     = true;
     m_EnabledAdvisor              = true;
     m_CombatAssistant             = false;
     this.SimulateDistricts        = DEFAULT_SIM_DISTRICTS;
     m_SimulateWhenSleeping        = false;
     m_SimThread                   = true;
     m_SpawnSkeletonChance         = DEFAULT_SPAWN_SKELETON_CHANCE;
     m_SpawnZombieChance           = DEFAULT_SPAWN_ZOMBIE_CHANCE;
     m_SpawnZombieMasterChance     = DEFAULT_SPAWN_ZOMBIE_MASTER_CHANCE;
     m_CitySize                    = DEFAULT_CITY_SIZE;
     m_NPCCanStarveToDeath         = true;
     m_ZombificationChance         = DEFAULT_ZOMBIFICATION_CHANCE;
     m_RevealStartingDistrict      = true;
     m_AllowUndeadsEvolution       = true;
     m_DayZeroUndeadsPercent       = DEFAULT_DAY_ZERO_UNDEADS_PERCENT;
     m_ZombieInvasionDailyIncrease = DEFAULT_ZOMBIE_INVASION_DAILY_INCREASE;
     m_StarvedZombificationChance  = DEFAULT_STARVED_ZOMBIFICATION_CHANCE;
     m_MaxReincarnations           = DEFAULT_MAX_REINCARNATIONS;
     m_CanReincarnateAsRat         = false;
     m_CanReincarnateToSewers      = false;
     m_IsLivingReincRestricted     = false;
     m_Permadeath                  = false;
     m_DeathScreenshot             = true;
     m_AggressiveHungryCivilians   = true;
     m_NatGuardFactor              = DEFAULT_NATGUARD_FACTOR;
     m_SuppliesDropFactor          = DEFAULT_SUPPLIESDROP_FACTOR;
     m_ShowTargets                 = true;
     m_ShowPlayerTargets           = true;
     m_ZupDays                     = DEFAULT_ZOMBIFIEDS_UPGRADE_DAYS;
     m_RatsUpgrade                 = false;
     m_SkeletonsUpgrade            = false;
     m_ShamblersUpgrade            = false;
     m_AutoSavePeriodInHours       = DEFAULT_AUTOSAVE_PERIOD;
 }
示例#3
0
        public static bool IsZupDay(ZupDays d, int day)
        {
            switch (d)
            {
            case ZupDays.ONE: return(true);

            case ZupDays.TWO: return(day % 2 == 0);

            case ZupDays.THREE: return(day % 3 == 0);

            case ZupDays.FOUR: return(day % 4 == 0);

            case ZupDays.FIVE: return(day % 5 == 0);

            case ZupDays.SIX: return(day % 6 == 0);

            case ZupDays.SEVEN: return(day % 7 == 0);

            case ZupDays.OFF:
            default:
                return(false);
            }
        }
示例#4
0
        public static string Name(ZupDays d)
        {
            switch (d)
            {
            case ZupDays.OFF: return("OFF");

            case ZupDays.ONE: return("1 d");

            case ZupDays.TWO: return("2 d");

            case ZupDays.THREE: return("3 d");

            case ZupDays.FOUR: return("4 d");

            case ZupDays.FIVE: return("5 d");

            case ZupDays.SIX: return("6 d");

            case ZupDays.SEVEN: return("7 d");

            default:
                throw new ArgumentOutOfRangeException("unhandled zupDays");
            }
        }