Fix: remove [JsonPolymorphic] from Effect/Condition/TriggerEvent/Filter base classes

Having both [JsonPolymorphic] on the class AND a custom JsonConverter<T> in options
causes NotSupportedException: the built-in polymorphic resolver tries to configure
alongside the custom converter but requires it to support metadata reads/writes.

Our custom PolymorphicAbilityConverter<T> takes full ownership of polymorphic
dispatch, so [JsonPolymorphic] is redundant. The [JsonDerivedType] attributes
remain — our converter reads them via reflection for the type map; the framework
ignores them without [JsonPolymorphic] present.

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-09 20:37:33 -04:00
co-authored by Claude Happy
parent 51a7f9e8d2
commit bd07c0cdde
4 changed files with 0 additions and 4 deletions
@@ -10,7 +10,6 @@ using SOR.Database.Enums;
/// The default subject is Self (the source unit or ability owner).
/// Override with Subject = "Target" to evaluate against the current action's resolved target.
/// </summary>
[JsonPolymorphic(TypeDiscriminatorPropertyName = "$type")]
// Composite
[JsonDerivedType(typeof(AndCondition), "AND")]
[JsonDerivedType(typeof(OrCondition), "OR")]