예제 #1
0
파일: Soul.cs 프로젝트: rpeacock/CaliphEtAl
        public static void endOfGame()
        {
            int currentGold   = PointAndCurency.GetGold();
            int currentPoints = PointAndCurency.GetPoints();

            if (currentGold >= 80)
            {
                currentGold   = currentGold / 80;
                currentPoints = currentPoints + currentGold;
            }
            foreach (var soul in souls)
            {
                if (soul.soulName == "alive")
                {
                    currentPoints = currentPoints + (soul.goodLevel - (soul.maxAge - soul.age));
                    PointAndCurency.SetPoints(currentPoints);
                }
                else if (soul.soulName == "currency")
                {
                    currentPoints = PointAndCurency.GetPoints();
                    currentPoints = currentPoints + (soul.goodLevel / 2);
                    PointAndCurency.SetPoints(currentPoints);
                }
            }
        }
예제 #2
0
파일: Soul.cs 프로젝트: rpeacock/CaliphEtAl
        public static void endOfTurn()
        {
            int points   = PointAndCurency.GetPoints();
            int multiple = 15;

            foreach (var soul in souls)
            {
                if (soul.soulName == "alive")
                {
                    soul.age = soul.age + (1 * multiple);
                    if (soul.age >= soul.maxAge)
                    {
                        soul.soulName = "dead";
                    }
                    else
                    {
                        soul.goodLevel = soul.goodLevel + needCalculation();
                    }
                }
            }
            resourceMangement();
            babySoul();
            points = (int)(points * 1.2);
            PointAndCurency.SetPoints(points);
        }
        public void ResetGameStats()
        {
            List <Zone> zones = MapComponent.GetZones();

            foreach (Zone zone in zones)
            {
                zone.setUpgradeCost(300);
                zone.setTileType(1);
                zone.setNumberOfSouls(0);
            }
            Turn.setCurrentTurn(1);
            PointAndCurency.SetSouls(0);
            PointAndCurency.SetPoints(0);
            PointAndCurency.SetGold(0);
            Souls.souls = new List <Soul>();
        }
예제 #4
0
파일: Soul.cs 프로젝트: rpeacock/CaliphEtAl
        public static void scoreSoul(int numSouls)
        {
            int currentPoints = PointAndCurency.GetPoints();
            int currentSouls  = PointAndCurency.GetSouls();
            int selling       = 0;

            foreach (var soul in souls)
            {
                if (soul.soulName == "currency" && selling < numSouls)
                {
                    currentPoints = (currentPoints + soul.goodLevel);
                    //currentSouls = currentSouls - 1;
                    selling++;
                    soul.soulName = "point";
                    PointAndCurency.SetSouls(currentSouls);
                    PointAndCurency.SetPoints(currentPoints);
                }
            }
        }
예제 #5
0
        public void Quit()
        {
            List <Zone> zones = MapComponent.GetZones();

            foreach (Zone zone in zones)
            {
                zone.setUpgradeCost(300);
                zone.setTileType(1);
                zone.setNumberOfSouls(0);
            }
            Turn.setCurrentTurn(1);
            PointAndCurency.SetSouls(0);
            PointAndCurency.SetPoints(0);
            PointAndCurency.SetGold(0);
            Souls.souls = new List <Soul>();



            quitSession  = true;
            this.Visible = false;
            this.Enabled = false;
        }