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:
@@ -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")]
|
||||
|
||||
Reference in New Issue
Block a user