mirror of
https://github.com/waynebian01/Shigure.git
synced 2026-09-03 07:15:24 +08:00
改进11
This commit is contained in:
@@ -12,6 +12,7 @@ public enum ConditionFieldType
|
||||
public enum ConditionFieldCategory
|
||||
{
|
||||
State,
|
||||
Aura,
|
||||
Spell,
|
||||
DynamicUnit
|
||||
}
|
||||
@@ -67,7 +68,7 @@ public sealed class ConditionFieldCatalog
|
||||
|
||||
foreach (var (key, node) in stateConfig)
|
||||
{
|
||||
if (key is "group" or "spells")
|
||||
if (key is "group" or "spells" or "auras")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -78,6 +79,17 @@ public sealed class ConditionFieldCatalog
|
||||
}
|
||||
}
|
||||
|
||||
if (JsonHelpers.Get(stateConfig, "auras") is JsonObject auras)
|
||||
{
|
||||
foreach (var (auraName, node) in auras)
|
||||
{
|
||||
if (node is JsonObject field && field.ContainsKey("step"))
|
||||
{
|
||||
AddField(fields, seen, $"auras.{auraName}", $"光环: {auraName}", ReadType(field), ConditionFieldCategory.Aura);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (JsonHelpers.Get(stateConfig, "spells") is JsonObject spells)
|
||||
{
|
||||
foreach (var (spellName, node) in spells)
|
||||
|
||||
@@ -1060,6 +1060,16 @@ public static class ModuleConditionEvaluator
|
||||
return state.Spells.TryGetValue(key["spell.".Length..], out var value) ? value : null;
|
||||
}
|
||||
|
||||
if (key.StartsWith("auras.", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return state.Auras.TryGetValue(key["auras.".Length..], out var value) ? value : null;
|
||||
}
|
||||
|
||||
if (key.StartsWith("aura.", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return state.Auras.TryGetValue(key["aura.".Length..], out var value) ? value : null;
|
||||
}
|
||||
|
||||
if (ModuleSpecialActions.IsFailedSpell(key))
|
||||
{
|
||||
return ModuleSpecialActions.GetFailedSpell(state, failedSpells);
|
||||
|
||||
Reference in New Issue
Block a user