更新
This commit is contained in:
@@ -33,9 +33,12 @@ namespace Continentis.MainGame
|
||||
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 result = DynamicTextInterpreter.Parse(TextInterpreter, textToInterpret);
|
||||
// 第一阶段:根据卡牌上下文(持有者、目标等)裁剪条件标签块
|
||||
string resolved = CardTextTagResolver.Resolve(card, textToInterpret);
|
||||
|
||||
// 第二阶段:Dynamic Expresso 求值 $Attribute / $Keyword 等表达式
|
||||
string result = DynamicTextInterpreter.Parse(TextInterpreter, resolved);
|
||||
|
||||
Debug.Log($"Interpreted Text: {result}");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user