diff --git a/src/common/gamecode/economy.c b/src/common/gamecode/economy.c index 5ca313e60..0391c5fb6 100644 --- a/src/common/gamecode/economy.c +++ b/src/common/gamecode/economy.c @@ -646,7 +646,7 @@ give_control(unit * u, unit * u2) int morale = region_get_morale(r); region_set_owner(r, u2->faction, turn); if (morale>0) { - region_set_morale(r, morale-1, turn); + region_set_morale(r, morale-MORALE_TRANSFER, turn); } } } @@ -3299,7 +3299,6 @@ peasant_taxes(region * r) building * b; int money; int maxsize; - int morale; f = region_get_owner(r); if (f==NULL || is_mourning(r, turn)) { @@ -3315,13 +3314,12 @@ peasant_taxes(region * r) if (u==NULL || u->faction!=f) return; maxsize = buildingeffsize(b, false); - morale = region_get_morale(r); - if (morale0 && morale>0) { - int taxmoney = (int)(money * b->type->taxes(b, maxsize)); - if (taxmoney>0) { + if (maxsize>0) { + double taxfactor = money * b->type->taxes(b, maxsize); + double morale = money * region_get_morale(r) * MORALE_TAX_FACTOR; + if (taxfactor>morale) taxfactor = morale; + if (taxfactor>0) { + int taxmoney = (int)taxfactor; change_money(u, taxmoney); rsetmoney(r, money - taxmoney); ADDMSG(&u->faction->msgs, msg_message("income_tax", diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index 5673f9b7b..793391d30 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -3088,7 +3088,7 @@ age_building(building * b) static double rc_popularity(const struct race * rc) { - int pop = get_param_int(rc->parameters, "morale", 10); + int pop = get_param_int(rc->parameters, "morale", MORALE_AVERAGE); return 1.0/(pop-MORALE_COOLDOWN); /* 10 turns average */ } diff --git a/src/common/gamecode/report.c b/src/common/gamecode/report.c index 678709dae..3a88e3f5a 100644 --- a/src/common/gamecode/report.c +++ b/src/common/gamecode/report.c @@ -1202,6 +1202,7 @@ statistics(FILE * F, const region * r, const faction * f) rparagraph(F, buf, 2, 2, 0); msg_release(m); } + if (p) { m = msg_message("nr_stat_recruits", "max", p / RECRUITFRACTION); nr_render(m, f->locale, buf, sizeof(buf), f); @@ -1220,6 +1221,15 @@ statistics(FILE * F, const region * r, const faction * f) rparagraph(F, buf, 2, 2, 0); msg_release(m); } + + if (r->land->ownership) { + m = msg_message("nr_stat_morale", "morale", r->land->morale); + nr_render(m, f->locale, buf, sizeof(buf), f); + rparagraph(F, buf, 2, 2, 0); + msg_release(m); + } + + } /* info about units */ diff --git a/src/common/kernel/region.h b/src/common/kernel/region.h index 9ac09cf19..0e4a5e01f 100644 --- a/src/common/kernel/region.h +++ b/src/common/kernel/region.h @@ -62,10 +62,13 @@ struct rawmaterial; struct donation; struct item; -#define MORALE_MAX 4 /* Maximum morale allowed */ +#define MORALE_TAX_FACTOR 0.005 /* 0.5% tax per point of morale */ +#define MORALE_MAX 10 /* Maximum morale allowed */ #define MORALE_DEFAULT 2 /* Morale of peasants when they are conquered for the first time */ #define MORALE_TAKEOVER 0 /* Morale of peasants after they lose their lord */ #define MORALE_COOLDOWN 2 /* minimum cooldown before a morale change occurs */ +#define MORALE_AVERAGE 6 /* default average time for morale to change */ +#define MORALE_TRANSFER 2 /* points of morale lost when GIVE COMMAND */ #define OWNER_MOURNING 0x01 typedef struct region_owner { diff --git a/src/eressea.sln b/src/eressea.sln index 40a868a5c..626508234 100644 --- a/src/eressea.sln +++ b/src/eressea.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual C++ Express 2005 +# Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util", "common\util.vcproj", "{F70CFB27-8A2F-E447-B452-4E1C590EDA6D}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kernel", "common\kernel.vcproj", "{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}" @@ -8,17 +8,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gamecode", "common\gamecode EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "editor", "eressea\editor.vcproj", "{D893D6B3-805D-9848-8EA4-CDA1B79151F6}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "eressea-lua", "eressea\eressea-lua.vcproj", "{75501170-51C2-E641-BA8B-EDC008184192}" - ProjectSection(ProjectDependencies) = postProject - {6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D} = {6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D} - {F70CFB27-8A2F-E447-B452-4E1C590EDA6D} = {F70CFB27-8A2F-E447-B452-4E1C590EDA6D} - {1E8BFF9E-3044-0742-992F-C5765B80FE65} = {1E8BFF9E-3044-0742-992F-C5765B80FE65} - {D893D6B3-805D-9848-8EA4-CDA1B79151F6} = {D893D6B3-805D-9848-8EA4-CDA1B79151F6} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "eressea", "eressea.vcproj", "{AD80EB0B-7CB4-42F2-9C95-8CCEF68DB387}" EndProject Global + GlobalSection(SubversionScc) = preSolution + Svn-Managed = True + Manager = AnkhSVN - Subversion Support for Visual Studio + EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Profile|Win32 = Profile|Win32 @@ -41,10 +37,6 @@ Global {D893D6B3-805D-9848-8EA4-CDA1B79151F6}.Profile|Win32.ActiveCfg = Profile|Win32 {D893D6B3-805D-9848-8EA4-CDA1B79151F6}.Profile|Win32.Build.0 = Profile|Win32 {D893D6B3-805D-9848-8EA4-CDA1B79151F6}.Release|Win32.ActiveCfg = Release|Win32 - {75501170-51C2-E641-BA8B-EDC008184192}.Debug|Win32.ActiveCfg = Debug|Win32 - {75501170-51C2-E641-BA8B-EDC008184192}.Profile|Win32.ActiveCfg = Profile|Win32 - {75501170-51C2-E641-BA8B-EDC008184192}.Profile|Win32.Build.0 = Profile|Win32 - {75501170-51C2-E641-BA8B-EDC008184192}.Release|Win32.ActiveCfg = Release|Win32 {AD80EB0B-7CB4-42F2-9C95-8CCEF68DB387}.Debug|Win32.ActiveCfg = Debug|Win32 {AD80EB0B-7CB4-42F2-9C95-8CCEF68DB387}.Debug|Win32.Build.0 = Debug|Win32 {AD80EB0B-7CB4-42F2-9C95-8CCEF68DB387}.Profile|Win32.ActiveCfg = Release|Win32 @@ -55,8 +47,4 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(SubversionScc) = preSolution - Svn-Managed = True - Manager = AnkhSVN - Subversion Support for Visual Studio - EndGlobalSection EndGlobal diff --git a/src/eressea.vcproj b/src/eressea.vcproj index ab0975e30..043e134a7 100644 --- a/src/eressea.vcproj +++ b/src/eressea.vcproj @@ -251,6 +251,22 @@ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" > + + + + + + + + diff --git a/src/eressea/eressea-lua.vcproj b/src/eressea/eressea-lua.vcproj index 3fdf58b08..1511b1e2a 100644 --- a/src/eressea/eressea-lua.vcproj +++ b/src/eressea/eressea-lua.vcproj @@ -377,14 +377,6 @@ RelativePath=".\console.h" > - - - - @@ -393,18 +385,10 @@ RelativePath=".\korrektur.c" > - - - - diff --git a/src/res/e3a/races.xml b/src/res/e3a/races.xml index 43f0b220d..ff75b5468 100644 --- a/src/res/e3a/races.xml +++ b/src/res/e3a/races.xml @@ -54,7 +54,7 @@ - + diff --git a/src/res/e3a/strings.xml b/src/res/e3a/strings.xml index 8635879d2..e933e4da9 100644 --- a/src/res/e3a/strings.xml +++ b/src/res/e3a/strings.xml @@ -73,25 +73,45 @@ rebellious + wütende + mad + + zornige angry - + + unruhige + agitated + + + gleichgültige + indifferent + + + entspannte + relaxed + + zufriedene content - + glückliche happy - + treue loyal - + ergebene devoted + + unterwürfige + subservient + Streitross diff --git a/src/res/messages.xml b/src/res/messages.xml index 06f7d4f3d..156e07d8f 100644 --- a/src/res/messages.xml +++ b/src/res/messages.xml @@ -776,7 +776,6 @@ "Deine Partei hat $int($population) Personen in $int($units) Einheiten." - "Your faction has $int($population) people in $int($units) units." "Your faction has $int($population) people in $int($units) units." @@ -785,7 +784,6 @@ "Statistik für $region($region):" "Statistics for $region($region):" - "Statistics for $region($region):" @@ -793,7 +791,13 @@ "Unterhaltung: max. $int($max) Silber" "Entertainment: max. $int($max) silver" - "Entertainment: max. $int($max) silver" + + + + + + "Moral der Bauern: $int($morale)" + "Peasant morale: $int($morale)" @@ -801,14 +805,13 @@ "Luxusgüter zum angegebenen Preis: $int($max)" "Luxury goods at this price: $int($max)" - "Luxury goods at this price: $int($max)" "Lohn für Arbeit: $int($max) Silber" - "Worker's salary: $int($max) silver" + "Worker salary: $int($max) silver"