From a574391d660f8633cd15593155f070b9ed4b2b62 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 cb2241950e..32e4108bd0 100644 --- a/common/actions.c +++ b/common/actions.c @@ -441,12 +441,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, @@ -4009,7 +4005,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)) { @@ -8564,12 +8559,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_WIPE_UNITS: case ACTRES_CAPTURE_UNITS: case ACTRES_NUKE_UNITS: diff --git a/server/unithand.c b/server/unithand.c index 92dec39535..560ee86501 100644 --- a/server/unithand.c +++ b/server/unithand.c @@ -909,8 +909,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