예제 #1
0
        public void NextDay()
        {
            StatBar();
            int index = Rand.Next(0, 2) + 1;

            switch (index)
            {
            case 1:
                neutralEvents.Events();
                break;

            case 2:
                badEvents.Events();
                break;
            }
        }
예제 #2
0
        //This method calls th diffrent events based on stability and just random
        public void Events()
        {
            // Index = Rand.Next(0, 12) + 1;
            Index = 1;

            switch (Index)
            {
            case 1 when statsHolder.Stability <= 100:
                Strikes();
                break;

            case 2 when statsHolder.Stability <= 85:
                Protests();
                break;

            case 3 when statsHolder.Stability <= 80:
                RightUprisings();
                break;

            case 4 when statsHolder.Stability <= 70:
                Riots();
                break;

            case 5 when statsHolder.Stability <= 50:
                DesertionMilitary();
                break;

            case 6 when statsHolder.Stability <= 50:
                InstabilityPolice();
                break;

            case 7 when statsHolder.InternationalRelation <= 30:
                WarDeclaration();
                break;

            case 8 when statsHolder.Stability <= 30:
                Rebellion();
                break;

            case 9 when statsHolder.Stability <= 50:
                Boycott();
                break;

            case 10 when statsHolder.Stability <= 0:
                CivilWar();
                break;

            case 11 when statsHolder.InternationalRelation <= 50:
                Terrorism();
                break;

            case 12 when statsHolder.Stability <= 10:
                Corruption();
                break;

            default:
            {
                if (statsHolder.Stability < 90)
                {
                    Events();
                }
                else
                {
                    neutralEvents.Events();
                }
                break;
            }
            }
        }