public Game() { AddParameter(new Parameter(ParameterIds.HappinessSensitivity, "Happiness Sensitivity", 0.25, 0, 1)); // How quickly happiness follows Satisfaction, 0: never, 1: immediately Date = new Date(2013, 1, 1); ProductTypes.Add(new ProductType("Food", 0.5, 1)); ProductTypes.Add(new ProductType("Clothes", 1, 1)); Country = new Polity.Country(StartPopulation); Event e = new Event("Discovery"); e.Condition = new ChanceCondition(0.01); e.Effect = new MultipleEffects(); e.AddEffect(new MessageEffect("New technologies increase productivity!")); e.AddEffect(new ChangeParameterEffect(Country, ParameterIds.Productivity, 1, 0.05)); e = new Event("MPs Propose to Lower Taxes"); e.Condition = new ChanceCondition(0.3); e.HappensOnce = true; Issues iss = new Issues(); iss.AddIssue(IssueIds.Populism, 1); iss.AddIssue(IssueIds.BigGovernment, -1); e.Effect = new SubmitBillEffect(new Bill(iss, new ChangeParameterEffect(Country, ParameterIds.IncomeTaxRate, 1, -0.05)), Country.Parliament); Events.Add(e); Decision d = new Decision("Celebrate"); d.DisplayCondition = new HasMoneyCondition(Country.Budget, 5); d.Effect = new MessageEffect("We have lots of money! Hurray!"); Decisions.Add(d); d = new Decision("Decrease Income Tax"); iss = new Issues(); iss.AddIssue(IssueIds.Populism, 0.5); iss.AddIssue(IssueIds.BigGovernment, -0.5); d.Effect = new SubmitBillEffect(new Bill(iss, new ChangeParameterEffect(Country, ParameterIds.IncomeTaxRate, 1, -0.02)), Country.Parliament); Decisions.Add(d); d = new Decision("Increase Income Tax"); iss = new Issues(); iss.AddIssue(IssueIds.Populism, -0.5); iss.AddIssue(IssueIds.BigGovernment, 0.5); d.Effect = new SubmitBillEffect(new Bill(iss, new ChangeParameterEffect(Country, ParameterIds.IncomeTaxRate, 1, 0.02)), Country.Parliament); Decisions.Add(d); d = new Decision("See Invisible Pink Unicorn"); d.DisplayCondition = new ConstCondition(false); d.Effect = new MessageEffect("Wow! Here it is: the invisible pink unicorn"); Decisions.Add(d); }
public Bill(Issues politics, params Effect[] effects) { Politics = politics; Effect = new MultipleEffects(effects); }