Description:
Add declining subsidy.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -113,6 +113,12 | |||||
|
113 | DifficultyLevel.Medium => 750M, |
|
113 | DifficultyLevel.Medium => 750M, |
|
114 | DifficultyLevel.Easy => 1000M, |
|
114 | DifficultyLevel.Easy => 1000M, |
|
115 | }; |
|
115 | }; |
|
|
116 | |||
|
|
117 | this.simulation.SubsidyDelta = message.Difficulty switch { | ||
|
|
118 | DifficultyLevel.Hard => 0M, | ||
|
|
119 | DifficultyLevel.Medium => -10M, | ||
|
|
120 | DifficultyLevel.Easy => 0M, | ||
|
|
121 | }; | ||
|
116 |
|
122 | ||
|
117 | Logging.Success("Spawned new game."); |
|
123 | Logging.Success("Spawned new game."); |
|
118 |
|
124 |
@@ -61,7 +61,13 | |||||
|
61 | public const int MAX_TREES_TO_PLANT = 25; |
|
61 | public const int MAX_TREES_TO_PLANT = 25; |
|
62 | public const int MAX_TREES_TO_CLEAR = 25; |
|
62 | public const int MAX_TREES_TO_CLEAR = 25; |
|
63 |
|
63 | ||
|
64 |
public decimal Subsidy { get; set; |
|
64 | public decimal Subsidy { get; set; |
|
|
65 | /* { | ||
|
|
66 | var dateSpan = DateTimeSpan.CompareDates(this.START_DATETIME, this.DateTime); | ||
|
|
67 | var months = (dateSpan.Years * 12) + dateSpan.Years; }*/ | ||
|
|
68 | } | ||
|
|
69 | |||
|
|
70 | public decimal SubsidyDelta { get; set;} | ||
|
65 |
|
71 | ||
|
66 | public int Tick |
|
72 | public int Tick |
|
67 | { |
|
73 | { |
@@ -235,6 +241,7 | |||||
|
235 |
|
241 | ||
|
236 | var oldSeason = this.Season; |
|
242 | var oldSeason = this.Season; |
|
237 | this.DateTime = this.DateTime.AddMonths(1); |
|
243 | this.DateTime = this.DateTime.AddMonths(1); |
|
|
244 | this.Subsidy = Math.Max(0, this.Subsidy + this.SubsidyDelta); | ||
|
238 | var newSeason = this.Season; |
|
245 | var newSeason = this.Season; |
|
239 | var seasonChanged = oldSeason != newSeason; |
|
246 | var seasonChanged = oldSeason != newSeason; |
|
240 |
|
247 |
You need to be logged in to leave comments.
Login now