OnOtherBuffApply/Remove监听
This commit is contained in:
@@ -13,6 +13,7 @@ MonoBehaviour:
|
||||
m_Name: CardData_Basic_BladeOfFear
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Continentis.MainGame.Card.CardData
|
||||
modName: Basic
|
||||
categoryName:
|
||||
className: BladeOfFear
|
||||
displayName: Card_Basic_BladeOfFear_DisplayName
|
||||
cardRarity: 20
|
||||
@@ -42,7 +43,7 @@ MonoBehaviour:
|
||||
Value: 5
|
||||
index: 3
|
||||
isKeyDuplicated: 0
|
||||
- Key: BuffStack
|
||||
- Key: BuffStack_Sharpness
|
||||
Value: 5
|
||||
index: 4
|
||||
isKeyDuplicated: 0
|
||||
|
||||
@@ -13,6 +13,7 @@ MonoBehaviour:
|
||||
m_Name: CardData_Basic_KnifeTrick
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Continentis.MainGame.Card.CardData
|
||||
modName: Basic
|
||||
categoryName:
|
||||
className: KnifeTrick
|
||||
displayName: Card_Basic_KnifeTrick_DisplayName
|
||||
cardRarity: 20
|
||||
@@ -38,7 +39,7 @@ MonoBehaviour:
|
||||
Value: 0
|
||||
index: 2
|
||||
isKeyDuplicated: 0
|
||||
- Key: BuffStack
|
||||
- Key: BuffStack_KnifeTrick
|
||||
Value: 4
|
||||
index: 3
|
||||
isKeyDuplicated: 0
|
||||
|
||||
@@ -13,6 +13,7 @@ MonoBehaviour:
|
||||
m_Name: CardData_Basic_LessRestoration
|
||||
m_EditorClassIdentifier:
|
||||
modName: Basic
|
||||
categoryName: Cleric
|
||||
className: LessRestoration
|
||||
displayName: Card_Basic_LessRestoration_DisplayName
|
||||
cardRarity: 10
|
||||
|
||||
@@ -2,14 +2,38 @@ using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class BladeOfFear : CardLogicBase
|
||||
{
|
||||
protected override void SetUpLogicComponents()
|
||||
{
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
return base.PlayEffect(targetList);
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_ParamFunction<CharacterBase>(0.2f, target =>
|
||||
{
|
||||
user.Attack(target, GetFinalDamage(target));
|
||||
}));
|
||||
mainGroup.AddCommand(new Cmd_Function(() =>
|
||||
{
|
||||
CreateCharacterBuff<Sharpness>(GetAttribute("BuffStack_Sharpness")).Apply(user, user, this);
|
||||
}));
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Arcane();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Commands;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
@@ -9,7 +10,14 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
return base.PlayEffect(targetList);
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential,
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
new Cmd_Function(() =>
|
||||
{
|
||||
CreateCharacterBuff<Buffs.KnifeTrick>(GetAttribute("BuffStack_KnifeTrick")).Apply(user, user, this);
|
||||
}));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
namespace Continentis.Mods.Basic.Cards.Cleric
|
||||
{
|
||||
public class LessRestoration : CardLogicBase
|
||||
{
|
||||
|
||||
@@ -4,10 +4,12 @@ using Continentis.MainGame.Character;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
using SLSFramework.UModAssistance;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Buffs
|
||||
{
|
||||
public class KnifeTrick : CharacterCombatBuffBase, IBuffExtension_IntegerRange
|
||||
public class KnifeTrick : CharacterCombatBuffBase
|
||||
{
|
||||
private bool _canTrigger = false;
|
||||
|
||||
@@ -17,10 +19,21 @@ namespace Continentis.Mods.Basic.Buffs
|
||||
this.contentSubmodule = new ContentSubmodule(this, false)
|
||||
.AddParameterGetter("Stack", () => unitedStackSubmodule.stackAmount.ToString());
|
||||
this.iconSubmodule = new IconSubmodule(this);
|
||||
this.unitedStackSubmodule = new UnitedStackSubmodule(this, stack);
|
||||
this.eventSubmodule = new EventSubmodule(this);
|
||||
|
||||
|
||||
this.eventSubmodule.onOtherBuffRemoved.Add("KnifeTrick_AddSharpness", new PrioritizedAction<BuffBase<CharacterBase>>((buff) =>
|
||||
{
|
||||
if (buff is Sharpness)
|
||||
{
|
||||
Debug.Log("Knife Trick observed Sharpness buff removal, adding new Sharpness buff.");
|
||||
Debug.Log("Stack amount: " + unitedStackSubmodule.stackAmount);
|
||||
CreateCharacterBuff<Sharpness>(unitedStackSubmodule.stackAmount).Apply(attachedCharacter, attachedCharacter);
|
||||
}
|
||||
}));
|
||||
|
||||
//TODO: Event listener for adding/removing buffs
|
||||
|
||||
|
||||
//this.eventSubmodule.onPreAttack.Add("KnifeTrick", new PrioritizedAction<int>((damage) =>
|
||||
//{
|
||||
// if (this.attachedCharacter.combatBuffSubmodule.HasBuff<Sharpness>())
|
||||
@@ -37,8 +50,6 @@ namespace Continentis.Mods.Basic.Buffs
|
||||
// _canTrigger = false;
|
||||
// }
|
||||
//}));
|
||||
|
||||
(this as IBuffExtension_IntegerRange).Initialize(stack);
|
||||
}
|
||||
|
||||
public override bool OnBuffApply(out CharacterCombatBuffBase existingBuff)
|
||||
|
||||
@@ -156,11 +156,11 @@ MonoBehaviour:
|
||||
index: 24
|
||||
isKeyDuplicated: 0
|
||||
- Key: DeckCapacity
|
||||
Value: 10
|
||||
Value: 15
|
||||
index: 25
|
||||
isKeyDuplicated: 0
|
||||
- Key: DrawCardAmountPerAction
|
||||
Value: 10
|
||||
Value: 15
|
||||
index: 26
|
||||
isKeyDuplicated: 0
|
||||
- Key: Awareness
|
||||
@@ -212,5 +212,6 @@ MonoBehaviour:
|
||||
- CardData_Basic_BladeOfFear
|
||||
- CardData_Basic_Backstab
|
||||
- CardData_Basic_FlashTerror
|
||||
- CardData_Basic_Strike
|
||||
hudDataRefs:
|
||||
- HUDData_Basic_Default
|
||||
|
||||
BIN
Assets/Mods/Basic/Sprites/Buffs/BuffIcon_Basic_Default.png
Normal file
BIN
Assets/Mods/Basic/Sprites/Buffs/BuffIcon_Basic_Default.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
143
Assets/Mods/Basic/Sprites/Buffs/BuffIcon_Basic_Default.png.meta
Normal file
143
Assets/Mods/Basic/Sprites/Buffs/BuffIcon_Basic_Default.png.meta
Normal file
@@ -0,0 +1,143 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 268144c5f2d60b345be49a779d58dadf
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1
Assets/Resources/PerformanceTestRunInfo.json
Normal file
1
Assets/Resources/PerformanceTestRunInfo.json
Normal file
@@ -0,0 +1 @@
|
||||
{"TestSuite":"","Date":0,"Player":{"Development":false,"ScreenWidth":0,"ScreenHeight":0,"ScreenRefreshRate":0,"Fullscreen":false,"Vsync":0,"AntiAliasing":0,"Batchmode":false,"RenderThreadingMode":"GraphicsJobs","GpuSkinning":true,"Platform":"","ColorSpace":"","AnisotropicFiltering":"","BlendWeights":"","GraphicsApi":"","ScriptingBackend":"Mono2x","AndroidTargetSdkVersion":"AndroidApiLevelAuto","AndroidBuildSystem":"Gradle","BuildTarget":"StandaloneWindows64","StereoRenderingPath":"MultiPass"},"Hardware":{"OperatingSystem":"","DeviceModel":"","DeviceName":"","ProcessorType":"","ProcessorCount":0,"GraphicsDeviceName":"","SystemMemorySizeMB":0},"Editor":{"Version":"6000.2.6f2","Branch":"6000.2/respin/6000.2.6f2-cc51a95c03","Changeset":"4a4dcaec6541","Date":1758112816},"Dependencies":["com.unity.2d.animation@12.0.2","com.unity.2d.enhancers@1.0.0","com.unity.2d.sprite@1.0.0","com.unity.addressables@2.7.4","com.unity.ai.assistant@1.0.0-pre.12","com.unity.ai.generators@1.0.0-pre.20","com.unity.ai.inference@2.3.0","com.unity.ai.navigation@2.0.9","com.unity.collab-proxy@2.9.3","com.unity.ide.rider@3.0.38","com.unity.ide.visualstudio@2.0.23","com.unity.inputsystem@1.14.2","com.unity.multiplayer.center@1.0.0","com.unity.nuget.newtonsoft-json@3.2.1","com.unity.render-pipelines.universal@17.2.0","com.unity.test-framework@1.6.0","com.unity.timeline@1.8.9","com.unity.toolchain.win-x86_64-linux-x86_64@2.0.10","com.unity.ugui@2.0.0","com.unity.visualscripting@1.9.7","com.xuanxuan.nb.fx@2.0.0","com.unity.modules.accessibility@1.0.0","com.unity.modules.ai@1.0.0","com.unity.modules.androidjni@1.0.0","com.unity.modules.animation@1.0.0","com.unity.modules.assetbundle@1.0.0","com.unity.modules.audio@1.0.0","com.unity.modules.cloth@1.0.0","com.unity.modules.director@1.0.0","com.unity.modules.imageconversion@1.0.0","com.unity.modules.imgui@1.0.0","com.unity.modules.jsonserialize@1.0.0","com.unity.modules.particlesystem@1.0.0","com.unity.modules.physics@1.0.0","com.unity.modules.physics2d@1.0.0","com.unity.modules.screencapture@1.0.0","com.unity.modules.terrain@1.0.0","com.unity.modules.terrainphysics@1.0.0","com.unity.modules.tilemap@1.0.0","com.unity.modules.ui@1.0.0","com.unity.modules.uielements@1.0.0","com.unity.modules.umbra@1.0.0","com.unity.modules.unityanalytics@1.0.0","com.unity.modules.unitywebrequest@1.0.0","com.unity.modules.unitywebrequestassetbundle@1.0.0","com.unity.modules.unitywebrequestaudio@1.0.0","com.unity.modules.unitywebrequesttexture@1.0.0","com.unity.modules.unitywebrequestwww@1.0.0","com.unity.modules.vehicles@1.0.0","com.unity.modules.video@1.0.0","com.unity.modules.vr@1.0.0","com.unity.modules.wind@1.0.0","com.unity.modules.xr@1.0.0","com.unity.modules.subsystems@1.0.0","com.unity.modules.hierarchycore@1.0.0","com.unity.sysroot@2.0.10","com.unity.sysroot.linux-x86_64@2.0.9","com.unity.ext.nunit@2.0.5","com.unity.render-pipelines.core@17.2.0","com.unity.shadergraph@17.2.0","com.unity.render-pipelines.universal-config@17.0.3","com.unity.burst@1.8.24","com.unity.dt.app-ui@1.3.1","com.unity.collections@2.5.7","com.unity.ai.toolkit@1.0.0-pre.20","com.unity.mathematics@1.3.2","com.unity.serialization@3.1.2","com.unity.profiling.core@1.0.2","com.unity.scriptablebuildpipeline@2.4.3","com.unity.2d.common@11.0.1","com.unity.settings-manager@2.1.0","com.unity.searcher@4.9.3","com.unity.rendering.light-transport@1.0.1","com.unity.nuget.mono-cecil@1.11.5","com.unity.test-framework.performance@3.1.0"],"Results":[]}
|
||||
7
Assets/Resources/PerformanceTestRunInfo.json.meta
Normal file
7
Assets/Resources/PerformanceTestRunInfo.json.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e03da9657c4bbd4499490b3c689b73b0
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1
Assets/Resources/PerformanceTestRunSettings.json
Normal file
1
Assets/Resources/PerformanceTestRunSettings.json
Normal file
@@ -0,0 +1 @@
|
||||
{"MeasurementCount":-1}
|
||||
7
Assets/Resources/PerformanceTestRunSettings.json.meta
Normal file
7
Assets/Resources/PerformanceTestRunSettings.json.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 03cdb179703a09c4888dd569a5974d90
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -8,7 +8,6 @@
|
||||
"GUID:8d9e84799a3968d4ba38c55892d14093",
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||
"GUID:cf414061cae3a954baf92763590f3127",
|
||||
"GUID:84651a3751eca9349aac36a66bba901b",
|
||||
"GUID:6463cfac4956c284ba7542bd246502cc",
|
||||
"GUID:21b0c8d1703a94250bfac916590cea4f",
|
||||
"GUID:776d03a35f1b52c4a9aed9f56d7b4229",
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace Continentis.MainGame
|
||||
|
||||
public class ContentSubmodule : BuffSubmodule
|
||||
{
|
||||
public string modClassName;
|
||||
public string displayName;
|
||||
public string originalFunctionText;
|
||||
public string interpretedFunctionText;
|
||||
@@ -38,7 +39,7 @@ namespace Continentis.MainGame
|
||||
/// <param name="willLocalizeFuncText">是否本地化功能描述文本,默认为true,设为false说明此Buff具有不止一条本地化文本,需要切换。</param>
|
||||
public ContentSubmodule(BuffBase<T> buff, bool willLocalizeFuncText = true) : base(buff)
|
||||
{
|
||||
string modClassName = ModManager.GetModClassName(buff.GetType());
|
||||
modClassName = ModManager.GetModClassName(buff.GetType());
|
||||
this.displayName = ("Buff_" + modClassName + "_DisplayName").Localize();
|
||||
|
||||
if (willLocalizeFuncText)
|
||||
@@ -90,7 +91,17 @@ namespace Continentis.MainGame
|
||||
this.iconID = iconID;
|
||||
}
|
||||
|
||||
this.icon = SpriteExtension.Create(ModManager.GetAsset<Texture2D>(this.iconID));
|
||||
Texture2D tex = ModManager.GetAsset<Texture2D>(this.iconID);
|
||||
|
||||
if (tex != null)
|
||||
{
|
||||
this.icon = SpriteExtension.Create(tex);
|
||||
}
|
||||
else
|
||||
{
|
||||
Texture2D defaultTex = ModManager.GetAsset<Texture2D>("BuffIcon_Basic_Default");
|
||||
this.icon = SpriteExtension.Create(defaultTex);
|
||||
}
|
||||
|
||||
if (buff.contentSubmodule != null)
|
||||
{
|
||||
@@ -125,6 +136,10 @@ namespace Continentis.MainGame
|
||||
|
||||
public OrderedDictionary<string, PrioritizedAction> onActionStart; //每次行动开始时
|
||||
public OrderedDictionary<string, PrioritizedAction> onActionEnd; //每次行动结束时
|
||||
|
||||
public OrderedDictionary<string, PrioritizedAction<BuffBase<T>>> onOtherBuffApplied; //Buff被添加时,参数为被添加的Buff实例
|
||||
public OrderedDictionary<string, PrioritizedAction<BuffBase<T>>> onOtherBuffFirstApplied; //Buff被新添加时,参数为被添加的Buff实例
|
||||
public OrderedDictionary<string, PrioritizedAction<BuffBase<T>>> onOtherBuffRemoved; //Buff被移除时,参数为被移除的Buff实例
|
||||
|
||||
public OrderedDictionary<string, PrioritizedAction<CharacterBase, IntendedCard, CharacterBase>> onOpponentDecideAction; //对手AI决定行动时,参数为对手,和原定的目标角色
|
||||
|
||||
@@ -148,6 +163,10 @@ namespace Continentis.MainGame
|
||||
onActionStart = new OrderedDictionary<string, PrioritizedAction>();
|
||||
onActionEnd = new OrderedDictionary<string, PrioritizedAction>();
|
||||
|
||||
onOtherBuffApplied = new OrderedDictionary<string, PrioritizedAction<BuffBase<T>>>();
|
||||
onOtherBuffFirstApplied = new OrderedDictionary<string, PrioritizedAction<BuffBase<T>>>();
|
||||
onOtherBuffRemoved = new OrderedDictionary<string, PrioritizedAction<BuffBase<T>>>();
|
||||
|
||||
onDealAttack = new OrderedDictionary<string, PrioritizedAction<AttackResult>>();
|
||||
onGetAttacked = new OrderedDictionary<string, PrioritizedAction<AttackResult>>();
|
||||
onOpponentDecideAction = new OrderedDictionary<string, PrioritizedAction<CharacterBase, IntendedCard, CharacterBase>>();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Linq;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.MainGame.Card
|
||||
@@ -32,6 +33,7 @@ namespace Continentis.MainGame.Card
|
||||
|
||||
public override void OnBuffRemove()
|
||||
{
|
||||
//attachedCard.combatBuffSubmodule.buffList.For(buff => buff.eventSubmodule.onOtherBuffRemoved.Invoke(this));
|
||||
attributeSubmodule?.RefreshAllModifiedAttributes();
|
||||
}
|
||||
|
||||
@@ -94,7 +96,8 @@ namespace Continentis.MainGame.Card
|
||||
public override void Remove()
|
||||
{
|
||||
OnBuffRemove();
|
||||
this.attachedCard.combatBuffSubmodule.buffList.Remove(this);
|
||||
attachedCard.combatBuffSubmodule.buffList.Remove(this);
|
||||
//attachedCard.combatBuffSubmodule.buffList.Exclude(this).For(buff => buff.eventSubmodule?.onOtherBuffRemoved.Invoke(this));
|
||||
}
|
||||
|
||||
public override void UntriggerRemove()
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Continentis.MainGame.Card
|
||||
/// </summary>
|
||||
public static CardLogicBase GenerateCardLogic(CardData data)
|
||||
{
|
||||
string typeID = ModManager.GetTypeID(data.modName, "Cards", data.className);
|
||||
string typeID = ModManager.GetTypeID(data.modName, "Cards", data.categoryName, data.className);
|
||||
Type logicType = ModManager.GetType(typeID);
|
||||
|
||||
if(logicType == null)
|
||||
|
||||
@@ -46,6 +46,7 @@ namespace Continentis.MainGame.Character
|
||||
public override void OnAfterFirstApply()
|
||||
{
|
||||
statusSubmodule?.AddStatus();
|
||||
attachedCharacter.combatBuffSubmodule.buffList.Exclude(this).For(buff => buff.eventSubmodule?.onOtherBuffFirstApplied.Invoke(this));
|
||||
}
|
||||
|
||||
public override void OnBuffRemove()
|
||||
@@ -90,7 +91,8 @@ namespace Continentis.MainGame.Character
|
||||
{
|
||||
existingBuff.iconSubmodule?.Update();
|
||||
}
|
||||
|
||||
|
||||
attachedCharacter.combatBuffSubmodule.buffList.Exclude(this).For(buff => buff.eventSubmodule?.onOtherBuffApplied.Invoke(this));
|
||||
RefreshAttributes();
|
||||
iconSubmodule?.Update();
|
||||
attachedCharacter.deckSubmodule.GetAllCards().ForEach(card => card.cardLogic.RefreshCardAttributes());
|
||||
@@ -101,6 +103,7 @@ namespace Continentis.MainGame.Character
|
||||
OnBuffRemove();
|
||||
this.attachedCharacter.combatBuffSubmodule.buffList.Remove(this);
|
||||
attachedCharacter.deckSubmodule.GetAllCards().ForEach(card => card.cardLogic.RefreshCardAttributes());
|
||||
attachedCharacter.combatBuffSubmodule.buffList.Exclude(this).For(buff => buff.eventSubmodule?.onOtherBuffRemoved.Invoke(this));
|
||||
}
|
||||
|
||||
public override void UntriggerRemove()
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace Continentis.MainGame.Equipment
|
||||
|
||||
if (data.haveCustomClass)
|
||||
{
|
||||
typeID = ModManager.GetTypeID(data.modName, "Equipments", data.className);
|
||||
typeID = ModManager.GetTypeID(data.modName, "Equipments", "", data.className);
|
||||
logicType = ModManager.GetType(typeID);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "StorySystemEditor",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:d1e9096bb63948544a42da8fa8cc647d"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42222c69a0f89ff43a1c0018c677ad97
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -3,9 +3,7 @@ using UnityEngine;
|
||||
namespace SLSFramework.StorySystem
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor.Experimental.GraphView;
|
||||
|
||||
// 节点连接的数据结构
|
||||
[Serializable]
|
||||
|
||||
@@ -8,7 +8,6 @@ using SLSFramework.General;
|
||||
using UMod;
|
||||
using UMod.Scripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.ResourceManagement.Exceptions;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace SLSFramework.UModAssistance
|
||||
@@ -34,7 +33,7 @@ namespace SLSFramework.UModAssistance
|
||||
}
|
||||
if (!host.IsSuccessful)
|
||||
{
|
||||
throw new OperationException($"Failed to load mod '{modName}'");
|
||||
throw new Exception($"Failed to load mod '{modName}' asynchronously");
|
||||
}
|
||||
LoadedMods.Add(modName, host.Result);
|
||||
Debug.Log($"Mod '{modName}' async loaded successfully.");
|
||||
@@ -156,9 +155,14 @@ namespace SLSFramework.UModAssistance
|
||||
return type.Namespace!.Replace("Continentis.Mods.", "") + "." + type.Name;
|
||||
}
|
||||
|
||||
public static string GetTypeID(string modName, string classification, string className)
|
||||
public static string GetTypeID(string modName, string classification, string category, string className)
|
||||
{
|
||||
return $"{modName}.{classification}.{className}";
|
||||
if (string.IsNullOrEmpty(category))
|
||||
{
|
||||
return $"{modName}.{classification}.{className}";
|
||||
}
|
||||
|
||||
return $"{modName}.{classification}.{category}.{className}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1216,12 +1216,17 @@ MonoBehaviour:
|
||||
- 2493deaccf35b0542800b0851771e665
|
||||
- bf1175d5dd9b5904d898eb4c9dd7e0c5
|
||||
- 2c36c9256c17bbb40854ef9b9e4d51c7
|
||||
- ee275fdb380b05f409adf47a9811f2d8
|
||||
- 77d05f054cee3cd4e846d9438a493494
|
||||
- eaf827a2a85089d4d81b180bae018be9
|
||||
- c7cc23cb9dea5f94187db2e14ce646af
|
||||
- f764ba86ad36ace4f97961d6765b6710
|
||||
- ef10462731b5127408af93915f8671e9
|
||||
- c47182d113862b84bb5ce50653b608f1
|
||||
- 3f37d7342fd3cbf4a9b837fca74655cc
|
||||
- fc239f962589ff84783ed646ef24cacc
|
||||
- 2e43289cea6d582489bad69136ba0d95
|
||||
- 2bff3d4a9372dc6408419c254d757aac
|
||||
- 9f2945f2bcd61ff499033e790f23a32b
|
||||
- 071013a8f86a78f43a5197bb688ccd3e
|
||||
- 27fbd8e42b698e54281f2ac2c22f4993
|
||||
@@ -1243,6 +1248,7 @@ MonoBehaviour:
|
||||
- 6aebfc684dac1d94b976add41d8e3692
|
||||
- cadd83d7ee1ab0849837fa385d7b9d6a
|
||||
- d9af8ea1600887d498ff2b813a9aaef8
|
||||
- 5352b6ab2496aa34e82a2182052d556c
|
||||
- dabb071442d893140add1d5830e8ae97
|
||||
- 161073cf460872a44ae766048fc30396
|
||||
- 47fa0e9cd39bb2a4f9fe6a7f7ccbae52
|
||||
@@ -1285,8 +1291,11 @@ MonoBehaviour:
|
||||
- 3bd839a6473c8c6408fe8ce537e3b959
|
||||
- d56a2cba928008540a5a712fdce6ca97
|
||||
- c3494c2c9122f0f4f80ea09b3e0e8ebf
|
||||
- d73f4e5ad304b1b4e9145ad53fed247f
|
||||
- 26c0d8a495e1dfd40ace5bd180a5ca36
|
||||
- 7f46a9d663df24a4cb185ee33ef528e6
|
||||
- d05922de2e27fda44bcaac4a00b454d9
|
||||
- 11580fee6c93e4445b768eb40c5780bb
|
||||
- 8c50de6c4398f87468fa40648e4bce32
|
||||
- 5e686642b2d76df4e9743809c06add07
|
||||
- fbb9c1dee26cf9743ad154a9e4c1c66a
|
||||
@@ -1315,6 +1324,7 @@ MonoBehaviour:
|
||||
- b22640136e4dd8446b73b22dd6f096af
|
||||
- 5f327f55a4d33694c9e0ea3660c80022
|
||||
- 4a47d4d206ab20b498e21a0a3234da4f
|
||||
- f997d4e8f500b944eb3cbb0f5c4ac7c5
|
||||
- e3b7e950dce0834498aeada85170508e
|
||||
- 8e767399f11808748822d0a4b3dffe39
|
||||
- 16646105431f90f43917454baedd59fd
|
||||
@@ -1336,6 +1346,8 @@ MonoBehaviour:
|
||||
- a1ea0841f8c6c834fb83f219b6db3981
|
||||
- e3909022df3d89944b9a57cb7fe261c7
|
||||
- 65e72b5f0f54fbe4cb9bb40c785085d5
|
||||
- 634ae9a7ace35674aac295f34a73f088
|
||||
- afb8fcbb8d897e449a135120c7516dbd
|
||||
- cb06c00119a425645be08799bd97c377
|
||||
- cf83d22138b5b29449dd0334aff4a3f0
|
||||
- 120104451e143f74b82c3d8c9046fcb4
|
||||
@@ -1346,16 +1358,40 @@ MonoBehaviour:
|
||||
- 25d431de73c653d42a6950339d22aa16
|
||||
- c2791d3b316c2614394010404ee2ccc4
|
||||
- d4a739f10fb7d8d49a75be3de4f95ac8
|
||||
- 84b1c40e60420ad47b31aef43bc98901
|
||||
- 3651f5e91140cb944b2ee602da6e5c48
|
||||
- 69d5cc5c03690434ebfd1473226fe410
|
||||
- 4315a0d9d4589a243b33d79da55b47a9
|
||||
- a3531403c3553ec4e9db865958d48ef4
|
||||
- fd4a697d946242343a065437c29f0cf2
|
||||
- 81bebd0fa57793c4bbe5369f3205e71b
|
||||
- cfc79d04c0439624b848efbb0e52b465
|
||||
- 4351450027391954e85fea86db758c08
|
||||
- 08185d6eb814648ce9cdfca048e1611b
|
||||
- af44f85b3a51e40cb8b1285fb308b2a7
|
||||
- 36996041f1dde6b46942025e4519df17
|
||||
- 89062ba4c7f90314c86ed9cedb4053cf
|
||||
- 95a4ba99bc298c74283b008b8b25b8bd
|
||||
- e82960b057418454eab7e7eefcc71a14
|
||||
- baf926c674d6ea842b99cda704461ee2
|
||||
- d3bf9fbf0029def4bbb8ce1e1ed0628c
|
||||
- 2ada5daa7b9068f4c98c9af0655aef6d
|
||||
- 57749720ca7b80e479d90181d6499476
|
||||
- 4cde0007c641b2c4a80b7642ae55ff73
|
||||
- f39fd5f93076c404ab92b10fe4c9b46f
|
||||
- d1de4576f57992f4abdbf42cf5d93a5d
|
||||
- edb12263f493f38458ff5b9fbdca659f
|
||||
- f694b29c3d1202a4cba7f81a0e308b48
|
||||
- 7958263785c327641b684242ce2f8c9a
|
||||
- 5b3352bb0a4563d4f8778594a486a3c9
|
||||
- e6c66e8ba85e73f4e913053be3226ca9
|
||||
- a58101ba7d997824d889bd04baf1c18c
|
||||
- 9a36a4bb7be9da947beb608206dc240f
|
||||
- 77b3f3b496104dc4d887f70412d2f57f
|
||||
- 95633a09783e9ad47a4980934e8af4d0
|
||||
- c87462c2ff921fb4e9e5f52ab691a665
|
||||
- c8533bcb32514564d98e8c49f29b13ea
|
||||
- 88df947440cfd3841b8e5a545437b253
|
||||
- 0cc91a8081a9a9f44ab0df9fe725a089
|
||||
- 222420d8b6807ad458d012a439512436
|
||||
- f0ea9bf78368bff43b7f5145f22492c3
|
||||
|
||||
@@ -27,8 +27,8 @@ MonoBehaviour:
|
||||
modAuthor: Soullies
|
||||
modVersion: 0.0.1
|
||||
modDescription: Basic Content of Continentis
|
||||
modAssetPath: X:/Projects/Unity/Others/Soulies_Cards/Assets/Mods/Basic
|
||||
modExportPath: X:\Projects\Unity\Others\Soulies_Cards\Assets\ExportedMods
|
||||
modAssetPath: D:/Projects/Continentis/Assets/Mods/Basic
|
||||
modExportPath: D:/Projects/Continentis/Assets/ExportedMods
|
||||
modIcon: {fileID: 2800000, guid: f6735e582463aa3409372b4c7689192c, type: 3}
|
||||
logLevel: 3
|
||||
optimizeMode: 0
|
||||
|
||||
@@ -145,6 +145,7 @@ PlayerSettings:
|
||||
bundleVersion: 0.1.0
|
||||
preloadedAssets:
|
||||
- {fileID: 0}
|
||||
- {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
metroInputSource: 0
|
||||
wsaTransparentSwapchain: 0
|
||||
m_HolographicPauseOnTrackingLoss: 1
|
||||
|
||||
Reference in New Issue
Block a user