diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-10-12 00:44:07 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-10-12 00:44:07 -0300 |
commit | ed686db23e0db271932049b0072dce2edd8d0975 (patch) | |
tree | fe4c4d2979454f643223e7ef51f4e79d41c91a4a /npc/functions/politics.txt | |
parent | 37203e1ee7fc20c047ab840762fb9305c6f65e74 (diff) | |
download | serverdata-ed686db23e0db271932049b0072dce2edd8d0975.tar.gz serverdata-ed686db23e0db271932049b0072dce2edd8d0975.tar.bz2 serverdata-ed686db23e0db271932049b0072dce2edd8d0975.tar.xz serverdata-ed686db23e0db271932049b0072dce2edd8d0975.zip |
Town actions: One action every 4 hours, maximum 6 actions every day.
Actions are only used on investments and tax control.
Paperwork, exiling, changing policies etc takes no actions.
Diffstat (limited to 'npc/functions/politics.txt')
-rw-r--r-- | npc/functions/politics.txt | 13 |
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; } |