From 46afb4b533114ddd7593883fdeddddb7abb00ee1 Mon Sep 17 00:00:00 2001 From: iisaev Date: Tue, 29 Sep 2026 13:05:41 +0300 Subject: [PATCH] map ui, skill ui, update skills data --- characters/actions.json | 5 ----- characters/actions/physics_attack.json | 21 +++++++++++++-------- characters/actions/physics_defence.json | 23 ++++++++++++++--------- characters/actions/physics_stun.json | 21 +++++++++++++-------- src/StatusEffect/StatusEffectInfo.cs | 1 + src/StatusEffectInfoFactory.cs | 5 +++-- status_effects/status_effects.json | Bin 492 -> 259 bytes 7 files changed, 44 insertions(+), 32 deletions(-) delete mode 100644 characters/actions.json 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 deacc5afd2ea66b1879bdbb1322e1f5db274f146..5a1adbca5e5dbec53a07e9522edbc37261cf8e18 100644 GIT binary patch literal 259 zcmZ9HF$=;l5QX>rig2@#!OczRQUn*>L?oUm&CpnKm!XvYcXNplbUDcTUf#W1mDX_b z;ROc`#Fi61+%Py~*a_;{O_bR!KeS%U6uJ1T(ahsQ9?1}=P=1LO&USJw)HKjJ!suuA z?;yN^9;EfcBbci)#2Q?TSr1fs