From 798f99d0ec63fa3bf47f05a28e384c62bd3106d0 Mon Sep 17 00:00:00 2001 From: Sveinung Kvilhaugsvik Date: Mon, 14 Jun 2021 06:45:59 +0200 Subject: [PATCH] Remove outdated "can't be expressed" comments. DiplRel and DiplRelTileOther are able to let enablers express the "must be at war with any cities on the target tile" requirements of bombard, attack and wipe actions. See osdn #42528 --- common/actions.c | 14 ++------------ server/unithand.c | 4 ++-- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/common/actions.c b/common/actions.c index efbd5886de..47bc41186c 100644 --- a/common/actions.c +++ b/common/actions.c @@ -440,12 +440,8 @@ static void hard_code_oblig_hard_reqs(void) /* Why this is a hard requirement: there is a hard requirement that * the actor player is at war with the owner of any city on the - * target tile. It can't move to the ruleset as long as Bombard and Attack - * are targeted at unit stacks only. Having the same requirement - * against each unit in the stack as against any city at the tile - * ensures compatibility with any future solution that allows the - * requirement against any city on the target tile to move to the - * ruleset. The Freeciv code assumes that ACTRES_ATTACK has this. */ + * target tile. + * The Freeciv code assumes that ACTRES_ATTACK has this. */ oblig_hard_req_register(req_from_values(VUT_DIPLREL, REQ_RANGE_LOCAL, FALSE, FALSE, TRUE, DS_WAR), FALSE, @@ -3977,7 +3973,6 @@ is_action_possible(const action_id wanted_action, break; case ACTRES_BOMBARD: - /* FIXME: Target of Bombard should be city and units. */ if (tile_city(target_tile) && !pplayers_at_war(city_owner(tile_city(target_tile)), actor_player)) { @@ -8472,12 +8467,7 @@ action_target_kind_default(enum action_result result) case ACTRES_TRANSPORT_EMBARK: return ATK_UNIT; case ACTRES_BOMBARD: - /* FIXME: Target is actually Units + City */ case ACTRES_ATTACK: - /* FIXME: Target is actually City, each unit at the - * target tile (Units) and, depending on the - * unreachable_protects setting, each or any - * *non transported* unit at the target tile. */ case ACTRES_CAPTURE_UNITS: case ACTRES_NUKE_UNITS: case ACTRES_SPY_ATTACK: diff --git a/server/unithand.c b/server/unithand.c index b132f9e224..d11ef6de3e 100644 --- a/server/unithand.c +++ b/server/unithand.c @@ -825,8 +825,8 @@ static struct player *need_war_player_hlp(const struct unit *actor, return NULL; } - /* Look for hard coded war requirements that can't be an action enabler - * requirement. */ + /* Look for hard coded war requirements without support for looking up in + * an action enabler requirement. */ switch (paction->result) { case ACTRES_BOMBARD: case ACTRES_ATTACK: -- 2.30.2