This commit is contained in:
SoulliesOfficial
2025-10-26 00:23:50 -04:00
parent bb9aea5f43
commit c3c4a17440
12 changed files with 48 additions and 28 deletions

View File

@@ -38,7 +38,6 @@ namespace Continentis.MainGame
TextInterpreter.SetFunction("Attribute", new Func<string, string>((name) => GetAttribute(card, name, true, false)));
TextInterpreter.SetFunction("Attribute", new Func<string, bool, string>((name, high) => GetAttribute(card, name, high, false)));
TextInterpreter.SetFunction("Attribute", new Func<string, bool, bool, string>((name, high, percent) => GetAttribute(card, name, high, percent)));
string descriptionToParse = card.contentSubmodule.originalFunctionText;
string result = DynamicTextInterpreter.Parse(TextInterpreter, descriptionToParse, card.contentSubmodule.keywords, card.contentSubmodule.hintKeywords);

View File

@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using Continentis.MainGame.Card;
using DynamicExpresso;
using SLSFramework.General;
using UnityEngine;

View File

@@ -101,7 +101,7 @@ namespace Continentis.MainGame.Card
{
cmd.selfContext.context["Target"] = target;
}
}
}//TODO: 变成递归
clone.selfContext.context["Target"] = target;
singleGroup.AddCommand(clone);
@@ -268,6 +268,17 @@ namespace Continentis.MainGame.Card
return ModManager.CreateInstance<T>(buffTypeID, parameters);
}
protected T CreateCharacterBuff<T>(string buffTypeID, params object[] parameters) where T :CharacterCombatBuffBase
{
if (string.IsNullOrEmpty(buffTypeID))
{
Debug.LogError($"Failed to get buff name for type {typeof(T).FullName}");
return null;
}
return ModManager.CreateInstance<T>(buffTypeID, parameters);
}
}
#endregion
}