diff --git a/Server/src/SOR.Admin/Components/Pages/Cards/AbilityBuilder.razor b/Server/src/SOR.Admin/Components/Pages/Cards/AbilityBuilder.razor
index 5ce69eb..ed8cf0d 100644
--- a/Server/src/SOR.Admin/Components/Pages/Cards/AbilityBuilder.razor
+++ b/Server/src/SOR.Admin/Components/Pages/Cards/AbilityBuilder.razor
@@ -257,6 +257,18 @@
+
+
+
+
+
+
+
@@ -409,7 +421,7 @@
private static readonly string[] AbilityTypes = ["Active", "Passive", "Aura", "Triggered"];
private static readonly string[] TargetScopes = ["Hand", "Deck", "Discard", "Battlefield", "Player", "AnyZone"];
private static readonly string[] TargetTypes = ["Unit", "ArchSpirit", "Spirit", "SpiritToken", "Ruin", "Tile", "Card", "Player"];
- private static readonly string[] TargetOwnerships= ["Self", "Owner", "Ally", "Enemy", "Any", "Random", "Target"];
+ private static readonly string[] TargetOwnerships= ["Self", "ExactSelf", "Owner", "Ally", "Enemy", "Any", "Random", "Target"];
private static readonly string[] AffinityValues = [
"Void", "Aether", "Lake", "Hill", "Forest", "Field",
@@ -612,7 +624,8 @@
if (node["Actions"] is JsonArray actions)
foreach (var actionNode in actions.OfType())
{
- var target = actionNode["Target"] as JsonObject;
+ var target = actionNode["Target"] as JsonObject;
+ var firstFilter= (target?["Filters"] as JsonArray)?.OfType().FirstOrDefault();
var act = new ActionDraft
{
Scope = target?["Scope"]?.GetValue() ?? "Battlefield",
@@ -620,6 +633,7 @@
Ownership = target?["Ownership"]?.GetValue() ?? "Enemy",
Count = target?["Count"]?["N"]?.GetValue() ?? 1,
All = target?["Count"]?["All"]?.GetValue() ?? false,
+ FilterType = firstFilter?["$type"]?.GetValue() ?? "",
};
if (actionNode["Conditions"] is JsonArray actionConds)
@@ -854,21 +868,22 @@
var actionsArr = new JsonArray();
foreach (var action in ab.Actions)
{
- var actionNode = new JsonObject
+ var targetNode = new JsonObject
{
- ["Target"] = new JsonObject
+ ["Scope"] = action.Scope,
+ ["Type"] = action.TargetType,
+ ["Ownership"] = action.Ownership,
+ ["Count"] = new JsonObject
{
- ["Scope"] = action.Scope,
- ["Type"] = action.TargetType,
- ["Ownership"] = action.Ownership,
- ["Count"] = new JsonObject
- {
- ["N"] = action.All ? 1 : action.Count,
- ["UpTo"] = false,
- ["All"] = action.All,
- },
+ ["N"] = action.All ? 1 : action.Count,
+ ["UpTo"] = false,
+ ["All"] = action.All,
},
};
+ if (!string.IsNullOrEmpty(action.FilterType))
+ targetNode["Filters"] = new JsonArray(
+ new JsonObject { ["$type"] = action.FilterType });
+ var actionNode = new JsonObject { ["Target"] = targetNode };
if (action.Conditions.Count > 0)
{
@@ -1468,6 +1483,11 @@
public string Ownership { get; set; } = "Enemy";
public int Count { get; set; } = 1;
public bool All { get; set; }
+ ///
+ /// Optional filter type applied to the target pool (single filter, no-param variant).
+ /// "" = no filter. Maps to Target.Filters[0] in the compiled JSON.
+ ///
+ public string FilterType { get; set; } = "";
public List Conditions { get; set; } = new();
public List Effects { get; set; } = new();
}