private void InitRegionsStructs()
    {
        regionStruct temp = new regionStruct();

        temp.name = "Castle Black";
        temp.crownNumber = 1;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = "Starks";

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Karhold";
        temp.crownNumber = 1;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Winterfell";
        temp.crownNumber = 1;
        temp.supplyNumber = 1;
        temp.city = false;
        temp.castle = true;
        temp.nextToSea = true;
        temp.harbor = true;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "The Stoney Shore";
        temp.crownNumber = 0;
        temp.supplyNumber = 1;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "The White Harbor";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = true;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = true;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Widow's Watch";
        temp.crownNumber = 0;
        temp.supplyNumber = 1;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Flint's Finger";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = true;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Greywater Watch";
        temp.crownNumber = 0;
        temp.supplyNumber = 1;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Moat Callin";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = true;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Pyke";
        temp.crownNumber = 1;
        temp.supplyNumber = 1;
        temp.city = false;
        temp.castle = true;
        temp.nextToSea = true;
        temp.harbor = true;
        temp.isSea = false;
        temp.capitalOfHouse = "GreyJoy";

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Seagard";
        temp.crownNumber = 1;
        temp.supplyNumber = 1;
        temp.city = false;
        temp.castle = true;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "The Twins";
        temp.crownNumber = 1;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "The Fingers";
        temp.crownNumber = 0;
        temp.supplyNumber = 1;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "The Mountains of the Moon";
        temp.crownNumber = 0;
        temp.supplyNumber = 1;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "The Eyrie";
        temp.crownNumber = 1;
        temp.supplyNumber = 1;
        temp.city = true;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Riverrun";
        temp.crownNumber = 1;
        temp.supplyNumber = 1;
        temp.city = false;
        temp.castle = true;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Lannisport";
        temp.crownNumber = 1;
        temp.supplyNumber = 2;
        temp.city = false;
        temp.castle = true;
        temp.nextToSea = true;
        temp.harbor = true;
        temp.isSea = false;
        temp.capitalOfHouse = "Lannister";

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Stoney Sept";
        temp.crownNumber = 1;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = false;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Harrenhal";
        temp.crownNumber = 1;
        temp.supplyNumber = 0;
        temp.city = true;
        temp.castle = false;
        temp.nextToSea = false;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Crackclaw point";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = true;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Searoad Marches";
        temp.crownNumber = 0;
        temp.supplyNumber = 1;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Blackwater";
        temp.crownNumber = 0;
        temp.supplyNumber = 2;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = false;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Dragonstone";
        temp.crownNumber = 1;
        temp.supplyNumber = 1;
        temp.city = false;
        temp.castle = true;
        temp.nextToSea = true;
        temp.harbor = true;
        temp.isSea = false;
        temp.capitalOfHouse = "Baratheon";

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "King's landing";
        temp.crownNumber = 0;
        temp.supplyNumber = 2;
        temp.city = false;
        temp.castle = true;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Highgarden";
        temp.crownNumber = 0;
        temp.supplyNumber = 2;
        temp.city = false;
        temp.castle = true;
        temp.nextToSea = true;
        temp.harbor = true;
        temp.isSea = false;
        temp.capitalOfHouse = "Tyrell";

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "The Reach";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = true;
        temp.castle = false;
        temp.nextToSea = false;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Kingswood";
        temp.crownNumber = 1;
        temp.supplyNumber = 1;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Oldtown";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = true;
        temp.nextToSea = true;
        temp.harbor = true;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Dornish Marches";
        temp.crownNumber = 1;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = false;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "The Boneway";
        temp.crownNumber = 1;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Storms End";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = true;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = true;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Three Towers";
        temp.crownNumber = 0;
        temp.supplyNumber = 1;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Prince's Pass";
        temp.crownNumber = 1;
        temp.supplyNumber = 1;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = false;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "The Arbor";
        temp.crownNumber = 1;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Starfall";
        temp.crownNumber = 0;
        temp.supplyNumber = 1;
        temp.city = true;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Yronwood";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = true;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Salt Shore";
        temp.crownNumber = 0;
        temp.supplyNumber = 1;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = true;
        temp.harbor = false;
        temp.isSea = false;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Sunspear";
        temp.crownNumber = 1;
        temp.supplyNumber = 1;
        temp.city = false;
        temp.castle = true;
        temp.nextToSea = true;
        temp.harbor = true;
        temp.isSea = false;
        temp.capitalOfHouse = "Martell";

        mRegionList.Add(temp);
        temp = new regionStruct();
        //----------------------------------------------SEAS------------------------------------------
        temp.name = "Bay of Ice";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = false;
        temp.harbor = false;
        temp.isSea = true;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "The Shivering Sea";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = false;
        temp.harbor = false;
        temp.isSea = true;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Sunset Sea";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = false;
        temp.harbor = false;
        temp.isSea = true;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Ironman's Bay";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = false;
        temp.harbor = false;
        temp.isSea = true;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "The Golden sound";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = false;
        temp.harbor = false;
        temp.isSea = true;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Redwyne straights";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = false;
        temp.harbor = false;
        temp.isSea = true;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "West Summer Sea";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = false;
        temp.harbor = false;
        temp.isSea = true;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "East Summer Sea";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = false;
        temp.harbor = false;
        temp.isSea = true;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Sea of Drone";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = false;
        temp.harbor = false;
        temp.isSea = true;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Shipbreaker Bay";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = false;
        temp.harbor = false;
        temp.isSea = true;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Blackwater Bay";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = false;
        temp.harbor = false;
        temp.isSea = true;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();

        temp.name = "Narrow Sea";
        temp.crownNumber = 0;
        temp.supplyNumber = 0;
        temp.city = false;
        temp.castle = false;
        temp.nextToSea = false;
        temp.harbor = false;
        temp.isSea = true;
        temp.capitalOfHouse = null;

        mRegionList.Add(temp); temp = new regionStruct();
    }
