feat(Card): 卡牌基本框架,尚未测试

This commit is contained in:
2025-10-14 14:10:20 +08:00
parent eba8d5792d
commit 9536e1b1c8
16 changed files with 246 additions and 58 deletions

View File

@@ -0,0 +1,33 @@
using UnityEngine;
namespace Card
{
public static class EffectHandler
{
public static void Execute(EffectData effect, CardContext context)
{
switch (effect.type)
{
case EffectType.Damage:
context.Target.TakeDamage(effect.value);
break;
case EffectType.Heal:
context.Target.Heal(effect.value);
break;
case EffectType.DrawCard:
context.Player.Draw(effect.value);
break;
case EffectType.AddBuff:
//TODO:context.Target.AddBuff(effect.value);
break;
default:
Debug.LogWarning($"未知效果类型: {effect.type}");
break;
}
}
}
}