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

Binary file not shown.

View File

@@ -27,7 +27,7 @@ MonoBehaviour:
baseWeight: 1 baseWeight: 1
variableAttributes: variableAttributes:
dictionaryList: dictionaryList:
- Key: BaseDamage - Key: Damage
Value: 48 Value: 48
index: 0 index: 0
isKeyDuplicated: 0 isKeyDuplicated: 0

View File

@@ -17,13 +17,18 @@ MonoBehaviour:
displayName: Card_Basic_CommonHolyWater_DisplayName displayName: Card_Basic_CommonHolyWater_DisplayName
cardRarity: 10 cardRarity: 10
cardType: 50 cardType: 50
tags: [] tags:
- TargetCount
cardSprite: {fileID: 21300000, guid: aae12ccc5edd96c40b082fba851f3056, type: 3} cardSprite: {fileID: 21300000, guid: aae12ccc5edd96c40b082fba851f3056, type: 3}
functionText: Card_Basic_CommonHolyWater_FunctionText functionText: Card_Basic_CommonHolyWater_FunctionText
cardDescription: $Keyword("Exhaust"), exhaust at most 3 Status or Curse cards. cardDescription: $Keyword("Exhaust"), exhaust at most 3 Status or Curse cards.
baseWeight: 1 baseWeight: 1
variableAttributes: variableAttributes:
dictionaryList: [] dictionaryList:
- Key: TargetCount
Value: 0
index: 0
isKeyDuplicated: 0
dividerPosProp: 0.5 dividerPosProp: 0.5
originalAttributes: originalAttributes:
dictionaryList: [] dictionaryList: []

View File

@@ -17,13 +17,18 @@ MonoBehaviour:
displayName: Card_Basic_HolyWaterPreparation_DisplayName displayName: Card_Basic_HolyWaterPreparation_DisplayName
cardRarity: 20 cardRarity: 20
cardType: 10 cardType: 10
tags: [] tags:
- TargetSelf
cardSprite: {fileID: 21300000, guid: 12363d2684ec21944b784f4708f4f2d4, type: 3} cardSprite: {fileID: 21300000, guid: 12363d2684ec21944b784f4708f4f2d4, type: 3}
functionText: Card_Basic_HolyWaterPreparation_FunctionText functionText: Card_Basic_HolyWaterPreparation_FunctionText
cardDescription: $Keyword("Innate"), create a bottle of Holy Water into team pile. cardDescription: $Keyword("Innate"), create a bottle of Holy Water into team pile.
baseWeight: 1 baseWeight: 1
variableAttributes: variableAttributes:
dictionaryList: [] dictionaryList:
- Key: TargetCount
Value: 0
index: 0
isKeyDuplicated: 0
dividerPosProp: 0.5 dividerPosProp: 0.5
originalAttributes: originalAttributes:
dictionaryList: [] dictionaryList: []
@@ -39,5 +44,6 @@ MonoBehaviour:
upgradeCards: [] upgradeCards: []
customDescriptions: [] customDescriptions: []
prefabRefs: [] prefabRefs: []
derivativeCardDataRefs: [] derivativeCardDataRefs:
- CardData_Basic_HolyWaterPreparation
derivativeCharacterDataRefs: [] derivativeCharacterDataRefs: []

View File

