Ticket #45885

Support "Tile" range for "Building" req

Eröffnet am: 2022-10-17 06:56 Letztes Update: 2022-10-24 03:16

Auswertung:
Verantwortlicher:
Status:
Geschlossen
Komponente:
Meilenstein:
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Gefixt
Datei:
2

Details

Checks if a city on target tile has the improvement. Currently, it can be used only in "Unit_Bribe_Cost_Pct" effect in the rare case when you bribe a unit in a city. But it is necessary for check connectivity of two cities with airports as soon as we have such an effect (see HRM#879656)

Ticket-Verlauf (3/14 Historien)

2022-10-17 06:56 Aktualisiert von: ihnatus
  • New Ticket "Support "Tile" range for "Building" req" created
2022-10-17 07:56 Aktualisiert von: ihnatus
  • File building-tile-req.patch (File ID: 10616) is attached
2022-10-18 03:27 Aktualisiert von: ihnatus
  • File building-tile-req.patch (File ID: 10616) is deleted
2022-10-20 07:09 Aktualisiert von: cazfi
Kommentar

+ if (context->tile == NULL) {
+ /* RPT_CERTAIN: Can't be. No tile to contain it.
+ * RPT_POSSIBLE: A tile city like that may exist but not be passed. */
+ return prob_type == RPT_CERTAIN;
+ }

Umh. Should that be '!=' ? Now you return TRUE for RPT_CERTAIN when tile is NULL.

--

Should is_req_knowable() have handling for Small Wonders equivalent to Great Wonder handling? Would depend on game.ruleset wonder_visibility.small_wonders

--

"A city ... must not stay ..."

Might be because I'm not native speaker, but to me that sounds like the city should not be a moving one.

2022-10-21 01:13 Aktualisiert von: cazfi
  • Meilenstein Update from (Keine) to S3_2 d3f
2022-10-21 04:03 Aktualisiert von: ihnatus
Kommentar

Reply To cazfi

Umh. Should that be '!=' ? Now you return TRUE for RPT_CERTAIN when tile is NULL.

That's how is_req_knowable() works for now: if it sees NULL for a necessary context field in RPT_POSSIBLE, it supposes that the player just does not know what is it; in RPT_CERTAIN, it supposes that it is just NULL so the result is TRI_MAYBE -> FALSE so it is known. If it is wrong, it's not the patch to change it.

Should is_req_knowable() have handling for Small Wonders equivalent to Great Wonder handling? Would depend on game.ruleset wonder_visibility.small_wonders

The problem is that we can't be sure whose city may be on a tile we don't see. We need to recurse by all players that is likely behind "just an obvious fact" (that I think is what this function does) and is more "can sometimes be deduced with an adequate effort".

"A city ... must not stay ..." Might be because I'm not native speaker, but to me that sounds like the city should not be a moving one.

OK, neither a native speaker but I'll try to reword.

2022-10-21 04:23 Aktualisiert von: cazfi
Kommentar

Reply To ihnatus

Reply To cazfi

Umh. Should that be '!=' ? Now you return TRUE for RPT_CERTAIN when tile is NULL.

That's how is_req_knowable() works for now: if it sees NULL for a necessary context field in RPT_POSSIBLE, it supposes that the player just does not know what is it; in RPT_CERTAIN, it supposes that it is just NULL so the result is TRI_MAYBE -> FALSE so it is known. If it is wrong, it's not the patch to change it.

Ok. Thanks for the explanation.

Should is_req_knowable() have handling for Small Wonders equivalent to Great Wonder handling? Would depend on game.ruleset wonder_visibility.small_wonders

The problem is that we can't be sure whose city may be on a tile we don't see. We need to recurse by all players that is likely behind "just an obvious fact" (that I think is what this function does) and is more "can sometimes be deduced with an adequate effort".

Ok.

2022-10-22 06:43 Aktualisiert von: cazfi
Kommentar

Thanks for the new version. Please leave also a comment when attaching files - osdn does not send notifications when there's just an attachment added. (I see you had attached the file just two minutes after I had commented, but that was enough for me not to see it)

2022-10-22 07:07 Aktualisiert von: cazfi
  • Verantwortlicher Update from (Keine) to cazfi
  • Lösung Update from Keine to Accepted
  • Komponente Update from (Keine) to General
Kommentar

Are there any other patches of yours currently waiting maintainer actions?

2022-10-22 07:12 Aktualisiert von: cazfi
Kommentar

Reply To cazfi

osdn does not send notifications when there's just an attachment added.

As this problem seems to remain, maybe someone could write a script to scan through all the tickets to see which ones have "attaching a file" as the latest action.

2022-10-22 16:22 Aktualisiert von: ihnatus
Kommentar

Reply To cazfi

Are there any other patches of yours currently waiting maintainer actions?

I see none yet, but I'll keep in mind leaving comments.

2022-10-24 03:16 Aktualisiert von: cazfi
  • Status Update from Offen to Geschlossen
  • Lösung Update from Accepted to Gefixt

Dateianhangliste

Bearbeiten

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Anmelden