Пример #1
0
        public LawSet GetLawSet(Culture cul, Religion rel, Random rand)
        {
            LawSet ls = new LawSet();

            List <Law> posLaws = FilterLaws(cul, rel, SuccessionLaws);

            ls.Succession = posLaws.RandomItem(rand).Name;

            posLaws   = FilterLaws(cul, rel, GenderLaws);
            ls.Gender = posLaws.RandomItem(rand).Name;

            ls.CrownAuthority = "centralization_" + rand.Normal(0, 4).ToString();

            ls.CityLevy = "city_contract_" + WeightedLawNum(rand).ToString();
            ls.CityTax  = "city_tax_" + WeightedLawNum(rand).ToString();

            if (IsMuslimLaw(cul, rel))
            {
                ls.isMuslim = true;

                ls.IqtaLevy = "iqta_contract_" + WeightedLawNum(rand).ToString();
                ls.IqtaTax  = "iqta_tax_" + WeightedLawNum(rand).ToString();
            }
            else
            {
                ls.isMuslim = false;

                ls.ChurchLevy = "temple_contract_" + WeightedLawNum(rand).ToString();
                ls.ChurchTax  = "temple_tax_" + WeightedLawNum(rand).ToString();

                ls.FeudalLevy = "feudal_contract_" + WeightedLawNum(rand).ToString();
                ls.FeudalTax  = "feudal_tax_" + WeightedLawNum(rand).ToString();
            }

            return(ls);
        }
Пример #2
0
		public LawSet GetLawSet( Culture cul, Religion rel, Random rand )
		{
			LawSet ls = new LawSet();

			List<Law> posLaws = FilterLaws( cul, rel, SuccessionLaws );
			ls.Succession = posLaws.RandomItem( rand ).Name;

			posLaws = FilterLaws( cul, rel, GenderLaws );
			ls.Gender = posLaws.RandomItem( rand ).Name;

			ls.CrownAuthority = "centralization_" + rand.Normal( 0, 4 ).ToString();

			ls.CityLevy = "city_contract_" + WeightedLawNum( rand ).ToString();
			ls.CityTax = "city_tax_" + WeightedLawNum( rand ).ToString();

			if( IsMuslimLaw( cul, rel ) )
			{
				ls.isMuslim = true;

				ls.IqtaLevy = "iqta_contract_" + WeightedLawNum( rand ).ToString();
				ls.IqtaTax = "iqta_tax_" + WeightedLawNum( rand ).ToString();
			} else
			{
				ls.isMuslim = false;

				ls.ChurchLevy = "temple_contract_" + WeightedLawNum( rand ).ToString();
				ls.ChurchTax = "temple_tax_" + WeightedLawNum( rand ).ToString();

				ls.FeudalLevy = "feudal_contract_" + WeightedLawNum( rand ).ToString();
				ls.FeudalTax = "feudal_tax_" + WeightedLawNum( rand ).ToString();
			}

			return ls;
		}