Example #2
0
    public void HandleActualToken()
    {
        if (GameObject.Find("Gamelogic").GetComponent<TurnController>().ActualTurn != TurnController.PART_OF_TURN.ACTION)
            return;
        /*
        string actualPlayer = orderedPlayer[actualPlayerIndex];
        while (mPlacedOrderList.Count() > 0)
        {
            //UGYANIGY A TOBBIRE
            if (mPlacedOrderList.Where(o => (o.order.name == "Raid") || (o.order.name == "Raid+")).Count() > 0 )
            {
                if (actualPlayer == realPlayer.playerHouse)
                {
                    //hadd tehesse le a paraszt
                }
                else
                {
                    //AI -> kitoroljuk a gecibe a parancsot MEG!
                    mPlacedOrderList.Remove(mPlacedOrderList.Where(o => o.ownerPlayerName == actualPlayer).FirstOrDefault());
                }
                break;
            }
            else if (mPlacedOrderList.Where(o => (o.order.name == "Attack-") || (o.order.name == "Attack") || (o.order.name == "Attack+")).Count() > 0 )
            {
                if (actualPlayer == realPlayer.playerHouse)
                {
                    //hadd tehesse le a paraszt
                }
                else
                {
                    //AI -> kitoroljuk a gecibe a parancsot MEG!
                    mPlacedOrderList.Remove(mPlacedOrderList.Where(o => o.ownerPlayerName == actualPlayer).FirstOrDefault());
                }
                break;
            }
            else if (mPlacedOrderList.Where(o => (o.order.name == "Consolidate") || (o.order.name == "Consolidate+")).Count() > 0 )
            {
                if (actualPlayer == realPlayer.playerHouse)
                {
                    //hadd tehesse le a paraszt
                }
                else
                {
                    //AI -> kitoroljuk a gecibe a parancsot MEG!
                    mPlacedOrderList.Remove(mPlacedOrderList.Where(o => o.ownerPlayerName == actualPlayer).FirstOrDefault());
                }
                break;
            }

            //noveeljuk a szamlalot a gecibe
            actualPlayerIndex++;
            if (actualPlayerIndex < 6)
            {
                actualPlayerIndex = 1;
            }
        }
        */

        /////////////////////////////////////////////////////////////////////////////////////////
        //                                     SZAKDOGA1-HEZ                                   //
        /////////////////////////////////////////////////////////////////////////////////////////

        //######################## RAID ########################
        // megnem fogyott el a raid, igy raidelunk
        if (mPlacedOrderList.Where(o => (o.order.name == "Raid") || (o.order.name == "Raid+")).Count() > 0)
        {
            //lecsekkoljuk h a kivalasztott terulet raid parancsos-e
            //raid plusszal akarmi leszedheto
            if (mPlacedOrderList.Find(o => (o.region.name == selectedActionRegionStart.name) && (o.order.name == "Raid+")) != null)
            {

                Debug.Log("Elso raid ok");
                //ikont is törölni kell , ill külön FG-ben végrehajtani ezt.,
                mPlacedOrderList.Remove(mPlacedOrderList.Where(o => (o.region.name == selectedActionRegionEnd.name)).FirstOrDefault());
                mPlacedOrderList.Remove(mPlacedOrderList.Where(o => (o.region.name == selectedActionRegionStart.name)).FirstOrDefault());
                RemoveTokenIcon(true);
            }
            //sima raid csak a nem defend-es területet szedi le
            else if (mPlacedOrderList.Find(o => (o.region.name == selectedActionRegionStart.name) && ((o.order.name == "Raid"))) != null)
            {
                PlacedOrderStruct temp = mPlacedOrderList.Find(o => (o.region.name == selectedActionRegionEnd.name));
                if (temp == null)
                {
                    Debug.Log("a kivalasztott teruleten nincs lerakott parancs, igy portyazassal nem szedheto le");
                    return;
                }
                if (temp.order.name != "Defend+" && temp.order.name != "Defend++")
                {
                    Debug.Log("masodik raid ok");
                    //ikont is törölni kell , ill külön FG-ben végrehajtani ezt.
                    mPlacedOrderList.Remove(mPlacedOrderList.Where(o => (o.region.name == selectedActionRegionEnd.name)).FirstOrDefault());
                    mPlacedOrderList.Remove(mPlacedOrderList.Where(o => (o.region.name == selectedActionRegionStart.name)).FirstOrDefault());
                    RemoveTokenIcon(true);
                }
            }
            else
            {
                Debug.Log("vagy van még portyazas parancs vagy rossz területet valasztottal");
            }
            return;
        }
        //ez majd jön
        //////######################## ATTACK ########################
        if (mPlacedOrderList.Where(o => (o.order.name == "Attack-") || (o.order.name == "Attack") || (o.order.name == "Attack+")).Count() > 0)
        {
            PlacedOrderStruct tempStart = mPlacedOrderList.Find(o => (o.region.name == selectedActionRegionStart.name));
            //lecsekkoljuk h a kivalasztott terulet tamadasos-e
            if (tempStart != null && (tempStart.order.name == "Attack-") || (tempStart.order.name == "Attack") || (tempStart.order.name == "Attack+"))
            {
                AttackerRegion = selectedActionRegionStart;
                AttackerRegion_gameobject = selectedActionRegionStart_gameobject;
                mPlacedOrderList.Remove(mPlacedOrderList.Where(o => (o.region.name == selectedActionRegionStart.name)).FirstOrDefault());
                RemoveTokenIcon(false);
            }
        }
        //      regionStruct tempEnd = mRegionList.Find(o => (o.name == selectedActionRegionEnd.name));
        //      {
        //          if( tempEnd != null )
        //            {
        //                foreach (var neighb in tempEnd.neighbours)
        //                {
        //                    foreach (var reg in realPlayer.regions)
        //                    {
        //                        if( reg.name == neighb.name )
        //                        {
        //                            //meg nincs feltoltve a jatekos kezdo regioja, igy nehez lezs :D
        //                            Debug.Log("itt tamogathat");
        //                        }
        //                    }
        //                }
        //            }
        //            else
        //            {
        //                Debug.Log("nemletezo regiot nehez tamadni");
        //                return;
        //            }
        //        }
        //        // itt már biztos h tamadas lesz, megnezzuk a szomszedos megyekbol ki tamogat kit.
        //
        //        /// itt gecisok minden fog számítani, pl a támogatás panelek
        //        Debug.Log("tamadasssssssss");
        //    }
        //    else
        //    {
        //        Debug.Log("valasz masik teruletet");
        //    }
        //
        //    return;
        //}
        //######################## CONSOLIDATE ########################
        if (mPlacedOrderList.Where(o => (o.order.name == "Consolidate") || (o.order.name == "Consolidate+")).Count() > 0)
        {
            //lecsekkoljuk h a kivalasztott terulet raid parancsos-e
            PlacedOrderStruct temp = mPlacedOrderList.Find(o => (o.region.name == selectedActionRegionStart.name) && ((o.order.name == "Consolidate") || (o.order.name == "Consolidate+")));
            if (temp != null)
            {
                Debug.Log("cons");
                foreach (var plyr in mPlayerList)
                {
                    if (plyr.playerHouse == temp.ownerPlayerName)
                    {
                        plyr.numberOfPowerTokens += 1 + temp.region.crownNumber;
                        break;
                    }
                }
                mPlacedOrderList.Remove(temp);
                RemoveTokenIcon(false);
            }
            else
            {
                Debug.Log("valasz masik teruletet");
            }

            return;
        }
    }
 public PlacedOrderStruct(string _name, regionStruct _region, OrderStruct _order)
 {
     this.ownerPlayerName = _name;
     this.region = _region;
     this.order = _order;
 }
Example #4
0
 public void resetSelectedRegions()
 {
     selectedRegion = null;
     selectedRegion_gameobject = null;
     selectedActionRegionStart = null;
     selectedActionRegionStart_gameobject = null;
     selectedActionRegionEnd = null;
     selectedActionRegionEnd_gameobject = null;
 }