Exemple #1
0
 public void ShowGeographyOverlay(GeographyTraitType t)
 {
     ShowOverlayLegend(EnumHelper.GetDescription(t));
     foreach (Region r in Map.LandRegions.Where(x => Game.VisibleDistricts.ContainsKey(x)))
     {
         Policy policy       = Game.LocalPlayerParty.GetPolicy(t);
         int    policyImpact = Game.VisibleDistricts[r].GetBaseImpact(policy);
         Color  impactColor  = ColorManager.Singleton.GetImpactColor(policyImpact);
         r.SetColor(impactColor);
     }
 }
Exemple #2
0
 public GeographyPolicy(int id, Party p, GeographyTraitType trait, int maxValue) : base(id, p, maxValue)
 {
     Trait = trait;
     Name  = EnumHelper.GetDescription(trait);
     Type  = PolicyType.Geography;
 }
Exemple #3
0
 public int GetPolicyValueFor(GeographyTraitType t)
 {
     return(GetPolicy(t).Value);
 }
Exemple #4
0
 public Policy GetPolicy(GeographyTraitType t)
 {
     return(Policies.OfType <GeographyPolicy>().First(x => x.Trait == t));
 }
Exemple #5
0
        public GeographyTrait(GeographyTraitType type, int category)
        {
            Type     = type;
            Category = category;
            BaseName = EnumHelper.GetDescription(type);
            string romanianNumber = category == 1 ? "I" : category == 2 ? "II" : "III";

            FullName = BaseName + " " + romanianNumber;

            switch (type)
            {
            case GeographyTraitType.Coastal:
                Description = "This district lies on the coast.\nThe " + BaseName + " policy will have a " + GetImpactAdjective() + " impact on this district.";
                break;

            case GeographyTraitType.Core:
                Description = "This district was one of the first to be added to the country.\nThe " + BaseName + " policy will have a " + GetImpactAdjective() + " impact on this district.";
                break;

            case GeographyTraitType.New:
                Description = "This district was one of the latest to be added to the country.\nThe " + BaseName + " policy will have a " + GetImpactAdjective() + " impact on this district.";
                break;

            case GeographyTraitType.Eastern:
                Description = "This district is located in the east of the country.\nThe " + BaseName + " policy will have a " + GetImpactAdjective() + " impact on this district.";
                break;

            case GeographyTraitType.Western:
                Description = "This district is located in the west of the country.\nThe " + BaseName + " policy will have a " + GetImpactAdjective() + " impact on this district.";
                break;

            case GeographyTraitType.Southern:
                Description = "This district is located in the south of the country.\nThe " + BaseName + " policy will have a " + GetImpactAdjective() + " impact on this district.";
                break;

            case GeographyTraitType.Northern:
                Description = "This district is located in the north of the country.\nThe " + BaseName + " policy will have a " + GetImpactAdjective() + " impact on this district.";
                break;

            case GeographyTraitType.Tiny:
                Description = "This district has a very small area.\nThe " + BaseName + " policy will have a " + GetImpactAdjective() + " impact on this district.";
                break;

            case GeographyTraitType.Large:
                Description = "This district has a very big area.\nThe " + BaseName + " policy will have a " + GetImpactAdjective() + " impact on this district.";
                break;

            case GeographyTraitType.Landlocked:
                Description = "This district has no ocean coastlines.\nThe " + BaseName + " policy will have a " + GetImpactAdjective() + " impact on this district.";
                break;

            case GeographyTraitType.Lakeside:
                Description = "This district is adjacent to a lake.\nThe " + BaseName + " policy will have a " + GetImpactAdjective() + " impact on this district.";
                break;

            case GeographyTraitType.Island:
                Description = "This district is on an island.\nThe " + BaseName + " policy will have a " + GetImpactAdjective() + " impact on this district.";
                break;

            default:
                throw new System.Exception("GeographyTraitType " + type.ToString() + " not handled");
            }
        }
Exemple #6
0
 public GeographyTrait GetGeographyTrait(GeographyTraitType type, int category)
 {
     return(GeographyTraits.First(x => x.Type == type && x.Category == category));
 }