Project

General

Profile

Actions

Bug #1331

open

Barbarians getting a Palace?

Added by Marko Lindqvist 18 days ago. Updated 9 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
05/01/2025
Due date:
% Done:

0%

Estimated time:

Description

We used to give "initial buildings" only when player founded their first city. This also meant that Barbarians never got them, as they never found cities.
However this was considered a bug concerning regular players in case where they managed to conquer an enemy city very early in the game, before founding any cities. Then they didn't get Palace at all. This was fixed so that the initial buildings are always got with the first city, no matter the methods of acquiring one.
I think that this lead to also barbarians now getting Palace when they conquer a city. This likely isn't what we really want.
The problem is with the global init buildings only. For nation-specific ones control would be at ruleset author to define them for the barbarian nation like they want, and at the moment ruleset sanity checking prevents init buildings for barbarian nations completely.

Actions #1

Updated by Alexandr Ignatiev 10 days ago

Does supplying "PlayerState", "Barbarian", "Player", FALSE to Palace reqs do the job? It likely should or it's also like a bug.

Actions #2

Updated by Marko Lindqvist 10 days ago

The initial buildings are not subject to requirements applied to building a building, I think. Otherwise nobody would get a Palace in the beginning of the game, as building (moving) it requires Masonry.

Actions #3

Updated by Alexandr Ignatiev 9 days ago

Marko Lindqvist wrote in #note-2:

The initial buildings are not subject to requirements applied to building a building, I think. Otherwise nobody would get a Palace in the beginning of the game, as building (moving) it requires Masonry.

Yes, I now see the code. But all calls to transfer_city() seem to have the last boolean parameter set to !is_barbarian(pplayer) that prevents free buildings. So, barbarians seem to get the palace only if they either find a city in a hut (that they will usually do only if taken by human player) or build them with a city founder (few ruleset provide them with capturable city founders and they won't build them themselves). For consistence, surely, create_city() should also check !barbarian for free builds. As a quick softcoding fix, we can just deprive the barbarian palace from any effect.

Actions

Also available in: Atom PDF