From e43f70e5d590a105fec747498473694a1733d98a Mon Sep 17 00:00:00 2001 From: Sveinung Kvilhaugsvik Date: Tue, 2 Feb 2021 20:46:29 +0100 Subject: [PATCH] Expand non domestic obligatory hard requirement. Tile and Tile Extras targeted actions may also no make sense against domestic targets. Set this up and add the "target must be foreign or unowned" obligatory hard requirement to the action "Conquer Extras". See osdn #41435 --- common/actions.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/common/actions.c b/common/actions.c index 0c11ec362b..fd9fbe9e16 100644 --- a/common/actions.c +++ b/common/actions.c @@ -311,6 +311,37 @@ static void hard_code_oblig_hard_reqs(void) ACTRES_CAPTURE_UNITS, ACTRES_CONQUER_CITY, ACTRES_NONE); + /* The same for tile targeted actions that also can be done to unclaimed + * tiles. */ + oblig_hard_req_reg(req_contradiction_or( + 2, + req_from_values(VUT_DIPLREL, REQ_RANGE_LOCAL, + FALSE, FALSE, TRUE, DRO_FOREIGN), + FALSE, + req_from_values(VUT_CITYTILE, REQ_RANGE_LOCAL, + FALSE, TRUE, TRUE, + CITYT_CLAIMED), + TRUE), + /* TRANS: error message for ruledit */ + N_("All action enablers for %s must require a " + "non domestic target."), + ACTRES_NONE); + /* The same for tile extras targeted actions that also can be done to + * unowned extras. */ + oblig_hard_req_reg(req_contradiction_or( + 2, + req_from_values(VUT_DIPLREL, REQ_RANGE_LOCAL, + FALSE, FALSE, TRUE, DRO_FOREIGN), + FALSE, + req_from_values(VUT_CITYTILE, REQ_RANGE_LOCAL, + FALSE, TRUE, TRUE, + CITYT_EXTRAS_OWNED), + TRUE), + /* TRANS: error message for ruledit */ + N_("All action enablers for %s must require a " + "non domestic target."), + ACTRES_CONQUER_EXTRAS, + ACTRES_NONE); /* Why this is a hard requirement: There is currently no point in * establishing an embassy when a real embassy already exists. -- 2.20.1