Add evaluation of deaths

This commit is contained in:
Andrew Cooper
2022-11-29 22:40:34 +11:00
parent ab7f2c1182
commit 9d8a4fbc93
19 changed files with 226 additions and 41 deletions

View File

@@ -0,0 +1 @@
{0} countrymen died of carbon-monoxide and dust inhalation

View File

@@ -0,0 +1 @@
{0} countrymen died of starvation

View File

@@ -0,0 +1,3 @@
also had your left eye gouged out!
;have also gained a very bad reputation.
;have also been declared national fink.

View File

@@ -0,0 +1,10 @@
Congratulations!!!!!!!!!!!!!!!!!!
You have successfully completed your {0} year term
of office. You were, of course, extremely lucky, but
nevertheless, it's quite an achievement. Goodbye and good
luck - you'll probably need it if you're the type that
plays this game.

View File

@@ -0,0 +1,3 @@
You have been thrown out of office and are now
residing in prison.;
You have been assassinated.

View File

@@ -0,0 +1,7 @@
The number of foreign workers has exceeded the number
of countrymen. As a minority, they have revolted and
taken over the country.
{0}

View File

@@ -0,0 +1,5 @@
{0} countrymen died in one year!!!!!
due to this extreme mismanagement, you have not only
been impeached and thrown out of office, but you
{1}

View File

@@ -0,0 +1,7 @@
Money was left over in the treasury which you did
not spend. As a result, some of your countrymen died
of starvation. The public is enraged and you have
been forced to resign.

View File

@@ -0,0 +1,7 @@
Over one third of the population has died since you
were elected to office. The people (remaining)
hate your guts.
{0}

View File

@@ -0,0 +1 @@
You were forced to spend {0} rallods on funeral expenses

View File

@@ -1,4 +1,3 @@
Goodbye.
(If you wish to continue this game at a later date, answer
'again' when asked if you want instructions at the start

View File

@@ -0,0 +1,5 @@
fish population has dwindled due to water pollution.
;air pollution is killing game bird population.
;mineral baths are being ruined by water pollution.
;unpleasant smog is discouraging sun bathers.
;hotels are looking shabby due to smog grit.

View File

@@ -51,6 +51,28 @@ internal static class Resource
public static string PollutionPrompt => GetString();
public static string PollutionError(float rallods) => string.Format(GetString(), rallods);
public static string DeathsStarvation(float deaths) => string.Format(GetString(), (int)deaths);
public static string DeathsPollution(int deaths) => string.Format(GetString(), deaths);
public static string FuneralExpenses(int expenses) => string.Format(GetString(), expenses);
public static string InsufficientReserves => GetString();
private static string PollutionEffect(IRandom random) => GetStrings()[random.Next(5)];
private static string EndAlso(IRandom random)
=> random.Next(10) switch
{
<= 3 => GetStrings()[0],
<= 6 => GetStrings()[1],
_ => GetStrings()[2]
};
public static string EndCongratulations(int termLength) => string.Format(GetString(), termLength);
private static string EndConsequences(IRandom random) => GetStrings()[random.Next(2)];
public static string EndForeignWorkers(IRandom random) => string.Format(GetString(), EndConsequences(random));
public static string EndManyDead(int deaths, IRandom random) => string.Format(GetString(), deaths, EndAlso(random));
public static string EndMoneyLeftOver(int termLength) => string.Format(GetString(), termLength);
public static string EndOneThirdDead(IRandom random) => string.Format(GetString(), EndConsequences(random));
public static string SavedYearsPrompt => GetString();
public static string SavedYearsError(int years) => string.Format(GetString(), years);
public static string SavedTreasuryPrompt => GetString();
@@ -61,6 +83,8 @@ internal static class Resource
public static string Goodbye => GetString();
private static string[] GetStrings([CallerMemberName] string? name = null) => GetString(name).Split(';');
private static string GetString([CallerMemberName] string? name = null)
{
using var stream = GetStream(name);