Exemplo n.º 1
0
        // Empty/Default Constructor means random outfit
        public static OutfitVO Create()
        {
            OutfitVO result = new OutfitVO();

            result.Novelty = 100;
            result.Modesty = GenerateRandom();
            result.Luxury  = GenerateRandom();
            switch (Util.RNG.Generate(0, 4))
            {
            case 1:
                result.Style = "Frankish";
                break;

            case 2:
                result.Style = "Venezian";
                break;

            default:
                result.Style = "Catalan";
                break;
            }
            result.CalculatePrice();
            result.GenerateName();
            result.GenerateDescription();
            return(result);
        }
Exemplo n.º 2
0
        public void Execute(DateTime day)
        {
            InventoryModel model = AmbitionApp.GetModel <InventoryModel>();
            int            count = model.ItemDefinitions.Length;
            ItemVO         item;
            string         style = null;

            model.Market.Clear();
            while (model.Market.Count < model.NumMarketSlots)
            {
                item = new ItemVO(model.ItemDefinitions[Util.RNG.Generate(0, count)]);
                item.State[ItemConsts.STYLE] = style = model.Styles[Util.RNG.Generate(0, model.Styles.Length)];
                item.Name = style + " " + item.Name;
                model.Market.Add(item);
            }

            OutfitVO outfit = OutfitVO.Create();

            outfit.Style = style;
            outfit.GenerateName();

            List <ItemVO> outfits = new List <ItemVO>()
            {
                outfit, OutfitVO.Create(), OutfitVO.Create()
            };

            if (AmbitionApp.GetModel <FactionModel>()["Bourgeoisie"].Level >= 3)
            {
                outfits.Add(OutfitVO.Create());
            }
            model.Market.RemoveAll(i => i.Type == ItemConsts.OUTFIT);
            model.Market.AddRange(outfits);
        }