2026-10-23 17:28:29iociveteres:
feat(gamedata): export power rating by the pr it buys
Power Rating has no level, so its one experience entry left the sheet to
guess what it buys. It is now exported as Power Rating PR 2 to PR 10, each
with the PR as its level: picking one sets the level, and the sheet prices
it by the table of the talent for the class.
.scripts/gamedata/build.py ..
@@ 65,7 65,8 @@
advancements = character.characteristics(report)
for s in skill_list:
advancements += s.advancements()
-
advancements += [t.advancement() for t in talent_list]
+
for t in talent_list:
+
advancements += t.advancements()
advancements += [a.advancement() for a in art_list]
advancements += [s.advancement() for s in spell_list]
advancements += [el.advancement() for el in elites if el.entry is not None]
.scripts/gamedata/character.py ..
@@ 71,6 71,17 @@
"requirements": self.requirements,
}
+
def advancements(self):
+
"""Записи опыта: одна, у Power Rating — по записи на каждый PR, до которого его покупают."""
+
rec = self.advancement()
+
if self.entry.title.en != pf.POWER_RATING:
+
return [rec]
+
out = []
+
for pr in pf.POWER_RATING_LEVELS:
+
names = {k: f"{rec[k]} PR {pr}" for k in ("name", "name_ru") if k in rec}
+
out.append({**rec, **names, "level": pr})
+
return out
+
def parse_level(e, f, report):
"""Уровень таланта; «—» — талант без уровня (Sound Constitution, Power Rating)."""