public BaseTravellerData GenerateRandomMerchantTraveller(int unitCount, float newRelationship)
        {
            BaseTravellerData tmp = new BaseTravellerData();

            // INITIALIZATION OF DATA
            tmp.weekSpawned   = ObtainPlayerWeeklyCount();
            tmp.troopsCarried = new List <TroopsInformation>();

            // LEADER INFORMATION
            int randLdrIdx = UnityEngine.Random.Range(0, unitStorage.merchantStorage.Count);

            tmp.leaderUnit = new List <BaseHeroInformationData>();

            BaseHeroInformationData newLeader = new BaseHeroInformationData();

            newLeader.unitInformation = new UnitInformationData();
            newLeader = TransitionManager.GetInstance.unitStorage.ObtainHeroBaseInformation(WieldedWeapon.Bow);
            // TODO : CHANGE ON NEW HERO PREFABS
            newLeader.unitInformation.prefabDataPath = "Assets/Resources/Prefabs/Unit and Items/Player.prefab";
            newLeader.unitInformation.wieldedWeapon  = WieldedWeapon.Bow;


            tmp.leaderUnit.Add(newLeader);
            tmp.UpdateRelationship(newRelationship);
            // TRAVELLER SPEED
            tmp.travellerSpeed = 0.025f;


            // TROOPS CARRIED
            tmp.troopsCarried.AddRange(unitStorage.GenerateBasicWarband(unitCount));

            TravellerFlavourPhrase flavourTmp = new TravellerFlavourPhrase();

            flavourTmp.relationshipGauge = 0;
            flavourTmp.flavourText       = "We're here to make some profits!";

            tmp.flavourTexts = new List <TravellerFlavourPhrase>();
            tmp.flavourTexts.Add(flavourTmp);

            return(tmp);
        }
Пример #2
0
        public void GenerateMapUnits()
        {
            for (int i = 0; i < currentMap.myMap.myMapPoints.Count; i++)
            {
                if (currentMap.myMap.myMapPoints[i].myPointInformation.troopsStationed == null)
                {
                    currentMap.myMap.myMapPoints[i].myPointInformation.troopsStationed = new List <TroopsInformation>();
                }

                int unitCount = 10;
                if (currentMap.myMap.myMapPoints[i].myPointInformation.coinTax >= 30)
                {
                    unitCount = UnityEngine.Random.Range(25, 35);
                }
                else if (currentMap.myMap.myMapPoints[i].myPointInformation.coinTax >= 20)
                {
                    unitCount = UnityEngine.Random.Range(15, 25);
                }

                // Base this stuff depending on what the spawnable of the place is.
                currentMap.myMap.myMapPoints[i].myPointInformation.troopsStationed.AddRange(unitStorage.GenerateBasicWarband(unitCount));
                currentMap.myMap.myMapPoints[i].myPointInformation.isKingdomPoint = currentMap.myMap.myMapPoints[i].pointTowardsKingdom;
            }
        }