@@ -17,15 +17,14 @@ namespace Continentis.Mods.Basic.Cards
protected override CommandBase PlayEffect(List<CharacterBase> targetList) protected override CommandBase PlayEffect(List<CharacterBase> targetList)
{ {
base.PlayEffect(targetList); CommandGroup mainGroup = TargetListCommandGroup(targetList,
ExecutionMode.Sequential,
CommandGroup mainGroup = TargetListCommandGroup(targetList, ExecutionMode.Sequential, ExecutionMode.Parallel, ExecutionMode.Sequential,
new Cmd_PlayAnimation(user.characterView, "Attack"), new Cmd_PlayAnimation(user.characterView, "Attack"),
new Cmd_ParamFunction<CharacterBase>(0.1f, target => new Cmd_ParamFunction<CharacterBase>(0.1f, target =>
{ {
user.Attack(target, GetFinalDamage(target)); user.Attack(target, GetFinalDamage(target));
Weak buff = new Weak(GetAttribute("WeaknessLayer")); CreateCharacterBuff<Weak>().Apply(target, user, this);
buff.Apply(target, user, this);
})); }));
return mainGroup; return mainGroup;

View File

@@ -16,7 +16,7 @@ namespace Continentis.Mods.Basic.Cards
new Cmd_Function(() => new Cmd_Function(() =>
{ {
CreateCharacterBuff<Buffs.GuardianAura>(GetAttribute("GuardianAuraCount")).Apply(user, user, this); CreateCharacterBuff<Buffs.GuardianAura>(GetAttribute("GuardianAuraCount")).Apply(user, user, this);
})); //对使用者施加沉重状态 }));
return mainGroup; return mainGroup;
} }

View File

@@ -200,6 +200,7 @@ MonoBehaviour:
prefabRefs: [] prefabRefs: []
derivativeCardDataRefs: [] derivativeCardDataRefs: []
derivativeCharacterDataRefs: [] derivativeCharacterDataRefs: []
initialDeckRef: [] initialDeckRef:
- CardData_Basic_HolyWaterPreparation
hudDataRefs: hudDataRefs:
- HUDData_Basic_Default - HUDData_Basic_Default

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, 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, 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))); TextInterpreter.SetFunction("Attribute", new Func<string, bool, bool, string>((name, high, percent) => GetAttribute(card, name, high, percent)));
string descriptionToParse = card.contentSubmodule.originalFunctionText; string descriptionToParse = card.contentSubmodule.originalFunctionText;
string result = DynamicTextInterpreter.Parse(TextInterpreter, descriptionToParse, card.contentSubmodule.keywords, card.contentSubmodule.hintKeywords); string result = DynamicTextInterpreter.Parse(TextInterpreter, descriptionToParse, card.contentSubmodule.keywords, card.contentSubmodule.hintKeywords);

View File

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

View File

@@ -101,7 +101,7 @@ namespace Continentis.MainGame.Card
{ {
cmd.selfContext.context["Target"] = target; cmd.selfContext.context["Target"] = target;
} }
} }//TODO: 变成递归
clone.selfContext.context["Target"] = target; clone.selfContext.context["Target"] = target;
singleGroup.AddCommand(clone); singleGroup.AddCommand(clone);
@@ -268,6 +268,17 @@ namespace Continentis.MainGame.Card
return ModManager.CreateInstance<T>(buffTypeID, parameters); 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 #endregion
} }

View File

