From f257569cf2b8801f8e7ba0ae7cde09fb499fba7e Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 4 Dec 2021 12:30:51 +0200 Subject: [PATCH 47/47] Prevent multiple gov changes after a single anarchy with "RandQuick" If revolentype is "RandQuick", switching governments for free after anarchy period of any lenght is an exploit. Prevent it, like we already did for "Quickening". Reported by Jacob Nevins See osdn #43334 Signed-off-by: Marko Lindqvist --- server/plrhand.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/plrhand.c b/server/plrhand.c index 1c0bd23483..f1c08b16d4 100644 --- a/server/plrhand.c +++ b/server/plrhand.c @@ -479,7 +479,8 @@ void handle_player_change_government(struct player *pplayer, if (anarchy && turns <= 0 && pplayer->government != game.government_during_revolution) { /* Multiple changes attempted after single anarchy period */ - if (game.info.revolentype == REVOLEN_QUICKENING) { + if (game.info.revolentype == REVOLEN_QUICKENING + || game.info.revolentype == REVOLEN_RANDQUICK) { notify_player(pplayer, NULL, E_REVOLT_DONE, ftc_server, _("You can't revolt the same turn you finished previous revolution.")); return; -- 2.33.0