dnd5-scripts/generate_npc/regions.py

1043 lines
56 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# regions.py
"""
Региональные и планарные распределения рас для Forgotten Realms.
Принцип: если регион найден, расы/подрасы, НЕ указанные в нём, имеют шанс 0.
Если у расы не указан ключ "subraces" - используются стандартные подрасы из RACES.
Сопоставление введённого названия с ключом - через symspellpy по алиасам.
"""
# ─── Прайм-миры: регионы ─────────────────────────────────────────────────────
REGIONAL_OVERWRITES: dict = {
"Toril": {
"sword_coast_north": {
"aliases": ["Sword Coast North", "Savage Frontier", "Frozenfar"],
"chances": {
"Human": {"chance": 58.0, "subraces": {"Illuskan": 70.0, "Damaran": 20.0, "Chondathan": 10.0}},
"Dwarf": {"chance": 14.0, "subraces": {"Shield/Mountain": 90.0, "Gold/Hill": 10.0}},
"Half-Elf": {"chance": 7.0, "subraces": {"Moon": 60.0, "Wood": 40.0}},
"Elf": {"chance": 6.0, "subraces": {"Moon": 50.0, "Wood": 50.0}},
"Orc": {"chance": 5.0},
"Half-Orc": {"chance": 4.0},
"Halfling": {"chance": 3.0, "subraces": {"Lightfoot": 70.0, "Stout": 30.0}},
"Goliath": {"chance": 2.0},
"Tiefling": {"chance": 1.0},
},
},
"silver_marches": {
"aliases": ["Silver Marches", "Luruar"],
"chances": {
"Human": {"chance": 42.0, "subraces": {"Illuskan": 50.0, "Chondathan": 40.0, "Damaran": 10.0}},
"Dwarf": {"chance": 22.0, "subraces": {"Shield/Mountain": 95.0, "Gold/Hill": 5.0}},
"Elf": {"chance": 13.0, "subraces": {"Moon": 60.0, "Sun": 25.0, "Wood": 15.0}},
"Half-Elf": {"chance": 10.0, "subraces": {"Moon": 80.0, "Sun": 20.0}},
"Halfling": {"chance": 5.0, "subraces": {"Lightfoot": 70.0, "Stout": 30.0}},
"Gnome": {"chance": 3.0, "subraces": {"Rock": 60.0, "Forest": 40.0}},
"Orc": {"chance": 3.0},
"Half-Orc": {"chance": 2.0},
},
},
"western_heartlands": {
"aliases": ["Western Heartlands", "Elturgard", "Sunset Mountains"],
"chances": {
"Human": {"chance": 72.0, "subraces": {"Chondathan": 55.0, "Tethyrian": 35.0, "Calishite": 7.0, "Illuskan": 3.0}},
"Halfling": {"chance": 9.0, "subraces": {"Lightfoot": 85.0, "Ghostwise": 10.0, "Stout": 5.0}},
"Half-Elf": {"chance": 6.0, "subraces": {"Moon": 70.0, "Wood": 30.0}},
"Elf": {"chance": 5.0, "subraces": {"Wood": 60.0, "Moon": 40.0}},
"Dwarf": {"chance": 4.0, "subraces": {"Shield/Mountain": 60.0, "Gold/Hill": 40.0}},
"Gnome": {"chance": 3.0, "subraces": {"Rock": 70.0, "Forest": 30.0}},
"Half-Orc": {"chance": 1.0},
},
},
"waterdeep": {
"aliases": ["Crown of North"],
"chances": {
"Human": {"chance": 60.0, "subraces": {"Illuskan": 35.0, "Tethyrian": 30.0, "Chondathan": 25.0, "Calishite": 5.0, "Shou": 5.0}},
"Half-Elf": {"chance": 9.0, "subraces": {"Moon": 75.0, "Sun": 15.0, "Wood": 10.0}},
"Elf": {"chance": 8.0, "subraces": {"Moon": 65.0, "Sun": 20.0, "Wood": 15.0}},
"Dwarf": {"chance": 8.0, "subraces": {"Shield/Mountain": 85.0, "Gold/Hill": 15.0}},
"Halfling": {"chance": 7.0, "subraces": {"Lightfoot": 85.0, "Stout": 15.0}},
"Gnome": {"chance": 3.0, "subraces": {"Rock": 65.0, "Forest": 35.0}},
"Half-Orc": {"chance": 2.0},
"Tiefling": {"chance": 2.0},
"Dragonborn": {"chance": 1.0},
},
},
"baldurs_gate": {
"aliases": [],
"chances": {
"Human": {"chance": 68.0, "subraces": {"Tethyrian": 45.0, "Chondathan": 30.0, "Calishite": 15.0, "Illuskan": 7.0, "Damaran": 3.0}},
"Half-Elf": {"chance": 7.0, "subraces": {"Moon": 70.0, "Wood": 30.0}},
"Halfling": {"chance": 6.0, "subraces": {"Lightfoot": 80.0, "Stout": 20.0}},
"Dwarf": {"chance": 6.0, "subraces": {"Shield/Mountain": 70.0, "Gold/Hill": 30.0}},
"Elf": {"chance": 5.0, "subraces": {"Moon": 60.0, "Wood": 40.0}},
"Half-Orc": {"chance": 3.0},
"Gnome": {"chance": 2.0, "subraces": {"Rock": 60.0, "Forest": 40.0}},
"Tiefling": {"chance": 2.0},
"Dragonborn": {"chance": 1.0},
},
},
"cormyr": {
"aliases": ["Cormyr", "Forest Kingdom", "Purple Dragons"],
"chances": {
"Human": {"chance": 78.0, "subraces": {"Chondathan": 80.0, "Tethyrian": 12.0, "Damaran": 5.0, "Illuskan": 3.0}},
"Half-Elf": {"chance": 6.0, "subraces": {"Moon": 80.0, "Sun": 20.0}},
"Elf": {"chance": 5.0, "subraces": {"Moon": 50.0, "Sun": 30.0, "Wood": 20.0}},
"Dwarf": {"chance": 5.0, "subraces": {"Shield/Mountain": 70.0, "Gold/Hill": 30.0}},
"Halfling": {"chance": 3.0, "subraces": {"Lightfoot": 90.0, "Stout": 10.0}},
"Gnome": {"chance": 2.0, "subraces": {"Rock": 70.0, "Forest": 30.0}},
"Half-Orc": {"chance": 1.0},
},
},
"amn": {
"aliases": ["Amn", "Merchant's Domain"],
"chances": {
"Human": {"chance": 78.0, "subraces": {"Tethyrian": 45.0, "Calishite": 38.0, "Chondathan": 12.0, "Illuskan": 5.0}},
"Halfling": {"chance": 8.0, "subraces": {"Lightfoot": 85.0, "Stout": 15.0}},
"Dwarf": {"chance": 5.0, "subraces": {"Shield/Mountain": 55.0, "Gold/Hill": 45.0}},
"Half-Elf": {"chance": 4.0, "subraces": {"Moon": 70.0, "Wood": 30.0}},
"Elf": {"chance": 2.0, "subraces": {"Moon": 50.0, "Wood": 50.0}},
"Gnome": {"chance": 2.0, "subraces": {"Rock": 70.0, "Forest": 30.0}},
"Half-Orc": {"chance": 1.0},
},
},
"tethyr": {
"aliases": ["Tethyr", "Country of Purple Marches"],
"chances": {
"Human": {"chance": 74.0, "subraces": {"Tethyrian": 70.0, "Calishite": 18.0, "Chondathan": 8.0, "Illuskan": 4.0}},
"Halfling": {"chance": 9.0, "subraces": {"Lightfoot": 80.0, "Stout": 20.0}},
"Half-Elf": {"chance": 5.0, "subraces": {"Moon": 65.0, "Wood": 35.0}},
"Elf": {"chance": 5.0, "subraces": {"Wood": 55.0, "Moon": 45.0}},
"Dwarf": {"chance": 4.0, "subraces": {"Shield/Mountain": 60.0, "Gold/Hill": 40.0}},
"Gnome": {"chance": 2.0, "subraces": {"Rock": 70.0, "Forest": 30.0}},
"Half-Orc": {"chance": 1.0},
},
},
"calimshan": {
"aliases": ["Calimshan"],
"chances": {
"Human": {"chance": 82.0, "subraces": {"Calishite": 88.0, "Tethyrian": 8.0, "Chondathan": 4.0}},
"Genasi": {"chance": 8.0, "subraces": {"Fire": 35.0, "Air": 35.0, "Earth": 15.0, "Water": 15.0}},
"Halfling": {"chance": 4.0, "subraces": {"Lightfoot": 90.0, "Stout": 10.0}},
"Half-Orc": {"chance": 3.0},
"Dwarf": {"chance": 2.0, "subraces": {"Gold/Hill": 60.0, "Shield/Mountain": 40.0}},
"Tiefling": {"chance": 1.0},
},
},
"chult": {
"aliases": ["Chult", "Chultan Peninsula"],
"chances": {
"Human": {"chance": 68.0, "subraces": {"Chultan": 90.0, "Tethyrian": 6.0, "Calishite": 4.0}},
"Tabaxi": {"chance": 14.0},
"Lizardfolk": {"chance": 9.0},
"Half-Elf": {"chance": 3.0, "subraces": {"Wood": 100.0}},
"Yuan-ti Pureblood": {"chance": 3.0},
"Dwarf": {"chance": 2.0, "subraces": {"Shield/Mountain": 100.0}},
"Aasimar": {"chance": 1.0, "subraces": {"Protector": 100.0}},
},
},
"unapproachable_east": {
"aliases": ["Unapproachable East", "Aglarond border",
"Thesk", "Great Dale"],
"chances": {
"Human": {"chance": 78.0, "subraces": {"Mulan": 50.0, "Rashemi": 25.0, "Damaran": 20.0, "Chondathan": 5.0}},
"Half-Orc": {"chance": 7.0},
"Half-Elf": {"chance": 4.0, "subraces": {"Wood": 60.0, "Moon": 40.0}},
"Elf": {"chance": 4.0, "subraces": {"Wood": 70.0, "Moon": 30.0}},
"Gnome": {"chance": 3.0, "subraces": {"Rock": 60.0, "Forest": 40.0}},
"Tiefling": {"chance": 2.0},
"Genasi": {"chance": 2.0, "subraces": {"Fire": 100.0}},
},
},
"rashemen": {
"aliases": ["Rashemen", "Land of Berserkers",
"Ashenwood", "Witches of Rashemen"],
"chances": {
"Human": {"chance": 84.0, "subraces": {"Rashemi": 80.0, "Damaran": 12.0, "Mulan": 8.0}},
"Dwarf": {"chance": 5.0, "subraces": {"Shield/Mountain": 80.0, "Gold/Hill": 20.0}},
"Half-Orc": {"chance": 4.0},
"Half-Elf": {"chance": 3.0, "subraces": {"Wood": 70.0, "Moon": 30.0}},
"Gnome": {"chance": 2.0, "subraces": {"Rock": 70.0, "Forest": 30.0}},
"Elf": {"chance": 1.0, "subraces": {"Wood": 100.0}},
"Goliath": {"chance": 1.0},
},
},
"thay": {
"aliases": ["Thay", "Red Wizards", "Thaymount", "High Thay"],
"chances": {
"Human": {"chance": 82.0, "subraces": {"Mulan": 55.0, "Rashemi": 30.0, "Chondathan": 8.0, "Damaran": 7.0}},
"Half-Orc": {"chance": 5.0},
"Tiefling": {"chance": 4.0},
"Gnome": {"chance": 3.0, "subraces": {"Rock": 70.0, "Forest": 30.0}},
"Genasi": {"chance": 2.0, "subraces": {"Fire": 100.0}},
"Dwarf": {"chance": 2.0, "subraces": {"Shield/Mountain": 70.0, "Gold/Hill": 30.0}},
"Elf": {"chance": 1.0, "subraces": {"Sun": 60.0, "Moon": 40.0}},
"Half-Elf": {"chance": 1.0, "subraces": {"Moon": 100.0}},
},
},
"underdark": {
"aliases": ["Underdark", "Deep Realm"],
"chances": {
"Elf": {"chance": 46.0, "subraces": {"Drow": 100.0}},
"Dwarf": {"chance": 20.0, "subraces": {"Duergar": 100.0}},
"Gnome": {"chance": 9.0, "subraces": {"Rock": 100.0}},
"Orc": {"chance": 9.0},
"Goblin": {"chance": 6.0},
"Bugbear": {"chance": 4.0},
"Hobgoblin": {"chance": 3.0},
"Kobold": {"chance": 2.0},
"Kenku": {"chance": 1.0},
},
},
"moonsea": {
"aliases": ["Moonsea", "Sembia border"],
"chances": {
"Human": {"chance": 74.0, "subraces": {"Chondathan": 45.0, "Damaran": 35.0, "Illuskan": 12.0, "Mulan": 8.0}},
"Half-Orc": {"chance": 7.0},
"Dwarf": {"chance": 5.0, "subraces": {"Shield/Mountain": 80.0, "Gold/Hill": 20.0}},
"Half-Elf": {"chance": 4.0, "subraces": {"Moon": 70.0, "Wood": 30.0}},
"Tiefling": {"chance": 4.0},
"Elf": {"chance": 3.0, "subraces": {"Moon": 60.0, "Wood": 40.0}},
"Orc": {"chance": 3.0},
},
},
"dalelands": {
"aliases": ["Dalelands"],
"chances": {
"Human": {"chance": 70.0, "subraces": {"Chondathan": 70.0, "Damaran": 20.0, "Illuskan": 10.0}},
"Half-Elf": {"chance": 9.0, "subraces": {"Moon": 65.0, "Wood": 35.0}},
"Elf": {"chance": 8.0, "subraces": {"Moon": 55.0, "Wood": 45.0}},
"Halfling": {"chance": 5.0, "subraces": {"Lightfoot": 75.0, "Stout": 25.0}},
"Dwarf": {"chance": 4.0, "subraces": {"Shield/Mountain": 65.0, "Gold/Hill": 35.0}},
"Gnome": {"chance": 2.0, "subraces": {"Rock": 60.0, "Forest": 40.0}},
"Half-Orc": {"chance": 2.0},
},
},
"sembia": {
"aliases": ["Sembia"],
"chances": {
"Human": {"chance": 80.0, "subraces": {"Chondathan": 65.0, "Damaran": 20.0, "Tethyrian": 8.0, "Shou": 7.0}},
"Half-Elf": {"chance": 6.0, "subraces": {"Moon": 75.0, "Wood": 25.0}},
"Halfling": {"chance": 5.0, "subraces": {"Lightfoot": 85.0, "Stout": 15.0}},
"Dwarf": {"chance": 4.0, "subraces": {"Shield/Mountain": 70.0, "Gold/Hill": 30.0}},
"Elf": {"chance": 2.0, "subraces": {"Moon": 70.0, "Wood": 30.0}},
"Gnome": {"chance": 2.0, "subraces": {"Rock": 70.0, "Forest": 30.0}},
"Tiefling": {"chance": 1.0},
},
},
"vast": {
"aliases": ["Vast"],
"chances": {
"Human": {"chance": 72.0, "subraces": {"Chondathan": 50.0, "Damaran": 30.0, "Illuskan": 12.0, "Mulan": 8.0}},
"Dwarf": {"chance": 8.0, "subraces": {"Shield/Mountain": 75.0, "Gold/Hill": 25.0}},
"Half-Elf": {"chance": 6.0, "subraces": {"Moon": 70.0, "Wood": 30.0}},
"Halfling": {"chance": 5.0, "subraces": {"Lightfoot": 80.0, "Stout": 20.0}},
"Elf": {"chance": 4.0, "subraces": {"Moon": 60.0, "Wood": 40.0}},
"Gnome": {"chance": 3.0, "subraces": {"Rock": 65.0, "Forest": 35.0}},
"Half-Orc": {"chance": 2.0},
},
},
"vilhon_reach": {
"aliases": ["Vilhon Reach", "Turmish", "Chondath"],
"chances": {
"Human": {"chance": 74.0, "subraces": {"Chondathan": 60.0, "Turami": 25.0, "Tethyrian": 10.0, "Mulan": 5.0}},
"Half-Elf": {"chance": 6.0, "subraces": {"Wood": 60.0, "Moon": 40.0}},
"Halfling": {"chance": 6.0, "subraces": {"Lightfoot": 80.0, "Stout": 20.0}},
"Elf": {"chance": 4.0, "subraces": {"Wood": 65.0, "Moon": 35.0}},
"Yuan-ti Pureblood": {"chance": 4.0},
"Dwarf": {"chance": 3.0, "subraces": {"Gold/Hill": 55.0, "Shield/Mountain": 45.0}},
"Gnome": {"chance": 2.0, "subraces": {"Rock": 70.0, "Forest": 30.0}},
"Half-Orc": {"chance": 1.0},
},
},
"shining_south": {
"aliases": ["Shining South", "Halruaa", "Dambrath", "Estagund",
"Durpar", "Var Golden", "Luiren", "Ulgarth"],
"chances": {
"Human": {"chance": 70.0, "subraces": {"Halruaan": 30.0, "Durpari": 25.0, "Dambrathan": 20.0, "Shaaran": 15.0, "Chondathan": 10.0}},
"Halfling": {"chance": 12.0, "subraces": {"Ghostwise": 45.0, "Lightfoot": 35.0, "Stout": 20.0}},
"Half-Elf": {"chance": 5.0, "subraces": {"Wood": 55.0, "Moon": 45.0}},
"Dwarf": {"chance": 4.0, "subraces": {"Gold/Hill": 70.0, "Shield/Mountain": 30.0}},
"Elf": {"chance": 4.0, "subraces": {"Wood": 60.0, "Moon": 40.0}},
"Half-Orc": {"chance": 3.0},
"Gnome": {"chance": 2.0, "subraces": {"Rock": 65.0, "Forest": 35.0}},
},
},
"old_empires": {
"aliases": ["Old Empires", "Mulhorand", "Unther", "Chessenta"],
"chances": {
"Human": {"chance": 80.0, "subraces": {"Mulan": 70.0, "Chondathan": 15.0, "Turami": 10.0, "Chessentan": 5.0}},
"Half-Orc": {"chance": 5.0},
"Genasi": {"chance": 4.0, "subraces": {"Earth": 30.0, "Fire": 30.0, "Water": 20.0, "Air": 20.0}},
"Halfling": {"chance": 4.0, "subraces": {"Lightfoot": 85.0, "Stout": 15.0}},
"Dwarf": {"chance": 3.0, "subraces": {"Gold/Hill": 60.0, "Shield/Mountain": 40.0}},
"Elf": {"chance": 2.0, "subraces": {"Sun": 60.0, "Moon": 40.0}},
"Tiefling": {"chance": 2.0},
},
},
"hordelands": {
"aliases": ["Hordelands", "Endless Wastes", "Taan", "Tuigan",
"Yaimmunahar", "Quoya Desert"],
"chances": {
"Human": {"chance": 90.0, "subraces": {"Tuigan": 85.0, "Rashemi": 10.0, "Mulan": 5.0}},
"Half-Orc": {"chance": 4.0},
"Halfling": {"chance": 3.0, "subraces": {"Stout": 60.0, "Lightfoot": 40.0}},
"Goliath": {"chance": 2.0},
"Dwarf": {"chance": 1.0, "subraces": {"Shield/Mountain": 100.0}},
},
},
"kara_tur": {
"aliases": ["Kara-Tur", "Shou Lung", "Kozakura", "Wa",
"Tabot", "Koryo", "T'u Lung"],
"chances": {
"Human": {"chance": 88.0, "subraces": {"Shou": 70.0, "Kozakuran": 15.0, "Wanese": 10.0, "Korobokuru": 5.0}},
"Half-Elf": {"chance": 3.0, "subraces": {"Wood": 100.0}},
"Halfling": {"chance": 3.0, "subraces": {"Lightfoot": 100.0}},
"Dwarf": {"chance": 2.0, "subraces": {"Shield/Mountain": 100.0}},
"Elf": {"chance": 2.0, "subraces": {"Wood": 100.0}},
"Hobgoblin": {"chance": 1.0},
"Tabaxi": {"chance": 1.0},
},
},
"moonshae_isles": {
"aliases": ["Moonshae Isles", "Moonshaes", "Gwynneth", "Alaron", "Snowdown", "Norland"],
"chances": {
"Human": {"chance": 72.0, "subraces": {"Ffolk": 60.0, "Northlander": 30.0, "Illuskan": 10.0}},
"Half-Elf": {"chance": 8.0, "subraces": {"Moon": 60.0, "Wood": 40.0}},
"Elf": {"chance": 7.0, "subraces": {"Wood": 55.0, "Moon": 45.0}},
"Halfling": {"chance": 5.0, "subraces": {"Lightfoot": 70.0, "Stout": 30.0}},
"Dwarf": {"chance": 4.0, "subraces": {"Shield/Mountain": 60.0, "Gold/Hill": 40.0}},
"Firbolg": {"chance": 2.0},
"Half-Orc": {"chance": 2.0},
},
},
"nelanther_isles": {
"aliases": ["Nelanther Isles", "Nelanther", "Pirate Isles", "Sword Coast pirates"],
"chances": {
"Human": {"chance": 68.0, "subraces": {"Tethyrian": 40.0, "Calishite": 30.0, "Illuskan": 20.0, "Chondathan": 10.0}},
"Half-Orc": {"chance": 10.0},
"Half-Elf": {"chance": 6.0, "subraces": {"Moon": 70.0, "Wood": 30.0}},
"Halfling": {"chance": 5.0, "subraces": {"Lightfoot": 90.0, "Stout": 10.0}},
"Dwarf": {"chance": 4.0, "subraces": {"Shield/Mountain": 60.0, "Gold/Hill": 40.0}},
"Genasi": {"chance": 4.0, "subraces": {"Water": 60.0, "Air": 40.0}},
"Tiefling": {"chance": 3.0},
},
},
"savage_north_interior": {
"aliases": ["Evermoors", "Nether Mountains", "Cold Wood",
"Fell Pass", "Dessarin Valley", "Sword Mountains"],
"chances": {
"Human": {"chance": 50.0, "subraces": {"Illuskan": 60.0, "Chondathan": 25.0, "Damaran": 15.0}},
"Orc": {"chance": 15.0},
"Dwarf": {"chance": 10.0, "subraces": {"Shield/Mountain": 90.0, "Gold/Hill": 10.0}},
"Half-Orc": {"chance": 8.0},
"Elf": {"chance": 6.0, "subraces": {"Wood": 70.0, "Moon": 30.0}},
"Goblin": {"chance": 5.0},
"Half-Elf": {"chance": 4.0, "subraces": {"Wood": 60.0, "Moon": 40.0}},
"Goliath": {"chance": 2.0},
},
},
"high_forest": {
"aliases": ["High Forest", "Star Mounts", "Grandfather Tree",
"Turlang", "Dire Wood"],
"chances": {
"Elf": {"chance": 40.0, "subraces": {"Wood": 70.0, "Moon": 30.0}},
"Human": {"chance": 22.0, "subraces": {"Illuskan": 50.0, "Chondathan": 50.0}},
"Half-Elf": {"chance": 12.0, "subraces": {"Wood": 70.0, "Moon": 30.0}},
"Firbolg": {"chance": 8.0},
"Gnome": {"chance": 7.0, "subraces": {"Forest": 80.0, "Rock": 20.0}},
"Halfling": {"chance": 6.0, "subraces": {"Ghostwise": 70.0, "Lightfoot": 30.0}},
"Satyr": {"chance": 3.0},
"Orc": {"chance": 2.0},
},
},
"impiltur_and_bloodstone": {
"aliases": ["Impiltur", "Damara", "Bloodstone Lands", "Narfell", "Vaasa"],
"chances": {
"Human": {"chance": 78.0, "subraces": {"Damaran": 75.0, "Chondathan": 15.0, "Rashemi": 10.0}},
"Dwarf": {"chance": 8.0, "subraces": {"Shield/Mountain": 85.0, "Gold/Hill": 15.0}},
"Half-Orc": {"chance": 4.0},
"Half-Elf": {"chance": 3.0, "subraces": {"Moon": 70.0, "Wood": 30.0}},
"Halfling": {"chance": 3.0, "subraces": {"Stout": 60.0, "Lightfoot": 40.0}},
"Elf": {"chance": 2.0, "subraces": {"Moon": 60.0, "Wood": 40.0}},
"Gnome": {"chance": 2.0, "subraces": {"Rock": 70.0, "Forest": 30.0}},
},
},
"anauroch": {
"aliases": ["Anauroch", "Great Sand Sea", "Bedine", "Sword of North", "Plain of Standing Stones", "Hidden Lake"],
"chances": {
"Human": {"chance": 80.0, "subraces": {"Bedine": 55.0, "Netherese": 25.0, "Illuskan": 12.0, "Damaran": 8.0}},
"Genasi": {"chance": 6.0, "subraces": {"Earth": 40.0, "Air": 30.0, "Fire": 30.0}},
"Half-Orc": {"chance": 4.0},
"Dwarf": {"chance": 3.0, "subraces": {"Shield/Mountain": 70.0, "Gold/Hill": 30.0}},
"Tiefling": {"chance": 3.0},
"Orc": {"chance": 2.0},
"Elf": {"chance": 2.0, "subraces": {"Moon": 60.0, "Sun": 40.0}},
},
},
"aglarond": {
"aliases": ["Aglarond", "Altumbel", "Umbergoth"],
"chances": {
"Half-Elf": {"chance": 40.0, "subraces": {"Wood": 70.0, "Moon": 30.0}},
"Human": {"chance": 38.0, "subraces": {"Aglarondan": 60.0, "Damaran": 25.0, "Chondathan": 15.0}},
"Elf": {"chance": 12.0, "subraces": {"Wood": 75.0, "Moon": 25.0}},
"Halfling": {"chance": 4.0, "subraces": {"Lightfoot": 70.0, "Stout": 30.0}},
"Dwarf": {"chance": 3.0, "subraces": {"Shield/Mountain": 70.0, "Gold/Hill": 30.0}},
"Gnome": {"chance": 2.0, "subraces": {"Forest": 60.0, "Rock": 40.0}},
"Half-Orc": {"chance": 1.0},
},
},
"lantan": {
"aliases": ["Lantan", "Lantanna", "Supai"],
"chances": {
"Human": {"chance": 68.0, "subraces": {"Lantanese": 80.0, "Chondathan": 12.0, "Calishite": 8.0}},
"Gnome": {"chance": 20.0, "subraces": {"Rock": 85.0, "Forest": 15.0}},
"Halfling": {"chance": 5.0, "subraces": {"Lightfoot": 90.0, "Stout": 10.0}},
"Half-Elf": {"chance": 3.0, "subraces": {"Moon": 100.0}},
"Dwarf": {"chance": 2.0, "subraces": {"Gold/Hill": 60.0, "Shield/Mountain": 40.0}},
"Tiefling": {"chance": 2.0},
},
},
"sea_of_fallen_stars": {
"aliases": ["Sea of Fallen Stars", "Inner Sea", "Pirate Isles", "Dragonmere", "Sea of Swords bound", "Whamite Isles"],
"chances": {
"Human": {"chance": 66.0, "subraces": {"Chondathan": 35.0, "Illuskan": 25.0, "Tethyrian": 20.0, "Turami": 12.0, "Mulan": 8.0}},
"Half-Orc": {"chance": 8.0},
"Half-Elf": {"chance": 6.0, "subraces": {"Moon": 70.0, "Wood": 30.0}},
"Halfling": {"chance": 5.0, "subraces": {"Lightfoot": 90.0, "Stout": 10.0}},
"Genasi": {"chance": 5.0, "subraces": {"Water": 60.0, "Air": 40.0}},
"Dwarf": {"chance": 4.0, "subraces": {"Shield/Mountain": 60.0, "Gold/Hill": 40.0}},
"Triton": {"chance": 3.0},
"Tiefling": {"chance": 3.0},
},
},
"sword_coast_central": {
"aliases": ["Sword Coast Central", "Trade Way", "Delimbiyr Vale", "Misty Forest bound"],
"chances": {
"Human": {"chance": 70.0, "subraces": {"Tethyrian": 40.0, "Chondathan": 35.0, "Illuskan": 20.0, "Calishite": 5.0}},
"Halfling": {"chance": 8.0, "subraces": {"Lightfoot": 80.0, "Stout": 20.0}},
"Half-Elf": {"chance": 6.0, "subraces": {"Moon": 65.0, "Wood": 35.0}},
"Dwarf": {"chance": 5.0, "subraces": {"Shield/Mountain": 65.0, "Gold/Hill": 35.0}},
"Elf": {"chance": 5.0, "subraces": {"Wood": 60.0, "Moon": 40.0}},
"Gnome": {"chance": 3.0, "subraces": {"Rock": 65.0, "Forest": 35.0}},
"Half-Orc": {"chance": 2.0},
"Orc": {"chance": 1.0},
},
},
"maztica": {
"aliases": ["Maztica", "True World", "Nexal", "Payit", "Kultaka", "Huacli", "Far Payit"],
"chances": {
"Human": {"chance": 80.0, "subraces": {"Nexalan": 65.0, "Payit": 20.0, "Calishite": 10.0, "Tethyrian": 5.0}},
"Lizardfolk": {"chance": 6.0},
"Half-Orc": {"chance": 4.0},
"Yuan-ti Pureblood": {"chance": 3.0},
"Tabaxi": {"chance": 3.0},
"Dwarf": {"chance": 2.0, "subraces": {"Gold/Hill": 100.0}},
"Tiefling": {"chance": 2.0},
},
},
"icewind_dale": {
"aliases": ["Icewind Dale", "Reghed Glacier", "Kelvin's Cairn", "Reghedmen"],
"chances": {
"Human": {"chance": 55.0, "subraces": {"Illuskan": 60.0, "Reghed": 30.0, "Damaran": 10.0}},
"Dwarf": {"chance": 16.0, "subraces": {"Shield/Mountain": 95.0, "Gold/Hill": 5.0}},
"Goliath": {"chance": 10.0},
"Half-Orc": {"chance": 6.0},
"Halfling": {"chance": 5.0, "subraces": {"Stout": 70.0, "Lightfoot": 30.0}},
"Elf": {"chance": 4.0, "subraces": {"Moon": 70.0, "Wood": 30.0}},
"Half-Elf": {"chance": 4.0, "subraces": {"Moon": 100.0}},
},
},
"evermeet": {
"aliases": ["Evermeet", "Island of Evermeet", "Green Isle", "Isle of Evermeet"],
"chances": {
"Elf": {"chance": 88.0, "subraces": {"Sun": 50.0, "Moon": 42.0, "Avariel": 5.0, "Eladrin": 3.0}},
"Half-Elf": {"chance": 8.0, "subraces": {"Sun": 60.0, "Moon": 40.0}},
"Human": {"chance": 3.0, "subraces": {"Illuskan": 100.0}},
"Gnome": {"chance": 1.0, "subraces": {"Forest": 100.0}},
},
},
"myth_drannor": {
"aliases": ["Myth Drannor", "City of Song", "Cormanthyr", "Cormanthor", "Elven Court"],
"chances": {
"Elf": {"chance": 50.0, "subraces": {"Moon": 45.0, "Sun": 30.0, "Wood": 20.0, "Eladrin": 5.0}},
"Human": {"chance": 22.0, "subraces": {"Chondathan": 70.0, "Damaran": 20.0, "Illuskan": 10.0}},
"Half-Elf": {"chance": 14.0, "subraces": {"Moon": 60.0, "Sun": 25.0, "Wood": 15.0}},
"Dwarf": {"chance": 5.0, "subraces": {"Shield/Mountain": 70.0, "Gold/Hill": 30.0}},
"Gnome": {"chance": 4.0, "subraces": {"Rock": 55.0, "Forest": 45.0}},
"Halfling": {"chance": 3.0, "subraces": {"Lightfoot": 80.0, "Stout": 20.0}},
"Satyr": {"chance": 2.0},
},
},
"tashalar_and_shaar": {
"aliases": ["Tashalar", "Lapaliiya", "Thindol", "Samarach", "Shaar", "Great Rift", "Channath Vale"],
"chances": {
"Human": {"chance": 55.0, "subraces": {"Chultan": 45.0, "Shaaran": 25.0, "Tethyrian": 20.0, "Calishite": 10.0}},
"Yuan-ti Pureblood": {"chance": 16.0},
"Lizardfolk": {"chance": 8.0},
"Dwarf": {"chance": 6.0, "subraces": {"Gold/Hill": 90.0, "Shield/Mountain": 10.0}},
"Half-Elf": {"chance": 5.0, "subraces": {"Wood": 100.0}},
"Tabaxi": {"chance": 4.0},
"Elf": {"chance": 3.0, "subraces": {"Wood": 100.0}},
"Half-Orc": {"chance": 3.0},
},
},
"nimbral": {
"aliases": ["Nimbral", "Nimbral Isles", "Immurk's Hold south", "Land of Flying Hunt"],
"chances": {
"Human": {"chance": 80.0, "subraces": {"Halruaan": 45.0, "Tethyrian": 30.0, "Illuskan": 15.0, "Calishite": 10.0}},
"Half-Elf": {"chance": 7.0, "subraces": {"Moon": 100.0}},
"Halfling": {"chance": 5.0, "subraces": {"Lightfoot": 90.0, "Stout": 10.0}},
"Elf": {"chance": 3.0, "subraces": {"Moon": 60.0, "Sun": 40.0}},
"Gnome": {"chance": 3.0, "subraces": {"Rock": 80.0, "Forest": 20.0}},
"Dwarf": {"chance": 1.0, "subraces": {"Shield/Mountain": 100.0}},
"Tiefling": {"chance": 1.0},
},
},
},
"Krynn": {
"abanasinia": {
"aliases": ["Abanasinia", "Crystalmir Lake", "Sancrist bound"],
"chances": {
"Human": {"chance": 72.0, "subraces": {"Plainsfolk": 45.0, "Abanasinian": 45.0, "Solamnic": 10.0}},
"Half-Elf": {"chance": 8.0, "subraces": {"Qualinesti": 100.0}},
"Kender": {"chance": 7.0},
"Dwarf": {"chance": 5.0, "subraces": {"Hylar": 50.0, "Neidar": 50.0}},
"Elf": {"chance": 4.0, "subraces": {"Qualinesti": 100.0}},
"Gnome": {"chance": 3.0, "subraces": {"Tinker": 100.0}},
"Half-Ogre": {"chance": 1.0},
},
},
"solamnia": {
"aliases": ["Solamnia", "Sancrist", "Knights of Solamnia", "Solamnic Plains"],
"chances": {
"Human": {"chance": 82.0, "subraces": {"Solamnic": 80.0, "Abanasinian": 12.0, "Plainsfolk": 8.0}},
"Dwarf": {"chance": 5.0, "subraces": {"Hylar": 60.0, "Neidar": 40.0}},
"Kender": {"chance": 4.0},
"Half-Elf": {"chance": 3.0, "subraces": {"Silvanesti": 50.0, "Qualinesti": 50.0}},
"Gnome": {"chance": 3.0, "subraces": {"Tinker": 100.0}},
"Elf": {"chance": 2.0, "subraces": {"Silvanesti": 60.0, "Qualinesti": 40.0}},
"Minotaur": {"chance": 1.0},
},
},
"silvanesti": {
"aliases": ["Silvanesti", "Elven Home"],
"chances": {
"Elf": {"chance": 90.0, "subraces": {"Silvanesti": 90.0, "Kagonesti": 10.0}},
"Half-Elf": {"chance": 6.0, "subraces": {"Silvanesti": 100.0}},
"Human": {"chance": 3.0, "subraces": {"Solamnic": 100.0}},
"Kender": {"chance": 1.0},
},
},
"qualinesti": {
"aliases": ["Qualinesti", "Pax Tharkas bound"],
"chances": {
"Elf": {"chance": 85.0, "subraces": {"Qualinesti": 85.0, "Kagonesti": 15.0}},
"Half-Elf": {"chance": 8.0, "subraces": {"Qualinesti": 100.0}},
"Human": {"chance": 4.0, "subraces": {"Abanasinian": 100.0}},
"Dwarf": {"chance": 2.0, "subraces": {"Neidar": 100.0}},
"Kender": {"chance": 1.0},
},
},
"thorbardin": {
"aliases": ["Thorbardin", "Mount Cloudseeker", "Hylar Halls", "Kingdom of Dwarves"],
"chances": {
"Dwarf": {"chance": 88.0, "subraces": {"Hylar": 40.0, "Daewar": 25.0, "Klar": 15.0, "Theiwar": 15.0, "Daergar": 5.0}},
"Gnome": {"chance": 6.0, "subraces": {"Tinker": 100.0}},
"Human": {"chance": 3.0, "subraces": {"Plainsfolk": 100.0}},
"Kender": {"chance": 2.0},
"Half-Ogre": {"chance": 1.0},
},
},
"icewall_and_north": {
"aliases": ["Icewall", "Icereach", "Southern Ergoth",
"Ice Folk", "Icewall Glacier"],
"chances": {
"Human": {"chance": 76.0, "subraces": {"Ice Folk": 70.0, "Plainsfolk": 20.0, "Solamnic": 10.0}},
"Dwarf": {"chance": 8.0, "subraces": {"Neidar": 100.0}},
"Elf": {"chance": 6.0, "subraces": {"Kagonesti": 100.0}},
"Kender": {"chance": 4.0},
"Half-Ogre": {"chance": 3.0},
"Minotaur": {"chance": 3.0},
},
},
"goodlund_and_balifor": {
"aliases": ["Goodlund", "Balifor", "Flotsam bound", "Kenderhome"],
"chances": {
"Kender": {"chance": 62.0},
"Human": {"chance": 22.0, "subraces": {"Plainsfolk": 60.0, "Abanasinian": 25.0, "Solamnic": 15.0}},
"Half-Elf": {"chance": 5.0, "subraces": {"Qualinesti": 100.0}},
"Gnome": {"chance": 4.0, "subraces": {"Tinker": 100.0}},
"Dwarf": {"chance": 3.0, "subraces": {"Neidar": 100.0}},
"Minotaur": {"chance": 2.0},
"Half-Ogre": {"chance": 2.0},
},
},
"ogrelands_blode_and_kern": {
"aliases": ["Blode", "Kern", "Ogrelands", "Kernen", "Ogre lands"],
"chances": {
"Half-Ogre": {"chance": 40.0},
"Human": {"chance": 28.0, "subraces": {"Plainsfolk": 50.0, "Abanasinian": 30.0, "Solamnic": 20.0}},
"Minotaur": {"chance": 12.0},
"Goblin": {"chance": 8.0},
"Hobgoblin": {"chance": 6.0},
"Bugbear": {"chance": 4.0},
"Kender": {"chance": 2.0},
},
},
"neraka_and_taman_busuk": {
"aliases": ["Neraka", "Taman Busuk", "Dargaard", "Estwilde", "Dargaard Keep bound"],
"chances": {
"Human": {"chance": 60.0, "subraces": {"Solamnic": 40.0, "Plainsfolk": 35.0, "Abanasinian": 25.0}},
"Half-Ogre": {"chance": 14.0},
"Hobgoblin": {"chance": 8.0},
"Goblin": {"chance": 6.0},
"Minotaur": {"chance": 5.0},
"Bugbear": {"chance": 4.0},
"Dwarf": {"chance": 2.0, "subraces": {"Neidar": 100.0}},
"Kender": {"chance": 1.0},
},
},
"nordmaar_and_khur": {
"aliases": ["Nordmaar", "Khur", "Khurish nomads"],
"chances": {
"Human": {"chance": 78.0, "subraces": {"Plainsfolk": 55.0, "Abanasinian": 25.0, "Solamnic": 20.0}},
"Half-Elf": {"chance": 6.0, "subraces": {"Kagonesti": 100.0}},
"Elf": {"chance": 5.0, "subraces": {"Kagonesti": 100.0}},
"Kender": {"chance": 4.0},
"Dwarf": {"chance": 3.0, "subraces": {"Neidar": 100.0}},
"Half-Ogre": {"chance": 2.0},
"Minotaur": {"chance": 2.0},
},
},
},
"Oerth": {
"greyhawk_city": {
"aliases": ["Free City of Greyhawk", "Gem of Flanaess"],
"chances": {
"Human": {"chance": 66.0, "subraces": {"Oeridian": 40.0, "Suel": 25.0, "Flan": 20.0, "Baklunish": 15.0}},
"Half-Elf": {"chance": 8.0, "subraces": {"Gray": 60.0, "High": 40.0}},
"Dwarf": {"chance": 7.0, "subraces": {"Hill": 60.0, "Mountain": 40.0}},
"Halfling": {"chance": 6.0, "subraces": {"Lightfoot": 70.0, "Stout": 30.0}},
"Elf": {"chance": 5.0, "subraces": {"Gray": 40.0, "High": 40.0, "Wood": 20.0}},
"Gnome": {"chance": 4.0, "subraces": {"Rock": 100.0}},
"Half-Orc": {"chance": 3.0},
"Tiefling": {"chance": 1.0},
},
},
"keoland_and_sheldomar": {
"aliases": ["Keoland", "Sheldomar Valley", "Gran March", "Bissel", "Ulek", "Yeomanry"],
"chances": {
"Human": {"chance": 70.0, "subraces": {"Suel": 45.0, "Oeridian": 40.0, "Flan": 15.0}},
"Dwarf": {"chance": 9.0, "subraces": {"Hill": 55.0, "Mountain": 45.0}},
"Halfling": {"chance": 7.0, "subraces": {"Lightfoot": 70.0, "Stout": 30.0}},
"Elf": {"chance": 6.0, "subraces": {"High": 45.0, "Gray": 35.0, "Wood": 20.0}},
"Half-Elf": {"chance": 4.0, "subraces": {"High": 60.0, "Gray": 40.0}},
"Gnome": {"chance": 3.0, "subraces": {"Rock": 100.0}},
"Half-Orc": {"chance": 1.0},
},
},
"furyondy_and_shield_lands": {
"aliases": ["Furyondy", "Shield Lands", "Veluna"],
"chances": {
"Human": {"chance": 74.0, "subraces": {"Oeridian": 55.0, "Suel": 25.0, "Flan": 20.0}},
"Dwarf": {"chance": 7.0, "subraces": {"Hill": 60.0, "Mountain": 40.0}},
"Halfling": {"chance": 6.0, "subraces": {"Lightfoot": 75.0, "Stout": 25.0}},
"Elf": {"chance": 5.0, "subraces": {"High": 50.0, "Gray": 30.0, "Wood": 20.0}},
"Half-Elf": {"chance": 4.0, "subraces": {"High": 60.0, "Gray": 40.0}},
"Gnome": {"chance": 3.0, "subraces": {"Rock": 100.0}},
"Half-Orc": {"chance": 1.0},
},
},
"pomarj_and_wild_coast": {
"aliases": ["Pomarj", "Wild Coast", "Slave Lords bound"],
"chances": {
"Human": {"chance": 40.0, "subraces": {"Oeridian": 40.0, "Suel": 35.0, "Flan": 25.0}},
"Orc": {"chance": 20.0},
"Half-Orc": {"chance": 12.0},
"Goblin": {"chance": 9.0},
"Hobgoblin": {"chance": 7.0},
"Dwarf": {"chance": 5.0, "subraces": {"Hill": 100.0}},
"Bugbear": {"chance": 4.0},
"Kobold": {"chance": 3.0},
},
},
"bandit_kingdoms_and_bright_desert": {
"aliases": ["Bandit Kingdoms", "Bright Desert", "Rift Canyon",
"Rauxes bound", "Nightfen"],
"chances": {
"Human": {"chance": 76.0, "subraces": {"Oeridian": 45.0, "Baklunish": 30.0, "Flan": 25.0}},
"Half-Orc": {"chance": 8.0},
"Dwarf": {"chance": 4.0, "subraces": {"Hill": 60.0, "Mountain": 40.0}},
"Halfling": {"chance": 4.0, "subraces": {"Lightfoot": 80.0, "Stout": 20.0}},
"Elf": {"chance": 3.0, "subraces": {"Wood": 60.0, "Gray": 40.0}},
"Half-Elf": {"chance": 3.0, "subraces": {"Gray": 100.0}},
"Tiefling": {"chance": 2.0},
},
},
"great_kingdom_of_aerdy": {
"aliases": ["Great Kingdom", "Aerdy", "North Province", "South Province", "Ahlissa", "North Kingdom"],
"chances": {
"Human": {"chance": 74.0, "subraces": {"Oeridian": 65.0, "Suel": 20.0, "Flan": 15.0}},
"Dwarf": {"chance": 7.0, "subraces": {"Hill": 55.0, "Mountain": 45.0}},
"Half-Orc": {"chance": 5.0},
"Elf": {"chance": 4.0, "subraces": {"Gray": 50.0, "High": 30.0, "Wood": 20.0}},
"Halfling": {"chance": 4.0, "subraces": {"Lightfoot": 75.0, "Stout": 25.0}},
"Half-Elf": {"chance": 3.0, "subraces": {"Gray": 60.0, "High": 40.0}},
"Tiefling": {"chance": 2.0},
"Gnome": {"chance": 1.0, "subraces": {"Rock": 100.0}},
},
},
"nyrond_and_urnsts": {
"aliases": ["Nyrond", "County of Urnst", "Duchy of Urnst", "Almor", "Innspa bound"],
"chances": {
"Human": {"chance": 72.0, "subraces": {"Oeridian": 50.0, "Suel": 30.0, "Flan": 20.0}},
"Dwarf": {"chance": 8.0, "subraces": {"Hill": 60.0, "Mountain": 40.0}},
"Halfling": {"chance": 6.0, "subraces": {"Lightfoot": 70.0, "Stout": 30.0}},
"Elf": {"chance": 5.0, "subraces": {"High": 45.0, "Gray": 35.0, "Wood": 20.0}},
"Half-Elf": {"chance": 4.0, "subraces": {"High": 55.0, "Gray": 45.0}},
"Gnome": {"chance": 3.0, "subraces": {"Rock": 100.0}},
"Half-Orc": {"chance": 2.0},
},
},
"baklunish_west": {
"aliases": ["Baklunish West", "Ket", "Tusmit", "Ekbir", "Zeif", "Ull", "Paynims", "Plains of Paynims"],
"chances": {
"Human": {"chance": 82.0, "subraces": {"Baklunish": 80.0, "Oeridian": 12.0, "Suel": 8.0}},
"Half-Orc": {"chance": 5.0},
"Genasi": {"chance": 4.0, "subraces": {"Fire": 40.0, "Air": 40.0, "Earth": 20.0}},
"Halfling": {"chance": 3.0, "subraces": {"Lightfoot": 85.0, "Stout": 15.0}},
"Dwarf": {"chance": 3.0, "subraces": {"Hill": 60.0, "Mountain": 40.0}},
"Elf": {"chance": 2.0, "subraces": {"Gray": 60.0, "High": 40.0}},
"Tiefling": {"chance": 1.0},
},
},
"iuz_and_horned_society": {
"aliases": ["Iuz", "Empire of Iuz", "Horned Society", "Bandit lands of Iuz", "Land of Iuz"],
"chances": {
"Human": {"chance": 50.0, "subraces": {"Flan": 45.0, "Oeridian": 35.0, "Baklunish": 20.0}},
"Orc": {"chance": 16.0},
"Half-Orc": {"chance": 12.0},
"Hobgoblin": {"chance": 8.0},
"Goblin": {"chance": 6.0},
"Bugbear": {"chance": 4.0},
"Tiefling": {"chance": 3.0},
"Kobold": {"chance": 1.0},
},
},
"sea_barons_and_isles": {
"aliases": ["Sea Barons", "Lordship of Isles", "Aerdi Sea", "Spindrift Isles", "Densac Gulf"],
"chances": {
"Human": {"chance": 70.0, "subraces": {"Oeridian": 40.0, "Suel": 35.0, "Flan": 25.0}},
"Half-Orc": {"chance": 8.0},
"Halfling": {"chance": 6.0, "subraces": {"Lightfoot": 90.0, "Stout": 10.0}},
"Half-Elf": {"chance": 5.0, "subraces": {"Gray": 60.0, "High": 40.0}},
"Elf": {"chance": 4.0, "subraces": {"Gray": 50.0, "Wood": 50.0}},
"Dwarf": {"chance": 4.0, "subraces": {"Hill": 60.0, "Mountain": 40.0}},
"Triton": {"chance": 2.0},
"Genasi": {"chance": 1.0, "subraces": {"Water": 100.0}},
},
},
},
}
# ─── Планы существования ─────────────────────────────────────────────────────
PLANAR_OVERWRITES: dict = {
"feywild": {
"aliases": ["Feywild", "Plane of Faerie", "Faerie",
"Seelie Court", "Unseelie Court"],
"chances": {
"Elf": {"chance": 55.0, "subraces": {"Eladrin": 75.0, "Wood": 18.0, "Avariel": 7.0}},
"Satyr": {"chance": 18.0},
"Firbolg": {"chance": 10.0},
"Gnome": {"chance": 8.0, "subraces": {"Forest": 80.0, "Rock": 20.0}},
"Half-Elf": {"chance": 5.0, "subraces": {"Moon": 100.0}},
"Halfling": {"chance": 4.0, "subraces": {"Lightfoot": 100.0}},
},
},
"shadowfell": {
"aliases": ["Shadowfell", "Plane of Shadow", "Shadow Vale", "Gloomwrought"],
"chances": {
"Elf": {"chance": 42.0, "subraces": {"Shadar-kai": 100.0}},
"Human": {"chance": 28.0, "subraces": {"Damaran": 50.0, "Illuskan": 30.0, "Chondathan": 20.0}},
"Aasimar": {"chance": 12.0, "subraces": {"Fallen": 100.0}},
"Tiefling": {"chance": 10.0},
"Half-Elf": {"chance": 5.0, "subraces": {"Moon": 100.0}},
"Gith": {"chance": 3.0},
},
},
"lower_planes_le": {
"aliases": ["Baator", "Nine Hells", "Avernus", "Dis", "Minauros",
"Phlegethos", "Stygia", "Malbolge", "Maladomini", "Cania", "Nessus"],
"chances": {
"Tiefling": {"chance": 42.0},
"Human": {"chance": 26.0, "subraces": {"Chondathan": 30.0, "Damaran": 25.0, "Tethyrian": 20.0, "Illuskan": 15.0, "Mulan": 10.0}},
"Dwarf": {"chance": 12.0, "subraces": {"Duergar": 100.0}},
"Half-Orc": {"chance": 8.0},
"Aasimar": {"chance": 6.0, "subraces": {"Fallen": 100.0}},
"Yuan-ti Pureblood": {"chance": 4.0},
"Gith": {"chance": 2.0},
},
},
"lower_planes_ne": {
"aliases": ["Hades", "Gray Waste", "Gehenna", "Carceri",
"Tarterus", "Oinos", "Niflheim", "Pluton"],
"chances": {
"Tiefling": {"chance": 38.0},
"Human": {"chance": 28.0, "subraces": {"Damaran": 35.0, "Chondathan": 25.0, "Mulan": 20.0, "Tethyrian": 20.0}},
"Orc": {"chance": 13.0},
"Half-Orc": {"chance": 9.0},
"Gith": {"chance": 7.0},
"Genasi": {"chance": 5.0, "subraces": {"Earth": 50.0, "Fire": 50.0}},
},
},
"lower_planes_ce": {
"aliases": ["Abyss", "Infinite Layers of Abyss", "Pazunia",
"Azzagrat", "Demonweb Pits", "Thanatos"],
"chances": {
"Tiefling": {"chance": 28.0},
"Orc": {"chance": 22.0},
"Half-Orc": {"chance": 15.0},
"Human": {"chance": 14.0, "subraces": {"Damaran": 30.0, "Illuskan": 30.0, "Chondathan": 25.0, "Mulan": 15.0}},
"Goblin": {"chance": 8.0},
"Bugbear": {"chance": 6.0},
"Elf": {"chance": 4.0, "subraces": {"Drow": 100.0}},
"Yuan-ti Pureblood": {"chance": 3.0},
},
},
"upper_planes_lg": {
"aliases": ["Mount Celestia", "Seven Heavens", "Celestia", "Arcadia",
"Mertion", "Solania", "Chronias"],
"chances": {
"Aasimar": {"chance": 38.0, "subraces": {"Protector": 100.0}},
"Human": {"chance": 27.0, "subraces": {"Tethyrian": 35.0, "Chondathan": 30.0, "Damaran": 20.0, "Illuskan": 15.0}},
"Dwarf": {"chance": 18.0, "subraces": {"Gold/Hill": 70.0, "Shield/Mountain": 30.0}},
"Elf": {"chance": 9.0, "subraces": {"Sun": 70.0, "Moon": 30.0}},
"Halfling": {"chance": 8.0, "subraces": {"Stout": 60.0, "Lightfoot": 40.0}},
},
},
"upper_planes_ng": {
"aliases": ["Elysium", "Bytopia", "Dothion", "Shurrock",
"Amoria", "Eronia", "Belierin"],
"chances": {
"Aasimar": {"chance": 30.0, "subraces": {"Protector": 100.0}},
"Gnome": {"chance": 22.0, "subraces": {"Forest": 55.0, "Rock": 45.0}},
"Halfling": {"chance": 20.0, "subraces": {"Lightfoot": 55.0, "Stout": 45.0}},
"Elf": {"chance": 15.0, "subraces": {"Wood": 60.0, "Moon": 40.0}},
"Human": {"chance": 8.0, "subraces": {"Chondathan": 40.0, "Tethyrian": 30.0, "Illuskan": 30.0}},
"Firbolg": {"chance": 5.0},
},
},
"upper_planes_cg": {
"aliases": ["Arborea", "Arvandor", "Ysgard", "Olympus",
"Ossa", "Pelion", "Aquallor"],
"chances": {
"Elf": {"chance": 45.0, "subraces": {"Moon": 45.0, "Eladrin": 40.0, "Sun": 15.0}},
"Aasimar": {"chance": 18.0, "subraces": {"Scourge": 60.0, "Protector": 40.0}},
"Satyr": {"chance": 15.0},
"Half-Elf": {"chance": 10.0, "subraces": {"Moon": 70.0, "Sun": 30.0}},
"Genasi": {"chance": 7.0, "subraces": {"Air": 50.0, "Water": 50.0}},
"Firbolg": {"chance": 5.0},
},
},
"planes_of_chaos": {
"aliases": ["Limbo", "Pandemonium", "Everchanging Chaos",
"Pandesmos", "Cocytus", "Agathion"],
"chances": {
"Gith": {"chance": 52.0},
"Genasi": {"chance": 20.0, "subraces": {"Air": 25.0, "Earth": 25.0, "Fire": 25.0, "Water": 25.0}},
"Tiefling": {"chance": 12.0},
"Human": {"chance": 9.0, "subraces": {"Illuskan": 40.0, "Damaran": 30.0, "Chondathan": 30.0}},
"Aasimar": {"chance": 4.0, "subraces": {"Scourge": 100.0}},
"Elf": {"chance": 3.0, "subraces": {"Eladrin": 100.0}},
},
},
"plane_of_law": {
"aliases": ["Mechanus", "Clockwork Nirvana", "Regulus", "Nirvana"],
"chances": {
"Gith": {"chance": 38.0},
"Human": {"chance": 34.0, "subraces": {"Damaran": 30.0, "Chondathan": 30.0, "Mulan": 20.0, "Tethyrian": 20.0}},
"Dwarf": {"chance": 18.0, "subraces": {"Shield/Mountain": 80.0, "Gold/Hill": 20.0}},
"Gnome": {"chance": 7.0, "subraces": {"Rock": 100.0}},
"Aasimar": {"chance": 3.0, "subraces": {"Protector": 100.0}},
},
},
}
# ─── Населенные пункты ───────────────────────────────────────────────────────
# Структура: Мир -> Регион -> [Список населенных пунктов]
SETTLEMENTS_OVERWRITES: dict = {
"Toril": {
"sword_coast_north": ["Luskan", "Neverwinter", "Port Llast", "Mirabar"],
"silver_marches": ["Silverymoon", "Sundabar", "Mithral Hall", "Everlund", "Citadel Adbar"],
"western_heartlands": ["Elturel", "Beregost", "Candlekeep", "Scornubel"],
"waterdeep": ["Waterdeep", "City of Splendors"],
"baldurs_gate": ["Baldur's Gate", "Gate", "Baldurs Gate"],
"cormyr": ["Suzail", "Marsember", "Arabel", "Wheloon"],
"amn": ["Athkatla", "Crimmor", "Eshpurta", "Purskul", "Trademeet"],
"tethyr": ["Zazesspur", "Darromar", "Myratma", "Ithmong", "Saradush", "Riatavin"],
"calimshan": ["Calimport", "Memnon", "Almraiven", "Keltar"],
"chult": ["Port Nyanzaru", "Mezro", "Omu"],
"unapproachable_east": ["Bezantur", "Two Stars", "Phsant", "Milvarune"],
"rashemen": ["Mulsantir", "Immilmar", "Urling", "Citadel Rashemar", "Mulptan"],
"thay": ["Eltabbar", "Tyraturos", "Amruthar", "Pyarados", "Surthay", "Nethjet"],
"underdark": ["Menzoberranzan", "Blingdenstone", "Gracklstugh", "Sshamath", "Ched Nasad"],
"moonsea": ["Zhentil Keep", "Melvaunt", "Hillsfar", "Mulmaster", "Phlan", "Thentia"],
"dalelands": ["Shadowdale", "Mistledale", "Deepingdale", "Battledale", "Daggerdale", "Archendale"],
"sembia": ["Selgaunt", "Ordulin", "Saerloon", "Yhaunn", "Daerlun", "Urmlaspyr"],
"vast": ["Ravens Bluff", "Tantras", "Calaunt", "Procampur", "Sarbreen"],
"vilhon_reach": ["Hlondeth", "Alaghon", "Arrabar", "Sespech", "Nimpeth"],
"old_empires": ["Skuld", "Messemprar", "Cimbar", "Soorenar"],
"icewind_dale": ["Ten Towns", "Bryn Shander", "Targos", "Lonelywood", "Easthaven", "Termalaine", "Caer-Dineval", "Caer-Konig", "Dougan's Hole", "Good Mead"],
"evermeet": ["Leuthilspar"],
"myth_drannor": ["Myth Drannor", "Semberholme", "Tangled Trees"],
"moonshae_isles": ["Callidyrr", "Corwell"],
"impiltur_and_bloodstone": ["Lyrabar", "Heliogabalus"],
"anauroch": ["Shade Enclave"],
"aglarond": ["Velprintalar", "Yeshelmaar", "Emmech"],
"lantan": ["Sambar", "Adaerglass"],
"sea_of_fallen_stars": ["Immurk's Hold"],
"sword_coast_central": ["Daggerford", "Secomber", "Boareskyr Bridge"],
"maztica": ["Helmsport", "Ulatos"],
"tashalar_and_shaar": ["Tashluta", "Sheirtalar"],
"nimbral": ["Cathtyr"],
},
"Krynn": {
"abanasinia": ["Solace", "Haven", "Que-Shu"],
"solamnia": ["Palanthas", "Vingaard", "Kalaman"],
"silvanesti": ["Silvanost", "Silvamori"],
"qualinesti": ["Qualinost"],
"thorbardin": ["Zhakar"],
"neraka_and_taman_busuk": ["Sanction"],
"nordmaar_and_khur": ["North Keep", "Willik", "Wendle", "Kernaghan"],
"goodlund_and_balifor": ["Kendermore", "Port Balifor"],
},
"Oerth": {
"greyhawk_city": ["Greyhawk", "City of Greyhawk"],
"keoland_and_sheldomar": ["Niole Dra"],
"furyondy_and_shield_lands": ["Chendl", "Dyvers", "Willip"],
"pomarj_and_wild_coast": ["Highport", "Suderham"],
"great_kingdom_of_aerdy": ["Rauxes", "Rel Astra"],
"nyrond_and_urnsts": ["Rel Mord", "Womtham"],
"baklunish_west": ["Lopolla"],
"iuz_and_horned_society": ["Molag", "Dorakaa"],
"sea_barons_and_isles": ["Asperdi", "Duxchan"],
}
}
# ─── Индекс алиасов и symspellpy ───────────────────────────────────────────
import os
import symspellpy
_ARTICLES = {"the", "a", "an", "of", "and"}
# ----------------------------------------------- Core Dictionary Logic ------------------------------------------------------------
def _clean(text: str) -> str:
"""Нижний регистр, удаление артиклей и апострофов, схлопывание пробелов."""
text = text.lower().replace("'", "").replace(".", "")
words = [w for w in text.split() if w not in _ARTICLES]
return " ".join(words)
def _merge_settlements():
"""Вливает SETTLEMENTS_OVERWRITES в REGIONAL_OVERWRITES и создает плоский список."""
world_settlements = {}
for world_name, regions in SETTLEMENTS_OVERWRITES.items():
world_settlements[world_name] = []
if world_name not in REGIONAL_OVERWRITES:
continue
for region_key, settlements in regions.items():
if region_key in REGIONAL_OVERWRITES[world_name]:
# Вливаем нас. пункты в aliases региона
REGIONAL_OVERWRITES[world_name][region_key]["aliases"].extend(settlements)
# Формируем плоский список
world_settlements[world_name].extend(settlements)
return world_settlements
WORLD_SETTLEMENTS = _merge_settlements()
def _build_alias_index() -> tuple[dict, dict]:
"""
Возвращает два индекса:
world_index: {"toril": "Toril", "avernus": "lower_planes_le", ...}
region_index: {(scope, cleaned_alias): region_key}
"""
world_index: dict[str, str] = {}
region_index: dict[tuple[str, str], str] = {}
for world_name in REGIONAL_OVERWRITES:
world_index[_clean(world_name)] = world_name
for region_key, data in REGIONAL_OVERWRITES[world_name].items():
for alias in data["aliases"]:
region_index[(world_name, _clean(alias))] = region_key
for plane_key, data in PLANAR_OVERWRITES.items():
for alias in data["aliases"]:
world_index[_clean(alias)] = plane_key
region_index[("__planes__", _clean(alias))] = plane_key
world_index[_clean("planes")] = "__planes__"
return world_index, region_index
WORLD_INDEX, REGION_INDEX = _build_alias_index()
# ----------------------------------------------- SymSpell Logic ------------------------------------------------------------
def _init_symspell_for_worlds():
"""Создает экземпляры SymSpell для каждого мира на основе плоского списка населенных пунктов."""
symspells = {}
for world, settlements in WORLD_SETTLEMENTS.items():
sym = symspellpy.SymSpell(max_dictionary_edit_distance=2, prefix_length=7)
for settlement in settlements:
# Добавляем в словарь оригинальное название и очищенное
clean_name = _clean(settlement)
if clean_name:
sym.create_dictionary_entry(clean_name, 1)
symspells[world] = sym
return symspells
WORLD_SYMSPELLS = _init_symspell_for_worlds()
def match_location(world: str, location: str) -> str:
"""
Сопоставляет введенную локацию со словарем населенных пунктов мира.
Возвращает скорректированное название или оригинальное, если совпадений нет.
"""
world_key = world.strip().title()
if world_key not in WORLD_SYMSPELLS:
return location
clean_loc = _clean(location)
sym = WORLD_SYMSPELLS[world_key]
# Ищем исправления с максимальной дистанцией 2
suggestions = sym.lookup(clean_loc, symspellpy.Verbosity.CLOSEST, max_edit_distance=2)
if suggestions:
best_match_clean = suggestions[0].term
# Ищем оригинальное написание по очищенному ключу
for settlement in WORLD_SETTLEMENTS.get(world_key, []):
if _clean(settlement) == best_match_clean:
return settlement
return location