@@ -45,12 +45,13 @@ namespace SLSFramework.UModAssistance
foreach (IModInfo mod in selectedMods) foreach (IModInfo mod in selectedMods)
{ {
ModHost host = ModManager.LoadMod(mod); ModHost host = ModManager.LoadMod(mod);
ModManager.RegisterTypesFromMod(host, typeof(RulesCollectionBase));
ModManager.RegisterTypesFromMod(host, typeof(CharacterBase)); ModManager.RegisterTypesFromMod(host, typeof(CharacterBase));
ModManager.RegisterTypesFromMod(host, typeof(CardLogicBase)); ModManager.RegisterTypesFromMod(host, typeof(CardLogicBase));
ModManager.RegisterTypesFromMod(host, typeof(EquipmentBase)); ModManager.RegisterTypesFromMod(host, typeof(EquipmentBase));
ModManager.RegisterTypesFromMod(host,typeof(CardCombatBuffBase)); ModManager.RegisterTypesFromMod(host,typeof(CardCombatBuffBase));
ModManager.RegisterTypesFromMod(host,typeof(CharacterCombatBuffBase)); ModManager.RegisterTypesFromMod(host,typeof(CharacterCombatBuffBase));
ModManager.RegisterTypesFromMod(host, typeof(RulesCollectionBase));
string manifestName = host.CurrentMod.NameInfo.ModName + "_Manifest"; string manifestName = host.CurrentMod.NameInfo.ModName + "_Manifest";
ModManifest manifest = host.Assets.Load<ModManifest>(manifestName); ModManifest manifest = host.Assets.Load<ModManifest>(manifestName);

View File

@@ -1218,15 +1218,17 @@ MonoBehaviour:
- 2c36c9256c17bbb40854ef9b9e4d51c7 - 2c36c9256c17bbb40854ef9b9e4d51c7
- 77d05f054cee3cd4e846d9438a493494 - 77d05f054cee3cd4e846d9438a493494
- eaf827a2a85089d4d81b180bae018be9 - eaf827a2a85089d4d81b180bae018be9
- 9f2945f2bcd61ff499033e790f23a32b - c47182d113862b84bb5ce50653b608f1
- 27fbd8e42b698e54281f2ac2c22f4993 - 3f37d7342fd3cbf4a9b837fca74655cc
- 071013a8f86a78f43a5197bb688ccd3e
- fc239f962589ff84783ed646ef24cacc - fc239f962589ff84783ed646ef24cacc
- 2e43289cea6d582489bad69136ba0d95 - 2e43289cea6d582489bad69136ba0d95
- 9f2945f2bcd61ff499033e790f23a32b
- 071013a8f86a78f43a5197bb688ccd3e
- 27fbd8e42b698e54281f2ac2c22f4993
- b38ed9568d914d0499004e6bd6cf5f28
- c5b4489e88775fb438118ec3868584ac - c5b4489e88775fb438118ec3868584ac
- 9c9a9be108b29494a8af63386bc444d8 - 9c9a9be108b29494a8af63386bc444d8
- 9ed47e1e96df5f547967c0cd8fe3208f - 9ed47e1e96df5f547967c0cd8fe3208f
- b38ed9568d914d0499004e6bd6cf5f28
- 1d9dd2d42c452b242b97716870ce964c - 1d9dd2d42c452b242b97716870ce964c
- 9a4129cdd7011ca46b83d8c17d9f3623 - 9a4129cdd7011ca46b83d8c17d9f3623
- d9fb4f0ba698af64f8fd05e706911c91 - d9fb4f0ba698af64f8fd05e706911c91
@@ -1253,12 +1255,12 @@ MonoBehaviour:
- 454f2361104caef46a6aa0ebbc74a7dd - 454f2361104caef46a6aa0ebbc74a7dd
- 20613f1c30ff5434c968adba59d99bfc - 20613f1c30ff5434c968adba59d99bfc
- 331ae11567674fb48b0174e707328076 - 331ae11567674fb48b0174e707328076
- 360d71d921a1a134ab234b01a9d0a271
- 7dc76381072f8104580bfea2f4228f50
- d7ab017f8e0c27c4f8725e1703be8499 - d7ab017f8e0c27c4f8725e1703be8499
- 7bd8c45b41910fd44bb7a5313d28ebf9 - 7bd8c45b41910fd44bb7a5313d28ebf9
- 99fbe7ae5b18a984887cae2039b86805 - 99fbe7ae5b18a984887cae2039b86805
- 3a342cc1db63a104da3bc2e09ba35be3 - 3a342cc1db63a104da3bc2e09ba35be3
- 360d71d921a1a134ab234b01a9d0a271
- 7dc76381072f8104580bfea2f4228f50
- 3e3f2261e78edf348b87fe951a8f9e66 - 3e3f2261e78edf348b87fe951a8f9e66
- b6560183465e5944ba49e39974faafd4 - b6560183465e5944ba49e39974faafd4
- e539456001f999741ace4b04c2f21133 - e539456001f999741ace4b04c2f21133
@@ -1292,9 +1294,6 @@ MonoBehaviour:
- adb289e448ccb4b4c8d235d74c23596f - adb289e448ccb4b4c8d235d74c23596f
- 719bfdf025ccc7d4bacb7be70a36c53c - 719bfdf025ccc7d4bacb7be70a36c53c
- db9de97b7cf368e4c864e6aabfcf5cb5 - db9de97b7cf368e4c864e6aabfcf5cb5
- 0e04c2750e72374428dd15fbd44fb7de
- c47182d113862b84bb5ce50653b608f1
- 3f37d7342fd3cbf4a9b837fca74655cc
- cc4badfacde2958469aca814be629b69 - cc4badfacde2958469aca814be629b69
- 1bd37941657d9244e8a960643b4d6675 - 1bd37941657d9244e8a960643b4d6675
- e8250e1265d15e54a8bf1ca1e7dd0d89 - e8250e1265d15e54a8bf1ca1e7dd0d89