fix: NPC 자동 선포에서 방랑 유저국을 제외한다
Ref GeneralAI와 같이 level 0 방랑군을 가중 선포 후보에서 제외한다. 정식 유저국과 NPC국은 같은 가중치를 유지하고 후보 및 RNG 순서를 회귀 테스트로 고정한다.
This commit is contained in:
@@ -175,7 +175,11 @@ export const do선전포고 = (ai: GeneralAI) => {
|
||||
const currentNationId = ai.nation.id;
|
||||
const cities = ai.worldRef.listCities();
|
||||
const neighbors = ai.worldRef.listNations().filter((nation) => {
|
||||
if (nation.id <= 0 || nation.id === currentNationId) {
|
||||
// Ref getAllNationStaticInfo() also contains level-0 wandering nations,
|
||||
// but automatic declarations explicitly skip them before adjacency and
|
||||
// weighted target selection. A wandering user ruler must not become an
|
||||
// NPC war target merely because its occupied city is adjacent.
|
||||
if (nation.id <= 0 || nation.id === currentNationId || nation.level === 0) {
|
||||
return false;
|
||||
}
|
||||
return isNeighbor(ai.map!, cities, currentNationId, nation.id, true);
|
||||
|
||||
Reference in New Issue
Block a user