src/namegen.cpp
branchgamebalance
changeset 9909 dce9a6923bb7
parent 9906 6f41b8713b65
child 6987 b0f13039bda2
equal deleted inserted replaced
9908:0fa543611bbe 9909:dce9a6923bb7
   281 
   281 
   282 	/* Select randomly if town name should consists of one or two parts. */
   282 	/* Select randomly if town name should consists of one or two parts. */
   283 	if (SeedChance(0, 15, seed) >= 10) {
   283 	if (SeedChance(0, 15, seed) >= 10) {
   284 		strecat(buf, name_finnish_real[SeedChance(2, lengthof(name_finnish_real), seed)], last);
   284 		strecat(buf, name_finnish_real[SeedChance(2, lengthof(name_finnish_real), seed)], last);
   285 	} else if (SeedChance(0, 15, seed) >= 5) {
   285 	} else if (SeedChance(0, 15, seed) >= 5) {
   286 		/* A two-part name by combining one of name_finnish_1 + "la"/"lä"
   286 		/* A two-part name by combining one of name_finnish_1 + "la"/"lä"
   287 		 * The reason for not having the contents of name_finnish_{1,2} in the same table is
   287 		 * The reason for not having the contents of name_finnish_{1,2} in the same table is
   288 		 * that the ones in name_finnish_2 are not good for this purpose. */
   288 		 * that the ones in name_finnish_2 are not good for this purpose. */
   289 		uint sel = SeedChance( 0, lengthof(name_finnish_1), seed);
   289 		uint sel = SeedChance( 0, lengthof(name_finnish_1), seed);
   290 		char *end;
   290 		char *end;
   291 		strecat(buf, name_finnish_1[sel], last);
   291 		strecat(buf, name_finnish_1[sel], last);
   295 		if (strstr(buf, "a") || strstr(buf, "o") || strstr(buf, "u") ||
   295 		if (strstr(buf, "a") || strstr(buf, "o") || strstr(buf, "u") ||
   296 			strstr(buf, "A") || strstr(buf, "O") || strstr(buf, "U"))
   296 			strstr(buf, "A") || strstr(buf, "O") || strstr(buf, "U"))
   297 		{
   297 		{
   298 			strecat(buf, "la", last);
   298 			strecat(buf, "la", last);
   299 		} else {
   299 		} else {
   300 			strecat(buf, "lä", last);
   300 			strecat(buf, "lä", last);
   301 		}
   301 		}
   302 	} else {
   302 	} else {
   303 		/* A two-part name by combining one of name_finnish_{1,2} + name_finnish_3.
   303 		/* A two-part name by combining one of name_finnish_{1,2} + name_finnish_3.
   304 		 * Why aren't name_finnish_{1,2} just one table? See above. */
   304 		 * Why aren't name_finnish_{1,2} just one table? See above. */
   305 		uint sel = SeedChance(2,
   305 		uint sel = SeedChance(2,