diff --git a/characters/actions.json b/characters/actions.json deleted file mode 100644 index fc7f09a..0000000 --- a/characters/actions.json +++ /dev/null @@ -1,5 +0,0 @@ -{ "Items": [ - ${actions/physics_attack}, - ${actions/physics_defence}, - ${actions/physics_stun} -]} \ No newline at end of file diff --git a/characters/actions/physics_attack.json b/characters/actions/physics_attack.json index 6f061fe..5476359 100644 --- a/characters/actions/physics_attack.json +++ b/characters/actions/physics_attack.json @@ -1,12 +1,17 @@ { - "Id": "physics/attack", - "Name": "characters/action/physics_attack/name", - "Description": "characters/action/physics_attack/description", - "Image": "characters/actions/physics_attack", - "Type": "ToEnemy", - "Values": [ + "Kind": "action", + "Items": [ + { + "Id": "physics/attack", + "Name": "characters/action/physics_attack/name", + "Description": "characters/action/physics_attack/description", + "Image": "characters/actions/physics_attack", + "Type": "ToEnemy", + "Values": [ "RequiredPoint=1", "Attack=1.0", "AttackType=Physics" - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/characters/actions/physics_defence.json b/characters/actions/physics_defence.json index 7465c31..1c59f98 100644 --- a/characters/actions/physics_defence.json +++ b/characters/actions/physics_defence.json @@ -1,11 +1,16 @@ { - "Id": "physics/defence", - "Name": "characters/action/defence/name", - "Description": "characters/action/defence/description", - "Image": "characters/actions/physics_defence", - "Type": "ToAlias", - "Values": [ + "Kind": "action", + "Items": [ + { + "Id": "physics/defence", + "Name": "characters/action/defence/name", + "Description": "characters/action/defence/description", + "Image": "characters/actions/physics_defence", + "Type": "ToAlias", + "Values": [ "RequiredPoint=1", - "Defence=4" - ] -} \ No newline at end of file + "Defence=4" + ] + } + ] +} diff --git a/characters/actions/physics_stun.json b/characters/actions/physics_stun.json index ecff35d..a7fc388 100644 --- a/characters/actions/physics_stun.json +++ b/characters/actions/physics_stun.json @@ -1,12 +1,17 @@ { - "Id": "physics/stun", - "Name": "characters/action/stun/name", - "Description": "characters/action/stun/description", - "Image": "characters/actions/physics_stun", - "Type": "ToEnemy", - "Values": [ + "Kind": "action", + "Items": [ + { + "Id": "physics/stun", + "Name": "characters/action/stun/name", + "Description": "characters/action/stun/description", + "Image": "characters/actions/physics_stun", + "Type": "ToEnemy", + "Values": [ "RequiredPoint=2", "AttackType=Physics", "Turn=3" - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/src/StatusEffect/StatusEffectInfo.cs b/src/StatusEffect/StatusEffectInfo.cs index eb0decb..ce022cf 100644 --- a/src/StatusEffect/StatusEffectInfo.cs +++ b/src/StatusEffect/StatusEffectInfo.cs @@ -12,6 +12,7 @@ namespace Cthangover.Core.Cards.StatusEffect /// Implements IIdentifiable so it works with PrefabFactory caching. /// [System.Serializable] + [EntityKind("status_effect")] public class StatusEffectInfo : IIdentifiable { /// Unique effect identifier used as the factory key. diff --git a/src/StatusEffectInfoFactory.cs b/src/StatusEffectInfoFactory.cs index cc39a60..cbc59ad 100644 --- a/src/StatusEffectInfoFactory.cs +++ b/src/StatusEffectInfoFactory.cs @@ -8,12 +8,13 @@ namespace Cthangover.Core.Factories.Impls /// behaviour, visual icon, etc. Works in tandem with /// StatusEffectActionFactory: this factory provides the data /// (what the effect is), while the action factory provides the - /// behaviour (what the effect does each turn). + /// behaviour (what the effect does each turn). Files are discovered + /// by the shared entity resolver through the DTO's + /// [EntityKind("status_effect")] attribute. /// public class StatusEffectInfoFactory : FileFactory { private static readonly Lazy lazy = new(() => new StatusEffectInfoFactory()); public static StatusEffectInfoFactory Instance => lazy.Value; - public override string GroupName => "status_effects"; } } diff --git a/status_effects/status_effects.json b/status_effects/status_effects.json index deacc5a..5a1adbc 100644 Binary files a/status_effects/status_effects.json and b/status_effects/status_effects.json differ