测试
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using Continentis.MainGame.Card;
|
||||
using DynamicExpresso;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -45,12 +45,13 @@ namespace SLSFramework.UModAssistance
|
||||
foreach (IModInfo mod in selectedMods)
|
||||
{
|
||||
ModHost host = ModManager.LoadMod(mod);
|
||||
ModManager.RegisterTypesFromMod(host, typeof(RulesCollectionBase));
|
||||
ModManager.RegisterTypesFromMod(host, typeof(CharacterBase));
|
||||
ModManager.RegisterTypesFromMod(host, typeof(CardLogicBase));
|
||||
ModManager.RegisterTypesFromMod(host, typeof(EquipmentBase));
|
||||
ModManager.RegisterTypesFromMod(host,typeof(CardCombatBuffBase));
|
||||
ModManager.RegisterTypesFromMod(host,typeof(CharacterCombatBuffBase));
|
||||
ModManager.RegisterTypesFromMod(host, typeof(RulesCollectionBase));
|
||||
|
||||
|
||||
string manifestName = host.CurrentMod.NameInfo.ModName + "_Manifest";
|
||||
ModManifest manifest = host.Assets.Load<ModManifest>(manifestName);
|
||||
|
||||
Reference in New Issue
Block a user