Fix: Genus not propagated to CardInstance/FieldCard — breaks passive conditions

DefinitionToInstance and ToFieldCard both omitted copying Genus, so
HasGenusCondition and GenusContainsFilter always evaluated against null
(returning false). All three data-flow gaps are now fixed:
- DefinitionToInstance: def.Genus?.ToList() → CardInstance.Genus
- ToFieldCard:          source.Genus?.ToList() → FieldCard.Genus
- FilterMatches:        GenusContainsFilter now handled (was falling to _ => true)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-03-17 17:29:42 -04:00
co-authored by Claude Happy
parent f60457b716
commit 0f416127b1
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -1011,6 +1011,7 @@ public static class GameEngine
TerramorphaMode = def.TerramorphaMode,
AbilitiesJson = def.AbilitiesJson,
EffectsJson = def.EffectsJson,
Genus = def.Genus?.ToList(),
};
private static void DrawCards(PlayerState player, int count)
@@ -1121,6 +1122,7 @@ public static class GameEngine
TerramorphaMode = source.TerramorphaMode,
AbilitiesJson = source.AbilitiesJson,
EffectsJson = source.EffectsJson,
Genus = source.Genus?.ToList(),
Position = position,
};