summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/functions/politics.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt
index f74c9c6fc..b6a9e0d5e 100644
--- a/npc/functions/politics.txt
+++ b/npc/functions/politics.txt
@@ -360,6 +360,14 @@ function script POL_Manage {
if (strcharinfo(0) != .@MAYOR$)
return;
+ // How many actions do you have?
+ // You get 1 action/4-hour, capped to 6
+ .@left=(gettimeparam(GETTIME_HOUR)/4)-TOWN_ACTIONS;
+ if (.@left > 6) {
+ .@left=6;
+ TOWN_ACTIONS=(gettimeparam(GETTIME_HOUR)/4)-6;
+ }
+
do
{
.@GP=getd("$"+getarg(0)+"_MONEY");
@@ -372,6 +380,7 @@ function script POL_Manage {
mesc l("Town Money: @@", .@GP), 2;
mesc l("Town Reputation: %d | %d.%02d %% Tax", .@RP, .@TX/100, .@TX%100), 2;
mesc l("Town Weekly Exports: @@", .@EX), 2;
+ mesc l("Total actions left: %d", .@left), (.@left > 1 ? 9 : 1);
next;
menuint
l("Nothing"), 0,
@@ -406,6 +415,7 @@ function script POL_Manage {
.@GP=getd("$"+getarg(0)+"_MONEY");
setd(.@town$+"_MONEY", .@GP-.@cost);
setd(.@town$+"_EXPORT", .@EX+rand2(4,6));
+ TOWN_ACTIONS+=1;
mesc l("Investment executed"), 2;
next;
}
@@ -427,6 +437,7 @@ function script POL_Manage {
.@GP=getd("$"+getarg(0)+"_MONEY");
setd(.@town$+"_MONEY", .@GP-.@cost);
setd(.@town$+"_REPUTATION", .@RP+1);
+ TOWN_ACTIONS+=1;
mesc l("Investment executed"), 2;
next;
}
@@ -443,6 +454,7 @@ function script POL_Manage {
if (askyesno() == ASK_YES) {
setd(.@town$+"_REPUTATION", .@RP-.@cost);
setd(.@town$+"_TAX", .@TX+rand2(2,5));
+ TOWN_ACTIONS+=1;
mesc l("Taxes raised"), 1;
next;
}
@@ -458,6 +470,7 @@ function script POL_Manage {
if (askyesno() == ASK_YES) {
setd(.@town$+"_TAX", max(0, .@TX-.@cost));
setd(.@town$+"_REPUTATION", min(100, .@RP+.@cost));
+ TOWN_ACTIONS+=1;
mesc l("Taxes lowered"), 1;
next;
}