diff --git a/SVSim.BattleEngine/COPIED.manifest.tsv b/SVSim.BattleEngine/COPIED.manifest.tsv index b0efd46..285d1ac 100644 --- a/SVSim.BattleEngine/COPIED.manifest.tsv +++ b/SVSim.BattleEngine/COPIED.manifest.tsv @@ -164,6 +164,7 @@ Cute.Payment/StringExtensions.cs Cute.Payment/StringExtensions.cs 3d0f43fd0995ee Cute.Payment\IPaymentCommonCallback.cs Cute.Payment\IPaymentCommonCallback.cs 21466450f2d87e33a5d8e8d681832bb230cc75547384d5cd69120e439235ebdf 0 Cute/EventExtension.cs Cute/EventExtension.cs abe1b8be9d01d8ad88901cdccf387563ae14282dd4e02b3fc1e1e7a872526f0c 0 Cute/IEnumerableExtensions.cs Cute/IEnumerableExtensions.cs 6238351f85ebcc14e0cebfd1c1cc57162baf997d9e1b8de25a4316a41c9ff74b 0 +Cute/ListExtensions.cs Cute/ListExtensions.cs c468ed8de843ce7b032408876459a643497efba94450c861146c6b6b2b2c6101 0 Cute\AchievementManager.cs Cute\AchievementManager.cs ef74efb238feff1a14f3bc70c612b4faab3e5546612c2b21324998ae72d37091 0 Cute\AdjustManager.cs Cute\AdjustManager.cs 670477cb0f0b5e7d8c4940a6b826a57c037b8392a58caf242a0219160461c485 0 Cute\AssetBundleObject.cs Cute\AssetBundleObject.cs 8bb313efedc9c4ceea5ecc22768952299393dfa30e532c9d411e48f622929d2e 0 diff --git a/SVSim.BattleEngine/Engine/Cute/ListExtensions.cs b/SVSim.BattleEngine/Engine/Cute/ListExtensions.cs new file mode 100644 index 0000000..21b3a1c --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/ListExtensions.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace Cute; + +public static class ListExtensions +{ + public static void FisherYatesShuffle(this List listToShuffle) + { + for (int num = listToShuffle.Count - 1; num > 0; num--) + { + int index = Random.Range(0, num + 1); + T value = listToShuffle[index]; + listToShuffle[index] = listToShuffle[num]; + listToShuffle[num] = value; + } + } +} diff --git a/SVSim.BattleEngine/Shim/GodObjects/ClosureStubs.cs b/SVSim.BattleEngine/Shim/GodObjects/ClosureStubs.cs index 405ceba..bc9d171 100644 --- a/SVSim.BattleEngine/Shim/GodObjects/ClosureStubs.cs +++ b/SVSim.BattleEngine/Shim/GodObjects/ClosureStubs.cs @@ -53,7 +53,7 @@ namespace Wizard.Battle.UI namespace Wizard.UI.ReportToManagement { - public partial class DialogReportToManagement { } + public partial class DialogReportToManagement { public static DialogBase Create(long battleId = -1L) => default!; } } namespace Wizard.Dialog.Setting diff --git a/SVSim.BattleEngine/Shim/GodObjects/GodObjects.cs b/SVSim.BattleEngine/Shim/GodObjects/GodObjects.cs index 0cf0208..bcb3974 100644 --- a/SVSim.BattleEngine/Shim/GodObjects/GodObjects.cs +++ b/SVSim.BattleEngine/Shim/GodObjects/GodObjects.cs @@ -74,7 +74,7 @@ public class EffectMgr public static TargetType ToStrTargetType(string str) => TargetType.NONE; } -public partial class GameObjMgr { } +public partial class GameObjMgr { public GameObjMgr() { } } public class GameMgr { diff --git a/SVSim.BattleEngine/Shim/View/SettingsUiStubs.cs b/SVSim.BattleEngine/Shim/View/SettingsUiStubs.cs index a361e68..eae52b5 100644 --- a/SVSim.BattleEngine/Shim/View/SettingsUiStubs.cs +++ b/SVSim.BattleEngine/Shim/View/SettingsUiStubs.cs @@ -61,7 +61,7 @@ namespace Wizard.Battle.View.Vfx public abstract void RegisterOpeningVfx(ClassBattleCardBase playerClass, ClassBattleCardBase enemyClass); public static string OpenningLogStep = ""; - public static VfxBase ShowBattleUIImmediatelyVfx(BattlePlayerBase battlePlayerBase, bool fixDirection = false, bool isNewReplay = false, bool isBanmenkun = false) => NullVfx.Create(); + public static VfxBase ShowBattleUIImmediatelyVfx(BattlePlayerBase battlePlayerBase, bool fixDirection = false, bool isNewReplay = false, bool isBanmenkun = false) => NullVfx.GetInstance(); public class WaitVoiceEndVfx : VfxBase { } public class OpeningShowCharacterPanelVfx : SequentialVfxPlayer { } diff --git a/SVSim.BattleEngine/Shim/View/TouchProcessorIfaces.cs b/SVSim.BattleEngine/Shim/View/TouchProcessorIfaces.cs index bd5440c..0458919 100644 --- a/SVSim.BattleEngine/Shim/View/TouchProcessorIfaces.cs +++ b/SVSim.BattleEngine/Shim/View/TouchProcessorIfaces.cs @@ -25,6 +25,7 @@ namespace Wizard.Battle.Touch // Empty hand stubs: supply the four ITouchProcessor members as no-ops. public partial class SkillTargetSelectTouchProcessor : ITouchProcessor { + public static SkillTargetSelectTouchProcessor Create(BattleManagerBase battleMgr, BattleCardBase actCard, List selectSkills, Prediction prediction, List selectCards, bool isEvolve, bool isChoiceBrave, BattleCardBase transformCard = null, Action onCompleteLastProcess = null, Action onCancelLastProcess = null) => default!; public VfxBase Start() => NullVfx.GetInstance(); public VfxBase Update(float dt, Camera camera) => NullVfx.GetInstance(); public VfxWith End() => default!; diff --git a/SVSim.BattleEngine/Shim/View/VfxShim.cs b/SVSim.BattleEngine/Shim/View/VfxShim.cs index 9f4023f..7fa2aea 100644 --- a/SVSim.BattleEngine/Shim/View/VfxShim.cs +++ b/SVSim.BattleEngine/Shim/View/VfxShim.cs @@ -56,6 +56,7 @@ namespace Wizard.Battle.View.Vfx { var p = new SequentialVfxPlayer(); if (vfxCollection != null) p._children.AddRange(vfxCollection); return p; } public void Register(VfxBase vfx) { if (vfx != null) _children.Add(vfx); } public int Count() => _children.Count; + public List GetAllVfxAsList() => new List(_children); public override bool IsVfxNonEmpty() { foreach (var c in _children) { if (c != null && c.IsVfxNonEmpty()) return true; } @@ -70,6 +71,7 @@ namespace Wizard.Battle.View.Vfx { var p = new ParallelVfxPlayer(); if (vfxCollection != null) p._children.AddRange(vfxCollection); return p; } public static ParallelVfxPlayer Create(params VfxBase[] vfxCollection) { var p = new ParallelVfxPlayer(); if (vfxCollection != null) p._children.AddRange(vfxCollection); return p; } + public List GetVfxList() => new List(_children); } public class VfxWithLoading : SequentialVfxPlayer @@ -115,6 +117,10 @@ namespace Wizard.Battle.View.Vfx public VfxWith(VfxBase vfx, T1 value1, T2 value2) { Vfx = vfx; Value_1 = value1; Value_2 = value2; } } + // m1_stub_gen drops `event` decls (session-6 gap) — re-add StartSkillSelectVfx.OnStart + // that its generated stub lost. Re-check this if CS1061 on an event name recurs. + public partial class StartSkillSelectVfx { public event System.Action OnStart; } + public class EvolveVfxBase : VfxBase { } public partial class CanNotTouchCardVfx : VfxBase { } @@ -133,6 +139,7 @@ namespace Wizard.Battle.View.Vfx public virtual void RegisterSequentialVfx(T vfx) where T : VfxBase { } public Queue GetSequentialVfxQueues() => new Queue(); public List GetVfxList() => new List(); + public static void CheckAndAddEffectVfxList(VfxBase vfx, List effectVfxList) { } public virtual void Update(float dt) { } public virtual void Cancel() { } public void Dispose() { } diff --git a/SVSim.BattleEngine/Shim/View/ViewUiTouchStubs.cs b/SVSim.BattleEngine/Shim/View/ViewUiTouchStubs.cs index a15d0d6..6787548 100644 --- a/SVSim.BattleEngine/Shim/View/ViewUiTouchStubs.cs +++ b/SVSim.BattleEngine/Shim/View/ViewUiTouchStubs.cs @@ -11,6 +11,9 @@ namespace Wizard.Battle.View public partial class BattleCardView { // BuildInfo (14-arg ctor + members) provided by Generated/BattleCardView_BuildInfo.g.cs + // Parameterless ctor lets the no-op subclass hand stubs (ClassBattleCardViewBase, + // NullBattleCardView) and any non-chaining stub satisfy their implicit base() call. + public BattleCardView() { } public BattleCardView(BuildInfo buildInfo) { } // AttackTargetSelectInfo provided by Generated/BattleCardView_AttackTargetSelectInfo.g.cs public virtual UnityEngine.GameObject GameObject { get; protected set; }