M6.6: StepReview signing + hybrid math revision

- New Step VIII (Review): name input and Confirm button that
  saves the finalized character to user://character.tres.
- Hybrid lineage rules simplified per project decision: drop
  the "no-stack on overlap, take +1 free elsewhere" rule from
  theriapolis-rpg-clades.md. Hybrids now pick one ability mod
  from each parent clade and they sum if they overlap.
  Removes HybridFreeAbility, the free-bonus picker row, and the
  overlap special case from AbilityCalc + WizardValidation.
- StepClade bonus rows now mutate in place (sync ButtonPressed)
  instead of tearing down on every Refresh — the old path freed
  the very button mid-Pressed-signal, leaving stale buttons next
  to the new ones.
- StepSkills drops the redundant "Calling: X · History: Y" meta
  line; both are already shown in the Aside summary.
- Aside hybrid section adds dual-species traits and the
  universal-hybrid detriment pills.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Christopher Wiebe
2026-05-03 20:51:55 -07:00
parent 0e5d4b7425
commit bb986d49f9
8 changed files with 364 additions and 31 deletions
+20 -5
View File
@@ -24,20 +24,35 @@ public static class AbilityCalc
var list = new List<ModSource>();
if (draft.IsHybrid)
{
AddCladeSource(list, ability, CodexContent.Clade(draft.SireCladeId), " (sire)");
AddCladeSource(list, ability, CodexContent.Clade(draft.DamCladeId), " (dam)");
// Hybrids: take ONE ability modifier from each parent clade.
// Picks stack if they happen to land on the same ability — the
// original "no stack, take +1 + free elsewhere" rule was
// dropped per project decision. Species mods don't apply.
if (draft.SireChosenAbility == ability)
AddCladeChoice(list, ability, CodexContent.Clade(draft.SireCladeId), " (sire)");
if (draft.DamChosenAbility == ability)
AddCladeChoice(list, ability, CodexContent.Clade(draft.DamCladeId), " (dam)");
}
else
{
AddCladeSource(list, ability, CodexContent.Clade(draft.CladeId), "");
var sp = CodexContent.SpeciesById(draft.EffectiveSpeciesId);
if (sp is not null) AddDictSource(list, ability, sp.Name, sp.AbilityMods);
}
var sp = CodexContent.SpeciesById(draft.EffectiveSpeciesId);
if (sp is not null) AddDictSource(list, ability, sp.Name, sp.AbilityMods);
return list;
}
/// <summary>The chosen-mod path: one mod from a parent clade. The value
/// is the clade's actual mod for that ability (so picking CON from
/// canidae yields +1 while picking CON from ursidae yields +2).</summary>
private static void AddCladeChoice(List<ModSource> list, string ability, CladeDef? clade, string suffix)
{
if (clade is null) return;
if (clade.AbilityMods.TryGetValue(ability, out int v) && v != 0)
list.Add(new ModSource(clade.Name + suffix, v));
}
public static int TotalBonus(string ability, CharacterDraft draft)
=> Sources(ability, draft).Sum(s => s.Value);