diff --git a/Assets/ExportedMods/Basic.umod b/Assets/ExportedMods/Basic.umod index e04bd1a1..d852d11b 100644 --- a/Assets/ExportedMods/Basic.umod +++ b/Assets/ExportedMods/Basic.umod @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:23c89c166440da63d6d12e35785854eedea39348b72b269d77858a8c8e7e1240 -size 475931141 +oid sha256:39d88e90dbb11efee3ca5e4f4a7481bd74f431b18f6db3355d14e58ed3f96e0a +size 475934421 diff --git a/Assets/Mods/Basic/Cards/Data/General/Attack/CardData_Basic_Bludgeon.asset b/Assets/Mods/Basic/Cards/Data/General/Attack/CardData_Basic_Bludgeon.asset index 132b2ecc..c8358c5e 100644 --- a/Assets/Mods/Basic/Cards/Data/General/Attack/CardData_Basic_Bludgeon.asset +++ b/Assets/Mods/Basic/Cards/Data/General/Attack/CardData_Basic_Bludgeon.asset @@ -27,7 +27,7 @@ MonoBehaviour: baseWeight: 1 variableAttributes: dictionaryList: - - Key: BaseDamage + - Key: Damage Value: 48 index: 0 isKeyDuplicated: 0 diff --git a/Assets/Mods/Basic/Cards/Data/General/Item/CardData_Basic_CommomHolyWater.asset b/Assets/Mods/Basic/Cards/Data/General/Item/CardData_Basic_CommomHolyWater.asset index 2ea1202c..78216600 100644 --- a/Assets/Mods/Basic/Cards/Data/General/Item/CardData_Basic_CommomHolyWater.asset +++ b/Assets/Mods/Basic/Cards/Data/General/Item/CardData_Basic_CommomHolyWater.asset @@ -17,13 +17,18 @@ MonoBehaviour: displayName: Card_Basic_CommonHolyWater_DisplayName cardRarity: 10 cardType: 50 - tags: [] + tags: + - TargetCount cardSprite: {fileID: 21300000, guid: aae12ccc5edd96c40b082fba851f3056, type: 3} functionText: Card_Basic_CommonHolyWater_FunctionText cardDescription: $Keyword("Exhaust"), exhaust at most 3 Status or Curse cards. baseWeight: 1 variableAttributes: - dictionaryList: [] + dictionaryList: + - Key: TargetCount + Value: 0 + index: 0 + isKeyDuplicated: 0 dividerPosProp: 0.5 originalAttributes: dictionaryList: [] diff --git a/Assets/Mods/Basic/Cards/Data/General/Skill/CardData_Basic_HolyWaterPreparation.asset b/Assets/Mods/Basic/Cards/Data/General/Skill/CardData_Basic_HolyWaterPreparation.asset index c659ea8f..59437e32 100644 --- a/Assets/Mods/Basic/Cards/Data/General/Skill/CardData_Basic_HolyWaterPreparation.asset +++ b/Assets/Mods/Basic/Cards/Data/General/Skill/CardData_Basic_HolyWaterPreparation.asset @@ -17,13 +17,18 @@ MonoBehaviour: displayName: Card_Basic_HolyWaterPreparation_DisplayName cardRarity: 20 cardType: 10 - tags: [] + tags: + - TargetSelf cardSprite: {fileID: 21300000, guid: 12363d2684ec21944b784f4708f4f2d4, type: 3} functionText: Card_Basic_HolyWaterPreparation_FunctionText cardDescription: $Keyword("Innate"), create a bottle of Holy Water into team pile. baseWeight: 1 variableAttributes: - dictionaryList: [] + dictionaryList: + - Key: TargetCount + Value: 0 + index: 0 + isKeyDuplicated: 0 dividerPosProp: 0.5 originalAttributes: dictionaryList: [] @@ -39,5 +44,6 @@ MonoBehaviour: upgradeCards: [] customDescriptions: [] prefabRefs: [] - derivativeCardDataRefs: [] + derivativeCardDataRefs: + - CardData_Basic_HolyWaterPreparation derivativeCharacterDataRefs: [] diff --git a/Assets/Mods/Basic/Cards/Scripts/General/Bludgeon.cs b/Assets/Mods/Basic/Cards/Scripts/General/Bludgeon.cs index 2d109e5c..75a37240 100644 --- a/Assets/Mods/Basic/Cards/Scripts/General/Bludgeon.cs +++ b/Assets/Mods/Basic/Cards/Scripts/General/Bludgeon.cs @@ -17,15 +17,14 @@ namespace Continentis.Mods.Basic.Cards protected override CommandBase PlayEffect(List targetList) { - base.PlayEffect(targetList); - - CommandGroup mainGroup = TargetListCommandGroup(targetList, ExecutionMode.Sequential, ExecutionMode.Parallel, + CommandGroup mainGroup = TargetListCommandGroup(targetList, + ExecutionMode.Sequential, + ExecutionMode.Sequential, new Cmd_PlayAnimation(user.characterView, "Attack"), new Cmd_ParamFunction(0.1f, target => { user.Attack(target, GetFinalDamage(target)); - Weak buff = new Weak(GetAttribute("WeaknessLayer")); - buff.Apply(target, user, this); + CreateCharacterBuff().Apply(target, user, this); })); return mainGroup; diff --git a/Assets/Mods/Basic/Cards/Scripts/Knight/GuardianAura.cs b/Assets/Mods/Basic/Cards/Scripts/Knight/GuardianAura.cs index 2e5824c6..9767b69a 100644 --- a/Assets/Mods/Basic/Cards/Scripts/Knight/GuardianAura.cs +++ b/Assets/Mods/Basic/Cards/Scripts/Knight/GuardianAura.cs @@ -16,7 +16,7 @@ namespace Continentis.Mods.Basic.Cards new Cmd_Function(() => { CreateCharacterBuff(GetAttribute("GuardianAuraCount")).Apply(user, user, this); - })); //对使用者施加沉重状态 + })); return mainGroup; } diff --git a/Assets/Mods/Basic/Characters/Data/CharacterData_Basic_Mage.asset b/Assets/Mods/Basic/Characters/Data/CharacterData_Basic_Mage.asset index 4abeedab..8ecf6d8c 100644 --- a/Assets/Mods/Basic/Characters/Data/CharacterData_Basic_Mage.asset +++ b/Assets/Mods/Basic/Characters/Data/CharacterData_Basic_Mage.asset @@ -200,6 +200,7 @@ MonoBehaviour: prefabRefs: [] derivativeCardDataRefs: [] derivativeCharacterDataRefs: [] - initialDeckRef: [] + initialDeckRef: + - CardData_Basic_HolyWaterPreparation hudDataRefs: - HUDData_Basic_Default diff --git a/Assets/Scripts/MainGame/Base/Interpreters/CardTextInterpreter.cs b/Assets/Scripts/MainGame/Base/Interpreters/CardTextInterpreter.cs index 4708cb60..b721883f 100644 --- a/Assets/Scripts/MainGame/Base/Interpreters/CardTextInterpreter.cs +++ b/Assets/Scripts/MainGame/Base/Interpreters/CardTextInterpreter.cs @@ -38,7 +38,6 @@ namespace Continentis.MainGame TextInterpreter.SetFunction("Attribute", new Func((name) => GetAttribute(card, name, true, false))); TextInterpreter.SetFunction("Attribute", new Func((name, high) => GetAttribute(card, name, high, false))); TextInterpreter.SetFunction("Attribute", new Func((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); diff --git a/Assets/Scripts/MainGame/Base/Interpreters/DynamicTextInterpreter.cs b/Assets/Scripts/MainGame/Base/Interpreters/DynamicTextInterpreter.cs index 43c6abdb..34f1b99e 100644 --- a/Assets/Scripts/MainGame/Base/Interpreters/DynamicTextInterpreter.cs +++ b/Assets/Scripts/MainGame/Base/Interpreters/DynamicTextInterpreter.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Globalization; -using Continentis.MainGame.Card; using DynamicExpresso; using SLSFramework.General; using UnityEngine; diff --git a/Assets/Scripts/MainGame/Card/CardAssistanceFunctions.cs b/Assets/Scripts/MainGame/Card/CardAssistanceFunctions.cs index d0abdcb5..4a86551b 100644 --- a/Assets/Scripts/MainGame/Card/CardAssistanceFunctions.cs +++ b/Assets/Scripts/MainGame/Card/CardAssistanceFunctions.cs @@ -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(buffTypeID, parameters); } + + protected T CreateCharacterBuff(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(buffTypeID, parameters); + } } #endregion } \ No newline at end of file diff --git a/Assets/Scripts/ScriptExtensions/UModAssistance/ModBrowser.cs b/Assets/Scripts/ScriptExtensions/UModAssistance/ModBrowser.cs index c8b5d3a2..2ec2d511 100644 --- a/Assets/Scripts/ScriptExtensions/UModAssistance/ModBrowser.cs +++ b/Assets/Scripts/ScriptExtensions/UModAssistance/ModBrowser.cs @@ -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(manifestName); diff --git a/Assets/UMod/Resources/Editor/WizardIncludeContent.asset b/Assets/UMod/Resources/Editor/WizardIncludeContent.asset index 4d7d4445..802a246d 100644 --- a/Assets/UMod/Resources/Editor/WizardIncludeContent.asset +++ b/Assets/UMod/Resources/Editor/WizardIncludeContent.asset @@ -1218,15 +1218,17 @@ MonoBehaviour: - 2c36c9256c17bbb40854ef9b9e4d51c7 - 77d05f054cee3cd4e846d9438a493494 - eaf827a2a85089d4d81b180bae018be9 - - 9f2945f2bcd61ff499033e790f23a32b - - 27fbd8e42b698e54281f2ac2c22f4993 - - 071013a8f86a78f43a5197bb688ccd3e + - c47182d113862b84bb5ce50653b608f1 + - 3f37d7342fd3cbf4a9b837fca74655cc - fc239f962589ff84783ed646ef24cacc - 2e43289cea6d582489bad69136ba0d95 + - 9f2945f2bcd61ff499033e790f23a32b + - 071013a8f86a78f43a5197bb688ccd3e + - 27fbd8e42b698e54281f2ac2c22f4993 + - b38ed9568d914d0499004e6bd6cf5f28 - c5b4489e88775fb438118ec3868584ac - 9c9a9be108b29494a8af63386bc444d8 - 9ed47e1e96df5f547967c0cd8fe3208f - - b38ed9568d914d0499004e6bd6cf5f28 - 1d9dd2d42c452b242b97716870ce964c - 9a4129cdd7011ca46b83d8c17d9f3623 - d9fb4f0ba698af64f8fd05e706911c91 @@ -1253,12 +1255,12 @@ MonoBehaviour: - 454f2361104caef46a6aa0ebbc74a7dd - 20613f1c30ff5434c968adba59d99bfc - 331ae11567674fb48b0174e707328076 + - 360d71d921a1a134ab234b01a9d0a271 + - 7dc76381072f8104580bfea2f4228f50 - d7ab017f8e0c27c4f8725e1703be8499 - 7bd8c45b41910fd44bb7a5313d28ebf9 - 99fbe7ae5b18a984887cae2039b86805 - 3a342cc1db63a104da3bc2e09ba35be3 - - 360d71d921a1a134ab234b01a9d0a271 - - 7dc76381072f8104580bfea2f4228f50 - 3e3f2261e78edf348b87fe951a8f9e66 - b6560183465e5944ba49e39974faafd4 - e539456001f999741ace4b04c2f21133 @@ -1292,9 +1294,6 @@ MonoBehaviour: - adb289e448ccb4b4c8d235d74c23596f - 719bfdf025ccc7d4bacb7be70a36c53c - db9de97b7cf368e4c864e6aabfcf5cb5 - - 0e04c2750e72374428dd15fbd44fb7de - - c47182d113862b84bb5ce50653b608f1 - - 3f37d7342fd3cbf4a9b837fca74655cc - cc4badfacde2958469aca814be629b69 - 1bd37941657d9244e8a960643b4d6675 - e8250e1265d15e54a8bf1ca1e7dd0d89